Home | History | Annotate | Download | only in pending

Lines Matching refs:netmask

9  * route add -net target 10.0.0.0 netmask 255.0.0.0 dev eth0
11 * delete net route, must match netmask, informative error message
13 * mod dyn reinstate metric netmask gw mss window irtt dev
29 interface's address and netmask, so the most common use of this command
44 netmask - old way of saying things like ADDR/24
189 * used to get the params like: metric, netmask, gw, mss, window, irtt, dev and their values.
192 static void get_next_params(char **argv, struct rtentry *rt, char **netmask)
205 else if (!strcmp(*argv, "netmask")) {
206 //when adding a network route, the netmask to be used.
210 if (addr_mask) help_exit("dup netmask");
211 *netmask = *argv;
212 get_hostname(*netmask, (struct sockaddr_in *) &sock);
240 // verify the netmask and conflict in netmask and route address.
241 static void verify_netmask(struct rtentry *rt, char *netmask)
249 perror_exit("conflicting netmask and host route");
250 if (addr_mask & (addr_mask + 1)) perror_exit("wrong netmask '%s'", netmask);
252 if (addr_mask & router_addr) perror_exit("conflicting netmask and route address");
260 char *netmask, *targetip;
272 netmask = strchr(targetip, '/');
273 if (netmask) {
274 *netmask++ = 0;
275 //used to verify the netmask and route conflict.
277 = htonl((1<<(32-atolx_range(netmask, 0, 32)))-1);
279 netmask = 0;
280 } else netmask = "default";
287 get_next_params(argv, &rt, (char **)&netmask);
288 verify_netmask(&rt, (char *)netmask);