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
15 void optprintv6(sec
, optmsk
, optbits
)
17 u_long optmsk
, optbits
;
19 u_short secmsk
= sec
[0], secbits
= sec
[1];
20 struct ipopt_names
*io
;
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
);
31 if ((optmsk
&& (optmsk
!= optbits
)) ||
32 (secmsk
&& (secmsk
!= secbits
))) {
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
);