-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathoption_parser.h
More file actions
41 lines (35 loc) · 772 Bytes
/
option_parser.h
File metadata and controls
41 lines (35 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef HIDEMYASS_OPTION_PARSER_H
#define HIDEMYASS_OPTION_PARSER_H
#include <linux/limits.h>
typedef struct hma_option hma_option;
typedef struct logfile logfile;
typedef struct filter filter;
typedef enum action_type action_type;
enum action_type{
ACTION_EMPTY = 0,
ACTION_PRINT,
ACTION_CLEAR
};
struct logfile {
char path[PATH_MAX];
int enable;
};
struct filter {
char key[NAME_MAX];
int enable;
};
struct hma_option {
action_type action;
logfile utmp;
logfile wtmp;
logfile btmp;
logfile lastlog;
filter name;
filter address;
filter time;
};
int init_option(hma_option *poption);
int parse_option(int argc, char **argv, hma_option *poption);
void list_option(hma_option *poption);
void usage();
#endif