-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.h
69 lines (59 loc) · 1.36 KB
/
options.h
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef __BFTPD_OPTIONS_H
#define __BFTPD_OPTIONS_H
#include "commands.h"
#include "mypaths.h"
#include <pwd.h>
#include <grp.h>
/*
Define some default options
*/
#define CONTROL_TIMEOUT 300
#define DATA_TIMEOUT 300
#define XFER_BUFSIZE 4096
#define XFER_DELAY 0
#define DEFAULT_PORT 21
struct bftpd_option {
char *name, *value;
struct bftpd_option *next;
};
struct list_of_struct_passwd {
struct passwd pwd;
struct list_of_struct_passwd *next;
};
struct list_of_struct_group {
struct group grp;
struct list_of_struct_group *next;
};
struct directory {
char *path;
struct bftpd_option *options;
struct directory *next;
};
struct global {
struct bftpd_option *options;
struct directory *directories;
};
struct group_of_users {
struct list_of_struct_passwd *users;
struct list_of_struct_group *groups;
char *temp_members;
struct bftpd_option *options;
struct directory *directories;
struct group_of_users *next;
};
struct user {
char *name;
struct bftpd_option *options;
struct directory *directories;
struct user *next;
};
extern struct group_of_users *config_groups;
extern struct user *config_users;
void expand_groups();
void config_init();
char *config_getoption(char *name);
char *config_getoption_reread( char *find_me );
void config_end();
void Reread_Config_File();
char *Find_Config_File();
#endif