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

Function rip_detach

freebsd/netinet/raw_ip.c:913–935  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

911}
912
913static void
914rip_detach(struct socket *so)
915{
916 struct inpcb *inp;
917
918 inp = sotoinpcb(so);
919 KASSERT(inp != NULL, ("rip_detach: inp == NULL"));
920 KASSERT(inp->inp_faddr.s_addr == INADDR_ANY,
921 ("rip_detach: not closed"));
922
923 INP_INFO_WLOCK(&V_ripcbinfo);
924 INP_WLOCK(inp);
925 rip_delhash(inp);
926 if (so == V_ip_mrouter && ip_mrouter_done)
927 ip_mrouter_done();
928 if (ip_rsvp_force_done)
929 ip_rsvp_force_done(so);
930 if (so == V_ip_rsvpd)
931 ip_rsvp_done();
932 in_pcbdetach(inp);
933 in_pcbfree(inp);
934 INP_INFO_WUNLOCK(&V_ripcbinfo);
935}
936
937static void
938rip_dodisconnect(struct socket *so, struct inpcb *inp)

Callers

nothing calls this directly

Calls 4

rip_delhashFunction · 0.85
ip_rsvp_doneFunction · 0.85
in_pcbdetachFunction · 0.85
in_pcbfreeFunction · 0.85

Tested by

no test coverage detected