21 lines
312 B
C
21 lines
312 B
C
#pragma once
|
|
|
|
#define NB_OPTIONS 5
|
|
|
|
typedef enum {
|
|
FL_HELP,
|
|
FL_PORTS,
|
|
FL_IP,
|
|
FL_SPEEDUP,
|
|
FL_SCAN,
|
|
} e_flag;
|
|
|
|
struct option_lst {
|
|
e_flag flag;
|
|
char *arg;
|
|
struct option_lst *next;
|
|
};
|
|
|
|
struct option_lst *parse_options(int ac, char *const *av);
|
|
char *get_option_arg(struct option_lst *options, e_flag flag);
|