Lines Matching defs:netmask
10 * route add -net target 10.0.0.0 netmask 255.0.0.0 dev eth0
12 * delete net route, must match netmask, informative error message
14 * mod dyn reinstate metric netmask gw mss window irtt dev
30 interface's address and netmask, so the most common use of this command
45 netmask - old way of saying things like ADDR/24
188 * used to get the params like: metric, netmask, gw, mss, window, irtt, dev and their values.
191 static void get_next_params(char **argv, struct rtentry *rt, char **netmask)
204 else if (!strcmp(*argv, "netmask")) {
205 //when adding a network route, the netmask to be used.
209 if (addr_mask) help_exit("dup netmask");
210 *netmask = argv[1];
211 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);