rte_argparse_arg(3)
π rte_argparse_arg (that's section 3 of the manual, bestie)
Okay so. Picture this: you're deep in DPDK land, you're writing a <rte_argparse.h> situation, and you need a struct to hold one single argument's whole configuration. That's literally this page. It's the Library Functions Manual entry, freshly shipped from the DPDK girlies. Sit down, grab a strawberry drink π, and let's go.
β¨ SYNOPSIS β¨
#include <rte_argparse.h>
π Data Fields π
Here's the whole squad, in order, no cap:
const char * name_longconst char * name_shortconst char * helpvoid * val_savervoid * val_setenum rte_argparse_value_required value_requiredenum rte_argparse_value_type value_typeuint32_t flags
πΈ DESCRIPTION πΈ
A structure used to hold argument's configuration. That's it, that's the whole vibe β it's the little container that tells the parser everything it needs to know about one argument. π«Ά
Where does it live? Definition at line 84 of file rte_argparse.h.
π FIELD DOCUMENTATION π
β const char* name_long
The long name of the argument. Rules, and the parser is so serious about them:
- If the argument is optional, it must start with
--. - If the argument is positional, it must not start with
-. - Other case will be considered as error. π (like, actually an error, not a cute little warning)
Definition at line 91 of file rte_argparse.h.
β const char* name_short
The short name of the argument:
- This field could be set only when
name_longis optional, and must start with a hyphen (-) followed by an English letter. - Other case it should be set
NULL.
So likeβ¦ short names are a privilege, not a right. π
Definition at line 98 of file rte_argparse.h.
β const char* help
Help information of the argument, must not be NULL. Not optional. Not negotiable. Give the people their help text. π
Definition at line 101 of file rte_argparse.h.
β void* val_saver
The saver for the argument's value, and it's giving main character energy:
- If this field is
NULL, the callback is used for parsing argument. - If this field is not
NULL, the argument's value will be automatically saved. Slay, no manual labour. β¨
Definition at line 108 of file rte_argparse.h.
β void* val_set
Okay this one's a little two-faced but in a fun way:
- If
val_saverisNULL, this filed (cast as(uint32_t)val_set) will be used as the first parameter to invoke callback. (Yes, the original says "filed" β we don't fix typos, we respect them. π ) - If
val_saveris notNULL, then:- If argument has no value,
*val_saverwill be set toval_set. - If argument has optional value but doesn't take value this time,
*val_saverwill be set toval_set. - Other case it should be set
NULL.
- If argument has no value,
Definition at line 119 of file rte_argparse.h.
β enum rte_argparse_value_required value_required
Specify if the argument takes a value. The enum rte_argparse_value_required of it all.
See also: enum rte_argparse_value_required.
Definition at line 122 of file rte_argparse.h.
β enum rte_argparse_value_type value_type
The type of the argument.
See also: enum rte_argparse_value_type.
Definition at line 124 of file rte_argparse.h.
β uint32_t flags
Any additional flags for this argument. Extra sparkle where you need it. β
Definition at line 127 of file rte_argparse.h.
π§ AUTHOR π§
Generated automatically by Doxygen for DPDK from the source code. Not a human, just a robot doing its little job. π€π
And that's the whole page, bestie β no skipped fields, no skipped line numbers, iykyk. π
Big kiss from the DPDK crew: Version 26.03.0, dated as ever, and that's the rte_argparse_arg(3) footer signing off. Mwah. π
π¦ where this page comes from
- nixos 26.05: dpdk 26.03
- nixpkgs unstable: dpdk 26.03
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms