1/* $FreeBSD: head/contrib/ipfilter/lib/v6optvalue.c 145519 2005-04-25 18:20:15Z darrenr $ */
|
1/* $FreeBSD: head/contrib/ipfilter/lib/v6optvalue.c 153881 2005-12-30 11:52:26Z guido $ */ |
2 3/* 4 * Copyright (C) 1993-2001 by Darren Reed. 5 * 6 * See the IPFILTER.LICENCE file for details on licencing. 7 *
|
8 * Id: v6optvalue.c,v 1.1 2003/04/26 04:55:58 darrenr Exp
|
8 * $Id: v6optvalue.c,v 1.1 2003/04/26 04:55:58 darrenr Exp $ |
9 */ 10#include "ipf.h" 11 12 13 14u_32_t getv6optbyname(optname) 15char *optname; 16{ 17#ifdef USE_INET6 18 struct ipopt_names *io; 19 20 for (io = v6ionames; io->on_name; io++) 21 if (!strcasecmp(optname, io->on_name)) 22 return io->on_bit; 23#endif 24 return -1; 25} 26 27 28u_32_t getv6optbyvalue(optval) 29int optval; 30{ 31#ifdef USE_INET6 32 struct ipopt_names *io; 33 34 for (io = v6ionames; io->on_name; io++) 35 if (io->on_value == optval) 36 return io->on_bit; 37#endif 38 return -1; 39}
|