1#ifndef __BFTPD_OPTIONS_H
2#define __BFTPD_OPTIONS_H
3
4#include "commands.h"
5#include "mypaths.h"
6
7#include <pwd.h>
8#include <grp.h>
9
10
11/*
12Define some default options
13*/
14
15#define CONTROL_TIMEOUT 300
16#define DATA_TIMEOUT 300
17#define XFER_BUFSIZE 4096
18#define XFER_DELAY 0
19#define DEFAULT_PORT 21
20
21struct bftpd_option {
22  char *name, *value;
23  struct bftpd_option *next;
24};
25struct list_of_struct_passwd {
26    struct passwd pwd;
27    struct list_of_struct_passwd *next;
28};
29struct list_of_struct_group {
30    struct group grp;
31    struct list_of_struct_group *next;
32};
33
34struct directory {
35    char *path;
36    struct bftpd_option *options;
37    struct directory *next;
38};
39struct global {
40    struct bftpd_option *options;
41    struct directory *directories;
42};
43struct group_of_users {
44    struct list_of_struct_passwd *users;
45    struct list_of_struct_group *groups;
46    char *temp_members;
47    struct bftpd_option *options;
48    struct directory *directories;
49    struct group_of_users *next;
50};
51struct user {
52    char *name;
53    struct bftpd_option *options;
54    struct directory *directories;
55    struct user *next;
56};
57
58extern struct group_of_users *config_groups;
59extern struct user *config_users;
60
61void expand_groups();
62void config_init();
63char *config_getoption(char *name);
64char *config_getoption_reread( char *find_me );
65void config_end();
66void Reread_Config_File();
67
68#endif
69