Home | History | Annotate | Download | only in src

Lines Matching refs:netmask

27 static int complete_context(struct in_addr local, int if_index, struct in_addr netmask,
262 /* This is a complex routine: it gets called with each (address,netmask,broadcast) triple
266 2) Fills in any netmask and broadcast addresses which have not been explicitly configured.
274 static int complete_context(struct in_addr local, int if_index, struct in_addr netmask,
280 if (!(context->flags & CONTEXT_NETMASK) && (is_same_net(local, context->start, netmask) ||
281 is_same_net(local, context->end, netmask))) {
282 if (context->netmask.s_addr != netmask.s_addr &&
283 !(is_same_net(local, context->start, netmask) &&
284 is_same_net(local, context->end, netmask))) {
288 _("DHCP range %s -- %s is not consistent with netmask %s"),
289 daemon->dhcp_buff, daemon->dhcp_buff2, inet_ntoa(netmask));
291 context->netmask = netmask;
294 if (context->netmask.s_addr) {
295 if (is_same_net(local, context->start, context->netmask) &&
296 is_same_net(local, context->end, context->netmask)) {
306 if (is_same_net(broadcast, context->start, context->netmask))
309 context->broadcast.s_addr = context->start.s_addr | ~context->netmask.s_addr;
312 is_same_net(param->relay, context->start, context->netmask)) {
317 context->broadcast.s_addr = context->start.s_addr | ~context->netmask.s_addr;
363 if (is_same_net(taddr, tmp->start, tmp->netmask) && (tmp->flags & CONTEXT_STATIC))
368 if (is_same_net(taddr, tmp->start, tmp->netmask)) break;
502 if (is_same_net(config->addr, context->start, context->netmask)) return 1;