Searched refs:rt (Results 1 - 25 of 47) sorted by relevance

12

/xnu-2422.115.4/bsd/netinet/
H A Din_rmx.c115 struct rtentry *rt = (struct rtentry *)treenodes; local
116 struct sockaddr_in *sin = (struct sockaddr_in *)(void *)rt_key(rt);
119 uint32_t flags = rt->rt_flags;
123 RT_LOCK_ASSERT_HELD(rt);
126 rt_str(rt, dbuf, sizeof (dbuf), gbuf, sizeof (gbuf));
132 rt->rt_flags |= RTF_MULTICAST;
134 if (!(rt->rt_flags & (RTF_HOST | RTF_CLONING | RTF_MULTICAST)))
135 rt->rt_flags |= RTF_PRCLONING;
153 if (rt->rt_flags & RTF_HOST) {
154 if (in_broadcast(sin->sin_addr, rt
260 struct rtentry *rt = (struct rtentry *)rn; local
278 struct rtentry *rt = (struct rtentry *)rn; local
362 struct rtentry *rt = (struct rtentry *)rn; local
461 struct rtentry *rt = (struct rtentry *)rn; local
711 struct rtentry *rt = (struct rtentry *)rn; local
[all...]
H A Din_arp.c296 arp_llinfo_purge(struct rtentry *rt) argument
298 struct llinfo_arp *la = rt->rt_llinfo;
300 RT_LOCK_ASSERT_HELD(rt);
301 VERIFY(rt->rt_llinfo_purge == arp_llinfo_purge && la != NULL);
304 RT_CONVERT_LOCK(rt);
312 arp_llinfo_get_ri(struct rtentry *rt, struct rt_reach_info *ri) argument
314 struct llinfo_arp *la = rt->rt_llinfo;
334 arp_llinfo_get_iflri(struct rtentry *rt, struct ifnet_llreach_info *iflri) argument
336 struct llinfo_arp *la = rt->rt_llinfo;
440 arp_llreach_alloc(struct rtentry *rt, struc argument
521 struct rtentry *rt = la->la_rt; local
666 arp_rtrequest(int req, struct rtentry *rt, struct sockaddr *sa) argument
912 route_t rt; local
[all...]
H A Dip_mroute.c342 #define MFCFIND(o, g, rt) { \
344 rt = NULL; \
350 rt = _rt; \
355 if (rt == NULL) { \
524 struct mfc *rt; local
526 MFCFIND(req->src.s_addr, req->grp.s_addr, rt);
527 if (rt != NULL) {
528 req->pktcnt = rt->mfc_pkt_cnt;
529 req->bytecnt = rt->mfc_byte_cnt;
530 req->wrong_if = rt
598 struct mfc *rt; local
827 struct mfc *rt; local
995 struct mfc *rt; local
1065 struct mfc *rt; local
1332 ip_mdq(struct mbuf *m, struct ifnet *ifp, struct mfc *rt, vifi_t xmt_vif) argument
[all...]
H A Dtcp_subr.c948 tcp_getrt_rtt(struct tcpcb *tp, struct rtentry *rt) argument
950 u_int32_t rtt = rt->rt_rmx.rmx_rtt;
958 if (rt->rt_rmx.rmx_locks & RTV_RTT)
964 if (rt->rt_rmx.rmx_rttvar) {
965 tp->t_rttvar = rt->rt_rmx.rmx_rttvar /
996 struct rtentry *rt; local
1036 rt = ro->ro_rt;
1037 if (rt != NULL)
1038 RT_LOCK_SPIN(rt);
1058 if (rt
1803 struct rtentry *rt; local
2051 struct rtentry *rt; local
2155 struct rtentry *rt; local
2249 struct rtentry *rt; local
2400 struct rtentry *rt; local
[all...]
H A Din_gif.c105 __unused struct rtentry *rt)
380 struct rtentry *rt; local
386 rt = rtalloc1_scoped((struct sockaddr *)&sin, 0, 0,
388 if (rt != NULL)
389 RT_LOCK(rt);
390 if (rt == NULL || rt->rt_ifp != m->m_pkthdr.rcvif) {
391 if (rt != NULL) {
392 RT_UNLOCK(rt);
393 rtfree(rt);
101 in_gif_output( struct ifnet *ifp, int family, struct mbuf *m, __unused struct rtentry *rt) argument
[all...]
/xnu-2422.115.4/bsd/net/
H A Droute.c458 * route; dst typically comes from rt_key(rt) but may be coming from
459 * a separate place when rt is in the process of being created.
462 rt_primary_default(struct rtentry *rt, struct sockaddr *dst) argument
464 return (SA_DEFAULT(dst) && !(rt->rt_flags & RTF_IFSCOPE));
797 struct rtentry *rt = (struct rtentry *)rn; local
799 int af = rt_key(rt)->sa_family;
801 if (!(rt->rt_flags & RTF_IFSCOPE) || (af != AF_INET && af != AF_INET6))
805 (SINIFSCOPE(rt_key(rt))->sin_scope_id == ma->ifscope) :
806 (SIN6IFSCOPE(rt_key(rt))->sin6_scope_id == ma->ifscope));
854 struct rtentry *rt; local
912 struct rtentry *rt, *newrt = NULL; local
1016 rtfree_locked(struct rtentry *rt) argument
1022 rtfree_common(struct rtentry *rt, boolean_t locked) argument
1185 rtfree(struct rtentry *rt) argument
1272 rtsetifa(struct rtentry *rt, struct ifaddr *ifa) argument
1307 struct rtentry *rt = NULL; local
1511 struct rtentry *rt = NULL; local
1682 struct rtentry *rt; local
2215 struct rtentry *rt = (struct rtentry *)rn; local
2252 struct rtentry *rt = (struct rtentry *)rn; local
2342 rt_setgate(struct rtentry *rt, struct sockaddr *dst, struct sockaddr *gate) argument
2596 rt_set_gwroute(struct rtentry *rt, struct sockaddr *dst, struct rtentry *gwrt) argument
2842 struct rtentry *rt = RT(rn); local
2941 rt_validate(struct rtentry *rt) argument
2984 struct rtentry *rt = NULL; local
3268 rt_set_idleref(struct rtentry *rt) argument
3290 rt_clear_idleref(struct rtentry *rt) argument
3305 rt_set_proxy(struct rtentry *rt, boolean_t set) argument
3333 rte_lock_init(struct rtentry *rt) argument
3339 rte_lock_destroy(struct rtentry *rt) argument
3346 rt_lock(struct rtentry *rt, boolean_t spin) argument
3358 rt_unlock(struct rtentry *rt) argument
3596 struct rtentry *rt = hint0, *hint = hint0; local
3788 rt_revalidate_gwroute(struct rtentry *rt, struct rtentry *gwrt) argument
3832 rt_str4(struct rtentry *rt, char *ds, uint32_t dslen, char *gs, uint32_t gslen) argument
3853 rt_str6(struct rtentry *rt, char *ds, uint32_t dslen, char *gs, uint32_t gslen) argument
3875 rt_str(struct rtentry *rt, char *ds, uint32_t dslen, char *gs, uint32_t gslen) argument
[all...]
H A Drtsock.c299 struct rtentry *rt = NULL; local
500 rt = saved_nrt;
501 RT_LOCK(rt);
516 rt = rt_lookup(TRUE, info.rti_info[RTAX_DST],
518 if (rt == NULL)
520 RT_LOCK(rt);
532 RT_LOCK_ASSERT_HELD(rt);
533 info.rti_info[RTAX_DST] = rt_key(rt);
535 info.rti_info[RTAX_GATEWAY] = rt->rt_gateway;
536 info.rti_info[RTAX_NETMASK] = rt_mask(rt);
696 rt_setexpire(struct rtentry *rt, uint64_t expiry) argument
775 rt_setif(struct rtentry *rt, struct sockaddr *Ifpaddr, struct sockaddr *Ifaaddr, struct sockaddr *Gate, unsigned int ifscope) argument
1246 rt_newaddrmsg(int cmd, struct ifaddr *ifa, int error, struct rtentry *rt) argument
1446 struct rtentry *rt = (struct rtentry *)rn; local
1512 struct rtentry *rt = (struct rtentry *)rn; local
[all...]
H A Dnetsrc.c133 struct rtentry *rt; local
150 rt = rt_lookup(TRUE, (struct sockaddr *)dstsin, NULL,
153 if (!rt)
158 if (ia->ia_ifp == rt->rt_ifp) {
179 if (rt)
180 rtfree(rt);
H A Dif_stf.c686 struct rtentry *rt; local
692 rt = rtalloc1((struct sockaddr *)&sin, 0, 0);
693 if (rt != NULL)
694 RT_LOCK(rt);
695 if (rt == NULL || rt->rt_ifp != inifp) {
701 if (rt != NULL) {
702 RT_UNLOCK(rt);
703 rtfree(rt);
707 RT_UNLOCK(rt);
831 stf_rtrequest( __unused int cmd, struct rtentry *rt, __unused struct sockaddr *sa) argument
[all...]
H A Dif_llreach.c433 struct rtentry *rt; local
451 rt = rt_lookup(TRUE, SA(&dst_ss), SA(&mask_ss), rnh, ifp->if_index);
452 if (rt != NULL) {
455 RT_LOCK(rt);
456 if ((rt->rt_flags & RTF_GATEWAY) &&
457 (gwrt = rt->rt_gwroute) != NULL &&
458 rt_key(rt)->sa_family == rt_key(gwrt)->sa_family &&
460 RT_UNLOCK(rt);
468 RT_UNLOCK(rt);
470 rtfree_locked(rt);
[all...]
H A Dif_loop.c428 struct rtentry *rt = route; local
434 if (rt != NULL) {
435 u_int32_t rt_flags = rt->rt_flags;
467 lo_rtrequest(int cmd, struct rtentry *rt, struct sockaddr *sa) argument
470 if (rt != NULL) {
471 RT_LOCK_ASSERT_HELD(rt);
472 rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu; /* for ISO */
478 rt->rt_rmx.rmx_recvpipe = rt
[all...]
/xnu-2422.115.4/bsd/netinet6/
H A Din6_rmx.c161 struct rtentry *rt = (struct rtentry *)treenodes; local
162 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)(void *)rt_key(rt);
165 uint32_t flags = rt->rt_flags;
169 RT_LOCK_ASSERT_HELD(rt);
172 rt_str(rt, dbuf, sizeof (dbuf), gbuf, sizeof (gbuf));
182 if ((rt->rt_flags & RTF_DYNAMIC) &&
190 rt->rt_flags |= RTF_MULTICAST;
192 if (!(rt->rt_flags & (RTF_HOST | RTF_CLONING | RTF_MULTICAST)))
193 rt->rt_flags |= RTF_PRCLONING;
209 if (rt
341 struct rtentry *rt = (struct rtentry *)rn; local
366 struct rtentry *rt = (struct rtentry *)rn; local
449 struct rtentry *rt = (struct rtentry *)rn; local
550 struct rtentry *rt = (struct rtentry *)rn; local
[all...]
H A Dip6_forward.c127 struct rtentry *rt; local
155 (rt = ip6forward_rt->ro_rt) != NULL && (rt->rt_flags & RTF_PROXY)) {
157 if ((rt = ip6forward_rt->ro_rt) != NULL)
158 ifscope = rt->rt_ifp->if_index;
171 if (ifscope != IFSCOPE_NONE && (rt = ip6forward_rt->ro_rt) != NULL) {
172 RT_LOCK(rt);
173 if (rt->rt_ifp->if_index != ifscope) {
174 RT_UNLOCK(rt);
176 rt
[all...]
H A Dip6_mroute.c204 #define MF6CFIND(o, g, rt) do { \
206 rt = NULL; \
212 rt = _rt; \
217 if (rt == NULL) { \
388 struct mf6c *rt; local
390 MF6CFIND(req->src.sin6_addr, req->grp.sin6_addr, rt);
391 if (rt != NULL) {
392 req->pktcnt = rt->mf6c_pkt_cnt;
393 req->bytecnt = rt->mf6c_byte_cnt;
394 req->wrong_if = rt
509 struct mf6c *rt; local
728 struct mf6c *rt; local
906 struct mf6c *rt; local
980 struct mf6c *rt; local
[all...]
H A Dnd6.c347 nd6_llinfo_purge(struct rtentry *rt) argument
349 struct llinfo_nd6 *ln = rt->rt_llinfo;
351 RT_LOCK_ASSERT_HELD(rt);
352 VERIFY(rt->rt_llinfo_purge == nd6_llinfo_purge && ln != NULL);
355 RT_CONVERT_LOCK(rt);
363 nd6_llinfo_get_ri(struct rtentry *rt, struct rt_reach_info *ri) argument
365 struct llinfo_nd6 *ln = rt->rt_llinfo;
385 nd6_llinfo_get_iflri(struct rtentry *rt, struct ifnet_llreach_info *iflri) argument
387 struct llinfo_nd6 *ln = rt->rt_llinfo;
419 struct rtentry *rt local
790 struct rtentry *rt; local
1033 struct rtentry *rt = ln->ln_rt; local
1606 struct rtentry *rt; local
1649 struct rtentry *rt; local
1880 struct rtentry *rt; local
1911 nd6_free(struct rtentry *rt) argument
2005 nd6_rtrequest(int req, struct rtentry *rt, struct sockaddr *sa) argument
2578 struct rtentry *rt; local
2911 struct rtentry *rt = NULL; local
3187 struct rtentry *rt = hint0, *hint = hint0; local
3713 nd6_storelladdr(struct ifnet *ifp, struct rtentry *rt, struct mbuf *m, struct sockaddr *dst, u_char *desten) argument
[all...]
H A Dnd6_nbr.c170 nd6_llreach_alloc(struct rtentry *rt, struct ifnet *ifp, void *addr, argument
173 struct llinfo_nd6 *ln = rt->rt_llinfo;
177 !(rt->rt_ifp->if_flags & IFF_LOOPBACK) &&
184 RT_CONVERT_LOCK(rt);
197 VERIFY(rt->rt_llinfo_purge != NULL);
198 rt->rt_llinfo_purge(rt);
227 &SIN6(rt_key(rt))->sin6_addr, tmp, sizeof (tmp))));
386 struct rtentry *rt; local
394 rt
856 struct rtentry *rt; local
2310 struct rtentry *rt; local
2359 struct rtentry *rt; local
[all...]
H A Dnd6_prproxy.c292 struct rtentry *rt; local
318 if ((rt = pr->ndpr_rt) != NULL) {
320 RT_ADDREF(rt);
322 rt = NULL;
328 if (rt != NULL) {
329 rt_set_proxy(rt, enable);
330 rtfree(rt);
337 struct rtentry *rt; local
360 if ((rt = pr->ndpr_rt) != NULL) {
362 RT_ADDREF(rt);
523 struct rtentry *rt; local
582 struct rtentry *rt; local
[all...]
H A Din6_gif.c103 __unused struct rtentry *rt)
342 struct rtentry *rt; local
349 rt = rtalloc1((struct sockaddr *)&sin6, 0, 0);
350 if (rt != NULL)
351 RT_LOCK(rt);
352 if (!rt || rt->rt_ifp != ifp) {
358 if (rt != NULL) {
359 RT_UNLOCK(rt);
360 rtfree(rt);
99 in6_gif_output( struct ifnet *ifp, int family, struct mbuf *m, __unused struct rtentry *rt) argument
[all...]
H A Dscope6.c248 rtkey_to_sa6(struct rtentry *rt, struct sockaddr_in6 *sin6) argument
250 VERIFY(rt_key(rt)->sa_family == AF_INET6);
252 *sin6 = *((struct sockaddr_in6 *)(void *)rt_key(rt));
257 rtgw_to_sa6(struct rtentry *rt, struct sockaddr_in6 *sin6) argument
259 VERIFY(rt->rt_flags & RTF_GATEWAY);
261 *sin6 = *((struct sockaddr_in6 *)(void *)rt->rt_gateway);
H A Din6_pcb.c446 struct rtentry *rt = inp->in6p_route.ro_rt; local
454 if (rt != NULL && rt->rt_ifp != *outif) {
455 ifnet_reference(rt->rt_ifp); /* for caller */
458 *outif = rt->rt_ifp;
1010 struct rtentry *rt; local
1013 if ((rt = in6p->in6p_route.ro_rt) != NULL) {
1014 RT_LOCK(rt);
1018 info.rti_info[RTAX_GATEWAY] = rt->rt_gateway;
1019 info.rti_info[RTAX_NETMASK] = rt_mask(rt);
[all...]
H A Dudp6_output.c430 struct rtentry *rt = in6p->in6p_route.ro_rt; local
433 if (rt->rt_flags & RTF_MULTICAST)
434 rt = NULL; /* unusable */
440 if (rt == NULL)
447 if (rt != NULL &&
448 (outif = rt->rt_ifp) != in6p->in6p_last_outifp)
H A Din6_ifattach.c966 struct rtentry *rt; local
1049 rt = rtalloc1((struct sockaddr *)&ia->ia_addr, 0, 0);
1050 if (rt != NULL) {
1055 rt->rt_flags, (struct rtentry **)0);
1056 rtfree(rt);
1123 rt = rtalloc1((struct sockaddr *)&sin6, 0, 0);
1124 if (rt != NULL) {
1125 RT_LOCK(rt);
1126 if (rt->rt_ifp == ifp) {
1132 rt
[all...]
H A Dicmp6.c1151 struct rtentry *rt = NULL; local
1182 rt = rtalloc1_scoped((struct sockaddr *)&sin6, 0,
1184 if (rt != NULL) {
1185 RT_LOCK(rt);
1186 if ((rt->rt_flags & RTF_HOST) &&
1187 !(rt->rt_rmx.rmx_locks & RTV_MTU) &&
1188 mtu < IN6_LINKMTU(rt->rt_ifp) &&
1189 rt->rt_rmx.rmx_mtu > mtu) {
1191 rt->rt_rmx.rmx_mtu = mtu;
1193 RT_UNLOCK(rt);
2373 struct rtentry *rt = NULL; local
[all...]
H A Dnd6_rtr.c731 nd6_rtmsg(cmd, rt)
733 struct rtentry *rt;
736 struct ifnet *ifp = rt->rt_ifp;
738 RT_LOCK_ASSERT_HELD(rt);
742 info.rti_info[RTAX_DST] = rt_key(rt);
743 info.rti_info[RTAX_GATEWAY] = rt->rt_gateway;
744 info.rti_info[RTAX_NETMASK] = rt_mask(rt);
750 info.rti_info[RTAX_IFA] = rt->rt_ifa->ifa_addr;
752 rt_missmsg(cmd, &info, rt->rt_flags, 0);
1232 struct rtentry *rt local
2913 struct rtentry *rt; local
3419 struct rtentry *rt = NULL; local
3637 struct rtentry *rt = NULL, *ndpr_rt = NULL; local
4209 struct rtentry *rt = (struct rtentry *)rn; local
[all...]
/xnu-2422.115.4/tools/lldbmacros/
H A Dnet.py588 rt = Cast(rte, 'rtentry *')
589 dst = Cast(rt.rt_nodes[0].rn_u.rn_leaf.rn_Key, 'sockaddr *')
608 gw = Cast(rt.rt_gateway, 'sockaddr *')
625 if (rt.rt_flags & RTF_WASCLONED):
628 out_string += rt_flags_string_format.format(rt.rt_parent) + " "
631 out_string += rt_flags_string_format.format(rt.rt_parent) + " "
639 out_string += rt_refcnt_rmx_string_format.format(rt.rt_refcnt, rt.rt_rmx.rmx_pksent) + " "
642 if (rt.rt_flags & RTF_UP):
644 if (rt
[all...]

Completed in 135 milliseconds

12