1/*	$NetBSD: printpoolnode.c,v 1.2 2012/02/15 17:55:07 riz Exp $	*/
2
3/*
4 * Copyright (C) 2002-2005 by Darren Reed.
5 *
6 * See the IPFILTER.LICENCE file for details on licencing.
7 */
8
9#include "ipf.h"
10
11#define	PRINTF	(void)printf
12#define	FPRINTF	(void)fprintf
13
14ip_pool_node_t *printpoolnode(np, opts)
15ip_pool_node_t *np;
16int opts;
17{
18
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);
31	}
32	return np->ipn_next;
33}
34