Sync usage with man page.
[netbsd-mini2440.git] / dist / ipf / lib / printtunable.c
blob82e1a94ecd7b0d8b455cbf75995db8473da6fa44
1 /* $NetBSD$ */
3 /*
4 * Copyright (C) 2003 by Darren Reed.
5 *
6 * See the IPFILTER.LICENCE file for details on licencing.
7 *
8 * Id: printtunable.c,v 1.1.4.1 2006/06/16 17:21:15 darrenr Exp
9 */
11 #include "ipf.h"
13 void printtunable(tup)
14 ipftune_t *tup;
16 printf("%s\tmin %#lx\tmax %#lx\tcurrent ",
17 tup->ipft_name, tup->ipft_min, tup->ipft_max);
18 if (tup->ipft_sz == sizeof(u_long))
19 printf("%lu\n", tup->ipft_vlong);
20 else if (tup->ipft_sz == sizeof(u_int))
21 printf("%u\n", tup->ipft_vint);
22 else if (tup->ipft_sz == sizeof(u_short))
23 printf("%hu\n", tup->ipft_vshort);
24 else if (tup->ipft_sz == sizeof(u_char))
25 printf("%u\n", (u_int)tup->ipft_vchar);
26 else {
27 printf("sz = %d\n", tup->ipft_sz);