diff options
| author | Cy Schubert <cy@FreeBSD.org> | 2021-12-15 21:45:47 +0000 |
|---|---|---|
| committer | Cy Schubert <cy@FreeBSD.org> | 2021-12-20 14:16:33 +0000 |
| commit | 41edb306f05651fcaf6c74f9e3557f59f80292e1 (patch) | |
| tree | 27e88c81aa6f5219d79ccd2c24e11d5cddac6d29 /sbin/ipf/libipf/printtunable.c | |
| parent | 3b9b51fe464ebb91e894742a6a0e6417e256f03a (diff) | |
Diffstat (limited to 'sbin/ipf/libipf/printtunable.c')
| -rw-r--r-- | sbin/ipf/libipf/printtunable.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sbin/ipf/libipf/printtunable.c b/sbin/ipf/libipf/printtunable.c new file mode 100644 index 000000000000..aa82841b2fe1 --- /dev/null +++ b/sbin/ipf/libipf/printtunable.c @@ -0,0 +1,30 @@ +/* $FreeBSD$ */ + +/* + * Copyright (C) 2012 by Darren Reed. + * + * See the IPFILTER.LICENCE file for details on licencing. + * + * $Id$ + */ + +#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); + } +} |
