printtunable.c revision 145519
1/*	$FreeBSD: head/contrib/ipfilter/lib/printtunable.c 145519 2005-04-25 18:20:15Z darrenr $	*/
2
3#include "ipf.h"
4
5void printtunable(tup)
6ipftune_t *tup;
7{
8	printf("%s\tmin %#lx\tmax %#lx\tcurrent ",
9		tup->ipft_name, tup->ipft_min, tup->ipft_max);
10	if (tup->ipft_sz == sizeof(u_long))
11		printf("%lu\n", tup->ipft_vlong);
12	else if (tup->ipft_sz == sizeof(u_int))
13		printf("%u\n", tup->ipft_vint);
14	else if (tup->ipft_sz == sizeof(u_short))
15		printf("%hu\n", tup->ipft_vshort);
16	else if (tup->ipft_sz == sizeof(u_char))
17		printf("%u\n", (u_int)tup->ipft_vchar);
18	else {
19		printf("sz = %d\n", tup->ipft_sz);
20	}
21}
22