|
DPDK 25.11.0-rc1
|
#include <rte_argparse.h>
Data Fields | |
| const char * | name_long |
| const char * | name_short |
| const char * | help |
| void * | val_saver |
| void * | val_set |
| enum rte_argparse_value_required | value_required |
| enum rte_argparse_value_type | value_type |
| uint32_t | flags |
A structure used to hold argument's configuration.
Definition at line 85 of file rte_argparse.h.
| const char* name_long |
Long name of the argument: 1) If the argument is optional, it must start with --. 2) If the argument is positional, it must not start with -. 3) Other case will be considered as error.
Definition at line 92 of file rte_argparse.h.
| const char* name_short |
Short name of the argument: 1) This field could be set only when name_long is optional, and must start with a hyphen (-) followed by an English letter. 2) Other case it should be set NULL.
Definition at line 99 of file rte_argparse.h.
| const char* help |
Help information of the argument, must not be NULL.
Definition at line 102 of file rte_argparse.h.
| void* val_saver |
Saver for the argument's value. 1) If this field is NULL, the callback is used for parsing argument. 2) If this field is not NULL, the argument's value will be automatically saved.
Definition at line 109 of file rte_argparse.h.
| void* val_set |
If val_saver is NULL, this filed (cast as (uint32_t)val_set) will be used as the first parameter to invoke callback.
If val_saver is not NULL, then: 1) If argument has no value, *val_saver will be set to val_set. 2) If argument has optional value but doesn't take value this time, *val_saver will be set to val_set. 3) Other case it should be set NULL.
Definition at line 120 of file rte_argparse.h.
| enum rte_argparse_value_required value_required |
Specify if the argument takes a value,
Definition at line 123 of file rte_argparse.h.
| enum rte_argparse_value_type value_type |
The type of the argument,
Definition at line 125 of file rte_argparse.h.
| uint32_t flags |
any additional flags for this argument
Definition at line 128 of file rte_argparse.h.