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

Function htable_prefix_free

freebsd/net/if_llatbl.c:238–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236}
237
238static void
239htable_prefix_free(struct lltable *llt, const struct sockaddr *addr,
240 const struct sockaddr *mask, u_int flags)
241{
242 struct llentry *lle, *next;
243 struct prefix_match_data pmd;
244
245 bzero(&pmd, sizeof(pmd));
246 pmd.addr = addr;
247 pmd.mask = mask;
248 pmd.flags = flags;
249 CK_LIST_INIT(&pmd.dchain);
250
251 IF_AFDATA_WLOCK(llt->llt_ifp);
252 /* Push matching lles to chain */
253 lltable_foreach_lle(llt, htable_prefix_free_cb, &pmd);
254
255 llentries_unlink(llt, &pmd.dchain);
256 IF_AFDATA_WUNLOCK(llt->llt_ifp);
257
258 CK_LIST_FOREACH_SAFE(lle, &pmd.dchain, lle_chain, next)
259 lltable_free_entry(llt, lle);
260}
261
262static void
263htable_free_tbl(struct lltable *llt)

Callers

nothing calls this directly

Calls 4

bzeroFunction · 0.85
lltable_foreach_lleFunction · 0.85
llentries_unlinkFunction · 0.85
lltable_free_entryFunction · 0.85

Tested by

no test coverage detected