Lines Matching defs:ifp

134 nd6_ifattach(struct ifnet *ifp)
142 ifp->if_nd = nd;
146 nd6_ifdetach(struct ifnet *ifp)
148 struct nd_ifinfo *nd = ifp->if_nd;
308 struct ifnet *ifp;
312 if ((ifp = if_get(rt->rt_ifidx)) == NULL)
320 nd6_ns_output(ifp, NULL, &dst->sin6_addr,
376 nd6_ns_output(ifp, &dst->sin6_addr, &dst->sin6_addr,
384 nd6_ns_output(ifp, &dst->sin6_addr, &dst->sin6_addr,
393 if_put(ifp);
441 struct ifnet *ifp;
445 TAILQ_FOREACH(ifp, &ifnetlist, if_list) {
449 TAILQ_FOREACH_SAFE(ifa, &ifp->if_addrlist, ifa_list, nifa) {
475 * ifp goes away.
478 nd6_purge(struct ifnet *ifp)
486 * Nuke neighbor cache entries for the ifp.
496 if (sdl->sdl_index == ifp->if_index)
503 nd6_lookup(const struct in6_addr *addr6, int create, struct ifnet *ifp,
530 if (create && ifp) {
543 ifa = ifaof_ifpforaddr(sin6tosa(&sin6), ifp);
557 info.rti_info[RTAX_GATEWAY] = sdltosa(ifp->if_sadl);
579 (ifp != NULL && rt->rt_ifidx != ifp->if_index)) {
585 ifp ? ifp->if_xname : "unspec"));
598 nd6_is_addr_neighbor(const struct sockaddr_in6 *addr, struct ifnet *ifp)
611 ntohs(*(u_int16_t *)&addr->sin6_addr.s6_addr[2]) == ifp->if_index)
614 TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) {
634 rt = nd6_lookup(&addr->sin6_addr, 0, ifp, ifp->if_rdomain);
670 struct ifnet *ifp;
674 ifp = if_get(rt->rt_ifidx);
683 rt6_flush(&in6, ifp);
696 rtdeletemsg(rt, ifp, ifp->if_rdomain);
698 if_put(ifp);
710 struct ifnet *ifp;
714 ifp = if_get(rt->rt_ifidx);
715 if (ifp == NULL)
740 nd6_llinfo_settimer(ln, ifp->if_nd->reachable);
742 if_put(ifp);
746 nd6_rtrequest(struct ifnet *ifp, int req, struct rtentry *rt)
756 if (nd6_need_cache(ifp) == 0 && (rt->rt_flags & RTF_HOST) == 0) {
767 if (req == RTM_RESOLVE && nd6_need_cache(ifp) == 0) {
799 __func__, ifp->if_xname);
802 satosdl(gate)->sdl_type = ifp->if_type;
803 satosdl(gate)->sdl_index = ifp->if_index;
882 ifa6 = in6ifa_ifpwithaddr(ifp,
896 (ifp->if_flags & IFF_MULTICAST)) {
902 llsol.s6_addr16[1] = htons(ifp->if_index);
908 if (in6_addmulti(&llsol, ifp, &error)) {
911 "%s (errno=%d)\n", ifp->if_xname,
940 (ifp->if_flags & IFF_MULTICAST) != 0) {
946 llsol.s6_addr16[1] = htons(ifp->if_index);
952 IN6_LOOKUP_MULTI(llsol, ifp, in6m);
967 nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp)
976 ndi->ndi = *ifp->if_nd;
995 *idp = htons(ifp->if_index);
998 rt = nd6_lookup(&nb_addr, 0, ifp, ifp->if_rdomain);
1035 nd6_cache_lladdr(struct ifnet *ifp, const struct in6_addr *from, char *lladdr,
1049 if (!ifp)
1050 panic("%s: ifp == NULL", __func__);
1059 * Validation about ifp->if_addrlen and lladdrlen must be done in
1063 * we do? (ifp->if_addrlen == 0)
1068 rt = nd6_lookup(from, 0, ifp, ifp->if_rdomain);
1070 rt = nd6_lookup(from, 1, ifp, ifp->if_rdomain);
1100 if (bcmp(lladdr, LLADDR(sdl), ifp->if_addrlen))
1122 ether_sprintf(lladdr), ifp->if_xname);
1127 * XXX is it dependent to ifp->if_type?
1129 sdl->sdl_alen = ifp->if_addrlen;
1130 bcopy(lladdr, LLADDR(sdl), ifp->if_addrlen);
1156 * Since nd6_resolve() in ifp->if_output() will cause
1162 if_output_mq(ifp, &ln->ln_mq, &ln_hold_total,
1242 struct ifnet *ifp;
1248 TAILQ_FOREACH(ifp, &ifnetlist, if_list) {
1249 nd6if = ifp->if_nd;
1265 nd6_resolve(struct ifnet *ifp, struct rtentry *rt0, struct mbuf *m,
1391 nd6_ns_output(ifp, NULL, &satosin6(dst)->sin6_addr, &saddr6, 0);
1400 nd6_need_cache(struct ifnet *ifp)
1406 switch (ifp->if_type) {