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

Function init_siftr

freebsd/netinet/siftr.c:1523–1542  ·  view source on GitHub ↗

* Module has just been loaded into the kernel. */

Source from the content-addressed store, hash-verified

1521 * Module has just been loaded into the kernel.
1522 */
1523static int
1524init_siftr(void)
1525{
1526 EVENTHANDLER_REGISTER(shutdown_pre_sync, siftr_shutdown_handler, NULL,
1527 SHUTDOWN_PRI_FIRST);
1528
1529 /* Initialise our flow counter hash table. */
1530 counter_hash = hashinit(SIFTR_EXPECTED_MAX_TCP_FLOWS, M_SIFTR,
1531 &siftr_hashmask);
1532
1533 mtx_init(&siftr_pkt_queue_mtx, "siftr_pkt_queue_mtx", NULL, MTX_DEF);
1534 mtx_init(&siftr_pkt_mgr_mtx, "siftr_pkt_mgr_mtx", NULL, MTX_DEF);
1535
1536 /* Print message to the user's current terminal. */
1537 uprintf("\nStatistical Information For TCP Research (SIFTR) %s\n"
1538 " http://caia.swin.edu.au/urp/newtcp\n\n",
1539 MODVERSION_STR);
1540
1541 return (0);
1542}
1543
1544/*
1545 * This is the function that is called to load and unload the module.

Callers 1

siftr_load_handlerFunction · 0.85

Calls 3

mtx_initFunction · 0.85
uprintfFunction · 0.85
hashinitFunction · 0.50

Tested by

no test coverage detected