DPDK  24.07.0
Data Fields
rte_argparse_arg Struct Reference

#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
 

Detailed Description

A structure used to hold argument's configuration.

Definition at line 90 of file rte_argparse.h.

Field Documentation

◆ name_long

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 97 of file rte_argparse.h.

◆ name_short

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 104 of file rte_argparse.h.

◆ help

const char* help

Help information of the argument, must not be NULL.

Definition at line 107 of file rte_argparse.h.

◆ val_saver

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 116 of file rte_argparse.h.

◆ val_set

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 127 of file rte_argparse.h.

◆ flags

uint64_t flags
See also
rte_argparse_flag

Definition at line 130 of file rte_argparse.h.


The documentation for this struct was generated from the following file: