Sync usage with man page.
[netbsd-mini2440.git] / dist / ipf / lib / optprintv6.c
blob2ecc0928166a727e823edcc5e196ba18e5acc60a
1 /* $NetBSD$ */
3 /*
4 * Copyright (C) 2003 by Darren Reed.
6 * See the IPFILTER.LICENCE file for details on licencing.
8 * Id: optprintv6.c,v 1.2.4.1 2006/06/16 17:21:08 darrenr Exp
9 */
10 #include "ipf.h"
13 #ifdef USE_INET6
15 void optprintv6(sec, optmsk, optbits)
16 u_short *sec;
17 u_long optmsk, optbits;
19 u_short secmsk = sec[0], secbits = sec[1];
20 struct ipopt_names *io;
21 char *s;
23 s = " v6hdrs ";
24 for (io = v6ionames; io->on_name; io++)
25 if ((io->on_bit & optmsk) &&
26 ((io->on_bit & optmsk) == (io->on_bit & optbits))) {
27 printf("%s%s", s, io->on_name);
28 s = ",";
31 if ((optmsk && (optmsk != optbits)) ||
32 (secmsk && (secmsk != secbits))) {
33 s = " ";
34 printf(" not v6hdrs");
35 if (optmsk != optbits) {
36 for (io = v6ionames; io->on_name; io++)
37 if ((io->on_bit & optmsk) &&
38 ((io->on_bit & optmsk) !=
39 (io->on_bit & optbits))) {
40 printf("%s%s", s, io->on_name);
41 s = ",";
47 #endif