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

Function in_ifdetach

freebsd/netinet/in.c:1184–1200  ·  view source on GitHub ↗

* On interface removal, clean up IPv4 data structures hung off of the ifnet. */

Source from the content-addressed store, hash-verified

1182 * On interface removal, clean up IPv4 data structures hung off of the ifnet.
1183 */
1184void
1185in_ifdetach(struct ifnet *ifp)
1186{
1187 IN_MULTI_LOCK();
1188 in_pcbpurgeif0(&V_ripcbinfo, ifp);
1189 in_pcbpurgeif0(&V_udbinfo, ifp);
1190 in_pcbpurgeif0(&V_ulitecbinfo, ifp);
1191 in_purgemaddrs(ifp);
1192 IN_MULTI_UNLOCK();
1193
1194 /*
1195 * Make sure all multicast deletions invoking if_ioctl() are
1196 * completed before returning. Else we risk accessing a freed
1197 * ifnet structure pointer.
1198 */
1199 inm_release_wait(NULL);
1200}
1201
1202/*
1203 * Delete all IPv4 multicast address records, and associated link-layer

Callers 1

if_detach_internalFunction · 0.85

Calls 3

in_pcbpurgeif0Function · 0.85
in_purgemaddrsFunction · 0.85
inm_release_waitFunction · 0.85

Tested by

no test coverage detected