rte_argparse(3)

πŸ“¦ version 26.03, in nixos 26.05, nixpkgs unstable

✨ rte_argparse(3) ✨

okay bestie, this one's a C struct from DPDK β€” it's literally the manual page rte_argparse(3) from the Library Functions Manual, and it's giving "config object for the argparse thing" energy. buckle up πŸ’…


🌸 SYNOPSIS 🌸

#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 πŸ¦‹

so this struct is the whole vibe holder β€” it's a structure used to hold argparse's configuration. that's it, that's the job, and it slays at it ✨

Definition at line 149 of file rte_argparse.h.

πŸ‘‘ Field Documentation πŸ‘‘

πŸ’– const char* prog_name

the program name, bestie. Must not be NULL. like, do not pass NULL here, fr fr.

Definition at line 151 of file rte_argparse.h.

πŸ’– const char* usage

how you're supposed to use the program. also must not be NULL β€” the parser needs its little instruction manual 🫢

Definition at line 153 of file rte_argparse.h.

πŸ’– const char* descriptor

this one explains what the program actually does. lowkey optional β€” could be NULL 😌

Definition at line 155 of file rte_argparse.h.

πŸ’– const char* epilog

the text that sits at the bottom of the help output. also could be NULL, so no pressure πŸŽ€

Definition at line 157 of file rte_argparse.h.

πŸ’– bool exit_on_error

whether it exits when there's an error. that's the whole thing. ✨

Definition at line 159 of file rte_argparse.h.

πŸ’– bool ignore_non_flag_args

okay this one: it makes the parser behave like getopt and move non-flag args to the end, ignoring them otherwise. and the important bit β€” if this flag is specified, no positional args are allowed. so pick your lane, bestie 🚨

Definition at line 163 of file rte_argparse.h.

πŸ’– rte_arg_parser_t callback

your very own user callback for parsing arguments. main character energy, honestly πŸ‘‘

Definition at line 167 of file rte_argparse.h.

πŸ’– void* opaque

an opaque pointer that gets used to invoke the callback. classic iykyk situation 🫢

Definition at line 169 of file rte_argparse.h.

πŸ’– void(* print_help) (const struct rte_argparse *obj)

a function pointer for printing usage when -h is passed. and if this is NULL, the default printing function will be used β€” so you're covered either way, no cap πŸ’…

Definition at line 174 of file rte_argparse.h.

πŸ’– void* reserved[15]

reserved field, used for future extension. literally just sitting there being mysterious for later 🧚

Definition at line 176 of file rte_argparse.h.

πŸ’– struct rte_argparse_arg args[]

the arguments configuration. and this is the non-negotiable part: it must be ended with ARGPARSE_ARG_END(). don't forget the terminator, bestie, the parser will simply not know when to stop 😭

Definition at line 178 of file rte_argparse.h.


⭐ Author ⭐

generated automatically by Doxygen for DPDK from the source code β€” so nobody hand-wrote this, it just spawned fully formed like a little documentation butterfly πŸ¦‹


and that's the whole page!! πŸ’œ this was DPDK, Version 26.03.0 β€” rte_argparse(3), out. slay, bye bestie πŸŒˆπŸ‘‘

πŸ“¦ where this page comes from