Lines Matching refs:ifp
139 __unused struct ifnet *ifp,
263 struct ifnet *ifp,
275 ifnet_lock_shared(ifp);
276 for (ifa = ifp->if_addrlist.tqh_first;
290 ifnet_lock_done(ifp);
295 ifnet_lock_done(ifp);
300 switch (ifp->if_type) {
406 struct ifnet *ifp;
424 TAILQ_FOREACH(ifp, &ifnet_head, if_list) {
425 if (ifp == ifp0)
427 if (get_hw_ifid(ifp, in6) != 0)
437 if_name(ifp0), if_name(ifp)));
445 if (get_rand_ifid(ifp, in6) == 0) {
468 struct ifnet *ifp,
482 proto_plumb(PF_INET6, ifp);
488 strncpy(ifra.ifra_name, if_name(ifp), sizeof(ifra.ifra_name));
490 if (ifp->if_type == IFT_PPP && ifra_passed != NULL) /* PPP provided both addresses for us */
499 ifra.ifra_addr.sin6_addr.s6_addr16[1] = htons(ifp->if_index); /* XXX */
502 if ((ifp->if_flags & IFF_LOOPBACK) != 0) {
506 if (get_ifid(ifp, altifp, &ifra.ifra_addr.sin6_addr) != 0) {
508 " %s: no ifid available\n", if_name(ifp)));
514 in6_addr2scopeid(ifp, &ifra.ifra_addr.sin6_addr);
541 if ((error = in6_update_ifa(ifp, &ifra, NULL)) != 0) {
552 if_name(ifp), error);
561 ia = in6ifa_ifpforlinklocal(ifp, 0); /* ia must not be NULL */
568 if (in6if_do_dad(ifp) && (ifp->if_flags & IFF_POINTOPOINT) == 0) {
581 pr0.ndpr_ifp = ifp;
611 in6_post_msg(ifp, KEV_INET6_NEW_LL_ADDR, ia);
622 struct ifnet *ifp) /* must be IFT_LOOP */
633 strncpy(ifra.ifra_name, if_name(ifp), sizeof(ifra.ifra_name));
665 if ((error = in6_update_ifa(ifp, &ifra, NULL)) != 0) {
668 if_name(ifp), error);
679 * when ifp == NULL, the caller is responsible for filling scopeid.
683 struct ifnet *ifp,
720 if (ifp)
721 in6->s6_addr16[1] = htons(ifp->if_index);
733 struct ifnet *ifp;
745 TAILQ_FOREACH(ifp, &ifnet_head, if_list) {
746 mltaddr.sin6_addr.s6_addr16[1] = htons(ifp->if_index);
747 ifnet_lock_shared(ifp);
748 IN6_LOOKUP_MULTI(mltaddr.sin6_addr, ifp, in6m);
749 ifnet_lock_done(ifp);
751 if (!in6_addmulti(&mltaddr.sin6_addr, ifp, &error, 0)) {
753 "(errno=%d)\n", if_name(ifp),
767 struct ifnet *ifp;
778 TAILQ_FOREACH(ifp, &ifnet_head, if_list) {
779 mltaddr.sin6_addr.s6_addr16[1] = htons(ifp->if_index);
780 ifnet_lock_shared(ifp);
781 IN6_LOOKUP_MULTI(mltaddr.sin6_addr, ifp, in6m);
782 ifnet_lock_done(ifp);
796 struct ifnet *ifp,
846 nd6_ifattach(ifp);
849 scope6_ifattach(ifp);
854 switch (ifp->if_type) {
872 if ((ifp->if_flags & IFF_MULTICAST) == 0) {
875 if_name(ifp));
883 if ((ifp->if_flags & IFF_LOOPBACK) != 0) {
887 if ((ia6 = in6ifa_ifpwithaddr(ifp, &in6)) == NULL) {
888 if (in6_ifattach_loopback(ifp) != 0) {
903 ia = in6ifa_ifpforlinklocal(ifp, 0);
905 if (in6_ifattach_linklocal(ifp, altifp, ifra) == 0) {
910 if_name(ifp));
921 if (in6_maxmtu < ifp->if_mtu)
922 in6_maxmtu = ifp->if_mtu;
924 if (in6_ifstat[ifp->if_index] == NULL) {
925 in6_ifstat[ifp->if_index] = (struct in6_ifstat *)
927 bzero(in6_ifstat[ifp->if_index], sizeof(struct in6_ifstat));
929 if (icmp6_ifstat[ifp->if_index] == NULL) {
930 icmp6_ifstat[ifp->if_index] = (struct icmp6_ifstat *)
932 bzero(icmp6_ifstat[ifp->if_index], sizeof(struct icmp6_ifstat));
943 struct ifnet *ifp)
952 in6_purgeprefix(ifp);
955 nd6_purge(ifp);
962 if (ia->ia_ifa.ifa_ifp != ifp)
968 ifnet_lock_exclusive(ifp);
971 for (ifa = ifp->if_addrlist.tqh_first; ifa; ifa = next)
998 if_detach_ifa(ifp, &ia->ia_ifa);
1014 "list\n", if_name(ifp)));
1021 ifnet_lock_done(ifp);
1031 nd6_purge(ifp);
1038 sin6.sin6_addr.s6_addr16[1] = htons(ifp->if_index);
1042 if (rt->rt_ifp == ifp) {
1053 struct ifnet *ifp,
1059 struct nd_ifinfo *ndi = &nd_ifinfo[ifp->if_index];