EDGESEC  0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
config.h
Go to the documentation of this file.
1 
10 #ifndef CONFIG_H
11 #define CONFIG_H
12 
13 #include <utarray.h>
14 #include "ap/ap_config.h"
15 #include "capture/capture_config.h"
16 #include "dhcp/dhcp_config.h"
17 #include "dns/dns_config.h"
18 #include "radius/radius_server.h"
20 #include "utils/allocs.h"
21 #include "utils/hashmap.h"
22 #include "utils/os.h"
23 
24 #define MAX_USER_SECRET 255
25 #define MAX_SALT_STRING_SIZE 255
26 
34 struct app_config {
35  UT_array *
37  bool ap_detect;
39  bool exec_ap;
41  bool exec_radius;
42  bool exec_dhcp;
43  bool exec_capture;
46  char nat_bridge[IF_NAMESIZE];
47  char nat_interface[IF_NAMESIZE];
48  char bridge_prefix[IF_NAMESIZE];
49  char interface_prefix[IF_NAMESIZE];
56  UT_array *config_ifinfo_array;
58  unsigned int supervisor_control_port;
64 #ifdef WITH_CRYPTO_SERVICE
65  char crypt_db_path[MAX_OS_PATH_LEN];
67  char crypt_secret[MAX_USER_SECRET];
69 #endif
75  struct radius_conf rconfig;
76  struct apconf hconfig;
77  struct dns_conf dns_config;
78  struct mdns_conf mdns_config;
79  struct dhcp_conf dhcp_config;
82 };
83 
92 int load_app_config(const char *filename, struct app_config *config);
93 
100 void free_app_config(struct app_config *config);
101 
109 bool load_capture_config(const char *filename, struct capture_conf *config);
110 
118 bool load_system_config(const char *filename, struct app_config *config);
119 
127 bool load_supervisor_config(const char *filename, struct app_config *config);
128 
136 bool load_mdns_conf(const char *filename, struct app_config *config);
137 
145 bool load_interface_list(const char *filename, struct app_config *config);
146 
154 bool load_ap_conf(const char *filename, struct app_config *config);
155 #endif
File containing the definition of the allocs functionalities.
File containing the definition of AP config structures.
File containing the definition of the capture config structures.
bool load_supervisor_config(const char *filename, struct app_config *config)
Loads the supervisor config.
Definition: config.c:626
int load_app_config(const char *filename, struct app_config *config)
Load the app configuration.
Definition: config.c:679
bool load_capture_config(const char *filename, struct capture_conf *config)
Loads the capture config.
Definition: config.c:487
bool load_mdns_conf(const char *filename, struct app_config *config)
Loads the mDNS config.
Definition: config.c:400
void free_app_config(struct app_config *config)
Frees the app configuration.
Definition: config.c:756
bool load_system_config(const char *filename, struct app_config *config)
Loads the system config.
Definition: config.c:522
bool load_ap_conf(const char *filename, struct app_config *config)
Loads the AP config.
Definition: config.c:210
bool load_interface_list(const char *filename, struct app_config *config)
Loads the list of interfaces.
Definition: config.c:81
#define MAX_USER_SECRET
Definition: config.h:24
File containing the definition of dhcp configuration structures.
File containing the definition of dns service configuration utilities.
File containing the definition of the hashmap utilities.
File containing the definition of the os functionalities.
#define MAX_OS_PATH_LEN
Definition: os.h:29
RADIUS authentication server.
The hostapd configuration structure.
Definition: ap_config.h:51
The App configuration structures. Used for configuring the networking services.
Definition: config.h:34
bool exec_radius
Definition: config.h:41
struct capture_conf capture_config
Definition: config.h:80
bool allow_all_connections
Definition: config.h:70
int default_open_vlanid
Definition: config.h:54
bool exec_firewall
Definition: config.h:45
struct mdns_conf mdns_config
Definition: config.h:78
bool exec_mdns_forward
Definition: config.h:44
UT_array * config_ifinfo_array
Definition: config.h:56
bool ignore_if_error
Definition: config.h:51
char supervisor_control_path[MAX_OS_PATH_LEN]
Definition: config.h:60
struct firewall_conf firewall_config
Definition: config.h:81
bool allocate_vlans
Definition: config.h:53
bool exec_capture
Definition: config.h:43
bool exec_ap
Definition: config.h:39
char pid_file_path[MAX_OS_PATH_LEN]
Definition: config.h:73
bool allow_all_nat
Definition: config.h:71
UT_array * bin_path_array
Definition: config.h:36
unsigned int supervisor_control_port
Definition: config.h:58
char interface_prefix[IF_NAMESIZE]
Definition: config.h:49
struct radius_conf rconfig
Definition: config.h:75
bool create_interfaces
Definition: config.h:50
bool generate_ssid
Definition: config.h:40
bool exec_dhcp
Definition: config.h:42
struct dhcp_conf dhcp_config
Definition: config.h:79
char connection_db_path[MAX_OS_PATH_LEN]
Definition: config.h:62
struct apconf hconfig
Definition: config.h:76
bool set_ip_forward
Definition: config.h:72
bool ap_detect
Definition: config.h:37
struct dns_conf dns_config
Definition: config.h:77
char config_ini_path[MAX_OS_PATH_LEN]
Definition: config.h:74
char bridge_prefix[IF_NAMESIZE]
Definition: config.h:48
char nat_bridge[IF_NAMESIZE]
Definition: config.h:46
char nat_interface[IF_NAMESIZE]
Definition: config.h:47
The capture configuration structure.
Definition: capture_config.h:32
The dhcp configuration structures.
Definition: dhcp_config.h:40
The dns configuration structures.
Definition: dns_config.h:42
Definition: firewall_config.h:28
The mDNS configuration structures.
Definition: dns_config.h:51
Radius configuration structure.
Definition: radius_config.h:23
File containing the definition of the supervisor service structure.