Lines Matching defs:rt
160 struct rtentry *rt = la->la_rt;
163 if (rt == 0)
165 if (rt->rt_refcnt > 0 && (sdl = SDL(rt->rt_gateway)) &&
169 rt->rt_flags &= ~RTF_REJECT;
172 rtrequest_locked(RTM_DELETE, rt_key(rt), (struct sockaddr *)0, rt_mask(rt),
191 struct rtentry *rt = la->la_rt;
193 if (rt->rt_expire && rt->rt_expire <= timenow.tv_sec)
206 struct rtentry *rt,
209 struct sockaddr *gate = rt->rt_gateway;
210 struct llinfo_arp *la = (struct llinfo_arp *)rt->rt_llinfo;
222 if (rt->rt_flags & RTF_GATEWAY)
233 if ((rt->rt_flags & RTF_HOST) == 0 &&
234 SIN(rt_mask(rt))->sin_addr.s_addr != 0xffffffff)
235 rt->rt_flags |= RTF_CLONING;
236 if (rt->rt_flags & RTF_CLONING) {
240 rt_setgate(rt, rt_key(rt),
242 gate = rt->rt_gateway;
243 SDL(gate)->sdl_type = rt->rt_ifp->if_type;
244 SDL(gate)->sdl_index = rt->rt_ifp->if_index;
246 rt->rt_expire = MAX(timenow.tv_sec, 1);
250 if (rt->rt_flags & RTF_ANNOUNCE)
251 dlil_send_arp(rt->rt_ifp, ARPOP_REQUEST, SDL(gate), rt_key(rt), (struct sockaddr_dl *)rt_key(rt), NULL);
260 SDL(gate)->sdl_type = rt->rt_ifp->if_type;
261 SDL(gate)->sdl_index = rt->rt_ifp->if_index;
269 rt->rt_llinfo = (caddr_t)la;
277 la->la_rt = rt;
278 rt->rt_flags |= RTF_LLINFO;
287 if (IN_MULTICAST(ntohl(SIN(rt_key(rt))->sin_addr.s_addr))) {
288 dlil_resolve_multi(rt->rt_ifp, rt_key(rt), gate, sizeof(struct sockaddr_dl));
289 rt->rt_expire = 0;
291 else if (in_broadcast(SIN(rt_key(rt))->sin_addr, rt->rt_ifp)) {
294 ifnet_llbroadcast_copy_bytes(rt->rt_ifp, LLADDR(gate_ll),
301 rt->rt_expire = MAX(timenow.tv_sec, 1);
305 if (SIN(rt_key(rt))->sin_addr.s_addr ==
306 (IA_SIN(rt->rt_ifa))->sin_addr.s_addr) {
317 rt->rt_expire = 0;
318 ifnet_lladdr_copy_bytes(rt->rt_ifp, LLADDR(SDL(gate)), SDL(gate)->sdl_alen = 6);
320 rt->rt_ifp = lo_ifp;
330 rt->rt_llinfo = NULL;
331 rt->rt_flags &= ~RTF_LLINFO;