rte_argparse_arg(3)
π NAME π
rte_argparse_arg β bestie, this is the lil struct that holds all the config for ONE single command-line argument in DPDK's argparse situation β¨
β¨ SYNOPSIS β¨
#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
Okay so that's the whole cast of characters π seven of them, and every single one matters, no skipping.
π Detailed Description π
It's a structure β like, a whole little container β and its only job in life is holding one argument's configuration. That's it. That's the girl's purpose. Iconic, honestly. π
Definition at line 85 of file rte_argparse.h.
π¦ Field Documentation π¦
β const char* name_long
The long name of the argument, and listen, there are RULES bestie, pls read them:
- If the argument is optional, it has got to start with
--. - If the argument is positional, it must not start with
-. Not even a lil one. Nope. - Any other case? Considered an error. Periodt. π
Definition at line 92 of file rte_argparse.h.
π const char* name_short
The short name of the argument. Rules again, stay with me:
- This field can only be set when
name_longis optional, and it must start with a hyphen (-) followed by an English letter. - In any other case it should be set to
NULL. Like, just leave it alone. π
Definition at line 99 of file rte_argparse.h.
π const char* help
The help info for the argument, and it must not be NULL. Fr fr, don't leave this empty, your users will be so lost π
Definition at line 102 of file rte_argparse.h.
π§ void* val_saver
The saver for the argument's value. Two vibes here:
- If this field is
NULL, then the callback is used for parsing the argument. - If this field is not
NULL, the argument's value gets automatically saved. Auto-pilot, no thoughts, slay. β¨
Definition at line 109 of file rte_argparse.h.
π void* val_set
Okay this one is conditional queen, pay attention π
If val_saver is NULL, this field β cast as (uint32_t)val_set β is used as the first parameter when the callback gets invoked.
If val_saver is not NULL, then:
- If the argument has no value,
*val_saverwill be set toval_set. - If the argument has an optional value but just doesn't take a value this time,
*val_saverwill be set toval_set. - In any other case it should be set
NULL.
Definition at line 120 of file rte_argparse.h.
π
enum rte_argparse_value_required value_required
Specifies whether the argument takes a value or not. That's the whole thing. Simple, clean, main character energy.
See also: enum rte_argparse_value_required.
Definition at line 123 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 125 of file rte_argparse.h.
π₯ uint32_t flags
Any additional flags for this argument. Extra. Spicy. Whatever else you need to say. πΆοΈ
Definition at line 128 of file rte_argparse.h.
πΈ Author πΈ
Generated automatically by Doxygen for DPDK from the source code. Not written by a person, just a lil robot doing its thing π€π
okay bye bestie, go forth and configure your arguments πβ¨ this was DPDK, Version 25.11.3 β rte_argparse_arg(3), mwah, love u, don't forget your NULL checks π«Άπ
π¦ where this page comes from
- ubuntu resolute: dpdk-doc 25.11.3-0ubuntu0.26.04.1 Β· BSD-3-Clause
- ubuntu stonking: dpdk-doc 25.11.3-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms