MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rt_table_destroy

Function rt_table_destroy

freebsd/net/route.c:150–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150void
151rt_table_destroy(struct rib_head *rh)
152{
153
154 RIB_WLOCK(rh);
155 rh->rib_dying = true;
156 RIB_WUNLOCK(rh);
157
158#ifdef FIB_ALGO
159 fib_destroy_rib(rh);
160#endif
161
162 tmproutes_destroy(rh);
163
164 rn_walktree(&rh->rmhead.head, rt_freeentry, &rh->rmhead.head);
165
166 nhops_destroy_rib(rh);
167
168 rib_destroy_subscriptions(rh);
169
170 /* Assume table is already empty */
171 RIB_LOCK_DESTROY(rh);
172 free(rh, M_RTABLE);
173}
174
175/*
176 * Adds a temporal redirect entry to the routing table.

Callers 2

in_detachheadFunction · 0.85
in6_detachheadFunction · 0.85

Calls 6

fib_destroy_ribFunction · 0.85
tmproutes_destroyFunction · 0.85
rn_walktreeFunction · 0.85
nhops_destroy_ribFunction · 0.85
freeFunction · 0.50

Tested by

no test coverage detected