Home | History | Annotate | Download | only in net

Lines Matching refs:rtentry

168 static void	rt_timer_remove_all(struct rtentry *);
181 * - References to a rtentry is managed by reference counting and psref
182 * - Reference counting is used for temporal reference when a rtentry
184 * - psref is used for temporal reference when a rtentry is fetched
188 * - Before destroying or updating a rtentry, we have to wait for
191 * - An obtained rtentry via rtalloc1 or rtrequest* must be
193 * - An obtained rtentry via rtcache_* must be unreferenced by
197 * - rtentry destruction
198 * - A rtentry is destroyed (freed) only when we call rtrequest(RTM_DELETE)
199 * - If a caller of rtrequest grabs a reference of a rtentry, the caller
200 * has a responsibility to destroy the rtentry by itself by calling
205 * - rtentry update
206 * - When updating a rtentry, RTF_UPDATING flag is set
207 * - If a rtentry is set RTF_UPDATING, fetching the rtentry from
216 * - When a rtcache caches a rtentry into itself, it also stores
245 * mutex and cv that are used to wait for references to a rtentry left
246 * before updating the rtentry.
263 SLIST_HEAD(, rtentry) queue;
267 /* psref for rtentry */
276 static int rtdeletemsg(struct rtentry *);
283 static void rt_ref(struct rtentry *);
285 static struct rtentry *
293 static void rtcache_ref(struct rtentry *, struct route *);
300 static void rt_wait_refcnt(const char *, struct rtentry *, int);
301 static void rt_wait_psref(struct rtentry *);
306 static int db_show_rtentry(struct rtentry *, void *);
330 rt_destroy(struct rtentry *rt)
342 rt_setkey(struct rtentry *rt, const struct sockaddr *key, int flags)
356 rt_get_ifa(struct rtentry *rt)
377 rt_set_ifa1(struct rtentry *rt, struct ifaddr *ifa)
388 rt_ifa_connected(const struct rtentry *rt, const struct ifaddr *ifa)
409 rt_replace_ifa(struct rtentry *rt, struct ifaddr *ifa)
439 rt_set_ifa(struct rtentry *rt, struct ifaddr *ifa)
479 rt_psref_class = psref_class_create("rtentry", IPL_SOFTNET);
489 pool_init(&rtentry_pool, sizeof(struct rtentry), 0, 0, 0, "rtentpl",
515 dump_rt(const struct rtentry *rt)
544 * Packet routing routines. If success, refcnt of a returned rtentry
547 struct rtentry *
552 struct rtentry *rt;
608 struct rtentry *
611 struct rtentry *rt;
621 rt_ref(struct rtentry *rt)
629 rt_unref(struct rtentry *rt)
661 rt_wait_refcnt(const char *title, struct rtentry *rt, int cnt)
675 rt_wait_psref(struct rtentry *rt)
683 _rt_free(struct rtentry *rt)
718 struct rtentry *rt;
734 rt_free(struct rtentry *rt)
770 rt_update_prepare(struct rtentry *rt)
804 rt_update_finish(struct rtentry *rt)
831 struct rtentry **rtp)
833 struct rtentry *rt;
923 * If error != 0, the rtentry is being
959 rtdeletemsg(struct rtentry *rt)
963 struct rtentry *retrt;
1012 struct rtentry *rt;
1023 * Revisit when working on rtentry MP-ification.
1059 const struct sockaddr *netmask, int flags, struct rtentry **ret_nrt)
1141 rtrequest1(int req, struct rt_addrinfo *info, struct rtentry **ret_nrt)
1145 struct rtentry *rt;
1265 cv_init(&rt->rt_cv, "rtentry");
1323 rt_setgate(struct rtentry *rt, const struct sockaddr *gate)
1344 struct rtentry *gwrt;
1371 rt_update_get_ifa(const struct rt_addrinfo *info, const struct rtentry *rt,
1432 rt_update(struct rtentry *rt, struct rt_addrinfo *info, void *rtm)
1550 rt_newmsg(const int cmd, const struct rtentry *rt)
1570 rt_newmsg_dynamic(const int cmd, const struct rtentry *rt)
1618 struct rtentry *rt;
1621 struct rtentry *nrt = NULL;
1691 struct rtentry *rt;
1704 struct rtentry *nrt;
1739 struct rtentry *rt;
1776 * If error != 0, the rtentry is being
1908 rt_timer_remove_all(struct rtentry *rt)
1926 rt_timer_add(struct rtentry *rt,
1927 void (*func)(struct rtentry *, struct rttimer *),
1985 * Take a reference to avoid the rtentry is freed
2013 static struct rtentry *
2016 struct rtentry *rt;
2039 struct rtentry *
2046 struct rtentry *
2053 struct rtentry *
2064 struct rtentry *rt;
2091 rtcache_trace(const char *func, struct rtentry *rt, struct route *ro)
2105 rtcache_ref(struct rtentry *rt, struct route *ro)
2120 rtcache_unref(struct rtentry *rt, struct route *ro)
2133 struct rtentry *
2136 struct rtentry *rt = NULL;
2176 struct rtentry *
2181 struct rtentry *rt = NULL;
2274 rt_settag(struct rtentry *rt, const struct sockaddr *tag)
2285 rt_gettag(const struct rtentry *rt)
2291 rt_check_reject_route(const struct rtentry *rt, const struct ifnet *ifp)
2309 rt_delete_matched_entries(sa_family_t family, int (*f)(struct rtentry *, void *),
2316 struct rtentry *rt, *retrt = NULL;
2347 log(LOG_ERR, "%s: unable to delete rtentry @ %p, "
2355 rt_walktree_locked(sa_family_t family, int (*f)(struct rtentry *, void *),
2364 int (*f)(struct rtentry *, void *), void *v, struct ifaddr *ifa)
2372 struct rtentry *rt;
2395 * If error != 0, the rtentry is being
2410 rt_walktree(sa_family_t family, int (*f)(struct rtentry *, void *), void *v)
2484 db_show_rtentry(struct rtentry *rt, void *w)
2486 db_printf("rtentry=%p", rt);