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

Function bridge_init

freebsd/net/if_bridge.c:1901–1918  ·  view source on GitHub ↗

* bridge_init: * * Initialize a bridge interface. */

Source from the content-addressed store, hash-verified

1899 * Initialize a bridge interface.
1900 */
1901static void
1902bridge_init(void *xsc)
1903{
1904 struct bridge_softc *sc = (struct bridge_softc *)xsc;
1905 struct ifnet *ifp = sc->sc_ifp;
1906
1907 if (ifp->if_drv_flags & IFF_DRV_RUNNING)
1908 return;
1909
1910 BRIDGE_LOCK(sc);
1911 callout_reset(&sc->sc_brcallout, bridge_rtable_prune_period * hz,
1912 bridge_timer, sc);
1913
1914 ifp->if_drv_flags |= IFF_DRV_RUNNING;
1915 bstp_init(&sc->sc_stp); /* Initialize Spanning Tree */
1916
1917 BRIDGE_UNLOCK(sc);
1918}
1919
1920/*
1921 * bridge_stop:

Callers

nothing calls this directly

Calls 1

bstp_initFunction · 0.85

Tested by

no test coverage detected