EDGESEC
0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
|
File containing the definition of the bridge creation functions. More...
#include <net/ethernet.h>
#include <utarray.h>
#include <list.h>
#include "../utils/allocs.h"
#include "../utils/os.h"
Go to the source code of this file.
Data Structures | |
struct | bridge_mac_tuple |
The bridge MAc tuple definition. More... | |
struct | bridge_mac_list |
The MAC bridge address store list. More... | |
struct | bridge_mac_list_tuple |
The structure for edge definition. More... | |
Functions | |
struct bridge_mac_list * | init_bridge_list (void) |
Init the MAC brideg address list for bridge assignment. More... | |
void | free_bridge_list (struct bridge_mac_list *ml) |
Free MAC bridge address list. More... | |
int | add_bridge_mac (struct bridge_mac_list *ml, const uint8_t *mac_addr_left, const uint8_t *mac_addr_right) |
Add bridge connection to the MAC bridge address list. More... | |
int | remove_bridge_mac (struct bridge_mac_list *ml, const uint8_t *mac_addr_left, const uint8_t *mac_addr_right) |
Removes a bridge connection from the MAC address list. More... | |
struct bridge_mac_list_tuple | get_bridge_mac (struct bridge_mac_list *ml, const uint8_t *mac_addr_left, const uint8_t *mac_addr_right) |
Get the bridge mac object from a bridge connection. More... | |
int | get_src_mac_list (struct bridge_mac_list *ml, const uint8_t *src_addr, UT_array **mac_list_arr) |
Get the MAC address dst list array for a src MAC address. More... | |
int | get_all_bridge_edges (struct bridge_mac_list *ml, UT_array **tuple_list_arr) |
Get the all the bridge edges as tuple list array. More... | |
int | check_bridge_exist (struct bridge_mac_list *ml, const uint8_t *mac_addr_left, const uint8_t *mac_addr_right) |
Check if a bridge exist. More... | |
File containing the definition of the bridge creation functions.
int add_bridge_mac | ( | struct bridge_mac_list * | ml, |
const uint8_t * | mac_addr_left, | ||
const uint8_t * | mac_addr_right | ||
) |
Add bridge connection to the MAC bridge address list.
ml | The MAC bridge address list |
mac_addr_left | The MAC address in byte format for left node |
mac_addr_right | The MAC address in byte format for right node |
int check_bridge_exist | ( | struct bridge_mac_list * | ml, |
const uint8_t * | mac_addr_left, | ||
const uint8_t * | mac_addr_right | ||
) |
Check if a bridge exist.
ml | The MAC bridge address list |
mac_addr_left | The MAC address in byte format for left node |
mac_addr_right | The MAC address in byte format for rigth node |
void free_bridge_list | ( | struct bridge_mac_list * | ml | ) |
Free MAC bridge address list.
ml | The MAC bridge address list |
int get_all_bridge_edges | ( | struct bridge_mac_list * | ml, |
UT_array ** | tuple_list_arr | ||
) |
Get the all the bridge edges as tuple list array.
ml | The MAC bridge address list |
tuple_list_arr | The returned array of tuples |
struct bridge_mac_list_tuple get_bridge_mac | ( | struct bridge_mac_list * | ml, |
const uint8_t * | mac_addr_left, | ||
const uint8_t * | mac_addr_right | ||
) |
Get the bridge mac object from a bridge connection.
ml | The MAC bridge address list |
mac_addr_left | The MAC address in byte format for left node |
mac_addr_right | The MAC address in byte format for rigth node |
int get_src_mac_list | ( | struct bridge_mac_list * | ml, |
const uint8_t * | src_addr, | ||
UT_array ** | mac_list_arr | ||
) |
Get the MAC address dst list array for a src MAC address.
ml | The MAC bridge address list |
src_addr | The source MAC address in byte format |
mac_list_arr | The returned array of MAC addresses |
struct bridge_mac_list* init_bridge_list | ( | void | ) |
Init the MAC brideg address list for bridge assignment.
int remove_bridge_mac | ( | struct bridge_mac_list * | ml, |
const uint8_t * | mac_addr_left, | ||
const uint8_t * | mac_addr_right | ||
) |
Removes a bridge connection from the MAC address list.
ml | The MAC bridge address list |
mac_addr_left | The MAC address in byte format for left node |
mac_addr_right | The MAC address in byte format for right node |