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

Function netdump_unconfigure

freebsd/netinet/netdump/netdump_client.c:373–394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371static struct cdev *netdump_cdev;
372
373static void
374netdump_unconfigure(void)
375{
376 struct diocskerneldump_arg kda;
377
378 NETDUMP_ASSERT_WLOCKED();
379 KASSERT(netdump_enabled(), ("%s: not enabled", __func__));
380
381 bzero(&kda, sizeof(kda));
382 kda.kda_index = KDA_REMOVE_DEV;
383 (void)dumper_remove(nd_conf.ndc_iface, &kda);
384
385 if (nd_ifp != NULL)
386 if_rele(nd_ifp);
387 nd_ifp = NULL;
388 netdump_set_enabled(false);
389
390 log(LOG_WARNING, "netdump: Lost configured interface %s\n",
391 nd_conf.ndc_iface);
392
393 bzero(&nd_conf, sizeof(nd_conf));
394}
395
396static void
397netdump_ifdetach(void *arg __unused, struct ifnet *ifp)

Callers 3

netdump_ifdetachFunction · 0.85
netdump_ioctlFunction · 0.85
netdump_modeventFunction · 0.85

Calls 6

netdump_enabledFunction · 0.85
bzeroFunction · 0.85
dumper_removeFunction · 0.85
if_releFunction · 0.85
netdump_set_enabledFunction · 0.85
logFunction · 0.50

Tested by

no test coverage detected