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

Function ng_device_mod_event

freebsd/netgraph/ng_device.c:141–158  ·  view source on GitHub ↗

* Handle loading and unloading for this node type. */

Source from the content-addressed store, hash-verified

139 * Handle loading and unloading for this node type.
140 */
141static int
142ng_device_mod_event(module_t mod, int event, void *data)
143{
144 int error = 0;
145
146 switch (event) {
147 case MOD_LOAD:
148 ngd_unit = new_unrhdr(0, MAX_NGD, NULL);
149 break;
150 case MOD_UNLOAD:
151 delete_unrhdr(ngd_unit);
152 break;
153 default:
154 error = EOPNOTSUPP;
155 break;
156 }
157 return (error);
158}
159
160/*
161 * create new node

Callers

nothing calls this directly

Calls 2

new_unrhdrFunction · 0.85
delete_unrhdrFunction · 0.85

Tested by

no test coverage detected