blob: 1a61a8f84c90cf3e26c4a4cec23980f345a181e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
/* $NetBSD: printtunable.c,v 1.2 2012/07/22 14:27:37 darrenr Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: printtunable.c,v 1.1.1.2 2012/07/22 13:44:42 darrenr Exp $
*/
#include "ipf.h"
void
printtunable(tup)
ipftune_t *tup;
{
PRINTF("%s\tmin %lu\tmax %lu\tcurrent ",
tup->ipft_name, tup->ipft_min, tup->ipft_max);
if (tup->ipft_sz == sizeof(u_long))
PRINTF("%lu\n", tup->ipft_vlong);
else if (tup->ipft_sz == sizeof(u_int))
PRINTF("%u\n", tup->ipft_vint);
else if (tup->ipft_sz == sizeof(u_short))
PRINTF("%hu\n", tup->ipft_vshort);
else if (tup->ipft_sz == sizeof(u_char))
PRINTF("%u\n", (u_int)tup->ipft_vchar);
else {
PRINTF("sz = %d\n", tup->ipft_sz);
}
}
|