summaryrefslogtreecommitdiff
path: root/src/xdp/common/common_params.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/xdp/common/common_params.h')
-rw-r--r--src/xdp/common/common_params.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/xdp/common/common_params.h b/src/xdp/common/common_params.h
new file mode 100644
index 000000000..6f64c82e3
--- /dev/null
+++ b/src/xdp/common/common_params.h
@@ -0,0 +1,22 @@
+/* This common_user.h is used by userspace programs */
+#ifndef __COMMON_PARAMS_H
+#define __COMMON_PARAMS_H
+
+#include <getopt.h>
+#include "common_defines.h"
+
+struct option_wrapper {
+ struct option option;
+ char *help;
+ char *metavar;
+ bool required;
+};
+
+void usage(const char *prog_name, const char *doc,
+ const struct option_wrapper *long_options, bool full);
+
+void parse_cmdline_args(int argc, char **argv,
+ const struct option_wrapper *long_options,
+ struct config *cfg, const char *doc);
+
+#endif /* __COMMON_PARAMS_H */