]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/ipfilter/lib/printtunable.c
This commit was generated by cvs2svn to compensate for changes in r155602,
[FreeBSD/FreeBSD.git] / contrib / ipfilter / lib / printtunable.c
1 /*      $FreeBSD$       */
2
3 #include "ipf.h"
4
5 void printtunable(tup)
6 ipftune_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 }