Sync usage with man page.
[netbsd-mini2440.git] / dist / ipf / lib / optvalue.c
blob7c9a220dee46e4a3ed7ffcf6e38b090b5e953c94
1 /* $NetBSD$ */
3 /*
4 * Copyright (C) 2001-2002 by Darren Reed.
6 * See the IPFILTER.LICENCE file for details on licencing.
8 * Id: optvalue.c,v 1.2.4.1 2006/06/16 17:21:08 darrenr Exp
9 */
10 #include "ipf.h"
13 u_32_t getoptbyname(optname)
14 char *optname;
16 struct ipopt_names *io;
18 for (io = ionames; io->on_name; io++)
19 if (!strcasecmp(optname, io->on_name))
20 return io->on_bit;
21 return -1;
25 u_32_t getoptbyvalue(optval)
26 int optval;
28 struct ipopt_names *io;
30 for (io = ionames; io->on_name; io++)
31 if (io->on_value == optval)
32 return io->on_bit;
33 return -1;