* Start of consumer API surface. */
| 593 | * Start of consumer API surface. |
| 594 | */ |
| 595 | void |
| 596 | debugnet_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 | |
| 616 | int |
| 617 | debugnet_connect(const struct debugnet_conn_params *dcp, |
no test coverage detected