comparison usr/src/cmd/ipf/lib/common/v6optvalue.c @ 0:c9caec207d52 b86

Initial porting based on b86
author Koji Uno <koji.uno@sun.com>
date Tue, 02 Jun 2009 18:56:50 +0900
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c9caec207d52
1 /*
2 * Copyright (C) 1993-2001 by Darren Reed.
3 *
4 * See the IPFILTER.LICENCE file for details on licencing.
5 *
6 * $Id: v6optvalue.c,v 1.1 2003/04/26 04:55:58 darrenr Exp $
7 */
8 #include "ipf.h"
9
10
11
12 u_32_t getv6optbyname(optname)
13 char *optname;
14 {
15 #ifdef USE_INET6
16 struct ipopt_names *io;
17
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;
23 }
24
25
26 u_32_t getv6optbyvalue(optval)
27 int optval;
28 {
29 #ifdef USE_INET6
30 struct ipopt_names *io;
31
32 for (io = v6ionames; io->on_name; io++)
33 if (io->on_value == optval)
34 return io->on_bit;
35 #endif
36 return -1;
37 }