17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * Copyright (C) 2002 by Darren Reed.
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * See the IPFILTER.LICENCE file for details on licencing.
57663b816Sml  *
6*de22af4eSJohn Ojemann  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
77c478bd9Sstevel@tonic-gate  */
87c478bd9Sstevel@tonic-gate 
97c478bd9Sstevel@tonic-gate #include "ipf.h"
107c478bd9Sstevel@tonic-gate 
117c478bd9Sstevel@tonic-gate #define	PRINTF	(void)printf
127c478bd9Sstevel@tonic-gate 
printpoolnode(np,opts)137c478bd9Sstevel@tonic-gate ip_pool_node_t *printpoolnode(np, opts)
147c478bd9Sstevel@tonic-gate ip_pool_node_t *np;
157c478bd9Sstevel@tonic-gate int opts;
167c478bd9Sstevel@tonic-gate {
17*de22af4eSJohn Ojemann 	if ((opts & OPT_DEBUG) == 0)
18*de22af4eSJohn Ojemann 		PRINTF(" %s", np->ipn_info ? "! " : "");
19*de22af4eSJohn Ojemann 	else
20*de22af4eSJohn Ojemann 		PRINTF("\tAddress: %s", np->ipn_info ? "! " : "");
217663b816Sml 
227663b816Sml #ifdef USE_INET6
23*de22af4eSJohn Ojemann 	if (np->ipn_addr.adf_family == AF_INET6)
24*de22af4eSJohn Ojemann 		printhostmask(6, (u_32_t *)&np->ipn_addr.adf_addr.in6,
25*de22af4eSJohn Ojemann 				 (u_32_t *)&np->ipn_mask.adf_addr);
26*de22af4eSJohn Ojemann 	else
277663b816Sml #endif
28*de22af4eSJohn Ojemann 	{
29*de22af4eSJohn Ojemann 		printip((u_32_t *)&np->ipn_addr.adf_addr.in4);
30*de22af4eSJohn Ojemann 		printmask(4, (u_32_t *)&np->ipn_mask.adf_addr);
31*de22af4eSJohn Ojemann 	}
327663b816Sml 
33*de22af4eSJohn Ojemann 	if ((opts & OPT_DEBUG) != 0)
34*de22af4eSJohn Ojemann #ifdef USE_QUAD_T
35*de22af4eSJohn Ojemann 		PRINTF("\t\tHits %qu\t\tBytes %qu\t\tName %s\n",
36*de22af4eSJohn Ojemann 			np->ipn_hits, np->ipn_bytes, np->ipn_name);
377663b816Sml #else
38*de22af4eSJohn Ojemann 		PRINTF("\t\tHits %lu\t\tBytes %lu\t\tName %s\n",
39*de22af4eSJohn Ojemann 			np->ipn_hits, np->ipn_bytes, np->ipn_name);
407663b816Sml #endif
417c478bd9Sstevel@tonic-gate 	return np->ipn_next;
427c478bd9Sstevel@tonic-gate }
43