Lines Matching defs:rt
106 struct rtentry *rt = (struct rtentry *)treenodes;
107 struct sockaddr_in *sin = (struct sockaddr_in *)rt_key(rt);
114 rt->rt_flags |= RTF_MULTICAST;
116 if(!(rt->rt_flags & (RTF_HOST | RTF_CLONING | RTF_MULTICAST))) {
117 rt->rt_flags |= RTF_PRCLONING;
136 if (rt->rt_flags & RTF_HOST) {
137 if (in_broadcast(sin->sin_addr, rt->rt_ifp)) {
138 rt->rt_flags |= RTF_BROADCAST;
141 if (satosin(rt->rt_ifa->ifa_addr)->sin_addr.s_addr
143 rt->rt_flags |= RTF_LOCAL;
148 if (!rt->rt_rmx.rmx_mtu && !(rt->rt_rmx.rmx_locks & RTV_MTU)
149 && rt->rt_ifp)
150 rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu;
153 if (ret == NULL && rt->rt_flags & RTF_HOST) {
160 rt2 = rtalloc1_scoped_locked(rt_key(rt), 0,
161 RTF_CLONING | RTF_PRCLONING, sa_get_ifscope(rt_key(rt)));
186 struct rtentry *rt = (struct rtentry *)rn;
189 if (rt != NULL && rt->rt_refcnt == 0 && (rt->rt_flags & RTPRF_OURS)) {
190 rt->rt_flags &= ~RTPRF_OURS;
191 rt->rt_rmx.rmx_expire = 0;
265 struct rtentry *rt = (struct rtentry *)rn;
267 if (!(rt->rt_flags & RTF_UP))
270 if ((rt->rt_flags & (RTF_LLINFO | RTF_HOST)) != RTF_HOST)
273 if ((rt->rt_flags & (RTF_WASCLONED | RTPRF_OURS)) != RTF_WASCLONED)
281 if ((rt->rt_flags & RTF_DELCLONE) || rtq_reallyold == 0) {
288 if (rtrequest_locked(RTM_DELETE, (struct sockaddr *)rt_key(rt),
289 rt->rt_gateway, rt_mask(rt), rt->rt_flags, &rt) == 0) {
291 rtunref(rt);
297 rt->rt_flags |= RTPRF_OURS;
298 rt->rt_rmx.rmx_expire = timenow.tv_sec + rtq_reallyold;
320 struct rtentry *rt = (struct rtentry *)rn;
327 if (rt->rt_flags & RTPRF_OURS) {
330 if (ap->draining || rt->rt_rmx.rmx_expire <= timenow.tv_sec) {
331 if (rt->rt_refcnt > 0)
335 (struct sockaddr *)rt_key(rt),
336 rt->rt_gateway, rt_mask(rt),
337 rt->rt_flags, 0);
345 && (rt->rt_rmx.rmx_expire - timenow.tv_sec
347 rt->rt_rmx.rmx_expire = timenow.tv_sec
351 rt->rt_rmx.rmx_expire);
482 struct rtentry *rt = (struct rtentry *)rn;
485 if (rt->rt_ifa == ap->ifa &&
486 (ap->del || !(rt->rt_flags & RTF_STATIC))) {
495 rt->rt_flags &= ~(RTF_CLONING | RTF_PRCLONING);
496 err = rtrequest_locked(RTM_DELETE, (struct sockaddr *)rt_key(rt),
497 rt->rt_gateway, rt_mask(rt), rt->rt_flags, 0);