Lines Matching defs:ifp

369 nd6_ifattach(struct ifnet *ifp)
404 #define ND nd_ifinfo[ifp->if_index]
414 ND.linkmtu = ifp->if_mtu;
423 nd6_setmtu(ifp);
433 nd6_setmtu(struct ifnet *ifp)
443 if (ifp->if_index >= nd_ifinfo_indexlim ||
444 !nd_ifinfo[ifp->if_index].initialized) {
449 ndi = &nd_ifinfo[ifp->if_index];
465 maxmtu = ndi->maxmtu = ifp->if_mtu;
476 ifp->if_name, ifp->if_unit, (uint32_t)ndi->maxmtu);
478 ndi->linkmtu = ifp->if_mtu;
645 struct ifnet *ifp = NULL;
686 if ((ifp = rt->rt_ifp) == NULL) {
717 if (ifp->if_index >= nd_ifinfo_indexlim) {
723 ndi = ND_IFINFO(ifp);
742 nd6_prproxy_ns_output(ifp, NULL,
745 nd6_ns_output(ifp, NULL,
760 m->m_pkthdr.rcvif = ifp;
807 nd6_ns_output(ifp, &dst->sin6_addr,
827 nd6_ns_output(ifp, &dst->sin6_addr,
1118 struct ifnet *ifp;
1124 ifp = ia6->ia_ifa.ifa_ifp;
1125 ifnet_lock_shared(ifp);
1126 for (ifa = ifp->if_addrlist.tqh_first; ifa;
1180 ifnet_lock_done(ifp);
1200 * ifp goes away.
1204 struct ifnet *ifp)
1210 /* Nuke default router list entries toward ifp */
1221 if (dr->ifp == ifp)
1225 if (dr->ifp == ifp)
1234 if (dr->ifp == ifp)
1238 /* Nuke prefix list entries toward ifp */
1242 if (pr->ndpr_ifp == ifp) {
1270 if (nd6_defifindex == ifp->if_index) {
1281 defrouter_select(ifp);
1286 * Nuke neighbor cache entries for the ifp.
1287 * Note that rt->rt_ifp may not be the same as ifp,
1303 SDL(rt->rt_gateway)->sdl_index == ifp->if_index) {
1337 struct ifnet *ifp,
1349 ifscope = (ifp != NULL) ? ifp->if_index : IFSCOPE_NONE;
1379 if (create && ifp) {
1391 ifa = ifaof_ifpforaddr((struct sockaddr *)&sin6, ifp);
1443 * Note also that ifa_ifp and ifp may differ when we connect two
1448 * If the address is from a proxied prefix, the ifa_ifp and ifp might
1449 * not match, because nd6_na_input() could have modified the ifp
1455 (ifp && rt->rt_ifa->ifa_ifp != ifp &&
1462 ifp ? if_name(ifp) : "unspec");
1481 struct ifnet *ifp)
1503 if (in6_setscope(&sin6_copy.sin6_addr, ifp, &zone))
1519 if (pr->ndpr_ifp != ifp) {
1541 if (dstaddr->ifa_ifp == ifp) {
1560 nd6_defifindex == ifp->if_index) {
1573 nd6_is_addr_neighbor(struct sockaddr_in6 *addr, struct ifnet *ifp, int rt_locked)
1579 if (nd6_is_new_addr_neighbor(addr, ifp)) {
1589 if ((rt = nd6_lookup(&addr->sin6_addr, 0, ifp, rt_locked)) != NULL) {
1783 struct ifnet *ifp = rt->rt_ifp;
1793 if (nd6_need_cache(ifp) == 0 && (rt->rt_flags & RTF_HOST) == 0) {
1807 if (!nd6_need_cache(ifp)) { /* stf case */
1820 no_nd_cache = !nd6_is_addr_neighbor(&sin6, ifp, 1);
1866 SDL(gate)->sdl_type = ifp->if_type;
1867 SDL(gate)->sdl_index = ifp->if_index;
1874 (ifp->if_eflags & IFEF_IPV6_ND6ALT)
1900 if ((ifp->if_flags & (IFF_POINTOPOINT | IFF_LOOPBACK)) == 0) {
1911 "value: %s\n", if_name(ifp));
1915 SDL(gate)->sdl_type = ifp->if_type;
1916 SDL(gate)->sdl_index = ifp->if_index;
1955 ln->ln_expire = (ifp->if_eflags & IFEF_IPV6_ND6ALT)
2001 caddr_t macp = nd6_ifptomac(ifp);
2006 Bcopy(macp, LLADDR(SDL(gate)), ifp->if_addrlen);
2007 SDL(gate)->sdl_alen = ifp->if_addrlen;
2046 if (ifp->if_flags & IFF_MULTICAST) {
2056 if (in6_setscope(&llsol, ifp, NULL))
2058 error = in6_mc_join(ifp, &llsol, NULL, &in6m, 0);
2061 "%s (errno=%d)\n", if_name(ifp),
2075 (ifp->if_flags & IFF_MULTICAST) != 0) {
2084 if (in6_setscope(&llsol, ifp, NULL) == 0) {
2086 IN6_LOOKUP_MULTI(&llsol, ifp, in6m);
2154 drl_64->defrouter[i].if_index = dr->ifp->if_index;
2185 drl_32->defrouter[i].if_index = dr->ifp->if_index;
2324 nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp)
2329 int i = ifp->if_index, error = 0;
2362 ndi = ND_IFINFO(ifp);
2370 linkmtu = IN6_LINKMTU(ifp);
2398 ndi = ND_IFINFO(ifp);
2415 error = nd6_setifinfo(ifp, oflags, flags);
2427 defrouter_select(ifp);
2447 if (ifp != lo_ifp && pr->ndpr_ifp != ifp) {
2521 if (ifp == lo_ifp || dr->ifp == ifp)
2524 if (ifp == lo_ifp ||
2525 TAILQ_FIRST(&nd_defrouter)->ifp == ifp)
2549 *idp = htons(ifp->if_index);
2553 if ((rt = nd6_lookup(&nb_addr, 0, ifp, 0)) == NULL) {
2586 *idp = htons(ifp->if_index);
2590 if ((rt = nd6_lookup(&nb_addr, 0, ifp, 0)) == NULL) {
2653 struct ifnet *ifp,
2670 if (ifp == NULL)
2671 panic("ifp == NULL in nd6_cache_lladdr");
2680 * Validation about ifp->if_addrlen and lladdrlen must be done in
2684 * we do? (ifp->if_addrlen == 0)
2690 rt = nd6_lookup(from, 0, ifp, 0);
2692 if ((rt = nd6_lookup(from, 1, ifp, 0)) == NULL)
2727 if (bcmp(lladdr, LLADDR(sdl), ifp->if_addrlen))
2748 * XXX is it dependent to ifp->if_type?
2750 sdl->sdl_alen = ifp->if_addrlen;
2751 bcopy(lladdr, LLADDR(sdl), ifp->if_addrlen);
2754 nd6_llreach_alloc(rt, ifp, LLADDR(sdl), sdl->sdl_alen, FALSE);
2794 * we assume ifp is not a p2p here, so just
2798 nd6_output(ifp, ifp, m, &sin6, rt, NULL);
2887 defrouter_select(ifp);
2929 nd6_output(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m0,
2945 if (IN6_IS_ADDR_MULTICAST(&dst->sin6_addr) || !nd6_need_cache(ifp)) {
2977 1, 0, ifp->if_index)) != NULL) {
2979 if (rt->rt_ifp != ifp) {
2982 error = nd6_output(ifp, origifp, m0,
3012 if (!nd6_is_addr_neighbor(&gw6, ifp, 0) ||
3013 (ia6 = in6ifa_ifpwithaddr(ifp, &gw6.sin6_addr))) {
3021 if ((ifp->if_flags & IFF_POINTOPOINT) == 0)
3058 ifp->if_index);
3163 if (nd6_is_addr_neighbor(&sin6, ifp, 0)) {
3173 rt = nd6_lookup(&dst->sin6_addr, 1, ifp, 0);
3187 ndi = ND_IFINFO(ifp);
3190 if ((ifp->if_flags & IFF_POINTOPOINT) == 0 &&
3209 if ((ifp->if_flags & IFF_POINTOPOINT) != 0 &&
3269 ndi = ND_IFINFO(ifp);
3278 nd6_prproxy_ns_output(ifp, NULL, &dst->sin6_addr, ln);
3280 nd6_ns_output(ifp, NULL, &dst->sin6_addr, ln, 0);
3315 ndi = ND_IFINFO(ifp);
3325 if ((ifp->if_flags & IFF_LOOPBACK) != 0) {
3363 error = dlil_output(ifp, PF_INET6, m, (caddr_t)rt,
3400 struct ifnet *ifp)
3409 switch (ifp->if_type) {
3434 struct ifnet *ifp,
3444 switch (ifp->if_type) {
3457 for (i = 0; i < ifp->if_addrlen; i++)
3498 nd6_lookup_ipv6(ifnet_t ifp, const struct sockaddr_in6 *ip6_dest,
3510 if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
3529 result = dlil_resolve_multi(ifp,
3577 nd6_setifinfo(struct ifnet *ifp, u_int32_t before, u_int32_t after)
3588 return (nd6_if_prproxy(ifp, ((int32_t)(after - before) > 0)));
3621 dr->ifp) != 0)
3631 d->if_index = dr->ifp->if_index;
3654 dr->ifp) != 0)
3664 d_32->if_index = dr->ifp->if_index;
3738 pfr->router->ifp) != 0)
3803 pfr->router->ifp) != 0)