Lines Matching refs:ifo
310 struct if_options *ifo = state->options; in send_message() local
345 (!(ifo->options & DHCPCD_INFORM) && is_bootp(iface->state->new))) in send_message()
480 blacklisted_ip(const struct if_options *ifo, in_addr_t addr) in blacklisted_ip() argument
484 for (i = 0; i < ifo->blacklist_len; i += 2) in blacklisted_ip()
485 if (ifo->blacklist[i] == (addr & ifo->blacklist[i + 1])) in blacklisted_ip()
491 whitelisted_ip(const struct if_options *ifo, in_addr_t addr) in whitelisted_ip() argument
495 if (ifo->whitelist_len == 0) in whitelisted_ip()
497 for (i = 0; i < ifo->whitelist_len; i += 2) in whitelisted_ip()
498 if (ifo->whitelist[i] == (addr & ifo->whitelist[i + 1])) in whitelisted_ip()
507 struct if_options *ifo = state->options; in handle_dhcp() local
523 if (has_option_mask(ifo->requiremask, DHO_SERVERID) && in handle_dhcp()
546 if (has_option_mask(ifo->requiremask, i) && in handle_dhcp()
621 if (!(ifo->options & DHCPCD_INFORM)) in handle_dhcp()
641 if (ifo->options & DHCPCD_ARP && in handle_dhcp()
777 struct if_options *ifo = ifs->options; in configure_interface1() local
784 if (iface->flags & IFF_POINTOPOINT && !(ifo->options & DHCPCD_INFORM)) in configure_interface1()
785 ifo->options |= DHCPCD_STATIC; in configure_interface1()
787 ifo->options & (DHCPCD_INFORM | DHCPCD_STATIC)) in configure_interface1()
788 ifo->options &= ~(DHCPCD_ARP | DHCPCD_IPV4LL); in configure_interface1()
790 ifo->options &= ~DHCPCD_IPV6RS; in configure_interface1()
791 if (ifo->options & DHCPCD_LINK && carrier_status(iface) == -1) in configure_interface1()
792 ifo->options &= ~DHCPCD_LINK; in configure_interface1()
794 if (ifo->metric != -1) in configure_interface1()
795 iface->metric = ifo->metric; in configure_interface1()
801 ifo->options |= DHCPCD_CLIENTID; in configure_interface1()
808 ifo->options |= DHCPCD_CLIENTID | DHCPCD_BROADCAST; in configure_interface1()
814 if (*ifo->clientid) { in configure_interface1()
815 iface->clientid = xmalloc(ifo->clientid[0] + 1); in configure_interface1()
816 memcpy(iface->clientid, ifo->clientid, ifo->clientid[0] + 1); in configure_interface1()
817 } else if (ifo->options & DHCPCD_CLIENTID) { in configure_interface1()
818 if (ifo->options & DHCPCD_DUID) { in configure_interface1()
846 if (ifo->options & DHCPCD_CLIENTID) in configure_interface1()
857 struct if_options *ifo; in select_profile() local
861 ifo = read_config(cffile, iface->name, iface->ssid, profile); in select_profile()
862 if (ifo == NULL) { in select_profile()
875 iface->state->options = ifo; in select_profile()
960 struct if_options *ifo = iface->state->options; in start_discover() local
961 int timeout = ifo->timeout; in start_discover()
969 timeout -= ifo->reboot; in start_discover()
977 if (ifo->fallback) in start_discover()
979 else if (ifo->options & DHCPCD_IPV4LL && in start_discover()
987 if (ifo->options & DHCPCD_REQUEST) in start_discover()
989 iface->name, inet_ntoa(ifo->req_addr)); in start_discover()
1061 struct if_options *ifo; in handle_3rdparty() local
1064 ifo = iface->state->options; in handle_3rdparty()
1065 if (ifo->req_addr.s_addr != INADDR_ANY) in handle_3rdparty()
1083 struct if_options *ifo; in start_static() local
1087 ifo = iface->state->options; in start_static()
1089 dhcp_message_new(&ifo->req_addr, &ifo->req_mask); in start_static()
1116 struct if_options *ifo = iface->state->options; in start_reboot() local
1118 if (ifo->options & DHCPCD_LINK && iface->carrier == LINK_DOWN) { in start_reboot()
1122 if (ifo->options & DHCPCD_STATIC) { in start_reboot()
1126 if (ifo->reboot == 0 || iface->state->offer == NULL) { in start_reboot()
1130 if (ifo->options & DHCPCD_INFORM) { in start_reboot()
1134 if (ifo->options & DHCPCD_IPV4LL) { in start_reboot()
1148 if (ifo->fallback) in start_reboot()
1149 add_timeout_sec(ifo->reboot, start_fallback, iface); in start_reboot()
1150 else if (ifo->options & DHCPCD_LASTLEASE && in start_reboot()
1152 add_timeout_sec(ifo->reboot, start_timeout, iface); in start_reboot()
1153 else if (!(ifo->options & DHCPCD_INFORM && in start_reboot()
1155 add_timeout_sec(ifo->reboot, start_expire, iface); in start_reboot()
1157 if (ifo->options & DHCPCD_INFORM) in start_reboot()
1167 struct if_options *ifo = iface->state->options; in start_interface() local
1183 if (options & DHCPCD_IPV6RS && ifo->options & DHCPCD_IPV6RS) { in start_interface()
1187 ifo->options &= ~DHCPCD_IPV6RS; in start_interface()
1190 if (iface->state->arping_index < ifo->arping_len) { in start_interface()
1194 if (ifo->options & DHCPCD_STATIC) { in start_interface()
1198 if (ifo->options & DHCPCD_INFORM) { in start_interface()
1202 if (iface->hwlen == 0 && ifo->clientid[0] == '\0') { in start_interface()
1351 struct if_options *ifo; in handle_hwaddr() local
1355 ifo = ifp->state->options; in handle_hwaddr()
1356 if (!(ifo->options & in handle_hwaddr()
1368 if (!(ifo->options & in handle_hwaddr()
1388 struct if_options *ifo; in handle_ifa() local
1411 ifo = ifp->state->options; in handle_ifa()
1412 if ((ifo->options & (DHCPCD_INFORM | DHCPCD_STATIC)) == 0 || in handle_ifa()
1413 ifo->req_addr.s_addr != INADDR_ANY) in handle_ifa()
1422 if (i != DHO_ROUTER && has_option_mask(ifo->dstmask,i)) in handle_ifa()
1428 if (ifo->options & DHCPCD_INFORM) { in handle_ifa()
1450 const struct if_options *ifo; in if_reboot() local
1453 ifo = iface->state->options; in if_reboot()
1454 opt = ifo->options; in if_reboot()
1456 ifo = iface->state->options; in if_reboot()
1458 if ((ifo->options & (DHCPCD_INFORM | DHCPCD_STATIC) && in if_reboot()
1459 iface->addr.s_addr != ifo->req_addr.s_addr) || in if_reboot()
1461 !(ifo->options & (DHCPCD_INFORM | DHCPCD_STATIC)))) in if_reboot()
1512 struct if_options *ifo; in handle_signal() local
1542 ifo = read_config(cffile, NULL, NULL, NULL); in handle_signal()
1543 add_options(ifo, margc, margv); in handle_signal()
1546 ifo->options |= DHCPCD_MASTER; in handle_signal()
1548 ifo->options |= DHCPCD_DAEMONISED; in handle_signal()
1549 options = ifo->options; in handle_signal()
1550 free_options(ifo); in handle_signal()