rte_argparse(3)
π rte_argparse π
okay bestie, gather round, because today we're learning about rte_argparse β it's a Library Functions Manual moment, she's a 3, she's from the rte_argparse(3) page, and honestly? iconic.
β¨ NAME β¨
rte_argparse β that's it, that's the name, she's literally just a struct serving cunt and holding your config π«Ά
πΈ SYNOPSIS πΈ
#include <rte_argparse.h>
π Data Fields π
here's the whole cast, in order, no one gets cut:
const char * prog_nameconst char * usageconst char * descriptorconst char * epilogbool exit_on_errorbool ignore_non_flag_argsrte_arg_parser_t callbackvoid * opaquevoid(* print_help )(const struct rte_argparse *obj)void * reserved [15]struct rte_argparse_arg args []
π¦ DESCRIPTION π¦
so basically this struct is where argparse keeps all her configuration. that's the whole vibe. π
she's defined at Definition at line 150 of file rte_argparse.h.
π FIELD DOCUMENTATION π
okay now the main character energy β one field at a time, no skipping, bestie, fr fr:
const char* prog_nameβ the program's name. this one absolutely must not be NULL, no exceptions, don't try it. π«
Definition at line 152 of file rte_argparse.h.
const char* usageβ how you use the program. also must not be NULL, periodt.
Definition at line 154 of file rte_argparse.h.
const char* descriptorβ explains what the program actually does. this one could beNULL, she's optional, lowkey chill like that. π
Definition at line 156 of file rte_argparse.h.
const char* epilogβ the text that lives at the bottom of the help output. could beNULLtoo, no pressure. π
Definition at line 158 of file rte_argparse.h.
bool exit_on_errorβ whether to exit when there's an error.
Definition at line 160 of file rte_argparse.h.
bool ignore_non_flag_argsβ makes her behave likegetoptand move non-flag args to the end, ignoring them otherwise. but β heads up β if this flag is specified, no positional args are allowed. not even one. π«
Definition at line 164 of file rte_argparse.h.
rte_arg_parser_t callbackβ the user callback that does the actual parsing of arguments.
Definition at line 168 of file rte_argparse.h.
void* opaqueβ the opaque thingy that gets used to invoke the callback. mysterious, we love her. π
Definition at line 170 of file rte_argparse.h.
void(* print_help) (const struct rte_argparse *obj)β a function pointer for printing usage when-his passed. and if this isNULL, the default printing function steps in and handles it. β¨
Definition at line 175 of file rte_argparse.h.
void* reserved[15]β reserved field, saved for future extension. she's just vibing in the back waiting for her moment. β
Definition at line 177 of file rte_argparse.h.
struct rte_argparse_arg args[]β the arguments configuration. must be ended withARGPARSE_ARG_END()β do not forget this, bestie, it's giving unfinished sentence energy and the parser will NOT forgive you. π
Definition at line 179 of file rte_argparse.h.
π AUTHOR π
Generated automatically by Doxygen for DPDK from the source code.
and that's the whole page, ate and left no crumbs π
β¨ this was DPDK, Version 25.11.3, brought to you by the rte_argparse(3) girlies ππ¦ β mwah, take care of your prog_name, she can't be NULL π
π¦ 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