* Perform common duties while detaching an Ethernet interface */
| 1021 | * Perform common duties while detaching an Ethernet interface |
| 1022 | */ |
| 1023 | void |
| 1024 | ether_ifdetach(struct ifnet *ifp) |
| 1025 | { |
| 1026 | struct sockaddr_dl *sdl; |
| 1027 | |
| 1028 | sdl = (struct sockaddr_dl *)(ifp->if_addr->ifa_addr); |
| 1029 | uuid_ether_del(LLADDR(sdl)); |
| 1030 | |
| 1031 | if (ifp->if_l2com != NULL) { |
| 1032 | KASSERT(ng_ether_detach_p != NULL, |
| 1033 | ("ng_ether_detach_p is NULL")); |
| 1034 | (*ng_ether_detach_p)(ifp); |
| 1035 | } |
| 1036 | |
| 1037 | bpfdetach(ifp); |
| 1038 | if_detach(ifp); |
| 1039 | } |
| 1040 | |
| 1041 | #ifdef VIMAGE |
| 1042 | void |
no test coverage detected