DPDK 25.11.0-rc1
Data Fields
rte_argparse Struct Reference

#include <rte_argparse.h>

Data Fields

const char * prog_name
 
const char * usage
 
const char * descriptor
 
const char * epilog
 
bool exit_on_error
 
bool ignore_non_flag_args
 
rte_arg_parser_t callback
 
void * opaque
 
void(* print_help )(const struct rte_argparse *obj)
 
void * reserved [15]
 
struct rte_argparse_arg args []
 

Detailed Description

A structure used to hold argparse's configuration.

Examples
examples/dma/dmafwd.c, and examples/flow_filtering/main.c.

Definition at line 150 of file rte_argparse.h.

Field Documentation

◆ prog_name

const char* prog_name

Program name. Must not be NULL.

Examples
examples/dma/dmafwd.c, and examples/flow_filtering/main.c.

Definition at line 152 of file rte_argparse.h.

◆ usage

const char* usage

How to use the program. Must not be NULL.

Definition at line 154 of file rte_argparse.h.

◆ descriptor

const char* descriptor

Explain what the program does. Could be NULL.

Definition at line 156 of file rte_argparse.h.

◆ epilog

const char* epilog

Text at the bottom of help. Could be NULL.

Definition at line 158 of file rte_argparse.h.

◆ exit_on_error

bool exit_on_error

Whether exit when error.

Definition at line 160 of file rte_argparse.h.

◆ ignore_non_flag_args

bool ignore_non_flag_args

behave like getopt and move non-flag args to the end, ignoring them otherwise. If this flag is specified, no positional args are allowed.

Definition at line 164 of file rte_argparse.h.

◆ callback

rte_arg_parser_t callback

User callback for parsing arguments.

Definition at line 168 of file rte_argparse.h.

◆ opaque

void* opaque

Opaque which used to invoke callback.

Definition at line 170 of file rte_argparse.h.

◆ print_help

void(* print_help) (const struct rte_argparse *obj)

Function pointer for printing usage when -h is passed. If this is NULL, default printing function will be used.

Definition at line 175 of file rte_argparse.h.

◆ reserved

void* reserved[15]

Reserved field used for future extension.

Definition at line 177 of file rte_argparse.h.

◆ args

struct rte_argparse_arg args[]

Arguments configuration. Must ended with ARGPARSE_ARG_END().

Definition at line 179 of file rte_argparse.h.


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