Lines Matching refs:ifp
214 const struct interface *ifp; in dhcpcd_oneup() local
216 TAILQ_FOREACH(ifp, ctx->ifaces, next) { in dhcpcd_oneup()
217 if (D_STATE_RUNNING(ifp) || in dhcpcd_oneup()
218 RS_STATE_RUNNING(ifp) || in dhcpcd_oneup()
219 D6_STATE_RUNNING(ifp)) in dhcpcd_oneup()
323 dhcpcd_drop(struct interface *ifp, int stop) in dhcpcd_drop() argument
326 dhcp6_drop(ifp, stop ? NULL : "EXPIRE6"); in dhcpcd_drop()
327 ipv6nd_drop(ifp); in dhcpcd_drop()
328 ipv6_drop(ifp); in dhcpcd_drop()
329 dhcp_drop(ifp, stop ? "STOP" : "EXPIRE"); in dhcpcd_drop()
330 arp_close(ifp); in dhcpcd_drop()
334 stop_interface(struct interface *ifp) in stop_interface() argument
338 ctx = ifp->ctx; in stop_interface()
339 logger(ctx, LOG_INFO, "%s: removing interface", ifp->name); in stop_interface()
340 ifp->options->options |= DHCPCD_STOPPING; in stop_interface()
342 dhcpcd_drop(ifp, 1); in stop_interface()
343 if (ifp->options->options & DHCPCD_DEPARTED) in stop_interface()
344 script_runreason(ifp, "DEPARTED"); in stop_interface()
346 script_runreason(ifp, "STOPPED"); in stop_interface()
349 eloop_q_timeout_delete(ctx->eloop, 0, NULL, ifp); in stop_interface()
352 TAILQ_REMOVE(ifp->ctx->ifaces, ifp, next); in stop_interface()
353 if_free(ifp); in stop_interface()
360 configure_interface1(struct interface *ifp) in configure_interface1() argument
362 struct if_options *ifo = ifp->options; in configure_interface1()
369 if_conf(ifp); in configure_interface1()
376 if (ifp->flags & IFF_POINTOPOINT && !(ifo->options & DHCPCD_INFORM)) in configure_interface1()
378 if (ifp->flags & IFF_NOARP || in configure_interface1()
381 if (ifp->flags & (IFF_POINTOPOINT | IFF_LOOPBACK) || in configure_interface1()
382 !(ifp->flags & IFF_MULTICAST)) in configure_interface1()
386 ifp->metric = (unsigned int)ifo->metric; in configure_interface1()
395 !(ifp->ctx->options & (DHCPCD_DUMPLEASE | DHCPCD_TEST))) in configure_interface1()
399 if (ifp->options->options & DHCPCD_PFXDLGONLY) in configure_interface1()
400 ifp->options->options &= ~(DHCPCD_IPV4 | DHCPCD_IPV6RS); in configure_interface1()
404 !(ifp->ctx->options & DHCPCD_DUMPLEASE)) in configure_interface1()
409 ra_global = if_checkipv6(ifp->ctx, NULL, in configure_interface1()
410 ifp->ctx->options & DHCPCD_IPV6RA_OWN ? 1 : 0); in configure_interface1()
411 ra_iface = if_checkipv6(ifp->ctx, ifp, in configure_interface1()
412 ifp->options->options & DHCPCD_IPV6RA_OWN ? 1 : 0); in configure_interface1()
416 !(ifp->ctx->options & DHCPCD_TEST)) in configure_interface1()
425 if (ifp->hwlen > DHCP_CHADDR_LEN) in configure_interface1()
427 else if (ifp->hwlen == 0 && !(ifo->options & DHCPCD_CLIENTID)) in configure_interface1()
432 switch (ifp->family) { in configure_interface1()
475 if (ifp->hwlen >= sizeof(ifo->iaid)) in configure_interface1()
477 ifp->hwaddr + ifp->hwlen - sizeof(ifo->iaid), in configure_interface1()
482 len = (uint32_t)strlen(ifp->name); in configure_interface1()
484 memcpy(ifo->iaid, ifp->name, len); in configure_interface1()
490 len = htonl(ifp->index); in configure_interface1()
499 ifp->name[0] != '\0') in configure_interface1()
503 logger(ifp->ctx, LOG_ERR, "%s: %m", __func__); in configure_interface1()
529 dhcpcd_selectprofile(struct interface *ifp, const char *profile) in dhcpcd_selectprofile() argument
534 if (ifp->ssid_len) { in dhcpcd_selectprofile()
538 ifp->ssid, ifp->ssid_len); in dhcpcd_selectprofile()
540 logger(ifp->ctx, LOG_ERR, in dhcpcd_selectprofile()
541 "%s: %s: %m", ifp->name, __func__); in dhcpcd_selectprofile()
546 ifo = read_config(ifp->ctx, ifp->name, pssid, profile); in dhcpcd_selectprofile()
548 logger(ifp->ctx, LOG_DEBUG, "%s: no profile %s", in dhcpcd_selectprofile()
549 ifp->name, profile); in dhcpcd_selectprofile()
553 strlcpy(ifp->profile, profile, sizeof(ifp->profile)); in dhcpcd_selectprofile()
554 logger(ifp->ctx, LOG_INFO, "%s: selected profile %s", in dhcpcd_selectprofile()
555 ifp->name, profile); in dhcpcd_selectprofile()
557 *ifp->profile = '\0'; in dhcpcd_selectprofile()
559 free_options(ifp->options); in dhcpcd_selectprofile()
560 ifp->options = ifo; in dhcpcd_selectprofile()
562 configure_interface1(ifp); in dhcpcd_selectprofile()
567 configure_interface(struct interface *ifp, int argc, char **argv, in configure_interface() argument
572 old = ifp->options ? ifp->options->mtime : 0; in configure_interface()
573 dhcpcd_selectprofile(ifp, NULL); in configure_interface()
574 add_options(ifp->ctx, ifp->name, ifp->options, argc, argv); in configure_interface()
575 ifp->options->options |= options; in configure_interface()
576 configure_interface1(ifp); in configure_interface()
579 if (ifp->options && old != 0 && ifp->options->mtime != old) { in configure_interface()
580 logger(ifp->ctx, LOG_WARNING, in configure_interface()
581 "%s: confile file changed, expiring leases", ifp->name); in configure_interface()
582 dhcpcd_drop(ifp, 0); in configure_interface()
589 struct interface *ifp = arg; in dhcpcd_pollup() local
592 carrier = if_carrier(ifp); /* will set ifp->flags */ in dhcpcd_pollup()
593 if (carrier == LINK_UP && !(ifp->flags & IFF_UP)) { in dhcpcd_pollup()
598 eloop_timeout_add_tv(ifp->ctx->eloop, &tv, dhcpcd_pollup, ifp); in dhcpcd_pollup()
602 dhcpcd_handlecarrier(ifp->ctx, carrier, ifp->flags, ifp->name); in dhcpcd_pollup()
609 struct interface *ifp; in dhcpcd_handlecarrier() local
611 ifp = if_find(ctx->ifaces, ifname); in dhcpcd_handlecarrier()
612 if (ifp == NULL || !(ifp->options->options & DHCPCD_LINK)) in dhcpcd_handlecarrier()
617 carrier = if_carrier(ifp); /* will set ifp->flags */ in dhcpcd_handlecarrier()
622 ifp->flags = flags; in dhcpcd_handlecarrier()
626 dhcpcd_pollup(ifp); in dhcpcd_handlecarrier()
631 ifp->flags = flags; in dhcpcd_handlecarrier()
636 eloop_timeout_delete(ifp->ctx->eloop, dhcpcd_pollup, ifp); in dhcpcd_handlecarrier()
641 } else if (carrier == LINK_DOWN || (ifp->flags & IFF_UP) == 0) { in dhcpcd_handlecarrier()
642 if (ifp->carrier != LINK_DOWN) { in dhcpcd_handlecarrier()
643 if (ifp->carrier == LINK_UP) in dhcpcd_handlecarrier()
645 ifp->name); in dhcpcd_handlecarrier()
646 ifp->carrier = LINK_DOWN; in dhcpcd_handlecarrier()
647 script_runreason(ifp, "NOCARRIER"); in dhcpcd_handlecarrier()
649 arp_close(ifp); in dhcpcd_handlecarrier()
650 ipv4_buildroutes(ifp->ctx); in dhcpcd_handlecarrier()
651 ipv6nd_expire(ifp, 0); in dhcpcd_handlecarrier()
653 dhcpcd_drop(ifp, 0); in dhcpcd_handlecarrier()
656 } else if (carrier == LINK_UP && ifp->flags & IFF_UP) { in dhcpcd_handlecarrier()
657 if (ifp->carrier != LINK_UP) { in dhcpcd_handlecarrier()
659 ifp->name); in dhcpcd_handlecarrier()
660 ifp->carrier = LINK_UP; in dhcpcd_handlecarrier()
665 dhcpcd_handleinterface(ctx, 0, ifp->name); in dhcpcd_handlecarrier()
667 if (ifp->wireless) { in dhcpcd_handlecarrier()
672 olen = ifp->ssid_len; in dhcpcd_handlecarrier()
674 memcpy(ossid, ifp->ssid, ifp->ssid_len); in dhcpcd_handlecarrier()
675 if_getssid(ifp); in dhcpcd_handlecarrier()
678 if (ifp->ssid_len != olen || in dhcpcd_handlecarrier()
679 memcmp(ifp->ssid, ossid, ifp->ssid_len)) in dhcpcd_handlecarrier()
680 dhcpcd_drop(ifp, 0); in dhcpcd_handlecarrier()
683 dhcpcd_initstate(ifp, 0); in dhcpcd_handlecarrier()
684 script_runreason(ifp, "CARRIER"); in dhcpcd_handlecarrier()
689 ipv6nd_expire(ifp, RTR_CARRIER_EXPIRE); in dhcpcd_handlecarrier()
692 if (ifp->options->options & DHCPCD_IPV6RA_OWN) in dhcpcd_handlecarrier()
693 ipv6_gentempifid(ifp); in dhcpcd_handlecarrier()
694 dhcpcd_startinterface(ifp); in dhcpcd_handlecarrier()
700 warn_iaid_conflict(struct interface *ifp, uint8_t *iaid) in warn_iaid_conflict() argument
705 TAILQ_FOREACH(ifn, ifp->ctx->ifaces, next) { in warn_iaid_conflict()
706 if (ifn == ifp) in warn_iaid_conflict()
721 if (ifn && strcmp(ifp->name, ifn->name)) in warn_iaid_conflict()
722 logger(ifp->ctx, LOG_ERR, in warn_iaid_conflict()
724 ifp->name, ifn->name); in warn_iaid_conflict()
728 pre_start(struct interface *ifp) in pre_start() argument
735 if (ifp->options->options & DHCPCD_IPV6 && ipv6_start(ifp) == -1) { in pre_start()
736 logger(ifp->ctx, LOG_ERR, "%s: ipv6_start: %m", ifp->name); in pre_start()
737 ifp->options->options &= ~DHCPCD_IPV6; in pre_start()
744 struct interface *ifp = arg; in dhcpcd_startinterface() local
745 struct if_options *ifo = ifp->options; in dhcpcd_startinterface()
752 switch (ifp->carrier) { in dhcpcd_startinterface()
756 logger(ifp->ctx, LOG_INFO, "%s: waiting for carrier", in dhcpcd_startinterface()
757 ifp->name); in dhcpcd_startinterface()
762 if ((carrier = if_carrier(ifp)) == LINK_UNKNOWN) { in dhcpcd_startinterface()
765 eloop_timeout_add_tv(ifp->ctx->eloop, in dhcpcd_startinterface()
766 &tv, dhcpcd_startinterface, ifp); in dhcpcd_startinterface()
768 dhcpcd_handlecarrier(ifp->ctx, carrier, in dhcpcd_startinterface()
769 ifp->flags, ifp->name); in dhcpcd_startinterface()
776 if (ifp->ctx->duid == NULL) { in dhcpcd_startinterface()
777 if (duid_init(ifp) == 0) in dhcpcd_startinterface()
780 logger(ifp->ctx, LOG_INFO, "DUID %s", in dhcpcd_startinterface()
781 hwaddr_ntoa(ifp->ctx->duid, in dhcpcd_startinterface()
782 ifp->ctx->duid_len, in dhcpcd_startinterface()
791 logger(ifp->ctx, LOG_INFO, "%s: IAID %s", ifp->name, in dhcpcd_startinterface()
794 warn_iaid_conflict(ifp, ifo->iaid); in dhcpcd_startinterface()
799 logger(ifp->ctx, LOG_INFO, "%s: IAID %s", in dhcpcd_startinterface()
800 ifp->name, hwaddr_ntoa(ifo->ia[i].iaid, in dhcpcd_startinterface()
803 warn_iaid_conflict(ifp, ifo->ia[i].iaid); in dhcpcd_startinterface()
811 ipv6nd_startrs(ifp); in dhcpcd_startinterface()
814 dhcp6_find_delegates(ifp); in dhcpcd_startinterface()
822 nolease = dhcp6_start(ifp, DH6S_INIT); in dhcpcd_startinterface()
836 nolease = dhcp6_start(ifp, DH6S_INIT); in dhcpcd_startinterface()
840 logger(ifp->ctx, LOG_ERR, in dhcpcd_startinterface()
841 "%s: dhcp6_start: %m", ifp->name); in dhcpcd_startinterface()
846 dhcp_start(ifp); in dhcpcd_startinterface()
852 struct interface *ifp = arg; in dhcpcd_prestartinterface() local
854 pre_start(ifp); in dhcpcd_prestartinterface()
855 if (if_up(ifp) == -1) in dhcpcd_prestartinterface()
856 logger(ifp->ctx, LOG_ERR, "%s: if_up: %m", ifp->name); in dhcpcd_prestartinterface()
858 if (ifp->options->options & DHCPCD_LINK && in dhcpcd_prestartinterface()
859 ifp->carrier == LINK_UNKNOWN) in dhcpcd_prestartinterface()
863 if ((carrier = if_carrier(ifp)) != LINK_UNKNOWN) { in dhcpcd_prestartinterface()
864 dhcpcd_handlecarrier(ifp->ctx, carrier, in dhcpcd_prestartinterface()
865 ifp->flags, ifp->name); in dhcpcd_prestartinterface()
868 logger(ifp->ctx, LOG_INFO, in dhcpcd_prestartinterface()
870 ifp->name); in dhcpcd_prestartinterface()
873 dhcpcd_startinterface(ifp); in dhcpcd_prestartinterface()
891 dhcpcd_initstate1(struct interface *ifp, int argc, char **argv, in dhcpcd_initstate1() argument
896 configure_interface(ifp, argc, argv, options); in dhcpcd_initstate1()
897 ifo = ifp->options; in dhcpcd_initstate1()
899 if (ifo->options & DHCPCD_IPV4 && ipv4_init(ifp->ctx) == -1) { in dhcpcd_initstate1()
900 logger(ifp->ctx, LOG_ERR, "ipv4_init: %m"); in dhcpcd_initstate1()
903 if (ifo->options & DHCPCD_IPV6 && ipv6_init(ifp->ctx) == NULL) { in dhcpcd_initstate1()
904 logger(ifp->ctx, LOG_ERR, "ipv6_init: %m"); in dhcpcd_initstate1()
912 if (ifo->options & DHCPCD_IPV6 && ipv6_start(ifp) == -1) { in dhcpcd_initstate1()
913 logger(ifp->ctx, LOG_ERR, "%s: ipv6_start: %m", ifp->name); in dhcpcd_initstate1()
919 dhcpcd_initstate(struct interface *ifp, unsigned long long options) in dhcpcd_initstate() argument
922 dhcpcd_initstate1(ifp, ifp->ctx->argc, ifp->ctx->argv, options); in dhcpcd_initstate()
926 run_preinit(struct interface *ifp) in run_preinit() argument
929 pre_start(ifp); in run_preinit()
930 if (ifp->ctx->options & DHCPCD_TEST) in run_preinit()
933 script_runreason(ifp, "PREINIT"); in run_preinit()
935 if (ifp->options->options & DHCPCD_LINK && ifp->carrier != LINK_UNKNOWN) in run_preinit()
936 script_runreason(ifp, in run_preinit()
937 ifp->carrier == LINK_UP ? "CARRIER" : "NOCARRIER"); in run_preinit()
945 struct interface *ifp, *iff, *ifn; in dhcpcd_handleinterface() local
951 ifp = if_find(ctx->ifaces, ifname); in dhcpcd_handleinterface()
952 if (ifp == NULL) { in dhcpcd_handleinterface()
956 logger(ctx, LOG_DEBUG, "%s: interface departed", ifp->name); in dhcpcd_handleinterface()
957 ifp->options->options |= DHCPCD_DEPARTED; in dhcpcd_handleinterface()
958 stop_interface(ifp); in dhcpcd_handleinterface()
977 TAILQ_FOREACH_SAFE(ifp, ifs, next, ifn) { in dhcpcd_handleinterface()
978 if (strcmp(ifp->name, ifname) != 0) in dhcpcd_handleinterface()
982 iff = if_find(ctx->ifaces, ifp->name); in dhcpcd_handleinterface()
986 iff->flags = ifp->flags; in dhcpcd_handleinterface()
987 iff->hwlen = ifp->hwlen; in dhcpcd_handleinterface()
988 if (ifp->hwlen != 0) in dhcpcd_handleinterface()
989 memcpy(iff->hwaddr, ifp->hwaddr, iff->hwlen); in dhcpcd_handleinterface()
991 logger(ctx, LOG_DEBUG, "%s: interface added", ifp->name); in dhcpcd_handleinterface()
992 TAILQ_REMOVE(ifs, ifp, next); in dhcpcd_handleinterface()
993 TAILQ_INSERT_TAIL(ctx->ifaces, ifp, next); in dhcpcd_handleinterface()
994 dhcpcd_initstate(ifp, 0); in dhcpcd_handleinterface()
995 run_preinit(ifp); in dhcpcd_handleinterface()
996 iff = ifp; in dhcpcd_handleinterface()
1003 while ((ifp = TAILQ_FIRST(ifs))) { in dhcpcd_handleinterface()
1004 TAILQ_REMOVE(ifs, ifp, next); in dhcpcd_handleinterface()
1005 if_free(ifp); in dhcpcd_handleinterface()
1018 struct interface *ifp; in dhcpcd_handlehwaddr() local
1019 char buf[sizeof(ifp->hwaddr) * 3]; in dhcpcd_handlehwaddr()
1021 ifp = if_find(ctx->ifaces, ifname); in dhcpcd_handlehwaddr()
1022 if (ifp == NULL) in dhcpcd_handlehwaddr()
1025 if (hwlen > sizeof(ifp->hwaddr)) { in dhcpcd_handlehwaddr()
1027 logger(ctx, LOG_ERR, "%s: %s: %m", ifp->name, __func__); in dhcpcd_handlehwaddr()
1031 if (ifp->hwlen == hwlen && memcmp(ifp->hwaddr, hwaddr, hwlen) == 0) in dhcpcd_handlehwaddr()
1034 logger(ctx, LOG_INFO, "%s: new hardware address: %s", ifp->name, in dhcpcd_handlehwaddr()
1036 ifp->hwlen = hwlen; in dhcpcd_handlehwaddr()
1037 memcpy(ifp->hwaddr, hwaddr, hwlen); in dhcpcd_handlehwaddr()
1043 struct interface *ifp; in dhcpcd_start_interface() local
1044 ifp = if_find(ctx->ifaces, ifname); in dhcpcd_start_interface()
1045 if (ifp == NULL) in dhcpcd_start_interface()
1051 dhcpcd_startinterface(ifp); in dhcpcd_start_interface()
1057 struct interface *ifp; in dhcpcd_stop_interface() local
1058 ifp = if_find(ctx->ifaces, ifname); in dhcpcd_stop_interface()
1059 if (ifp == NULL) in dhcpcd_stop_interface()
1065 stop_interface(ifp); in dhcpcd_stop_interface()
1071 struct interface *ifp; in dhcpcd_stop_interfaces() local
1072 TAILQ_FOREACH(ifp, ctx->ifaces, next) { in dhcpcd_stop_interfaces()
1073 stop_interface(ifp); in dhcpcd_stop_interfaces()
1080 struct interface *ifp; in dhcpcd_release_ipv4() local
1082 ifp = if_find(ctx->ifaces, ifname); in dhcpcd_release_ipv4()
1083 if (ifp == NULL) in dhcpcd_release_ipv4()
1089 dhcp_drop(ifp, "RELEASE"); in dhcpcd_release_ipv4()
1093 if_reboot(struct interface *ifp, int argc, char **argv) in if_reboot() argument
1097 oldopts = ifp->options->options; in if_reboot()
1098 script_runreason(ifp, "RECONFIGURE"); in if_reboot()
1099 dhcpcd_initstate1(ifp, argc, argv, 0); in if_reboot()
1100 dhcp_reboot_newopts(ifp, oldopts); in if_reboot()
1101 dhcp6_reboot(ifp); in if_reboot()
1102 dhcpcd_prestartinterface(ifp); in if_reboot()
1126 struct interface *ifn, *ifp; in reconf_reboot() local
1134 while ((ifp = TAILQ_FIRST(ifs))) { in reconf_reboot()
1135 TAILQ_REMOVE(ifs, ifp, next); in reconf_reboot()
1136 ifn = if_find(ctx->ifaces, ifp->name); in reconf_reboot()
1142 if_free(ifp); in reconf_reboot()
1144 TAILQ_INSERT_TAIL(ctx->ifaces, ifp, next); in reconf_reboot()
1145 dhcpcd_initstate1(ifp, argc, argv, 0); in reconf_reboot()
1146 run_preinit(ifp); in reconf_reboot()
1147 dhcpcd_prestartinterface(ifp); in reconf_reboot()
1156 struct interface *ifp; in stop_all_interfaces() local
1162 TAILQ_FOREACH_REVERSE(ifp, ctx->ifaces, if_head, next) { in stop_all_interfaces()
1163 if (!(ifp->options->options & DHCPCD_PFXDLGONLY)) in stop_all_interfaces()
1166 if (ifp == NULL) in stop_all_interfaces()
1169 ifp->options->options |= DHCPCD_RELEASE; in stop_all_interfaces()
1170 ifp->options->options &= ~DHCPCD_PERSISTENT; in stop_all_interfaces()
1172 ifp->options->options |= DHCPCD_EXITING; in stop_all_interfaces()
1173 stop_interface(ifp); in stop_all_interfaces()
1185 struct interface *ifp; in dhcpcd_handle_signal() local
1215 TAILQ_FOREACH(ifp, ctx->ifaces, next) { in dhcpcd_handle_signal()
1216 ipv4_applyaddr(ifp); in dhcpcd_handle_signal()
1286 struct interface *ifp; in dhcpcd_getinterfaces() local
1290 TAILQ_FOREACH(ifp, fd->ctx->ifaces, next) { in dhcpcd_getinterfaces()
1292 if (D_STATE_RUNNING(ifp)) in dhcpcd_getinterfaces()
1294 if (RS_STATE_RUNNING(ifp)) in dhcpcd_getinterfaces()
1296 if (D6_STATE_RUNNING(ifp)) in dhcpcd_getinterfaces()
1302 TAILQ_FOREACH(ifp, fd->ctx->ifaces, next) { in dhcpcd_getinterfaces()
1303 if (send_interface(fd, ifp) == -1) in dhcpcd_getinterfaces()
1304 logger(ifp->ctx, LOG_ERR, in dhcpcd_getinterfaces()
1313 struct interface *ifp; in dhcpcd_handleargs() local
1389 if ((ifp = if_find(ctx->ifaces, argv[oi])) == NULL) in dhcpcd_handleargs()
1392 ifp->options->options |= DHCPCD_RELEASE; in dhcpcd_handleargs()
1393 ifp->options->options &= ~DHCPCD_PERSISTENT; in dhcpcd_handleargs()
1395 ifp->options->options |= DHCPCD_EXITING; in dhcpcd_handleargs()
1396 stop_interface(ifp); in dhcpcd_handleargs()
1436 struct interface *ifp; in main() local
1668 ifp = TAILQ_FIRST(ctx.ifaces); in main()
1669 if (ifp == NULL) { in main()
1670 ifp = calloc(1, sizeof(*ifp)); in main()
1671 if (ifp == NULL) { in main()
1676 ifp->ctx = &ctx; in main()
1677 TAILQ_INSERT_HEAD(ctx.ifaces, ifp, next); in main()
1685 configure_interface(ifp, ctx.argc, ctx.argv, 0); in main()
1687 ifp->options->options |= DHCPCD_PFXDLGONLY; in main()
1689 if (dhcp_dump(ifp) == -1) in main()
1693 if (dhcp6_dump(ifp) == -1) in main()
1909 TAILQ_FOREACH(ifp, ctx.ifaces, next) { in main()
1910 dhcpcd_initstate1(ifp, argc, argv, 0); in main()
1917 TAILQ_FOREACH(ifp, ctx.ifaces, next) { in main()
1918 run_preinit(ifp); in main()
1919 if (ifp->carrier != LINK_DOWN) in main()
1926 else if ((ifp = TAILQ_FIRST(ctx.ifaces))) in main()
1927 t = ifp->options->timeout; in main()
1950 TAILQ_FOREACH(ifp, ctx.ifaces, next) { in main()
1952 dhcpcd_prestartinterface, ifp); in main()
1968 while ((ifp = TAILQ_FIRST(ctx.ifaces))) { in main()
1969 TAILQ_REMOVE(ctx.ifaces, ifp, next); in main()
1970 if_free(ifp); in main()