4 * Copyright (C) 2012 by Darren Reed.
6 * See the IPFILTER.LICENCE file for details on licencing.
13 printhashnode(iph, ipep, copyfunc, opts, fields)
24 if ((*copyfunc)(ipep, &ipe, sizeof(ipe)))
27 hv = IPE_V4_HASH_FN(ipe.ipe_addr.i6[0], ipe.ipe_mask.i6[0],
31 for (i = 0; fields[i].w_value != 0; i++) {
32 printpoolfield(&ipe, IPLT_HASH, i);
33 if (fields[i + 1].w_value != 0)
37 } else if ((opts & OPT_DEBUG) != 0) {
38 PRINTF("\t%d\tAddress: %s", hv,
39 inet_ntoa(ipe.ipe_addr.in4));
40 printmask(ipe.ipe_family, (u_32_t *)&ipe.ipe_mask.in4_addr);
41 PRINTF("\tRef. Count: %d\tGroup: %s\n", ipe.ipe_ref,
44 PRINTF("\tHits: %"PRIu64"\tBytes: %"PRIu64"\n",
45 ipe.ipe_hits, ipe.ipe_bytes);
47 PRINTF("\tHits: %lu\tBytes: %lu\n",
48 ipe.ipe_hits, ipe.ipe_bytes);
52 printip(ipe.ipe_family, (u_32_t *)&ipe.ipe_addr.in4_addr);
53 printmask(ipe.ipe_family, (u_32_t *)&ipe.ipe_mask.in4_addr);
54 if (ipe.ipe_value != 0) {
55 switch (iph->iph_type & ~IPHASH_ANON)
57 case IPHASH_GROUPMAP :
58 if (strncmp(ipe.ipe_group, iph->iph_name,
60 PRINTF(", group=%s", ipe.ipe_group);