Lines Matching defs:ifp
174 nd6_llreach_alloc(struct rtentry *rt, struct ifnet *ifp, void *addr,
180 (ln->ln_expire != 0 || (ifp->if_eflags & IFEF_IPV6_ND6ALT) != 0) &&
182 ifp->if_addrlen == IF_LLREACH_MAXLEN && /* Ethernet */
183 alen == ifp->if_addrlen) {
217 lr = ln->ln_llreach = ifnet_llreach_alloc(ifp,
229 nd6log((LOG_DEBUG, "%s%d: %s%s for %s\n", ifp->if_name,
230 ifp->if_unit, type, why, inet_ntop(AF_INET6,
255 struct ifnet *ifp = m->m_pkthdr.rcvif;
271 if ((ifp->if_eflags & IFEF_IPV6_ND6ALT) != 0) {
291 if (in6_setscope(&taddr6, ifp, NULL) != 0)
298 ip6_sprintf(&ip6->ip6_dst), if_name(ifp)));
328 if (!nd6_is_addr_neighbor(&src_sa6, ifp, 0)) {
382 ifa = (struct ifaddr *)in6ifa_ifpwithaddr(ifp, &taddr6);
395 ifp->if_index);
405 ifp, IN6_IFF_NOTREADY|IN6_IFF_ANYCAST);
431 nd6_prproxy_ns_input(ifp, &saddr6, lladdr,
446 if (lladdr && ((ifp->if_addrlen + 2 + 7) & ~7) != lladdrlen) {
450 ip6_sprintf(&taddr6), ifp->if_addrlen, lladdrlen - 2));
488 advrouter = (ifp->if_eflags & IFEF_IPV6_ROUTER);
501 if (in6_setscope(&saddr6, ifp, NULL) != 0)
504 nd6_na_output(ifp, &saddr6, &taddr6,
512 nd6_cache_lladdr(ifp, &saddr6, lladdr, lladdrlen,
515 nd6_na_output(ifp, &saddr6, &taddr6,
550 struct ifnet *ifp,
572 if ((ifp->if_eflags & IFEF_IPV6_ND6ALT) || IN6_IS_ADDR_MULTICAST(taddr6))
577 ip6oa.ip6oa_boundif = ifp->if_index;
582 maxlen += (sizeof(struct nd_opt_hdr) + ifp->if_addrlen + 7) & ~7;
612 im6o->im6o_multicast_ifp = ifp;
638 if (in6_setscope(&ip6->ip6_dst, ifp, NULL) != 0)
688 if (hsrc != NULL && (ia = in6ifa_ifpwithaddr(ifp, hsrc)) &&
712 ia = in6ifa_ifpwithaddr(ifp, src);
753 if (!dad && (mac = nd6_ifptomac(ifp))) {
754 int optlen = sizeof(struct nd_opt_hdr) + ifp->if_addrlen;
765 bcopy(mac, (caddr_t)(nd_opt + 1), ifp->if_addrlen);
791 if (ifp->if_eflags & IFEF_TXSTART) {
843 struct ifnet *ifp = m->m_pkthdr.rcvif;
862 if ((ifp->if_eflags & IFEF_IPV6_ND6ALT) != 0) {
874 ip6_sprintf(&ip6->ip6_dst), if_name(ifp)));
895 if (in6_setscope(&taddr6, ifp, NULL))
925 ifa = (struct ifaddr *)in6ifa_ifpwithaddr(ifp, &taddr6);
945 ndi = ND_IFINFO(ifp);
955 if_name(ifp));
971 if (lladdr && ((ifp->if_addrlen + 2 + 7) & ~7) != lladdrlen) {
975 ip6_sprintf(&taddr6), ifp->if_addrlen, lladdrlen - 2));
981 nd6_prproxy_na_input(ifp, &saddr6, &daddr6, &taddr6, flags);
989 if ((rt = nd6_lookup(&taddr6, 0, ifp, 0)) == NULL) {
997 if (rt->rt_ifp != ifp) {
1006 rt->rt_if_ref_fn(ifp, 1);
1011 rt->rt_ifp = ifp;
1029 if (ifp->if_addrlen && !lladdr) {
1038 sdl->sdl_alen = ifp->if_addrlen;
1039 bcopy(lladdr, LLADDR(sdl), ifp->if_addrlen);
1082 if (bcmp(lladdr, LLADDR(sdl), ifp->if_addrlen))
1129 sdl->sdl_alen = ifp->if_addrlen;
1130 bcopy(lladdr, LLADDR(sdl), ifp->if_addrlen);
1145 ndi = ND_IFINFO(ifp);
1204 nd6_llreach_alloc(rt, ifp, LLADDR(sdl), sdl->sdl_alen, TRUE);
1223 * we assume ifp is not a loopback here, so just set
1227 nd6_output(ifp, ifp, m_hold, &sin6, rt, NULL);
1263 struct ifnet *ifp,
1288 ip6oa.ip6oa_boundif = ifp->if_index;
1293 maxlen += (sizeof(struct nd_opt_hdr) + ifp->if_addrlen + 7) & ~7;
1323 im6o->im6o_multicast_ifp = ifp;
1346 if (in6_setscope(&daddr6, ifp, NULL))
1376 ia = in6ifa_ifpwithaddr(ifp, src);
1402 mac = nd6_ifptomac(ifp);
1406 if (sdl->sdl_alen == ifp->if_addrlen)
1411 int optlen = sizeof(struct nd_opt_hdr) + ifp->if_addrlen;
1423 bcopy(mac, (caddr_t)(nd_opt + 1), ifp->if_addrlen);
1439 if (ifp->if_eflags & IFEF_TXSTART) {
1473 struct ifnet *ifp)
1475 switch (ifp->if_type) {
1492 return ((caddr_t)ifnet_lladdr(ifp));
1732 struct ifnet *ifp = ifa->ifa_ifp;
1735 if ((ifp->if_flags & IFF_UP) == 0 ||
1736 (ifp->if_flags & IFF_RUNNING) == 0 ||
1737 (ifp->if_eflags & IFEF_IPV6_ND6ALT) != 0)
1743 if (in6_setscope(&taddr6, ifp, NULL) != 0)
1746 if (in6_setscope(&saddr6, ifp, NULL) != 0)
1752 nd6_na_output(ifp, &saddr6, &taddr6, ND_NA_FLAG_OVERRIDE, 1, NULL);
1879 struct ifnet *ifp = ifa->ifa_ifp;
1892 if_name(ifp), ip6_sprintf(&ia->ia_addr.sin6_addr),
1906 if_name(ifp), ip6_sprintf(&ia->ia_addr.sin6_addr));
1908 if_name(ifp));
1914 "detected, disable IPv6\n", if_name(ifp));
1917 nd_ifinfo[ifp->if_index].flags |=
1926 in6_post_msg(ifp, KEV_INET6_NEW_USER_ADDR, ia);
1935 struct ifnet *ifp = ifa->ifa_ifp;
1940 if ((ifp->if_flags & IFF_UP) == 0) {
1944 if ((ifp->if_flags & IFF_RUNNING) == 0) {
1954 nd6_ns_output(ifp, NULL, &taddr6, NULL, 1);
1962 struct ifnet *ifp;
1967 ifp = ifa->ifa_ifp;
2040 struct ifnet *ifp;
2044 ifp = ifa->ifa_ifp;
2050 switch (ifp->if_type) {
2064 llifa = ifp->if_lladdr;
2074 if (in6_get_hw_ifid(ifp, &in6) != 0)
2161 nd6_llreach_set_reachable(struct ifnet *ifp, void *addr, unsigned int alen)
2167 ifnet_llreach_set_reachable(ifp, ETHERTYPE_IPV6, addr, alen);
2171 nd6_alt_node_addr_decompose(struct ifnet *ifp, struct sockaddr *sa,
2176 VERIFY(nd6_need_cache(ifp));
2188 sdl->sdl_type = ifp->if_type;
2189 sdl->sdl_index = ifp->if_index;
2198 sdl->sdl_nlen = strlen(ifp->if_name);
2199 bcopy(ifp->if_name, sdl->sdl_data, sdl->sdl_nlen);
2227 sin6->sin6_scope_id = ifp->if_index;
2254 nd6_alt_node_present(struct ifnet *ifp, struct sockaddr_in6 *sin6,
2261 nd6_cache_lladdr(ifp, &sin6->sin6_addr, LLADDR(sdl),
2268 ifp->if_index);
2304 nd6_alt_node_absent(struct ifnet *ifp, struct sockaddr_in6 *sin6)
2315 ifp->if_index);