EDGESEC
0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
|
File containing the implementation of hostapd config generation utilities. More...
#include <stdbool.h>
#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
#include <libgen.h>
#include <signal.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include "ap_config.h"
#include "utils/allocs.h"
#include "utils/iface.h"
#include "utils/log.h"
#include "utils/os.h"
Macros | |
#define | WITH_HOSTAPD_UCI |
#define | HOSTAPD_LOG_FILE_OPTION "-f" |
#define | PROCESS_RESTART_TIME 5 /* In seconds */ |
#define | MAX_AP_CHECK_COUNT 5 /* Number of tries */ |
Functions | |
int | generate_vlan_conf (char *vlan_file, char *interface) |
Generates and save the VLAN configuration file. More... | |
int | generate_hostapd_conf (struct apconf *hconf, struct radius_conf *rconf) |
Generates and saves the hostapd configuration files. More... | |
void | get_hostapd_args (const char *hostapd_bin_path, const char *hostapd_file_path, const char *hostapd_log_path, const char *argv[static 5]) |
int | check_ap_running (char *name, char *if_name, int wait_time) |
int | run_ap_process (struct apconf *hconf) |
Executes the hostapd process. More... | |
bool | kill_ap_process (void) |
Terminate the AP service. More... | |
int | signal_ap_process (const struct apconf *hconf) |
Signal the AP process to reload the config. More... | |
File containing the implementation of hostapd config generation utilities.
Defines function that generate the hostapd daemon configuration file and manages (execute, kill and signal) the hostapd process.
#define HOSTAPD_LOG_FILE_OPTION "-f" |
#define MAX_AP_CHECK_COUNT 5 /* Number of tries */ |
#define PROCESS_RESTART_TIME 5 /* In seconds */ |
#define WITH_HOSTAPD_UCI |
int check_ap_running | ( | char * | name, |
char * | if_name, | ||
int | wait_time | ||
) |
int generate_hostapd_conf | ( | struct apconf * | hconf, |
struct radius_conf * | rconf | ||
) |
Generates and saves the hostapd configuration files.
hconf | The hostapd configuration structure |
rconf | The radius configuration structure |
int generate_vlan_conf | ( | char * | vlan_file, |
char * | interface | ||
) |
Generates and save the VLAN configuration file.
vlan_file | The VLAN configuration file path |
interface | The WiFi AP interface name |
void get_hostapd_args | ( | const char * | hostapd_bin_path, |
const char * | hostapd_file_path, | ||
const char * | hostapd_log_path, | ||
const char * | argv[static 5] | ||
) |
bool kill_ap_process | ( | void | ) |
Terminate the AP service.
int run_ap_process | ( | struct apconf * | hconf | ) |
Executes the hostapd process.
hconf | The hostapd process config structure |
int signal_ap_process | ( | const struct apconf * | hconf | ) |
Signal the AP process to reload the config.
hconf | The hostapd process config structure |