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

File containing the implementation of the app configuration utilities. More...

#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <minIni.h>
#include <unistd.h>
#include "./dhcp/dhcp_config_utils.h"
#include "config.h"
#include "utils/allocs.h"
#include "utils/os.h"
#include "supervisor/cmd_processor.h"
Include dependency graph for config.c:

Functions

bool get_config_ifinfo (char *info, config_ifinfo_t *el)
 
bool load_interface_list (const char *filename, struct app_config *config)
 Loads the list of interfaces. More...
 
bool load_dhcp_list (const char *filename, struct app_config *config)
 
bool load_radius_conf (const char *filename, struct app_config *config)
 
bool load_ap_conf (const char *filename, struct app_config *config)
 Loads the AP config. More...
 
bool load_dns_conf (const char *filename, struct app_config *config)
 
bool load_mdns_conf (const char *filename, struct app_config *config)
 Loads the mDNS config. More...
 
bool load_dhcp_conf (const char *filename, struct app_config *config)
 
bool load_capture_config (const char *filename, struct capture_conf *config)
 Loads the capture config. More...
 
bool load_system_config (const char *filename, struct app_config *config)
 Loads the system config. More...
 
bool load_supervisor_config (const char *filename, struct app_config *config)
 Loads the supervisor config. More...
 
bool load_nat_config (const char *filename, struct app_config *config)
 
bool load_firewall_config (const char *filename, struct firewall_conf *config)
 
int load_app_config (const char *filename, struct app_config *config)
 Load the app configuration. More...
 
void free_app_config (struct app_config *config)
 Frees the app configuration. More...
 

Detailed Description

File containing the implementation of the app configuration utilities.

Author
Alexandru Mereacre
Date
2021

Function Documentation

◆ free_app_config()

void free_app_config ( struct app_config config)

Frees the app configuration.

Parameters
configThe app configuration structure
Returns
true on success, false otherwise

◆ get_config_ifinfo()

bool get_config_ifinfo ( char *  info,
config_ifinfo_t el 
)

◆ load_ap_conf()

bool load_ap_conf ( const char *  filename,
struct app_config config 
)

Loads the AP config.

Parameters
filenameThe app configuration file
configThe app configuration structure
Returns
true on success, false otherwise

◆ load_app_config()

int load_app_config ( const char *  filename,
struct app_config config 
)

Load the app configuration.

Parameters
filenameThe app configuration file
[in,out]configThe configuration structure to store config in. Must be cleaned up with free_app_config().
Returns
0 on success, -1 otherwise

◆ load_capture_config()

bool load_capture_config ( const char *  filename,
struct capture_conf config 
)

Loads the capture config.

Parameters
filenameThe app configuration file
configThe capture configuration structure
Returns
true on success, false otherwise

◆ load_dhcp_conf()

bool load_dhcp_conf ( const char *  filename,
struct app_config config 
)

◆ load_dhcp_list()

bool load_dhcp_list ( const char *  filename,
struct app_config config 
)

◆ load_dns_conf()

bool load_dns_conf ( const char *  filename,
struct app_config config 
)

◆ load_firewall_config()

bool load_firewall_config ( const char *  filename,
struct firewall_conf config 
)

◆ load_interface_list()

bool load_interface_list ( const char *  filename,
struct app_config config 
)

Loads the list of interfaces.

Parameters
filenameThe app configuration file
configThe app configuration structure
Returns
true on success, false otherwise

◆ load_mdns_conf()

bool load_mdns_conf ( const char *  filename,
struct app_config config 
)

Loads the mDNS config.

Parameters
filenameThe app configuration file
configThe app configuration structure
Returns
true on success, false otherwise

◆ load_nat_config()

bool load_nat_config ( const char *  filename,
struct app_config config 
)

◆ load_radius_conf()

bool load_radius_conf ( const char *  filename,
struct app_config config 
)

◆ load_supervisor_config()

bool load_supervisor_config ( const char *  filename,
struct app_config config 
)

Loads the supervisor config.

Parameters
filenameThe app configuration file
configThe app configuration structure
Returns
true on success, false otherwise

◆ load_system_config()

bool load_system_config ( const char *  filename,
struct app_config config 
)

Loads the system config.

Parameters
filenameThe app configuration file
configThe app configuration structure
Returns
true on success, false otherwise