• Home
  • Raw
  • Download

Lines Matching refs:ifp

380     const struct interface *ifp,  in ipv6_makestableprivate()  argument
391 ifp->hwaddr, ifp->hwlen, in ipv6_makestableprivate()
392 ifp->ssid, ifp->ssid_len, in ipv6_makestableprivate()
394 ifp->ctx->secret, ifp->ctx->secret_len); in ipv6_makestableprivate()
402 ipv6_makeaddr(struct in6_addr *addr, const struct interface *ifp, in ipv6_makeaddr() argument
413 if (ifp->options->options & DHCPCD_SLAACPRIVATE) { in ipv6_makeaddr()
414 if (ifp->ctx->secret_len == 0) { in ipv6_makeaddr()
415 if (ipv6_readsecret(ifp->ctx) == -1) in ipv6_makeaddr()
420 prefix, prefix_len, ifp, &dad) == -1) in ipv6_makeaddr()
429 if ((ap = ipv6_linklocal(ifp)) == NULL) { in ipv6_makeaddr()
637 struct interface *ifp; in ipv6_addaddr() local
643 TAILQ_FOREACH(ifp, ap->iface->ctx->ifaces, next) { in ipv6_addaddr()
644 if (ifp == ap->iface || strcmp(ifp->name, ap->iface->name) == 0) in ipv6_addaddr()
646 state = IPV6_STATE(ifp); in ipv6_addaddr()
891 ipv6_getstate(struct interface *ifp) in ipv6_getstate() argument
895 state = IPV6_STATE(ifp); in ipv6_getstate()
897 ifp->if_data[IF_DATA_IPV6] = calloc(1, sizeof(*state)); in ipv6_getstate()
898 state = IPV6_STATE(ifp); in ipv6_getstate()
900 logger(ifp->ctx, LOG_ERR, "%s: %m", __func__); in ipv6_getstate()
907 if (ifp->options && in ipv6_getstate()
908 ifp->options->options & DHCPCD_IPV6RA_OWN && in ipv6_getstate()
909 ip6_use_tempaddr(ifp->name)) in ipv6_getstate()
910 ipv6_regentempifid(ifp); in ipv6_getstate()
920 struct interface *ifp; in ipv6_handleifa() local
939 TAILQ_FOREACH(ifp, ifs, next) { in ipv6_handleifa()
941 if (strcmp(ifp->name, ifname)) in ipv6_handleifa()
943 state = ipv6_getstate(ifp); in ipv6_handleifa()
970 ap->iface = ifp; in ipv6_handleifa()
1045 ipv6_iffindaddr(const struct interface *ifp, const struct in6_addr *addr) in ipv6_iffindaddr() argument
1050 state = IPV6_CSTATE(ifp); in ipv6_iffindaddr()
1068 ipv6_addlinklocalcallback(struct interface *ifp, in ipv6_addlinklocalcallback() argument
1074 state = ipv6_getstate(ifp); in ipv6_addlinklocalcallback()
1082 logger(ifp->ctx, LOG_ERR, "%s: %m", __func__); in ipv6_addlinklocalcallback()
1093 ipv6_newlinklocal(struct interface *ifp) in ipv6_newlinklocal() argument
1099 ap->iface = ifp; in ipv6_newlinklocal()
1117 ipv6_addlinklocal(struct interface *ifp) in ipv6_addlinklocal() argument
1124 if (!(ifp->options->options & DHCPCD_SLAACPRIVATE)) { in ipv6_addlinklocal()
1125 switch (ifp->family) { in ipv6_addlinklocal()
1128 if (ifp->hwlen != 6 && ifp->hwlen != 8) { in ipv6_addlinklocal()
1132 if (memcmp(ifp->hwaddr, allzero, ifp->hwlen) == 0 || in ipv6_addlinklocal()
1133 memcmp(ifp->hwaddr, allone, ifp->hwlen) == 0) in ipv6_addlinklocal()
1145 state = ipv6_getstate(ifp); in ipv6_addlinklocal()
1149 ap = ipv6_newlinklocal(ifp); in ipv6_addlinklocal()
1153 if (ifp->options->options & DHCPCD_SLAACPRIVATE) { in ipv6_addlinklocal()
1157 &ap->prefix, ap->prefix_len, ifp, &dadcounter) == -1) in ipv6_addlinklocal()
1165 switch (ifp->family) { in ipv6_addlinklocal()
1167 if (ifp->hwlen == 6) { in ipv6_addlinklocal()
1168 ap->addr.s6_addr[ 8] = ifp->hwaddr[0]; in ipv6_addlinklocal()
1169 ap->addr.s6_addr[ 9] = ifp->hwaddr[1]; in ipv6_addlinklocal()
1170 ap->addr.s6_addr[10] = ifp->hwaddr[2]; in ipv6_addlinklocal()
1173 ap->addr.s6_addr[13] = ifp->hwaddr[3]; in ipv6_addlinklocal()
1174 ap->addr.s6_addr[14] = ifp->hwaddr[4]; in ipv6_addlinklocal()
1175 ap->addr.s6_addr[15] = ifp->hwaddr[5]; in ipv6_addlinklocal()
1176 } else if (ifp->hwlen == 8) in ipv6_addlinklocal()
1177 memcpy(&ap->addr.s6_addr[8], ifp->hwaddr, 8); in ipv6_addlinklocal()
1199 if (ifp->options->options & in ipv6_addlinklocal()
1227 ipv6_start(struct interface *ifp) in ipv6_start() argument
1234 if (ifp->flags & IFF_POINTOPOINT) in ipv6_start()
1237 state = IPV6_CSTATE(ifp); in ipv6_start()
1245 if (ifp->options->options & DHCPCD_IPV6RA_OWN && in ipv6_start()
1246 ip6_use_tempaddr(ifp->name)) in ipv6_start()
1247 ipv6_regentempifid(ifp); in ipv6_start()
1251 if (ap == NULL && ipv6_addlinklocal(ifp) == -1) in ipv6_start()
1255 if_initrt6(ifp); in ipv6_start()
1260 ipv6_freedrop(struct interface *ifp, int drop) in ipv6_freedrop() argument
1265 if (ifp == NULL) in ipv6_freedrop()
1268 if ((state = IPV6_STATE(ifp)) == NULL) in ipv6_freedrop()
1281 ifp->if_data[IF_DATA_IPV6] = NULL; in ipv6_freedrop()
1282 eloop_timeout_delete(ifp->ctx->eloop, NULL, ifp); in ipv6_freedrop()
1352 const struct interface *ifp; in ipv6_findaddrid() local
1356 TAILQ_FOREACH(ifp, ctx->ifaces, next) { in ipv6_findaddrid()
1357 if ((state = IPV6_CSTATE(ifp))) { in ipv6_findaddrid()
1373 ipv6_regen_desync(struct interface *ifp, int force) in ipv6_regen_desync() argument
1378 state = IPV6_STATE(ifp); in ipv6_regen_desync()
1384 max = ip6_temp_preferred_lifetime(ifp->name) - REGEN_ADVANCE; in ipv6_regen_desync()
1391 max = ip6_temp_preferred_lifetime(ifp->name) - in ipv6_regen_desync()
1393 eloop_timeout_add_sec(ifp->ctx->eloop, max, ipv6_regentempifid, ifp); in ipv6_regen_desync()
1397 ipv6_gentempifid(struct interface *ifp) in ipv6_gentempifid() argument
1404 if ((state = IPV6_STATE(ifp)) == NULL) in ipv6_gentempifid()
1439 ipv6_findaddrid(ifp->ctx, state->randomid)) in ipv6_gentempifid()
1490 const struct interface *ifp; in ipv6_createtempaddr() local
1526 TAILQ_FOREACH(ifp, ia0->iface->ctx->ifaces, next) { in ipv6_createtempaddr()
1527 cstate = IPV6_CSTATE(ifp); in ipv6_createtempaddr()
1584 ipv6_settempstale(struct interface *ifp) in ipv6_settempstale() argument
1589 state = IPV6_STATE(ifp); in ipv6_settempstale()
1675 ipv6_addtempaddrs(struct interface *ifp, const struct timespec *now) in ipv6_addtempaddrs() argument
1680 state = IPV6_STATE(ifp); in ipv6_addtempaddrs()
1707 struct interface *ifp = arg; in ipv6_regentempifid() local
1710 state = IPV6_STATE(ifp); in ipv6_regentempifid()
1712 ipv6_gentempifid(ifp); in ipv6_regentempifid()
1714 ipv6_regen_desync(ifp, 1); in ipv6_regentempifid()
1898 make_route(const struct interface *ifp, const struct ra *rap) in make_route() argument
1904 logger(ifp->ctx, LOG_ERR, "%s: %m", __func__); in make_route()
1907 r->iface = ifp; in make_route()
1909 r->metric = ifp->metric; in make_route()
1919 make_prefix(const struct interface *ifp, const struct ra *rap, in make_prefix() argument
1940 r = make_route(ifp, rap); in make_prefix()
2003 const struct interface *ifp; in ipv6_build_dhcp_routes() local
2008 TAILQ_FOREACH(ifp, ctx->ifaces, next) { in ipv6_build_dhcp_routes()
2009 d6_state = D6_CSTATE(ifp); in ipv6_build_dhcp_routes()
2012 rt = make_prefix(ifp, NULL, addr); in ipv6_build_dhcp_routes()