Lines Matching refs:s_addr
146 subnet_addr.s_addr = override.s_addr = 0; in dhcp_reply()
184 mess->ciaddr.s_addr = 0; in dhcp_reply()
236 … if (subnet_addr.s_addr == 0 && (opt = option_find(mess, sz, OPTION_SUBNET_SELECT, INADDRSZ))) in dhcp_reply()
274 if (mess->giaddr.s_addr || subnet_addr.s_addr || mess->ciaddr.s_addr) { in dhcp_reply()
279 if (subnet_addr.s_addr) { in dhcp_reply()
282 } else if (mess->giaddr.s_addr) { in dhcp_reply()
289 if (context_tmp->netmask.s_addr && in dhcp_reply()
299 if (context_tmp->netmask.s_addr && in dhcp_reply()
666 mess->ciaddr.s_addr = 0; in dhcp_reply()
667 if (service->server.s_addr != 0) in dhcp_reply()
674 option_put(mess, end, OPTION_SERVER_IDENTIFIER, INADDRSZ, htonl(context->local.s_addr)); in dhcp_reply()
699 mess->yiaddr.s_addr = 0; in dhcp_reply()
700 if (mess_type == DHCPDISCOVER || mess->ciaddr.s_addr == 0) { in dhcp_reply()
701 mess->ciaddr.s_addr = 0; in dhcp_reply()
710 if (boot->next_server.s_addr) mess->siaddr = boot->next_server; in dhcp_reply()
718 htonl(context->local.s_addr)); in dhcp_reply()
743 option_addr(opt).s_addr != server_id(context, override, fallback).s_addr) in dhcp_reply()
754 if (lease && lease->addr.s_addr == option_addr(opt).s_addr) lease_prune(lease, now); in dhcp_reply()
756 … if (have_config(config, CONFIG_ADDR) && config->addr.s_addr == option_addr(opt).s_addr) { in dhcp_reply()
771 option_addr(opt).s_addr != server_id(context, override, fallback).s_addr) in dhcp_reply()
774 if (lease && lease->addr.s_addr == mess->ciaddr.s_addr) in dhcp_reply()
790 addr.s_addr = conf.s_addr = 0; in dhcp_reply()
810 if (context->router.s_addr == config->addr.s_addr) break; in dhcp_reply()
827 if (conf.s_addr) in dhcp_reply()
858 ntohl(server_id(context, override, fallback).s_addr)); in dhcp_reply()
883 if (override.s_addr != 0) { in dhcp_reply()
884 if (option_addr(opt).s_addr != override.s_addr) return 0; in dhcp_reply()
887 if (context->local.s_addr == option_addr(opt).s_addr) break; in dhcp_reply()
899 if (lease && lease->addr.s_addr != mess->yiaddr.s_addr) { in dhcp_reply()
907 if (lease && lease->addr.s_addr != mess->yiaddr.s_addr) { in dhcp_reply()
920 if ((lease && mess->ciaddr.s_addr != lease->addr.s_addr) || in dhcp_reply()
939 if (context->router.s_addr == config->addr.s_addr) break; in dhcp_reply()
951 config->addr.s_addr != mess->yiaddr.s_addr)) in dhcp_reply()
960 config->addr.s_addr != mess->yiaddr.s_addr && in dhcp_reply()
998 mess->yiaddr.s_addr = 0; in dhcp_reply()
1002 ntohl(server_id(context, override, fallback).s_addr)); in dhcp_reply()
1006 if (!unicast_dest || mess->giaddr.s_addr != 0 || mess->ciaddr.s_addr == 0 || in dhcp_reply()
1009 mess->ciaddr.s_addr = 0; in dhcp_reply()
1013 if (mess->giaddr.s_addr) lease->giaddr = mess->giaddr; in dhcp_reply()
1076 if (override.s_addr != 0) in dhcp_reply()
1087 ntohl(server_id(context, override, fallback).s_addr)); in dhcp_reply()
1105 if (message || mess->ciaddr.s_addr == 0) return 0; in dhcp_reply()
1125 if (override.s_addr != 0) in dhcp_reply()
1134 ntohl(server_id(context, override, fallback).s_addr)); in dhcp_reply()
1201 if (override.s_addr != 0) in server_id()
1407 if (mess->siaddr.s_addr != 0) in dhcp_packet_size()
1508 if (a->s_addr == 0) in do_opt()
1671 if (service->server.s_addr != 0) { in pxe_opts()
1679 memcpy(q, &service->server.s_addr, INADDRSZ); in pxe_opts()
1731 mess->siaddr.s_addr = 0; in clear_packet()
1802 if (boot->next_server.s_addr) mess->siaddr = boot->next_server; in do_options()
1823 mess->siaddr.s_addr = ((struct in_addr*) opt->val)->s_addr; in do_options()
1842 if (subnet_addr.s_addr) in do_options()
1843 option_put(mess, end, OPTION_SUBNET_SELECT, INADDRSZ, ntohl(subnet_addr.s_addr)); in do_options()
1848 option_put(mess, end, OPTION_NETMASK, INADDRSZ, ntohl(context->netmask.s_addr)); in do_options()
1852 if (context->broadcast.s_addr && !option_find2(netid, config_opts, OPTION_BROADCAST)) in do_options()
1853 option_put(mess, end, OPTION_BROADCAST, INADDRSZ, ntohl(context->broadcast.s_addr)); in do_options()
1857 if (context->router.s_addr && in_list(req_options, OPTION_ROUTER) && in do_options()
1859 option_put(mess, end, OPTION_ROUTER, INADDRSZ, ntohl(context->router.s_addr)); in do_options()
1863 option_put(mess, end, OPTION_DNSSERVER, INADDRSZ, ntohl(context->local.s_addr)); in do_options()