Lines Matching defs:ifp
507 in6_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
547 if (ifp == NULL)
583 return (nd6_ioctl(cmd, data, ifp));
607 return (scope6_set(ifp, ifru_scope_id));
617 return (scope6_get(ifp, ifru_scope_id));
640 error = in6_lifaddr_ioctl(so, cmd, &iflr, ifp, p);
706 return (in6_autoconf(ifp, TRUE));
710 return (in6_autoconf(ifp, FALSE));
721 if ((ifp->if_eflags & IFEF_NOAUTOIPV6LL) != 0 &&
725 error = in6_if_up(ifp, ifra);
727 error = in6_if_up(ifp, NULL);
737 if (ia->ia_ifa.ifa_ifp != ifp) {
768 VERIFY(ifp != NULL);
772 return (in6_setrouter(ifp, intval));
778 return (in6_domifattach(ifp));
783 in6_purgeif(ifp);
785 if ((error = proto_unplumb(PF_INET6, ifp)))
787 if_name(ifp), error);
809 htons(ifp->if_index);
811 htons(ifp->if_index)) {
816 (u_int32_t)ifp->if_index)
821 ia = in6ifa_ifpwithaddr(ifp, &sa6->sin6_addr);
957 if ((ifp->if_flags & IFF_POINTOPOINT) == 0) {
999 if (ifp == NULL) {
1003 index = ifp->if_index;
1021 if (ifp == NULL) {
1025 index = ifp->if_index;
1117 error = in6_domifattach(ifp);
1125 if ((error = in6_if_up(ifp, NULL)) != 0)
1133 if ((error = in6_update_ifa(ifp, ifra, ia, 0, M_WAITOK)) != 0)
1149 pr0.ndpr_ifp = ifp;
1193 if ((ia = in6ifa_ifpwithaddr(ifp,
1248 pf_ifaddr_hook(ifp, cmd);
1269 pr0.ndpr_ifp = ifp;
1311 pf_ifaddr_hook(ifp, cmd);
1317 error = ifnet_ioctl(ifp, PF_INET6, cmd, data);
1328 in6_autoconf(struct ifnet *ifp, int enable)
1332 if (ifp->if_flags & IFF_LOOPBACK)
1342 ifnet_lock_exclusive(ifp);
1343 if (ifp->if_eflags & IFEF_IPV6_ROUTER) {
1344 ifp->if_eflags &= ~IFEF_ACCEPT_RTADV;
1347 ifp->if_eflags |= IFEF_ACCEPT_RTADV;
1349 ifnet_lock_done(ifp);
1353 ifnet_lock_exclusive(ifp);
1354 ifp->if_eflags &= ~IFEF_ACCEPT_RTADV;
1355 ifnet_lock_done(ifp);
1361 if (ia->ia_ifa.ifa_ifp != ifp) {
1396 in6_setrouter(struct ifnet *ifp, int enable)
1398 if (ifp->if_flags & IFF_LOOPBACK)
1405 ndi = ND_IFINFO(ifp);
1413 (void) nd6_if_prproxy(ifp, FALSE);
1423 ifnet_lock_exclusive(ifp);
1425 ifp->if_eflags |= IFEF_IPV6_ROUTER;
1427 ifp->if_eflags &= ~IFEF_IPV6_ROUTER;
1429 ifnet_lock_done(ifp);
1432 defrouter_select(ifp);
1435 if_allmulti(ifp, enable);
1437 return (in6_autoconf(ifp, FALSE));
1446 in6_update_ifa(struct ifnet *ifp, struct in6_aliasreq *ifra,
1462 if (ifp == NULL || ifra == NULL) /* this maybe redundant */
1469 if ((ifp->if_flags & IFF_POINTOPOINT) != 0 &&
1516 if (((ifp->if_flags & (IFF_POINTOPOINT|IFF_LOOPBACK)) != 0 ) &&
1522 ifp)) != 0)
1525 scopeid = in6_addr2scopeid(ifp, &dst6.sin6_addr);
1542 if ((ifp->if_flags & (IFF_POINTOPOINT|IFF_LOOPBACK)) == 0) {
1597 ifnet_lock_exclusive(ifp);
1605 if ((ifp->if_flags & (IFF_POINTOPOINT | IFF_LOOPBACK)) != 0) {
1618 ia->ia_ifp = ifp;
1620 if_attach_ifa(ifp, &ia->ia_ifa);
1624 ifnet_lock_done(ifp);
1714 if ((error = in6_ifinit(ifp, ia, &ifra->ifra_addr, hostIsNew)) != 0)
1736 if (hostIsNew && in6if_do_dad(ifp))
1761 if ((ifp->if_flags & IFF_MULTICAST) != 0) {
1773 if ((error = in6_setscope(&llsol, ifp, NULL)) != 0) {
1791 imm = in6_joingroup(ifp, &llsol, &error, delay);
1796 ip6_sprintf(&llsol), if_name(ifp),
1824 if ((error = in6_setscope(&mltaddr.sin6_addr, ifp, NULL)) !=
1855 imm = in6_joingroup(ifp, &mltaddr.sin6_addr, &error, 0);
1861 if_name(ifp), error));
1881 if (in6_nigroup(ifp, hostname, hostnamelen, &mltaddr.sin6_addr)
1883 imm = in6_joingroup(ifp, &mltaddr.sin6_addr, &error,
1890 if_name(ifp), error));
1906 if ((error = in6_setscope(&mltaddr.sin6_addr, ifp, NULL))
1930 imm = in6_joingroup(ifp, &mltaddr.sin6_addr, &error, 0);
1936 if_name(ifp), error));
1951 if ((error = nd6_ifattach(ifp)) != 0)
1959 if (hostIsNew && in6if_do_dad(ifp) &&
2012 in6_unlink_ifa(ia, ifp);
2024 struct ifnet *ifp = ifa->ifa_ifp;
2047 ip6_sprintf(&ia->ia_addr.sin6_addr), if_name(ifp),
2076 in6_unlink_ifa(ia, ifp);
2077 in6_post_msg(ifp, KEV_INET6_ADDR_DELETED, ia);
2081 in6_unlink_ifa(struct in6_ifaddr *ia, struct ifnet *ifp)
2092 ifnet_lock_exclusive(ifp);
2095 if_detach_ifa(ifp, ifa);
2097 ifnet_lock_done(ifp);
2162 in6_purgeif(struct ifnet *ifp)
2166 if (ifp == NULL)
2174 if (ia->ia_ifa.ifa_ifp != ifp) {
2193 in6_ifdetach(ifp);
2221 struct ifnet *ifp, struct proc *p)
2227 VERIFY(ifp != NULL);
2277 ifa = (struct ifaddr *)in6ifa_ifpforlinklocal(ifp, 0);
2339 (caddr_t)&ifra_32, ifp, p));
2342 (caddr_t)&ifra, ifp, p));
2347 (caddr_t)&ifra, ifp, p));
2356 (caddr_t)&ifra_64, ifp, p));
2400 ifnet_lock_shared(ifp);
2401 TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list)
2431 ifnet_lock_done(ifp);
2446 in6_addr2scopeid(ifp, &s6->sin6_addr);
2448 if ((ifp->if_flags & IFF_POINTOPOINT) != 0) {
2455 in6_addr2scopeid(ifp,
2480 if ((ifp->if_flags & IFF_POINTOPOINT) != 0) {
2507 (caddr_t)&ifra_32, ifp, p));
2510 (caddr_t)&ifra, ifp, p));
2515 (caddr_t)&ifra, ifp, p));
2529 (caddr_t)&ifra_64, ifp, p));
2545 in6_ifinit(ifp, ia, sin6, newhost)
2546 struct ifnet *ifp;
2559 ifnet_lock_shared(ifp);
2560 TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list)
2570 ifnet_lock_done(ifp);
2583 (error = ifnet_ioctl(ifp, PF_INET6, SIOCSIFADDR, ia))) {
2591 ia->ia_ifa.ifa_metric = ifp->if_metric;
2632 in6_purgeaddrs(struct ifnet *ifp)
2634 in6_purgeif(ifp);
2641 in6ifa_ifpforlinklocal(ifp, ignoreflags)
2642 struct ifnet *ifp;
2647 ifnet_lock_shared(ifp);
2648 TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list)
2667 ifnet_lock_done(ifp);
2676 in6ifa_ifpwithaddr(ifp, addr)
2677 struct ifnet *ifp;
2682 ifnet_lock_shared(ifp);
2683 TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list)
2697 ifnet_lock_done(ifp);
2941 struct ifnet *ifp;
2954 TAILQ_FOREACH(ifp, &ifnet_head, if_list) {
2959 if (in6_addr2scopeid(ifp, dst) != in6_addr2scopeid(oifp, dst))
2962 ifnet_lock_shared(ifp);
2963 TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list)
3155 if (bifp == oifp && ifp != oifp) { /* (1) */
3159 if (bifp != oifp && ifp == oifp) /* (2) */
3163 * Both bifp and ifp are on the outgoing
3204 ifnet_lock_done(ifp);
3237 struct ifnet *ifp,
3253 ifnet_lock_shared(ifp);
3254 TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list)
3318 ifnet_lock_done(ifp);
3324 TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list)
3357 ifnet_lock_done(ifp);
3364 ifnet_lock_done(ifp);
3383 struct ifnet *ifp,
3394 error = in6_ifattach(ifp, NULL, ifra);
3400 ifnet_lock_exclusive(ifp);
3401 TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list)
3416 ifnet_lock_done(ifp);
3423 struct ifnet *ifp)
3425 if ((ifp->if_flags & IFF_LOOPBACK) != 0)
3436 if (ifp->if_eflags & (IFEF_IPV6_ND6ALT|IFEF_LOCALNET_PRIVATE))
3439 switch (ifp->if_type) {
3461 if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) !=
3477 struct ifnet *ifp;
3480 TAILQ_FOREACH(ifp, &ifnet_head, if_list) {
3484 if ((ndi = ND_IFINFO(ifp)) != NULL && !ndi->initialized)
3488 if ((ifp->if_flags & IFF_LOOPBACK) == 0 &&
3489 IN6_LINKMTU(ifp) > maxmtu)
3490 maxmtu = IN6_LINKMTU(ifp);
3508 in6_if2idlen(struct ifnet *ifp)
3510 switch (ifp->if_type) {
3560 printf("in6_if2idlen: unknown link type (%d)\n", ifp->if_type);
3642 in6_post_msg(struct ifnet *ifp, u_int32_t event_code, struct in6_ifaddr *ifa)
3672 if (ifp != NULL) {
3674 ifp->if_name, IFNAMSIZ);
3675 in6_event_data.link_data.if_family = ifp->if_family;
3676 in6_event_data.link_data.if_unit = (u_int32_t) ifp->if_unit;