EDGESEC
0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
|
File containing the implementation of the supervisor service. More...
#include <stdbool.h>
#include <sys/socket.h>
#include <libgen.h>
#include <sys/ioctl.h>
#include <sys/un.h>
#include <time.h>
#include <unistd.h>
#include <utarray.h>
#include "subscriber_events.h"
#include <eloop.h>
#include "../utils/allocs.h"
#include "../utils/log.h"
#include "../utils/os.h"
#include "../utils/sockctl.h"
#include "../capture/capture_service.h"
#include "cmd_processor.h"
#include "network_commands.h"
#include "supervisor_utils.h"
Functions | |
void | configure_mac_info (struct mac_conn_info *info, bool allow_connection, int vlanid, ssize_t pass_len, uint8_t *pass, char *label) |
int | run_analyser (char *ifname, struct capture_conf *config, pthread_t *pid) |
int | schedule_analyser (struct supervisor_context *context, int vlanid) |
int | save_device_vlan (struct supervisor_context *context, uint8_t mac_addr[], struct mac_conn_info *info) |
struct mac_conn_info | get_mac_conn_cmd (uint8_t mac_addr[], void *mac_conn_arg) |
Return a mac_conn_info for a given MAC address. More... | |
void | ap_service_callback (struct supervisor_context *context, uint8_t mac_addr[], enum AP_CONNECTION_STATUS status) |
The AP service callback. More... | |
int | process_received_data (int sock, struct client_address *claddr, struct supervisor_context *context) |
void | eloop_read_domain_handler (int sock, void *eloop_ctx, void *sock_ctx) |
void | eloop_read_udp_handler (int sock, void *eloop_ctx, void *sock_ctx) |
void | close_supervisor (struct supervisor_context *context) |
Closes the supervisor service. More... | |
int | run_supervisor (char *server_path, unsigned int port, struct supervisor_context *context) |
Executes the supervisor service. More... | |
File containing the implementation of the supervisor service.
void ap_service_callback | ( | struct supervisor_context * | context, |
uint8_t | mac_addr[], | ||
enum AP_CONNECTION_STATUS | status | ||
) |
The AP service callback.
context | The supervisor context |
mac_addr | The STA mac address |
status | The STA connection status |
void close_supervisor | ( | struct supervisor_context * | context | ) |
Closes the supervisor service.
context | The supervisor structure |
void configure_mac_info | ( | struct mac_conn_info * | info, |
bool | allow_connection, | ||
int | vlanid, | ||
ssize_t | pass_len, | ||
uint8_t * | pass, | ||
char * | label | ||
) |
void eloop_read_domain_handler | ( | int | sock, |
void * | eloop_ctx, | ||
void * | sock_ctx | ||
) |
void eloop_read_udp_handler | ( | int | sock, |
void * | eloop_ctx, | ||
void * | sock_ctx | ||
) |
struct mac_conn_info get_mac_conn_cmd | ( | uint8_t | mac_addr[], |
void * | mac_conn_arg | ||
) |
Return a mac_conn_info for a given MAC address.
mac_addr | The input MAC adderss |
mac_conn_arg | The supervisor_context pointer |
int process_received_data | ( | int | sock, |
struct client_address * | claddr, | ||
struct supervisor_context * | context | ||
) |
int run_analyser | ( | char * | ifname, |
struct capture_conf * | config, | ||
pthread_t * | pid | ||
) |
int run_supervisor | ( | char * | server_path, |
unsigned int | port, | ||
struct supervisor_context * | context | ||
) |
Executes the supervisor service.
server_path | The domain socket path |
port | The UDP port |
context | The supervisor structure |
int save_device_vlan | ( | struct supervisor_context * | context, |
uint8_t | mac_addr[], | ||
struct mac_conn_info * | info | ||
) |
int schedule_analyser | ( | struct supervisor_context * | context, |
int | vlanid | ||
) |