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

File containing the definition of the service runners. More...

#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <fcntl.h>
#include <libgen.h>
#include <pthread.h>
#include <unistd.h>
#include <utarray.h>
#include <eloop.h>
#include "utils/allocs.h"
#include "utils/hashmap.h"
#include "utils/iface.h"
#include "utils/iface_mapper.h"
#include "utils/ifaceu.h"
#include "utils/log.h"
#include "utils/net.h"
#include "utils/os.h"
#include "capture/capture_service.h"
#include "supervisor/network_commands.h"
#include "supervisor/sqlite_macconn_writer.h"
#include "supervisor/supervisor.h"
#include "ap/ap_service.h"
#include "dhcp/dhcp_service.h"
#include "dns/mdns_service.h"
#include "firewall/firewall_service.h"
#include "config.h"
#include "runctl.h"
Include dependency graph for runctl.c:

Functions

void copy_ifinfo (UT_array *in, UT_array *out)
 
int init_mac_mapper_ifnames (UT_array *connections, hmap_vlan_conn **vlan_mapper)
 
int create_mac_mapper (struct supervisor_context *ctx)
 
int create_subnet_interfaces (struct iface_context *context, UT_array *ifinfo_array, bool ignore_error)
 
int set_subnet_ips (struct iface_context *context, UT_array *ifinfo_array)
 
int construct_ap_ctrlif (char *ctrl_interface, char *interface, char *ap_ctrl_if_path)
 
int init_context (struct app_config *app_config, struct supervisor_context *ctx)
 Initialises the app context structure. More...
 
int run_mdns_forwarder (const char *mdns_bin_path, const char *config_ini_path)
 
void close_capture_thread (const hmap_vlan_conn *vlan_mapper)
 
int run_ctl (struct app_config *app_config, struct eloop_data *eloop)
 Executes the edgesec WiFi networking engine. Creates subnets and starts the supervisor, radius servers and hostapd service. More...
 

Detailed Description

File containing the definition of the service runners.

Author
Alexandru Mereacre
Date
2020

Function Documentation

◆ close_capture_thread()

void close_capture_thread ( const hmap_vlan_conn vlan_mapper)

◆ construct_ap_ctrlif()

int construct_ap_ctrlif ( char *  ctrl_interface,
char *  interface,
char *  ap_ctrl_if_path 
)

◆ copy_ifinfo()

void copy_ifinfo ( UT_array *  in,
UT_array *  out 
)

◆ create_mac_mapper()

int create_mac_mapper ( struct supervisor_context ctx)

◆ create_subnet_interfaces()

int create_subnet_interfaces ( struct iface_context context,
UT_array *  ifinfo_array,
bool  ignore_error 
)

◆ init_context()

int init_context ( struct app_config app_config,
struct supervisor_context ctx 
)

Initialises the app context structure.

Parameters
app_configThe app config structure
ctxThe app context structure
Returns
0 on success, -1 otherwise

◆ init_mac_mapper_ifnames()

int init_mac_mapper_ifnames ( UT_array *  connections,
hmap_vlan_conn **  vlan_mapper 
)

◆ run_ctl()

int run_ctl ( struct app_config app_config,
struct eloop_data *  eloop 
)

Executes the edgesec WiFi networking engine. Creates subnets and starts the supervisor, radius servers and hostapd service.

Parameters
app_configThe app configuration structures, setting WiFi network config params.
eloopThe eloop structure, if NULL initialises a new one
Returns
0 if succes, -1 if a service fails to start.

◆ run_mdns_forwarder()

int run_mdns_forwarder ( const char *  mdns_bin_path,
const char *  config_ini_path 
)

◆ set_subnet_ips()

int set_subnet_ips ( struct iface_context context,
UT_array *  ifinfo_array 
)