4 * Copyright (C) 2002 by Darren Reed.
6 * See the IPFILTER.LICENCE file for details on licencing.
11 #define PRINTF (void)printf
12 #define FPRINTF (void)fprintf
14 ip_pool_t *printpool(pp, copyfunc, name, opts)
20 ip_pool_node_t *ipnp, *ipnpn, ipn;
23 if ((*copyfunc)(pp, &ipp, sizeof(ipp)))
26 if ((name != NULL) && strncmp(name, ipp.ipo_name, FR_GROUPLEN))
29 if ((opts & OPT_DEBUG) == 0) {
30 if ((ipp.ipo_flags & IPOOL_ANON) != 0)
31 PRINTF("# 'anonymous' tree %s\n", ipp.ipo_name);
32 PRINTF("table role = ");
34 PRINTF("Name: %s", ipp.ipo_name);
35 if ((ipp.ipo_flags & IPOOL_ANON) == IPOOL_ANON)
68 printf("unknown(%d)", ipp.ipo_unit);
71 if ((opts & OPT_DEBUG) == 0) {
72 PRINTF(" type = tree number = %s\n", ipp.ipo_name);
77 PRINTF("\tReferences: %d\tHits: %lu\n", ipp.ipo_ref,
79 PRINTF("\tNodes Starting at %p\n", ipp.ipo_list);
84 while (ipnpn != NULL) {
85 ipnp = (ip_pool_node_t *)malloc(sizeof(*ipnp));
86 (*copyfunc)(ipnpn, ipnp, sizeof(ipn));
87 ipnpn = ipnp->ipn_next;
88 ipnp->ipn_next = ipp.ipo_list;
92 if (ipp.ipo_list == NULL) {
95 for (ipnp = ipp.ipo_list; ipnp != NULL; ) {
96 ipnp = printpoolnode(ipnp, opts);
98 if ((opts & OPT_DEBUG) == 0) {
104 if ((opts & OPT_DEBUG) == 0)