2 * Copyright (C) 1993-2001 by Darren Reed.
4 * See the IPFILTER.LICENCE file for details on licencing.
6 * $Id: optname.c,v 1.3 2001/06/09 17:09:24 darrenr Exp $
12 u_32_t
optname(cp
, sp
, linenum
)
17 struct ipopt_names
*io
, *so
;
23 for (s
= strtok(**cp
, ","); s
; s
= strtok(NULL
, ",")) {
24 for (io
= ionames
; io
->on_name
; io
++)
25 if (!strcasecmp(s
, io
->on_name
)) {
30 fprintf(stderr
, "%d: unknown IP option name %s\n",
34 if (!strcasecmp(s
, "sec-class"))
38 if (sec
&& !*(*cp
+ 1)) {
39 fprintf(stderr
, "%d: missing security level after sec-class\n",
46 for (s
= strtok(**cp
, ","); s
; s
= strtok(NULL
, ",")) {
47 for (so
= secclass
; so
->on_name
; so
++)
48 if (!strcasecmp(s
, so
->on_name
)) {
54 "%d: no such security level: %s\n",