Lines Matching defs:NULL

504  * To clear the scope ID, pass is a NULL pifscope.  To set the scope ID, pass
505 * in a non-NULL pifscope with non-zero ifscope. Otherwise if pifscope is
506 * non-NULL and ifscope is IFSCOPE_NONE, the existing scope ID is left intact.
508 * pifscope, if it is non-NULL.
515 unsigned int ifscope = (pifscope != NULL) ? *pifscope : IFSCOPE_NONE;
523 if (pifscope == NULL || ifscope != IFSCOPE_NONE)
527 if (pifscope != NULL &&
534 * passing NULL) or setting it.
546 } else if (pifscope == NULL || ifscope != IFSCOPE_NONE) {
551 if (pifscope != NULL) {
645 ret = sa_copy(sa, ss, NULL);
648 ret = sa_copy(sa, ss, NULL);
668 if (hint == NULL ||
766 if (rte_zone == NULL)
806 if ((rt = ro->ro_rt) != NULL) {
808 if (rt->rt_ifp != NULL && (rt->rt_flags & RTF_UP) &&
815 ro->ro_rt = NULL;
818 if (ro->ro_rt != NULL) {
864 struct rtentry *rt, *newrt = NULL;
869 if (rnh == NULL)
876 rt = rt_lookup(FALSE, dst, NULL, rnh, ifscope);
877 if (rt == NULL)
890 err = rtrequest_locked(RTM_RESOLVE, dst, NULL, NULL, 0, &newrt);
1042 if (rnh != NULL && rnh->rnh_close != NULL)
1069 if ((rt_parent = rt->rt_parent) != NULL)
1070 rt->rt_parent = NULL;
1072 if ((rt_ifa = rt->rt_ifa) != NULL)
1073 rt->rt_ifa = NULL;
1078 if (rt->rt_llinfo != NULL) {
1079 if (rt->rt_llinfo_free != NULL)
1083 rt->rt_llinfo = NULL;
1092 if (rt_parent != NULL)
1095 if (rt_ifa != NULL)
1233 struct rtentry *rt = NULL;
1237 struct ifaddr *ifa = NULL;
1238 unsigned int ifscope = (ifp != NULL) ? ifp->if_index : IFSCOPE_NONE;
1261 if ((ifa = ifa_ifwithnet_scoped(gateway, ifscope)) == NULL) {
1268 if (rt != NULL)
1279 if (!(flags & RTF_DONE) && rt != NULL &&
1287 ifa = NULL;
1294 ifa = NULL;
1298 if (rt != NULL)
1309 if ((rt == NULL) || (rt_mask(rt) != NULL && rt_mask(rt)->sa_len < 2))
1325 if (rt != NULL)
1329 gateway, netmask, flags, NULL, ifscope);
1350 if (rt != NULL) {
1361 if (stat != NULL)
1430 struct ifaddr *ifa = NULL;
1431 struct rtentry *rt = NULL;
1442 if (dst != NULL &&
1446 if (dst != NULL && dst->sa_family == AF_INET && ip_doscopedroute)
1448 dst = sa_copy(SA((uintptr_t)dst), &dst_ss, NULL);
1451 if (gw != NULL &&
1455 if (gw != NULL && gw->sa_family == AF_INET && ip_doscopedroute)
1457 gw = sa_copy(SA((uintptr_t)gw), &gw_ss, NULL);
1470 if (ifa == NULL)
1480 if (ifa == NULL)
1482 if (ifa == NULL) {
1486 if (rt != NULL) {
1489 if (ifa != NULL) {
1496 rt = NULL;
1504 if (ifa != NULL && ifa->ifa_addr->sa_family != dst->sa_family) {
1508 if (newifa != NULL) {
1521 if ((ifa == NULL ||
1524 0, 0, ifscope)) != NULL) {
1525 if (ifa != NULL)
1529 if (ifa != NULL) {
1543 ifa != NULL && ifa->ifa_ifp->if_index != ifscope) {
1545 ifa = NULL;
1605 struct ifaddr *ifa = NULL;
1618 if ((rnh = rt_tables[af]) == NULL)
1625 netmask = NULL;
1651 if (netmask != NULL)
1674 struct rtentry *gwrt = NULL;
1679 if ((rn = rnh->rnh_deladdr(dst, netmask, rnh)) == NULL)
1726 if ((gwrt = rt->rt_gwroute) != NULL)
1727 rt->rt_gwroute = NULL;
1732 if ((ifa = rt->rt_ifa) != NULL) {
1736 if (ifa_rtrequest != NULL)
1737 ifa_rtrequest(RTM_DELETE, rt, NULL);
1739 ifa = NULL;
1770 if (gwrt != NULL)
1778 if (ret_nrt != NULL) {
1788 if (ret_nrt == NULL || (rt = *ret_nrt) == NULL)
1806 if ((netmask = rt->rt_genmask) == NULL)
1848 NULL : &ifscope);
1851 if (netmask != NULL)
1866 if (ifa == NULL)
1870 if ((rt = rte_alloc()) == NULL)
1955 if (rn == NULL) {
1957 rt_set_gwroute(rt, rt_key(rt), NULL);
1960 rt->rt_ifa = NULL;
1970 rt->rt_parent = NULL;
1999 if (rt->rt_parent != NULL &&
2012 if (ifa_rtrequest != NULL)
2013 ifa_rtrequest(req, rt, SA(ret_nrt ? *ret_nrt : NULL));
2015 ifa = NULL;
2040 if ((rt->rt_flags & RTF_GATEWAY) && rt->rt_gwroute != NULL)
2044 !(rt->rt_flags & RTF_HOST) && rt_mask(rt) != NULL) {
2115 return (rtrequest_locked(RTM_DELETE, rt_key(rt), NULL,
2116 rt_mask(rt), rt->rt_flags, NULL));
2171 * will be NULL if it is a cloning host route.
2173 if ((xmp = (u_char *)rt_mask(rt->rt_parent)) != NULL) {
2205 return (rtrequest_locked(RTM_DELETE, rt_key(rt), NULL,
2206 rt_mask(rt), rt->rt_flags, NULL));
2252 (void) sa_copy(dst, &dst_ss, NULL);
2253 (void) sa_copy(gate, &gate_ss, NULL);
2284 if (rt_key(rt) != NULL) {
2292 rt->rt_gateway, rt_mask(rt), rt->rt_flags, NULL);
2322 if (gwrt != NULL)
2353 gwrt != NULL && gwrt->rt_ifp != NULL &&
2364 if (gwrt != NULL)
2371 /* Set gateway route; callee adds ref to gwrt if non-NULL */
2380 if (rt_primary_default(rt, dst) && rt->rt_ifp != NULL) {
2394 gwrt != NULL && gwrt->rt_gateway->sa_family == AF_LINK &&
2402 if (gwrt != NULL)
2413 if (rt->rt_gateway == NULL || glen > SA_SIZE(rt->rt_gateway->sa_len)) {
2418 if (new == NULL) {
2420 rt_set_gwroute(rt, dst, NULL);
2429 * which case rt_key(rt) is NULL (and so does rt_gateway).
2433 R_Free(rt_key(rt)); /* free old block; NULL is okay */
2446 if ((rt->rt_flags & RTF_GATEWAY) && rt->rt_gwroute != NULL &&
2489 if (gwrt != NULL)
2497 if (rt->rt_gwroute != NULL) {
2501 rt->rt_gwroute = NULL;
2505 VERIFY(rt->rt_gwroute == NULL);
2511 if ((rt->rt_gwroute = gwrt) != NULL) {
2515 /* rt_parent might be NULL if rt is embryonic */
2516 gwrt_isrouter = (rt->rt_parent != NULL &&
2572 return (NULL);
2580 dst = sa_copy(dst, &ss, (ifscope == IFSCOPE_NONE) ? NULL : &ifscope);
2583 if (netmask != NULL)
2587 f = w = NULL;
2590 if (rn != NULL && (rn->rn_flags & RNF_ROOT))
2591 rn = NULL;
2607 return (af == AF_INET ? rnh->rnh_lookup(&sin_def, NULL, rnh) :
2608 rnh->rnh_lookup(&sin6_def, NULL, rnh));
2646 netmask = NULL;
2665 if (rn != NULL && (rn->rn_flags & RNF_ROOT))
2666 rn = NULL;
2667 if (rn != NULL) {
2674 rn = NULL;
2682 if (netmask != NULL)
2718 if (rn != NULL) {
2729 rn = NULL;
2733 rn0 = NULL;
2742 rn = NULL;
2752 if (rn == NULL)
2766 if (rn == NULL || (rn0 != NULL &&
2775 if (rn == NULL && (rn = node_lookup_default(af)) != NULL &&
2777 rn = NULL;
2779 if (rn != NULL) {
2793 rn = NULL;
2813 rt = NULL;
2816 return (rt != NULL);
2864 if (m == NULL) {
2970 if (ifa_rtrequest != NULL)
2981 if (rt->rt_llinfo_purge != NULL)
2986 if (rt->rt_if_ref_fn != NULL) {
3005 if (ifa_rtrequest != NULL)
3038 if (rt->rt_ifp == NULL || rt->rt_ifp->if_want_aggressive_drain == 0)
3062 if (rt->rt_if_ref_fn != NULL) {
3065 rt->rt_if_ref_fn = NULL;
3087 if (rnh != NULL && rt_mask(rt)) {
3227 if (rte != NULL) {
3280 if (dst->ro_rt != NULL)
3291 if (dst->ro_rt == NULL) {
3298 } else if (src->ro_rt != NULL) {
3314 src->ro_rt = NULL;
3325 * If the returned route is non-NULL, the caller is responsible for
3339 *out_route = NULL;
3341 if (rt == NULL)
3365 if (hint != NULL) {
3387 if (gwrt == NULL) {
3403 rt->rt_gwroute = NULL;
3419 if (!(rt->rt_flags & RTF_UP) || gwrt == NULL ||
3423 gwrt = NULL;
3427 hint = NULL;
3429 if (gwrt != NULL)
3434 VERIFY(gwrt != NULL);
3466 VERIFY(prt != NULL);
3482 hint = NULL;
3511 if (rt != NULL) {
3529 VERIFY(gwrt != NULL);
3534 rt_key(gwrt)->sa_family && (rt->rt_gwroute == NULL ||
3545 (void) sa_copy(rt_key(gwrt), &key_ss, NULL);
3546 (void) sa_copy(rt->rt_gateway, &gw_ss, NULL);