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

Function debugnet_free

freebsd/net/debugnet.c:595–614  ·  view source on GitHub ↗

* Start of consumer API surface. */

Source from the content-addressed store, hash-verified

593 * Start of consumer API surface.
594 */
595void
596debugnet_free(struct debugnet_pcb *pcb)
597{
598 struct ifnet *ifp;
599
600 MPASS(g_debugnet_pcb_inuse);
601 MPASS(pcb == &g_dnet_pcb);
602
603 ifp = pcb->dp_ifp;
604 if (ifp != NULL) {
605 if (pcb->dp_drv_input != NULL)
606 ifp->if_input = pcb->dp_drv_input;
607 if (pcb->dp_event_started)
608 ifp->if_debugnet_methods->dn_event(ifp, DEBUGNET_END);
609 }
610 debugnet_mbuf_finish();
611
612 g_debugnet_pcb_inuse = false;
613 memset(&g_dnet_pcb, 0xfd, sizeof(g_dnet_pcb));
614}
615
616int
617debugnet_connect(const struct debugnet_conn_params *dcp,

Callers 2

netdump_dumperFunction · 0.85
debugnet_connectFunction · 0.85

Calls 2

debugnet_mbuf_finishFunction · 0.85
memsetFunction · 0.85

Tested by

no test coverage detected