Sync usage with man page.
[netbsd-mini2440.git] / dist / ipf / lib / printpoolnode.c
blob41f046dea55aa281e04c69146ead1e9324251a86
1 /* $NetBSD$ */
3 /*
4 * Copyright (C) 2002-2005 by Darren Reed.
6 * See the IPFILTER.LICENCE file for details on licencing.
7 */
9 #include "ipf.h"
11 #define PRINTF (void)printf
12 #define FPRINTF (void)fprintf
14 ip_pool_node_t *printpoolnode(np, opts)
15 ip_pool_node_t *np;
16 int opts;
19 if ((opts & OPT_DEBUG) == 0) {
20 putchar(' ');
21 if (np->ipn_info == 1)
22 PRINTF("! ");
23 printip((u_32_t *)&np->ipn_addr.adf_addr.in4);
24 printmask((u_32_t *)&np->ipn_mask.adf_addr);
25 } else {
26 PRINTF("\tAddress: %s%s", np->ipn_info ? "! " : "",
27 inet_ntoa(np->ipn_addr.adf_addr.in4));
28 printmask((u_32_t *)&np->ipn_mask.adf_addr);
29 PRINTF("\t\tHits %lu\tName %s\tRef %d\n",
30 np->ipn_hits, np->ipn_name, np->ipn_ref);
32 return np->ipn_next;