| 
    EDGESEC
    0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
    
   Secure router - reference implementation 
   | 
 
File containing the definition of the firewall service commands. More...
#include <stdbool.h>#include <inttypes.h>#include <utarray.h>#include "../supervisor/supervisor_config.h"#include "../utils/hashmap.h"#include "../utils/iface_mapper.h"#include "firewall_config.h"Go to the source code of this file.
Functions | |
| struct fwctx * | fw_init_context (hmap_if_conn *if_mapper, hmap_vlan_conn *vlan_mapper, hmap_str_keychar *hmap_bin_paths, UT_array *config_ifinfo_array, char *nat_bridge, char *nat_interface, bool exec_firewall, char *path) | 
| Initialises the firewall service context.  More... | |
| void | fw_free_context (struct fwctx *context) | 
| Frees the firewall service context.  More... | |
| int | fw_add_nat (struct fwctx *context, char *ip_addr) | 
| Adds NAT rule to an IP.  More... | |
| int | fw_remove_nat (struct fwctx *context, char *ip_addr) | 
| Removes NAT rule to an IP.  More... | |
| int | fw_add_bridge (struct fwctx *context, char *ip_addr_left, char *ip_addr_right) | 
| Adds bridge rule for two IPs.  More... | |
| int | fw_remove_bridge (struct fwctx *context, char *ip_addr_left, char *ip_addr_right) | 
| Removes bridge rule for two IPs.  More... | |
| int | fw_set_ip_forward (void) | 
| Set the ip forward os system param.  More... | |
File containing the definition of the firewall service commands.
| int fw_add_bridge | ( | struct fwctx * | context, | 
| char * | ip_addr_left, | ||
| char * | ip_addr_right | ||
| ) | 
Adds bridge rule for two IPs.
| context | The firewall context | 
| ip_addr_left | The IP address string left | 
| ip_addr_right | The IP address string right | 
| int fw_add_nat | ( | struct fwctx * | context, | 
| char * | ip_addr | ||
| ) | 
Adds NAT rule to an IP.
| context | The firewall context | 
| ip_addr | The IP address string | 
| void fw_free_context | ( | struct fwctx * | context | ) | 
Frees the firewall service context.
| context | The firewall context | 
| struct fwctx* fw_init_context | ( | hmap_if_conn * | if_mapper, | 
| hmap_vlan_conn * | vlan_mapper, | ||
| hmap_str_keychar * | hmap_bin_paths, | ||
| UT_array * | config_ifinfo_array, | ||
| char * | nat_bridge, | ||
| char * | nat_interface, | ||
| bool | exec_firewall, | ||
| char * | path | ||
| ) | 
Initialises the firewall service context.
| if_mapper | The WiFi subnet to interface mapper | 
| vlan_mapper | The WiFi VLAN to interface mapper | 
| hmap_bin_paths | The Mapper for paths to systems binaries | 
| config_ifinfo_array | The config_ifinfo_array from struct app_config  | 
| nat_bridge | The NAT bridge name | 
| nat_interface | The nat interface string | 
| exec_firewall | if true runs the firewall system commands | 
| path | The firewall bin path | 
| int fw_remove_bridge | ( | struct fwctx * | context, | 
| char * | ip_addr_left, | ||
| char * | ip_addr_right | ||
| ) | 
Removes bridge rule for two IPs.
| context | The firewall context | 
| ip_addr_left | The IP address string left | 
| ip_addr_right | The IP address string right | 
| int fw_remove_nat | ( | struct fwctx * | context, | 
| char * | ip_addr | ||
| ) | 
Removes NAT rule to an IP.
| context | The firewall context | 
| ip_addr | The IP address string | 
| int fw_set_ip_forward | ( | void | ) | 
Set the ip forward os system param.