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

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

#include "supervisor_config.h"
Include dependency graph for supervisor.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

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 run_supervisor (char *server_path, unsigned int port, struct supervisor_context *context)
 Executes the supervisor service. More...
 
void close_supervisor (struct supervisor_context *context)
 Closes the supervisor service. More...
 

Detailed Description

File containing the definition of the supervisor service.

Author
Alexandru Mereacre
Date
2020

Function Documentation

◆ ap_service_callback()

void ap_service_callback ( struct supervisor_context context,
uint8_t  mac_addr[],
enum AP_CONNECTION_STATUS  status 
)

The AP service callback.

Parameters
contextThe supervisor context
mac_addrThe STA mac address
statusThe STA connection status
Returns
0 on success, -1 on failure

◆ close_supervisor()

void close_supervisor ( struct supervisor_context context)

Closes the supervisor service.

Parameters
contextThe supervisor structure
Returns
true on success, false otherwise

◆ get_mac_conn_cmd()

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.

Parameters
mac_addrThe input MAC adderss
mac_conn_argThe supervisor_context pointer
Returns
struct mac_conn_info

◆ run_supervisor()

int run_supervisor ( char *  server_path,
unsigned int  port,
struct supervisor_context context 
)

Executes the supervisor service.

Parameters
server_pathThe domain socket path
portThe UDP port
contextThe supervisor structure
Returns
int The domain socket