Lines Matching refs:ifo

362 	struct if_options *ifo = ifp->options;  in configure_interface1()  local
373 if (ifo->options & DHCPCD_RELEASE) in configure_interface1()
374 ifo->options &= ~DHCPCD_PERSISTENT; in configure_interface1()
376 if (ifp->flags & IFF_POINTOPOINT && !(ifo->options & DHCPCD_INFORM)) in configure_interface1()
377 ifo->options |= DHCPCD_STATIC; in configure_interface1()
379 ifo->options & (DHCPCD_INFORM | DHCPCD_STATIC)) in configure_interface1()
380 ifo->options &= ~(DHCPCD_ARP | DHCPCD_IPV4LL); in configure_interface1()
383 ifo->options &= ~DHCPCD_IPV6RS; in configure_interface1()
385 if (ifo->metric != -1) in configure_interface1()
386 ifp->metric = (unsigned int)ifo->metric; in configure_interface1()
388 if (!(ifo->options & DHCPCD_IPV4)) in configure_interface1()
389 ifo->options &= ~(DHCPCD_DHCP | DHCPCD_IPV4LL); in configure_interface1()
391 if (!(ifo->options & DHCPCD_IPV6)) in configure_interface1()
392 ifo->options &= ~(DHCPCD_IPV6RS | DHCPCD_DHCP6); in configure_interface1()
394 if (ifo->options & DHCPCD_SLAACPRIVATE && in configure_interface1()
396 ifo->options |= DHCPCD_IPV6RA_OWN; in configure_interface1()
403 if (ifo->options & DHCPCD_IPV6RS && in configure_interface1()
407 if (!(ifo->options & (DHCPCD_DHCP | DHCPCD_DHCP6))) in configure_interface1()
408 ifo->options &= ~DHCPCD_IPV6RA_REQRDNSS; in configure_interface1()
414 ifo->options &= ~DHCPCD_IPV6RS; in configure_interface1()
417 ifo->options |= DHCPCD_IPV6RA_OWN; in configure_interface1()
426 ifo->options |= DHCPCD_CLIENTID; in configure_interface1()
427 else if (ifp->hwlen == 0 && !(ifo->options & DHCPCD_CLIENTID)) in configure_interface1()
428 ifo->options |= DHCPCD_CLIENTID | DHCPCD_DUID; in configure_interface1()
435 ifo->options |= DHCPCD_CLIENTID | DHCPCD_BROADCAST; in configure_interface1()
439 if (!(ifo->options & DHCPCD_IAID)) { in configure_interface1()
475 if (ifp->hwlen >= sizeof(ifo->iaid)) in configure_interface1()
476 memcpy(ifo->iaid, in configure_interface1()
477 ifp->hwaddr + ifp->hwlen - sizeof(ifo->iaid), in configure_interface1()
478 sizeof(ifo->iaid)); in configure_interface1()
483 if (len <= sizeof(ifo->iaid)) { in configure_interface1()
484 memcpy(ifo->iaid, ifp->name, len); in configure_interface1()
485 if (len < sizeof(ifo->iaid)) in configure_interface1()
486 memset(ifo->iaid + len, 0, in configure_interface1()
487 sizeof(ifo->iaid) - len); in configure_interface1()
491 memcpy(ifo->iaid, &len, sizeof(len)); in configure_interface1()
494 ifo->options |= DHCPCD_IAID; in configure_interface1()
498 if (ifo->ia_len == 0 && ifo->options & DHCPCD_IPV6 && in configure_interface1()
501 ifo->ia = malloc(sizeof(*ifo->ia)); in configure_interface1()
502 if (ifo->ia == NULL) in configure_interface1()
505 ifo->ia_len = 1; in configure_interface1()
506 ifo->ia->ia_type = D6_OPTION_IA_NA; in configure_interface1()
507 memcpy(ifo->ia->iaid, ifo->iaid, sizeof(ifo->iaid)); in configure_interface1()
508 memset(&ifo->ia->addr, 0, sizeof(ifo->ia->addr)); in configure_interface1()
509 ifo->ia->sla = NULL; in configure_interface1()
510 ifo->ia->sla_len = 0; in configure_interface1()
513 for (i = 0; i < ifo->ia_len; i++) { in configure_interface1()
514 if (!ifo->ia[i].iaid_set) { in configure_interface1()
515 memcpy(&ifo->ia[i].iaid, ifo->iaid, in configure_interface1()
516 sizeof(ifo->ia[i].iaid)); in configure_interface1()
517 ifo->ia[i].iaid_set = 1; in configure_interface1()
524 if (!(ifo->auth.options & DHCPCD_AUTH_SEND)) in configure_interface1()
525 ifo->auth.options &= ~DHCPCD_AUTH_REQUIRE; in configure_interface1()
531 struct if_options *ifo; in dhcpcd_selectprofile() local
546 ifo = read_config(ifp->ctx, ifp->name, pssid, profile); in dhcpcd_selectprofile()
547 if (ifo == NULL) { in dhcpcd_selectprofile()
560 ifp->options = ifo; in dhcpcd_selectprofile()
745 struct if_options *ifo = ifp->options; in dhcpcd_startinterface() local
751 if (ifo->options & DHCPCD_LINK) { in dhcpcd_startinterface()
774 if (ifo->options & (DHCPCD_DUID | DHCPCD_IPV6)) { in dhcpcd_startinterface()
779 if (!(ifo->options & DHCPCD_PFXDLGONLY)) in dhcpcd_startinterface()
787 if (ifo->options & (DHCPCD_DUID | DHCPCD_IPV6) && in dhcpcd_startinterface()
788 !(ifo->options & DHCPCD_PFXDLGONLY)) in dhcpcd_startinterface()
792 hwaddr_ntoa(ifo->iaid, sizeof(ifo->iaid), in dhcpcd_startinterface()
794 warn_iaid_conflict(ifp, ifo->iaid); in dhcpcd_startinterface()
795 for (i = 0; i < ifo->ia_len; i++) { in dhcpcd_startinterface()
796 if (memcmp(ifo->iaid, ifo->ia[i].iaid, in dhcpcd_startinterface()
797 sizeof(ifo->iaid))) in dhcpcd_startinterface()
800 ifp->name, hwaddr_ntoa(ifo->ia[i].iaid, in dhcpcd_startinterface()
801 sizeof(ifo->ia[i].iaid), in dhcpcd_startinterface()
803 warn_iaid_conflict(ifp, ifo->ia[i].iaid); in dhcpcd_startinterface()
808 if (ifo->options & DHCPCD_IPV6) { in dhcpcd_startinterface()
809 if (ifo->options & DHCPCD_IPV6RS && in dhcpcd_startinterface()
810 !(ifo->options & DHCPCD_INFORM)) in dhcpcd_startinterface()
813 if (ifo->options & DHCPCD_DHCP6) in dhcpcd_startinterface()
816 if (!(ifo->options & DHCPCD_IPV6RS) || in dhcpcd_startinterface()
817 ifo->options & DHCPCD_IA_FORCED) in dhcpcd_startinterface()
821 if (ifo->options & DHCPCD_IA_FORCED) in dhcpcd_startinterface()
845 if (ifo->options & DHCPCD_IPV4) in dhcpcd_startinterface()
894 struct if_options *ifo; in dhcpcd_initstate1() local
897 ifo = ifp->options; in dhcpcd_initstate1()
899 if (ifo->options & DHCPCD_IPV4 && ipv4_init(ifp->ctx) == -1) { in dhcpcd_initstate1()
901 ifo->options &= ~DHCPCD_IPV4; in dhcpcd_initstate1()
903 if (ifo->options & DHCPCD_IPV6 && ipv6_init(ifp->ctx) == NULL) { in dhcpcd_initstate1()
905 ifo->options &= ~DHCPCD_IPV6RS; in dhcpcd_initstate1()
912 if (ifo->options & DHCPCD_IPV6 && ipv6_start(ifp) == -1) { in dhcpcd_initstate1()
914 ifo->options &= ~DHCPCD_IPV6; in dhcpcd_initstate1()
1108 struct if_options *ifo; in reload_config() local
1111 ifo = read_config(ctx, NULL, NULL, NULL); in reload_config()
1112 add_options(ctx, NULL, ifo, ctx->argc, ctx->argv); in reload_config()
1115 ifo->options |= DHCPCD_MASTER; in reload_config()
1117 ifo->options |= DHCPCD_DAEMONISED; in reload_config()
1118 ctx->options = ifo->options; in reload_config()
1119 free_options(ifo); in reload_config()
1435 struct if_options *ifo; in main() local
1477 ifo = NULL; in main()
1546 ifo = read_config(&ctx, NULL, NULL, NULL); in main()
1547 if (ifo == NULL) in main()
1549 opt = add_options(&ctx, NULL, ifo, argc, argv); in main()
1558 free_options(ifo); in main()
1559 ifo = read_config(&ctx, argv[optind], NULL, NULL); in main()
1560 if (ifo == NULL) in main()
1562 add_options(&ctx, NULL, ifo, argc, argv); in main()
1569 ifo->dhcp_override, ifo->dhcp_override_len); in main()
1576 ifo->dhcp6_override, ifo->dhcp6_override_len); in main()
1581 ctx.options = ifo->options; in main()
1925 t = ifo->timeout; in main()
1946 free_options(ifo); in main()
1947 ifo = NULL; in main()
1980 free_options(ifo); in main()