diff options
| author | Cy Schubert <cy@FreeBSD.org> | 2013-07-19 05:41:57 +0000 |
|---|---|---|
| committer | Cy Schubert <cy@FreeBSD.org> | 2013-07-19 05:41:57 +0000 |
| commit | f27f47054d2675045dce8688b408aa9340a118f7 (patch) | |
| tree | 225b5acf68c01bc6a260b386c2b2dbf4fa2839e3 /lib/printpoolnode.c | |
| parent | 39ff65a633dd44a40233913b84b347003c732868 (diff) | |
Notes
Diffstat (limited to 'lib/printpoolnode.c')
| -rw-r--r-- | lib/printpoolnode.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/printpoolnode.c b/lib/printpoolnode.c new file mode 100644 index 000000000000..a53ee3306512 --- /dev/null +++ b/lib/printpoolnode.c @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2002-2005 by Darren Reed. + * + * See the IPFILTER.LICENCE file for details on licencing. + */ + +#include "ipf.h" + +#define PRINTF (void)printf +#define FPRINTF (void)fprintf + +ip_pool_node_t *printpoolnode(np, opts) +ip_pool_node_t *np; +int opts; +{ + + if ((opts & OPT_DEBUG) == 0) { + putchar(' '); + if (np->ipn_info == 1) + PRINTF("! "); + printip((u_32_t *)&np->ipn_addr.adf_addr.in4); + printmask((u_32_t *)&np->ipn_mask.adf_addr); + } else { + PRINTF("\tAddress: %s%s", np->ipn_info ? "! " : "", + inet_ntoa(np->ipn_addr.adf_addr.in4)); + printmask((u_32_t *)&np->ipn_mask.adf_addr); + PRINTF("\t\tHits %lu\tName %s\tRef %d\n", + np->ipn_hits, np->ipn_name, np->ipn_ref); + } + return np->ipn_next; +} |
