* Module has just been loaded into the kernel. */
| 1521 | * Module has just been loaded into the kernel. |
| 1522 | */ |
| 1523 | static int |
| 1524 | init_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. |
no test coverage detected