| 155 | |
| 156 | #ifdef INET |
| 157 | static void |
| 158 | rip_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 | |
| 178 | static void |
| 179 | rip_delhash(struct inpcb *inp) |
no outgoing calls
no test coverage detected