| EDGESEC
    0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
    Secure router - reference implementation | 
File containing the definition of the network commands. More...
#include <stdbool.h>#include <inttypes.h>#include "../ap/ap_config.h"#include "supervisor_config.h"Go to the source code of this file.
| Macros | |
| #define | TICKET_PASSPHRASE_SIZE 16 | 
| #define | TICKET_TIMEOUT 60 | 
| Functions | |
| void | free_ticket (struct supervisor_context *context) | 
| Frees an allocated ticket.  More... | |
| int | accept_mac_cmd (struct supervisor_context *context, uint8_t *mac_addr, int vlanid) | 
| ACCEPT_MAC command.  More... | |
| int | deny_mac_cmd (struct supervisor_context *context, uint8_t *mac_addr) | 
| DENY_MAC command.  More... | |
| int | add_nat_cmd (struct supervisor_context *context, uint8_t *mac_addr) | 
| ADD_NAT command.  More... | |
| int | remove_nat_cmd (struct supervisor_context *context, uint8_t *mac_addr) | 
| REMOVE_NAT command.  More... | |
| int | assign_psk_cmd (struct supervisor_context *context, uint8_t *mac_addr, char *pass, int pass_len) | 
| ASSIGN_PSK command.  More... | |
| int | add_bridge_mac_cmd (struct supervisor_context *context, uint8_t *left_mac_addr, uint8_t *right_mac_addr) | 
| ADD_BRIDGE command (MAC address input)  More... | |
| int | add_bridge_ip_cmd (struct supervisor_context *context, char *left_ip_addr, char *right_ip_addr) | 
| ADD_BRIDGE command (IP address input)  More... | |
| int | remove_bridge_cmd (struct supervisor_context *context, uint8_t *left_mac_addr, uint8_t *right_mac_addr) | 
| REMOVE_BRIDGE command.  More... | |
| int | clear_bridges_cmd (struct supervisor_context *context, uint8_t *mac_addr) | 
| CLEAR_BRIDGES command.  More... | |
| uint8_t * | register_ticket_cmd (struct supervisor_context *context, uint8_t *mac_addr, char *label, int vlanid) | 
| REGISTER_TICKET command.  More... | |
| int | clear_psk_cmd (struct supervisor_context *context, uint8_t *mac_addr) | 
| CLEAR_PSK command.  More... | |
| int | add_nat_ip (struct supervisor_context *context, char *ip_addr) | 
| Add an IP to NAT.  More... | |
| int | remove_nat_ip (struct supervisor_context *context, char *ip_addr) | 
| Remove an IP to NAT.  More... | |
| int | add_bridge_ip (struct supervisor_context *context, char *ip_addr_left, char *ip_addr_right) | 
| Add an IP bridge.  More... | |
| int | delete_bridge_ip (struct supervisor_context *context, char *ip_addr_left, char *ip_addr_right) | 
| Deletes an IP bridge.  More... | |
File containing the definition of the network commands.
| #define TICKET_PASSPHRASE_SIZE 16 | 
| #define TICKET_TIMEOUT 60 | 
| int accept_mac_cmd | ( | struct supervisor_context * | context, | 
| uint8_t * | mac_addr, | ||
| int | vlanid | ||
| ) | 
ACCEPT_MAC command.
| context | The supervisor structure instance | 
| mac_addr | The MAC address | 
| vlanid | The VLAN ID | 
| int add_bridge_ip | ( | struct supervisor_context * | context, | 
| char * | ip_addr_left, | ||
| char * | ip_addr_right | ||
| ) | 
Add an IP bridge.
| context | The supervisor structure instance | 
| ip_addr_left | The left IP address string | 
| ip_addr_right | The right IP address string | 
| int add_bridge_ip_cmd | ( | struct supervisor_context * | context, | 
| char * | left_ip_addr, | ||
| char * | right_ip_addr | ||
| ) | 
ADD_BRIDGE command (IP address input)
| context | The supervisor structure instance | 
| left_ip_addr | The left IP address | 
| right_ip_addr | The right IP address | 
| int add_bridge_mac_cmd | ( | struct supervisor_context * | context, | 
| uint8_t * | left_mac_addr, | ||
| uint8_t * | right_mac_addr | ||
| ) | 
ADD_BRIDGE command (MAC address input)
| context | The supervisor structure instance | 
| left_mac_addr | The left MAC address | 
| right_mac_addr | The right MAC address | 
| int add_nat_cmd | ( | struct supervisor_context * | context, | 
| uint8_t * | mac_addr | ||
| ) | 
ADD_NAT command.
| context | The supervisor structure instance | 
| mac_addr | The MAC address | 
| int add_nat_ip | ( | struct supervisor_context * | context, | 
| char * | ip_addr | ||
| ) | 
Add an IP to NAT.
| context | The supervisor structure instance | 
| ip_addr | The IP address string | 
| int assign_psk_cmd | ( | struct supervisor_context * | context, | 
| uint8_t * | mac_addr, | ||
| char * | pass, | ||
| int | pass_len | ||
| ) | 
ASSIGN_PSK command.
| context | The supervisor structure instance | 
| mac_addr | The MAC address | 
| pass | The password | 
| pass_len | The password length | 
| int clear_bridges_cmd | ( | struct supervisor_context * | context, | 
| uint8_t * | mac_addr | ||
| ) | 
CLEAR_BRIDGES command.
| context | The supervisor structure instance | 
| mac_addr | The MAC address | 
| int clear_psk_cmd | ( | struct supervisor_context * | context, | 
| uint8_t * | mac_addr | ||
| ) | 
CLEAR_PSK command.
| context | The supervisor structure instance | 
| mac_addr | The MAC address string | 
| int delete_bridge_ip | ( | struct supervisor_context * | context, | 
| char * | ip_addr_left, | ||
| char * | ip_addr_right | ||
| ) | 
Deletes an IP bridge.
| context | The supervisor structure instance | 
| ip_addr_left | The left IP address string | 
| ip_addr_right | The right IP address string | 
| int deny_mac_cmd | ( | struct supervisor_context * | context, | 
| uint8_t * | mac_addr | ||
| ) | 
DENY_MAC command.
| context | The supervisor structure instance | 
| mac_addr | The MAC address | 
| void free_ticket | ( | struct supervisor_context * | context | ) | 
Frees an allocated ticket.
| context | The supervisor context | 
| uint8_t* register_ticket_cmd | ( | struct supervisor_context * | context, | 
| uint8_t * | mac_addr, | ||
| char * | label, | ||
| int | vlanid | ||
| ) | 
REGISTER_TICKET command.
| context | The supervisor structure instance | 
| mac_addr | The MAC address string | 
| label | The label string | 
| vlanid | The VLAN ID | 
| int remove_bridge_cmd | ( | struct supervisor_context * | context, | 
| uint8_t * | left_mac_addr, | ||
| uint8_t * | right_mac_addr | ||
| ) | 
REMOVE_BRIDGE command.
| context | The supervisor structure instance | 
| left_mac_addr | The left MAC address | 
| right_mac_addr | The right MAC address | 
| int remove_nat_cmd | ( | struct supervisor_context * | context, | 
| uint8_t * | mac_addr | ||
| ) | 
REMOVE_NAT command.
| context | The supervisor structure instance | 
| mac_addr | The MAC address | 
| int remove_nat_ip | ( | struct supervisor_context * | context, | 
| char * | ip_addr | ||
| ) | 
Remove an IP to NAT.
| context | The supervisor structure instance | 
| ip_addr | The IP address string |