* Hook disconnection. Note that we do *not* shutdown when all * hooks have been disconnected. */
| 767 | * hooks have been disconnected. |
| 768 | */ |
| 769 | static int |
| 770 | ng_iface_disconnect(hook_p hook) |
| 771 | { |
| 772 | const priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); |
| 773 | const iffam_p iffam = get_iffam_from_hook(priv, hook); |
| 774 | |
| 775 | if (iffam == NULL) |
| 776 | panic("%s", __func__); |
| 777 | PRIV_WLOCK(priv); |
| 778 | *get_hook_from_iffam(priv, iffam) = NULL; |
| 779 | PRIV_WUNLOCK(priv); |
| 780 | return (0); |
| 781 | } |
| 782 | |
| 783 | /* |
| 784 | * Handle loading and unloading for this node type. |
nothing calls this directly
no test coverage detected