* bridge_rtable_init: * * Initialize the route table for this bridge. */
| 2917 | * Initialize the route table for this bridge. |
| 2918 | */ |
| 2919 | static void |
| 2920 | bridge_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: |
no test coverage detected