OFP  1.0
Option and Flag Parser
argument.h
Go to the documentation of this file.
1 
9 #ifndef OFP_ARGUMENT_H
10 #define OFP_ARGUMENT_H
11 
12 
13 /* OFP headers */
14 #include "ofp.h"
15 
16 
17 enum ofp_argument_priority_e OFP_ENUMTYPE
18 {
21  OFP_ARG_PRTY_LAST
22 };
23 
24 
25 enum ofp_argument_type_e OFP_ENUMTYPE
26 {
29  OFP_ARG_TYPE_SUIA_OPTION
30 };
31 
32 
34 {
35  int r;
36  int i;
37  char *id;
38  char *desc;
39  ofp_uint idlen;
41  ofp_argument_type t;
42  ofp_argument_priority prty;
43  union
44  {
45  int f;
46  char *o;
47  } v;
48 };
49 
50 
51 #define OFP_ARG_REQUIRED (1)
52 #define OFP_ARG_NOT_REQUIRED (0)
53 
54 
55 #endif /* OFP_ARGUMENT_H */
OFP_ARG_PRTY_INHERIT
Inherit priority from the state.
Definition: argument.h:19
OFP_ARG_PRTY_FIRST
First appearance.
Definition: argument.h:20
OFP_ARG_TYPE_FLAG
Flag.
Definition: argument.h:27
OFP_ARG_TYPE_DUIA_OPTION
Double-UIA option.
Definition: argument.h:28
OFP Environment.
void(* ofp_Cfunction)(ofp_argument *arg, ofp_errorcode ec)
Pointer to C function used for argument error handling.
Definition: ofp.h:89
Definition: argument.h:34
int f
flag value
Definition: argument.h:45
char * desc
description
Definition: argument.h:38
ofp_uint idlen
identifier length
Definition: argument.h:39
int r
required
Definition: argument.h:35
int i
included
Definition: argument.h:36
ofp_argument_priority prty
parsing priority
Definition: argument.h:42
char * o
option value
Definition: argument.h:46
ofp_argument_type t
type
Definition: argument.h:41
union ofp_argument_s::@0 v
value
char * id
identifier
Definition: argument.h:37
ofp_Cfunction ef
error function
Definition: argument.h:40