mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
AF_XDP-interaction: Add common_params.c+h from XDP-tutorial
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
This commit is contained in:
22
AF_XDP-interaction/common_params.h
Normal file
22
AF_XDP-interaction/common_params.h
Normal file
@@ -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 */
|
Reference in New Issue
Block a user