Move /var/svc/log to /var/log/svc
[unleashed/lotheac.git] / usr / src / cmd / ipf / lib / common / printpooldata.c
bloba699af67dfed06dcc41180d2f94d0277b94c27ad
1 /*
2 * Copyright (C) 2002 by Darren Reed.
4 * See the IPFILTER.LICENCE file for details on licencing.
6 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
7 * Use is subject to license terms.
8 */
10 #pragma ident "%Z%%M% %I% %E% SMI"
12 #include "ipf.h"
14 #define PRINTF (void)printf
15 #define FPRINTF (void)fprintf
17 void printpooldata(pool, opts)
18 ip_pool_t *pool;
19 int opts;
22 if ((opts & OPT_DEBUG) == 0) {
23 if ((pool->ipo_flags & IPOOL_ANON) != 0)
24 PRINTF("# 'anonymous' tree %s\n", pool->ipo_name);
25 PRINTF("table role = ");
26 } else {
27 PRINTF("Name: %s", pool->ipo_name);
28 if ((pool->ipo_flags & IPOOL_ANON) == IPOOL_ANON)
29 PRINTF("(anon)");
30 putchar(' ');
31 PRINTF("Role: ");
34 switch (pool->ipo_unit)
36 case IPL_LOGIPF :
37 PRINTF("ipf");
38 break;
39 case IPL_LOGNAT :
40 PRINTF("nat");
41 break;
42 case IPL_LOGSTATE :
43 PRINTF("state");
44 break;
45 case IPL_LOGAUTH :
46 PRINTF("auth");
47 break;
48 case IPL_LOGSYNC :
49 PRINTF("sync");
50 break;
51 case IPL_LOGSCAN :
52 PRINTF("scan");
53 break;
54 case IPL_LOGLOOKUP :
55 PRINTF("lookup");
56 break;
57 case IPL_LOGCOUNT :
58 PRINTF("count");
59 break;
60 default :
61 PRINTF("unknown(%d)", pool->ipo_unit);
64 if ((opts & OPT_DEBUG) == 0) {
65 PRINTF(" type = tree number = %s\n", pool->ipo_name);
66 } else {
67 putchar(' ');
69 PRINTF("\tReferences: %d\tHits: %lu\n", pool->ipo_ref,
70 pool->ipo_hits);
71 PRINTF("\tNodes Starting at %p\n", pool->ipo_list);