Move /var/svc/log to /var/log/svc
[unleashed/lotheac.git] / usr / src / cmd / ipf / lib / common / printpoolnode.c
blob1de7866870bee4700aeed29a28a814b912c15b6e
1 /*
2 * Copyright (C) 2002 by Darren Reed.
4 * See the IPFILTER.LICENCE file for details on licencing.
6 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
7 */
9 #include "ipf.h"
11 #define PRINTF (void)printf
13 ip_pool_node_t *printpoolnode(np, opts)
14 ip_pool_node_t *np;
15 int opts;
17 if ((opts & OPT_DEBUG) == 0)
18 PRINTF(" %s", np->ipn_info ? "! " : "");
19 else
20 PRINTF("\tAddress: %s", np->ipn_info ? "! " : "");
22 #ifdef USE_INET6
23 if (np->ipn_addr.adf_family == AF_INET6)
24 printhostmask(6, (u_32_t *)&np->ipn_addr.adf_addr.in6,
25 (u_32_t *)&np->ipn_mask.adf_addr);
26 else
27 #endif
29 printip((u_32_t *)&np->ipn_addr.adf_addr.in4);
30 printmask(4, (u_32_t *)&np->ipn_mask.adf_addr);
33 if ((opts & OPT_DEBUG) != 0)
34 #ifdef USE_QUAD_T
35 PRINTF("\t\tHits %qu\t\tBytes %qu\t\tName %s\n",
36 np->ipn_hits, np->ipn_bytes, np->ipn_name);
37 #else
38 PRINTF("\t\tHits %lu\t\tBytes %lu\t\tName %s\n",
39 np->ipn_hits, np->ipn_bytes, np->ipn_name);
40 #endif
41 return np->ipn_next;