xref: /freebsd/sbin/ipf/libipf/printnatside.c (revision efeb8bffe34422937c7f8df836afb5b817366d16)
1 /*
2  * Copyright (C) 2012 by Darren Reed.
3  *
4  * See the IPFILTER.LICENCE file for details on licencing.
5  *
6  * $Id: printnatside.c,v 1.2.2.6 2012/07/22 08:04:24 darren_r Exp $
7  */
8 #include "ipf.h"
9 
10 void
printnatside(char * side,nat_stat_side_t * ns)11 printnatside(char *side, nat_stat_side_t *ns)
12 {
13 	PRINTF("%lu\tproxy create fail %s\n", ns->ns_appr_fail, side);
14 	PRINTF("%lu\tproxy fail %s\n", ns->ns_ipf_proxy_fail, side);
15 	PRINTF("%lu\tbad nat %s\n", ns->ns_badnat, side);
16 	PRINTF("%lu\tbad nat new %s\n", ns->ns_badnatnew, side);
17 	PRINTF("%lu\tbad next addr %s\n", ns->ns_badnextaddr, side);
18 	PRINTF("%lu\tbucket max %s\n", ns->ns_bucket_max, side);
19 	PRINTF("%lu\tclone nomem %s\n", ns->ns_clone_nomem, side);
20 	PRINTF("%lu\tdecap bad %s\n", ns->ns_decap_bad, side);
21 	PRINTF("%lu\tdecap fail %s\n", ns->ns_decap_fail, side);
22 	PRINTF("%lu\tdecap pullup %s\n", ns->ns_decap_pullup, side);
23 	PRINTF("%lu\tdivert dup %s\n", ns->ns_divert_dup, side);
24 	PRINTF("%lu\tdivert exist %s\n", ns->ns_divert_exist, side);
25 	PRINTF("%lu\tdrop %s\n", ns->ns_drop, side);
26 	PRINTF("%lu\texhausted %s\n", ns->ns_exhausted, side);
27 	PRINTF("%lu\ticmp address %s\n", ns->ns_icmp_address, side);
28 	PRINTF("%lu\ticmp basic %s\n", ns->ns_icmp_basic, side);
29 	PRINTF("%lu\tinuse %s\n", ns->ns_inuse, side);
30 	PRINTF("%lu\ticmp mbuf wrong size %s\n", ns->ns_icmp_mbuf, side);
31 	PRINTF("%lu\ticmp header unmatched %s\n", ns->ns_icmp_notfound, side);
32 	PRINTF("%lu\ticmp rebuild failures %s\n", ns->ns_icmp_rebuild, side);
33 	PRINTF("%lu\ticmp short %s\n", ns->ns_icmp_short, side);
34 	PRINTF("%lu\ticmp packet size wrong %s\n", ns->ns_icmp_size, side);
35 	PRINTF("%lu\tIFP address fetch failures %s\n",
36 		ns->ns_ifpaddrfail, side);
37 	PRINTF("%lu\tpackets untranslated %s\n", ns->ns_ignored, side);
38 	PRINTF("%lu\tNAT insert failures %s\n", ns->ns_insert_fail, side);
39 	PRINTF("%lu\tNAT lookup misses %s\n", ns->ns_lookup_miss, side);
40 	PRINTF("%lu\tNAT lookup nowild %s\n", ns->ns_lookup_nowild, side);
41 	PRINTF("%lu\tnew ifpaddr failed %s\n", ns->ns_new_ifpaddr, side);
42 	PRINTF("%lu\tmemory requests failed %s\n", ns->ns_memfail, side);
43 	PRINTF("%lu\ttable max reached %s\n", ns->ns_table_max, side);
44 	PRINTF("%lu\tpackets translated %s\n", ns->ns_translated, side);
45 	PRINTF("%lu\tfinalised failed %s\n", ns->ns_unfinalised, side);
46 	PRINTF("%lu\tsearch wraps %s\n", ns->ns_wrap, side);
47 	PRINTF("%lu\tnull translations %s\n", ns->ns_xlate_null, side);
48 	PRINTF("%lu\ttranslation exists %s\n", ns->ns_xlate_exists, side);
49 	PRINTF("%lu\tno memory %s\n", ns->ns_memfail, side);
50 
51 	if (opts & OPT_VERBOSE)
52 		PRINTF("%p table %s\n", ns->ns_table, side);
53 }
54