Merge remote-tracking branch 'origin/master'
[unleashed/lotheac.git] / usr / src / cmd / ipf / lib / common / v6optvalue.c
blobfd8e2e22b649e13940e305980c75aa68caef2c7b
1 /*
2 * Copyright (C) 1993-2001 by Darren Reed.
4 * See the IPFILTER.LICENCE file for details on licencing.
6 * $Id: v6optvalue.c,v 1.1 2003/04/26 04:55:58 darrenr Exp $
7 */
8 #include "ipf.h"
12 u_32_t getv6optbyname(optname)
13 char *optname;
15 #ifdef USE_INET6
16 struct ipopt_names *io;
18 for (io = v6ionames; io->on_name; io++)
19 if (!strcasecmp(optname, io->on_name))
20 return io->on_bit;
21 #endif
22 return -1;
26 u_32_t getv6optbyvalue(optval)
27 int optval;
29 #ifdef USE_INET6
30 struct ipopt_names *io;
32 for (io = v6ionames; io->on_name; io++)
33 if (io->on_value == optval)
34 return io->on_bit;
35 #endif
36 return -1;