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

Function udp6_detach

freebsd/netinet6/udp6_usrreq.c:1261–1280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1259}
1260
1261static void
1262udp6_detach(struct socket *so)
1263{
1264 struct inpcb *inp;
1265 struct inpcbinfo *pcbinfo;
1266 struct udpcb *up;
1267
1268 pcbinfo = udp_get_inpcbinfo(so->so_proto->pr_protocol);
1269 inp = sotoinpcb(so);
1270 KASSERT(inp != NULL, ("udp6_detach: inp == NULL"));
1271
1272 INP_INFO_WLOCK(pcbinfo);
1273 INP_WLOCK(inp);
1274 up = intoudpcb(inp);
1275 KASSERT(up != NULL, ("%s: up == NULL", __func__));
1276 in_pcbdetach(inp);
1277 in_pcbfree(inp);
1278 INP_INFO_WUNLOCK(pcbinfo);
1279 udp_discardcb(up);
1280}
1281
1282static int
1283udp6_disconnect(struct socket *so)

Callers

nothing calls this directly

Calls 4

in_pcbdetachFunction · 0.85
in_pcbfreeFunction · 0.85
udp_discardcbFunction · 0.85
udp_get_inpcbinfoFunction · 0.50

Tested by

no test coverage detected