summaryrefslogtreecommitdiff
path: root/src/xdp/common/common_params.h
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-12-18 17:13:13 +0100
committerChristian Poessinger <christian@poessinger.com>2020-12-19 21:56:19 +0100
commitb5c80d310527223b93e4133ac2f4c8c063c70a98 (patch)
tree48ae9e2752b4b94c07f767a019c99a8c2460c014 /src/xdp/common/common_params.h
parent22308b05dfbcd8da0230bbd8ba3bbc2a55da7786 (diff)
downloadvyos-1x-b5c80d310527223b93e4133ac2f4c8c063c70a98.tar.gz
vyos-1x-b5c80d310527223b93e4133ac2f4c8c063c70a98.zip
xdp: T2666: switch to example code provided by xdp-tutorial
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 */