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_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 []

πŸ¦‹ 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 be NULL, 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 be NULL too, 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 like getopt and 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 -h is passed. and if this is NULL, 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 with ARGPARSE_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