4 * Copyright (C) 2012 by Darren Reed.
6 * See the IPFILTER.LICENCE file for details on licencing.
13 printpool(pp, copyfunc, name, opts, fields)
20 ip_pool_node_t *ipnp, *ipnpn, ipn, **pnext;
23 if ((*copyfunc)(pp, &ipp, sizeof(ipp)))
26 if ((name != NULL) && strncmp(name, ipp.ipo_name, FR_GROUPLEN))
29 printpooldata(&ipp, opts);
31 if ((ipp.ipo_flags & IPOOL_DELETE) != 0)
33 if ((opts & OPT_DEBUG) == 0)
38 pnext = &ipp.ipo_list;
39 while (ipnpn != NULL) {
40 ipnp = (ip_pool_node_t *)malloc(sizeof(*ipnp));
41 (*copyfunc)(ipnpn, ipnp, sizeof(ipn));
42 ipnpn = ipnp->ipn_next;
44 pnext = &ipnp->ipn_next;
45 ipnp->ipn_next = NULL;
48 if (ipp.ipo_list == NULL) {
51 for (ipnp = ipp.ipo_list; ipnp != NULL; ipnp = ipnpn) {
52 ipnpn = printpoolnode(ipnp, opts, fields);
55 if ((opts & OPT_DEBUG) == 0) {
61 if ((opts & OPT_DEBUG) == 0)