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

Function bridge_rtable_init

freebsd/net/if_bridge.c:2919–2932  ·  view source on GitHub ↗

* bridge_rtable_init: * * Initialize the route table for this bridge. */

Source from the content-addressed store, hash-verified

2917 * Initialize the route table for this bridge.
2918 */
2919static void
2920bridge_rtable_init(struct bridge_softc *sc)
2921{
2922 int i;
2923
2924 sc->sc_rthash = malloc(sizeof(*sc->sc_rthash) * BRIDGE_RTHASH_SIZE,
2925 M_DEVBUF, M_WAITOK);
2926
2927 for (i = 0; i < BRIDGE_RTHASH_SIZE; i++)
2928 CK_LIST_INIT(&sc->sc_rthash[i]);
2929
2930 sc->sc_rthash_key = arc4random();
2931 CK_LIST_INIT(&sc->sc_rtlist);
2932}
2933
2934/*
2935 * bridge_rtable_fini:

Callers 1

bridge_clone_createFunction · 0.85

Calls 2

mallocFunction · 0.85
arc4randomFunction · 0.50

Tested by

no test coverage detected