]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/ipfilter/lib/printtunable.c
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / ipfilter / lib / printtunable.c
1 /*      $FreeBSD$       */
2
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  */     
10
11 #include "ipf.h"
12
13 void printtunable(tup)
14 ipftune_t *tup;
15 {
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);
28         }
29 }