EDGESEC  0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
ap_config.h
Go to the documentation of this file.
1 
14 #ifndef CONFIG_GENERATOR_H
15 #define CONFIG_GENERATOR_H
16 
17 #include <stdbool.h>
18 #include <net/if.h>
19 #include <sys/types.h>
20 
21 #include "../radius/radius_server.h"
22 #include "../utils/allocs.h"
23 #include "../utils/os.h"
24 
25 #define AP_NAME_LEN 32 /* Maximum length of the AP name, i.e., ESSID name */
26 #define AP_SECRET_LEN \
27  64 /* Maximum length of the AP secret, i.e., ESSID secret */
28 #define AP_DRIVE_LEN 20 /* Maximum length of the AP driver name */
29 #define AP_HWMODE_LEN \
30  4 /* Maximum size of the hostapd @c hw_mode param @see \
31  https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf */
32 #define AP_WPA_KEY_MGMT_LEN \
33  20 /* Maximum size of the hostapd @c wpa_key_mgmt param @see \
34  https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf */
35 #define AP_RSN_PAIRWISE_LEN \
36  20 /* Maximum size of the hostapd @c rsn_pairwise param @see \
37  https://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf */
38 
48 };
49 
54 struct apconf {
61  char
62  interface[IF_NAMESIZE];
65  char device[IF_NAMESIZE];
66  char
73  char driver
77  char hw_mode
81  int channel;
83  int wmm_enabled;
85  int auth_algs;
87  int wpa;
89  char wpa_key_mgmt
94  char rsn_pairwise
99  char ctrl_interface
100  [MAX_OS_PATH_LEN];
104  int macaddr_acl;
106  int dynamic_vlan;
108  char vlan_bridge
109  [IF_NAMESIZE];
112  char vlan_file
116  int logger_stdout;
121  int logger_syslog;
130  int wpa_psk_radius;
133  [IF_NAMESIZE];
135 };
136 
137 #endif
#define AP_NAME_LEN
Definition: ap_config.h:25
#define AP_HWMODE_LEN
Definition: ap_config.h:29
#define AP_WPA_KEY_MGMT_LEN
Definition: ap_config.h:31
#define AP_DRIVE_LEN
Definition: ap_config.h:28
#define AP_SECRET_LEN
Definition: ap_config.h:26
AP_CONNECTION_STATUS
The AP conection status.
Definition: ap_config.h:41
@ AP_DISCONNECTED_STATUS
Definition: ap_config.h:44
@ AP_CONNECTED_STATUS
Definition: ap_config.h:43
@ AP_DEFAULT_STATUS
Definition: ap_config.h:42
#define AP_RSN_PAIRWISE_LEN
Definition: ap_config.h:33
#define MAX_OS_PATH_LEN
Definition: os.h:29
The hostapd configuration structure.
Definition: ap_config.h:51
int logger_stdout
Definition: ap_config.h:113
char vlan_tagged_interface[IF_NAMESIZE]
Definition: ap_config.h:130
char wpa_key_mgmt[AP_WPA_KEY_MGMT_LEN]
Definition: ap_config.h:87
char ctrl_interface_path[MAX_OS_PATH_LEN]
Definition: ap_config.h:56
char wpa_passphrase[AP_SECRET_LEN]
Definition: ap_config.h:67
char hw_mode[AP_HWMODE_LEN]
Definition: ap_config.h:75
int ignore_broadcast_ssid
Definition: ap_config.h:123
int wmm_enabled
Definition: ap_config.h:80
int auth_algs
Definition: ap_config.h:82
char ssid[AP_NAME_LEN]
Definition: ap_config.h:64
char vlan_bridge[IF_NAMESIZE]
Definition: ap_config.h:106
int wpa_psk_radius
Definition: ap_config.h:127
char ap_file_path[MAX_OS_PATH_LEN]
Definition: ap_config.h:53
char ap_log_path[MAX_OS_PATH_LEN]
Definition: ap_config.h:55
char ctrl_interface[MAX_OS_PATH_LEN]
Definition: ap_config.h:97
char rsn_pairwise[AP_RSN_PAIRWISE_LEN]
Definition: ap_config.h:92
int logger_syslog_level
Definition: ap_config.h:120
int logger_stdout_level
Definition: ap_config.h:115
int logger_syslog
Definition: ap_config.h:118
char driver[AP_DRIVE_LEN]
Definition: ap_config.h:71
int macaddr_acl
Definition: ap_config.h:101
int channel
Definition: ap_config.h:78
int dynamic_vlan
Definition: ap_config.h:103
int wpa
Definition: ap_config.h:84
char ap_bin_path[MAX_OS_PATH_LEN]
Definition: ap_config.h:52
char device[IF_NAMESIZE]
Definition: ap_config.h:62
char interface[IF_NAMESIZE]
Definition: ap_config.h:59
char vlan_file[MAX_OS_PATH_LEN]
Definition: ap_config.h:110