1 /* 2 * Copyright (C) 2002 by Darren Reed. 3 * 4 * See the IPFILTER.LICENCE file for details on licencing. 5 */ 6 7 #include "ipf.h" 8 9 #define PRINTF (void)printf 10 #define FPRINTF (void)fprintf 11 12 ip_pool_node_t *printpoolnode(np, opts) 13 ip_pool_node_t *np; 14 int opts; 15 { 16 if ((opts & OPT_DEBUG) == 0) { 17 putchar(' '); 18 if (np->ipn_info == 1) 19 PRINTF("! "); 20 printip((u_32_t *)&np->ipn_addr.adf_addr.in4); 21 printmask((u_32_t *)&np->ipn_mask.adf_addr); 22 } else { 23 PRINTF("\t\t%s%s", np->ipn_info ? "! " : "", 24 inet_ntoa(np->ipn_addr.adf_addr.in4)); 25 printmask((u_32_t *)&np->ipn_mask.adf_addr); 26 PRINTF("\n\t\tHits %lu\tName %s\n", 27 np->ipn_hits, np->ipn_name); 28 } 29 return np->ipn_next; 30 } 31