DPDK
24.11.0-rc3
|
#include <rte_argparse.h>
Data Fields | |
const char * | name_long |
const char * | name_short |
const char * | help |
void * | val_saver |
void * | val_set |
uint64_t | flags |
A structure used to hold argument's configuration.
Definition at line 83 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 90 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 97 of file rte_argparse.h.
const char* help |
Help information of the argument, must not be NULL.
Definition at line 100 of file rte_argparse.h.
void* val_saver |
Saver for the argument's value. 1) If the filed is NULL, the callback way is used for parsing argument. 2) If the field is not NULL, the autosave way is used for parsing argument.
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.
uint64_t flags |
Flag definition (RTE_ARGPARSE_ARG_*) for the argument.
Definition at line 123 of file rte_argparse.h.