Lines Matching defs:ifp

196  * Regardless of error, it will return an ifp with a reference held if the
198 * if the returned ifp is valid and release its reference at all times.
207 struct ifnet *ifp = NULL;
250 &ifp)) != 0) {
266 if (ifp != NULL) {
267 *errorp = in6_setscope(&srcsock.sin6_addr, ifp, NULL);
312 &ifp)) != 0) {
317 *errorp = in6_setscope(&dst, ifp, &odstzone);
343 if (in6_setscope(&src, ifp, &osrczone) ||
408 if (ia_best->ia_ifp == ifp && ia->ia_ifp != ifp)
410 if (ia_best->ia_ifp != ifp && ia->ia_ifp == ifp)
546 /* if ifp is non-NULL, refcnt held in in6_selectif() */
547 *ifpp = ifp;
548 } else if (ifp != NULL) {
549 ifnet_release(ifp);
564 * error, it will return an ifp with a reference held if the caller provides
566 * returned ifp is valid and release its reference at all times.
577 struct ifnet *ifp = NULL, *ifp0 = NULL;
646 /* ifp may be NULL if detached or out of range */
647 ifp = ifp0 =
657 if (ifp == NULL)
671 if ((ifp = ifp0 = mopts->im6o_multicast_ifp) != NULL) {
845 ifp = ifp0 = ron->ro_rt->rt_ifp;
915 ifp = ifp0 = ro->ro_rt->rt_ifp;
935 (ifa->ifa_ifp != ifp && ifp != lo_ifp) ||
954 ifscope, if_name(ifp),
960 ifscope, if_name(ifp));
970 ifp = NULL; /* ditch ifp; keep ifp0 */
986 if (ifp != NULL && opts != NULL &&
996 if (!(ifp->if_flags & IFF_LOOPBACK) && ifp->if_index !=
1007 ((ifp != NULL && ifp->if_type == IFT_CELLULAR) ||
1016 ifp = NULL; /* ditch ifp; keep ifp0 */
1021 if (ifp == NULL && (route == NULL || route->ro_rt == NULL)) {
1032 * We'll return ifp regardless of error, so pick it up from ifp0
1034 * releasing the ifp if it is non-NULL.
1036 ifp = ifp0;
1038 if (ifp != NULL)
1039 ifnet_reference(ifp); /* for caller */
1040 *retifp = ifp;
1050 (ifp != NULL) ? if_name(ifp) : "NONE", error);
1060 * Regardless of error, it will return an ifp with a reference held if the
1062 * if the returned ifp is valid and release its reference at all times.
1106 * back to ourselves, the ifp would be the loopback interface.
1124 * retifp might point to a valid ifp with a reference held;
1131 * Regardless of error, it will return an ifp with a reference held if the
1133 * if the returned ifp is valid and release its reference at all times.
1158 struct ifnet *ifp)
1164 if (ifp && ifp->if_index < nd_ifinfo_indexlim) {
1166 struct nd_ifinfo *ndi = &nd_ifinfo[ifp->if_index];
1661 * XXX actually, it is over-specification to return ifp against sin6_scope_id.
1664 * we may want to change the function to return something other than ifp.
1674 struct ifnet *ifp = NULL;
1715 ifp = ifindex2ifnet[pi->ipi6_ifindex];
1719 ifp = im6o_multicast_ifp;
1720 in6->s6_addr16[1] = htons(ifp->if_index);
1731 ifp = ifindex2ifnet[scopeid];
1738 if (ifp != NULL)
1739 ifnet_reference(ifp); /* for caller */
1740 *ifpp = ifp;
1758 struct ifnet *ifp)
1784 if (ifp && ifp->if_index != scopeid)