xref: /titanic_41/usr/src/cmd/ipf/lib/common/printtunable.c (revision b3697b90e692e3e5d859fb77d285d4c056d99eda)
1 /*
2  * Copyright (C) 1993-2005  by Darren Reed.
3  * See the IPFILTER.LICENCE file for details on licencing.
4  */
5 
6 #include "ipf.h"
7 
8 void printtunable(tup)
9 ipftune_t *tup;
10 {
11 	printf("%s\tmin %#lx\tmax %#lx\tcurrent ",
12 		tup->ipft_name, tup->ipft_min, tup->ipft_max);
13 	if (tup->ipft_sz == sizeof(u_long))
14 		printf("%lu\n", tup->ipft_vlong);
15 	else if (tup->ipft_sz == sizeof(u_int))
16 		printf("%u\n", tup->ipft_vint);
17 	else if (tup->ipft_sz == sizeof(u_short))
18 		printf("%hu\n", tup->ipft_vshort);
19 	else if (tup->ipft_sz == sizeof(u_char))
20 		printf("%u\n", (u_int)tup->ipft_vchar);
21 	else {
22 		printf("sz = %d\n", tup->ipft_sz);
23 	}
24 }
25