|
Lines 55-60
Link Here
|
| 55 |
struct hchead *heads; |
55 |
struct hchead *heads; |
| 56 |
u_long nelem; |
56 |
u_long nelem; |
| 57 |
|
57 |
|
|
|
58 |
KASSERT(af >= 0 && af < AF_MAX, ("hc_init: af=%d out of range", af)); |
| 59 |
|
| 58 |
hct = &hctable[af]; |
60 |
hct = &hctable[af]; |
| 59 |
nelem = init_nelem; |
61 |
nelem = init_nelem; |
| 60 |
if (hct->hct_nentries) |
62 |
if (hct->hct_nentries) |
|
Lines 86-91
Link Here
|
| 86 |
struct hctable *hct; |
88 |
struct hctable *hct; |
| 87 |
int s; |
89 |
int s; |
| 88 |
|
90 |
|
|
|
91 |
KASSERT(sa->sa_family >=0 && sa->sa_family < AF_MAX, |
| 92 |
("hc_get: sa_family=%d out o frange", sa->sa_family)); |
| 93 |
|
| 89 |
hct = &hctable[sa->sa_family]; |
94 |
hct = &hctable[sa->sa_family]; |
| 90 |
if (hct->hct_nentries == 0) |
95 |
if (hct->hct_nentries == 0) |
| 91 |
return 0; |
96 |
return 0; |
|
Lines 150-155
Link Here
|
| 150 |
u_long hash; |
155 |
u_long hash; |
| 151 |
int s; |
156 |
int s; |
| 152 |
|
157 |
|
|
|
158 |
KASSERT(hc->hc_host->sa_family >=0 && hc->hc_host->sa_family < AF_MAX, |
| 159 |
("hc_insert: sa_family=%d out of range", |
| 160 |
hc->hc_host->sa_family)); |
| 161 |
|
| 153 |
hct = &hctable[hc->hc_host->sa_family]; |
162 |
hct = &hctable[hc->hc_host->sa_family]; |
| 154 |
hash = hct->hct_cb->hccb_hash(hc->hc_host, hct->hct_nentries); |
163 |
hash = hct->hct_cb->hccb_hash(hc->hc_host, hct->hct_nentries); |