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

Function in_pcbnotifyall

freebsd/netinet/in_pcb.c:1993–2017  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1991}
1992
1993void
1994in_pcbnotifyall(struct inpcbinfo *pcbinfo, struct in_addr faddr, int errno,
1995 struct inpcb *(*notify)(struct inpcb *, int))
1996{
1997 struct inpcb *inp, *inp_temp;
1998
1999 INP_INFO_WLOCK(pcbinfo);
2000 CK_LIST_FOREACH_SAFE(inp, pcbinfo->ipi_listhead, inp_list, inp_temp) {
2001 INP_WLOCK(inp);
2002#ifdef INET6
2003 if ((inp->inp_vflag & INP_IPV4) == 0) {
2004 INP_WUNLOCK(inp);
2005 continue;
2006 }
2007#endif
2008 if (inp->inp_faddr.s_addr != faddr.s_addr ||
2009 inp->inp_socket == NULL) {
2010 INP_WUNLOCK(inp);
2011 continue;
2012 }
2013 if ((*notify)(inp, errno))
2014 INP_WUNLOCK(inp);
2015 }
2016 INP_INFO_WUNLOCK(pcbinfo);
2017}
2018
2019void
2020in_pcbpurgeif0(struct inpcbinfo *pcbinfo, struct ifnet *ifp)

Callers 2

udp_common_ctlinputFunction · 0.85
tcp_ctlinputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected