Lines Matching refs:ipe

215 	iphtent_t *ipe;  local
219 while ((ipe = iph->iph_table[i]) != NULL)
220 if (fr_delhtent(iph, ipe, ifs) != 0)
246 void fr_derefhtent(ipe) in fr_derefhtent() argument
247 iphtent_t *ipe; in fr_derefhtent()
249 ipe->ipe_ref--;
250 if (ipe->ipe_ref == 0) {
251 KFREE(ipe);
301 iphtent_t *ipe; local
305 KMALLOC(ipe, iphtent_t *);
306 if (ipe == NULL)
309 bcopy((char *)ipeo, (char *)ipe, sizeof(*ipe));
311 if (ipe->ipe_family == AF_INET6) {
312 bits = count6bits((u_32_t *)ipe->ipe_mask.in6_addr8);
313 hv = IPE_HASH_FN(sum4((uint32_t *)ipe->ipe_addr.in6_addr8),
314 sum4((uint32_t *)ipe->ipe_mask.in6_addr8),
318 if (ipe->ipe_family == AF_INET)
320 ipe->ipe_addr.in4_addr &= ipe->ipe_mask.in4_addr;
321 ipe->ipe_addr.in4_addr = ntohl(ipe->ipe_addr.in4_addr);
322 bits = count4bits(ipe->ipe_mask.in4_addr);
323 ipe->ipe_mask.in4_addr = ntohl(ipe->ipe_mask.in4_addr);
325 hv = IPE_HASH_FN(ipe->ipe_addr.in4_addr, ipe->ipe_mask.in4_addr,
330 ipe->ipe_ref = 1;
331 ipe->ipe_next = iph->iph_table[hv];
332 ipe->ipe_pnext = iph->iph_table + hv;
335 iph->iph_table[hv]->ipe_pnext = &ipe->ipe_next;
336 iph->iph_table[hv] = ipe;
338 ipe->ipe_snext = iph->iph_list;
339 ipe->ipe_psnext = &iph->iph_list;
340 if (ipe->ipe_next != NULL)
341 ipe->ipe_next->ipe_psnext = &ipe->ipe_snext;
342 iph->iph_list = ipe;
345 if (ipe->ipe_family == AF_INET6) {
366 ipe->ipe_ptr = fr_addgroup(ipe->ipe_group, NULL,
372 ipe->ipe_ptr = NULL;
373 ipe->ipe_value = 0;
386 int fr_delhtent(iph, ipe, ifs) in fr_delhtent() argument
388 iphtent_t *ipe;
391 if (ipe->ipe_ref != 1)
395 *ipe->ipe_pnext = ipe->ipe_next;
396 if (ipe->ipe_next != NULL)
397 ipe->ipe_next->ipe_pnext = ipe->ipe_pnext;
402 fr_delgroup(ipe->ipe_group, IPL_LOGIPF,
407 ipe->ipe_ptr = NULL;
408 ipe->ipe_value = 0;
412 KFREE(ipe);
428 iphtent_t *ipe; local
444 ipe = fr_iphmfind6(iph, &addr->in6);
448 ipe = fr_iphmfind(iph, &addr->in4);
450 ipe = NULL;
451 if (ipe != NULL)
452 rval = ipe->ipe_ptr;
479 iphtent_t *ipe; local
498 ipe = fr_iphmfind6(iph, &addr->in6);
502 ipe = fr_iphmfind(iph, &addr->in4);
504 ipe = NULL;
505 if (ipe != NULL) {
506 ipe->ipe_hits++;
507 ipe->ipe_bytes += fin->fin_plen;
523 iphtent_t *ipe; local
531 for (ipe = iph->iph_table[hv]; (ipe != NULL); ipe = ipe->ipe_next) {
532 if (ipe->ipe_mask.in4_addr != msk ||
533 ipe->ipe_addr.in4_addr != ips) {
539 if ((ipe == NULL) && (hmsk != 0)) {
551 return ipe;
562 iphtent_t *ipe; local
583 for (ipe = iph->iph_table[hv]; (ipe != NULL); ipe = ipe->ipe_next) {
584 if (bcmp((void *)&ipe->ipe_mask.in6, (void *)msk, 16) ||
585 bcmp((void *)&ipe->ipe_addr.in6, (void *)ips, 16))
590 if ((ipe == NULL) && ((hmsk[0] != 0) ||
607 return ipe;