EDGESEC  0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
Functions
hostapd.h File Reference

File containing the definition of hostapd config generation utilities. More...

#include <stdbool.h>
#include <sys/types.h>
#include "../radius/radius_config.h"
#include "../radius/radius_server.h"
#include "../utils/allocs.h"
#include "../utils/os.h"
#include "ap_config.h"
Include dependency graph for hostapd.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int generate_hostapd_conf (struct apconf *hconf, struct radius_conf *rconf)
 Generates and saves the hostapd configuration files. More...
 
int generate_vlan_conf (char *vlan_file, char *interface)
 Generates and save the VLAN configuration file. More...
 
int run_ap_process (struct apconf *hconf)
 Executes the hostapd process. More...
 
int signal_ap_process (const struct apconf *hconf)
 Signal the AP process to reload the config. More...
 
bool kill_ap_process (void)
 Terminate the AP service. More...
 

Detailed Description

File containing the definition of hostapd config generation utilities.

Author
Alexandru Mereacre
Date
2021

Defines function that generate the hostapd daemon configuration file and manages (execute, kill and signal) the hostapd process.

Function Documentation

◆ generate_hostapd_conf()

int generate_hostapd_conf ( struct apconf hconf,
struct radius_conf rconf 
)

Generates and saves the hostapd configuration files.

Parameters
hconfThe hostapd configuration structure
rconfThe radius configuration structure
Returns
0 if config file saved, -1 otherwise

◆ generate_vlan_conf()

int generate_vlan_conf ( char *  vlan_file,
char *  interface 
)

Generates and save the VLAN configuration file.

Parameters
vlan_fileThe VLAN configuration file path
interfaceThe WiFi AP interface name
Returns
0 if VLAN config file saved, -1 otherwise

◆ kill_ap_process()

bool kill_ap_process ( void  )

Terminate the AP service.

Returns
bool true on success, false otherwise

◆ run_ap_process()

int run_ap_process ( struct apconf hconf)

Executes the hostapd process.

Parameters
hconfThe hostapd process config structure
Returns
int 0 on success, -1 on failure

◆ signal_ap_process()

int signal_ap_process ( const struct apconf hconf)

Signal the AP process to reload the config.

Parameters
hconfThe hostapd process config structure
Returns
int 0 on success, -1 on failure