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

Function siftr_load_handler

freebsd/netinet/siftr.c:1555–1580  ·  view source on GitHub ↗

* This is the function that is called to load and unload the module. * When the module is loaded, this function is called once with * "what" == MOD_LOAD * When the module is unloaded, this function is called twice with * "what" = MOD_QUIESCE first, followed by "what" = MOD_UNLOAD second * When the system is shut down e.g. CTRL-ALT-DEL or using the shutdown command, * this function is called

Source from the content-addressed store, hash-verified

1553 * of the shutdown sequence i.e. after the disks have been synced.
1554 */
1555static int
1556siftr_load_handler(module_t mod, int what, void *arg)
1557{
1558 int ret;
1559
1560 switch (what) {
1561 case MOD_LOAD:
1562 ret = init_siftr();
1563 break;
1564
1565 case MOD_QUIESCE:
1566 case MOD_SHUTDOWN:
1567 ret = deinit_siftr();
1568 break;
1569
1570 case MOD_UNLOAD:
1571 ret = 0;
1572 break;
1573
1574 default:
1575 ret = EINVAL;
1576 break;
1577 }
1578
1579 return (ret);
1580}
1581
1582static moduledata_t siftr_mod = {
1583 .name = "siftr",

Callers

nothing calls this directly

Calls 2

init_siftrFunction · 0.85
deinit_siftrFunction · 0.85

Tested by

no test coverage detected