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

Function rip_inshash

freebsd/netinet/raw_ip.c:157–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155
156#ifdef INET
157static void
158rip_inshash(struct inpcb *inp)
159{
160 struct inpcbinfo *pcbinfo = inp->inp_pcbinfo;
161 struct inpcbhead *pcbhash;
162 int hash;
163
164 INP_INFO_WLOCK_ASSERT(pcbinfo);
165 INP_WLOCK_ASSERT(inp);
166
167 if (inp->inp_ip_p != 0 &&
168 inp->inp_laddr.s_addr != INADDR_ANY &&
169 inp->inp_faddr.s_addr != INADDR_ANY) {
170 hash = INP_PCBHASH_RAW(inp->inp_ip_p, inp->inp_laddr.s_addr,
171 inp->inp_faddr.s_addr, pcbinfo->ipi_hashmask);
172 } else
173 hash = 0;
174 pcbhash = &pcbinfo->ipi_hashbase[hash];
175 CK_LIST_INSERT_HEAD(pcbhash, inp, inp_hash);
176}
177
178static void
179rip_delhash(struct inpcb *inp)

Callers 4

rip_attachFunction · 0.85
rip_dodisconnectFunction · 0.85
rip_bindFunction · 0.85
rip_connectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected