11 #ifndef FIREWALL_SERVICE_H
12 #define FIREWALL_SERVICE_H
18 #include "../supervisor/supervisor_config.h"
19 #include "../utils/hashmap.h"
20 #include "../utils/iface_mapper.h"
File containing the definition of the firewall structures.
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.
Definition: firewall_service.c:71
int fw_add_bridge(struct fwctx *context, char *ip_addr_left, char *ip_addr_right)
Adds bridge rule for two IPs.
Definition: firewall_service.c:262
int fw_add_nat(struct fwctx *context, char *ip_addr)
Adds NAT rule to an IP.
Definition: firewall_service.c:182
int fw_remove_nat(struct fwctx *context, char *ip_addr)
Removes NAT rule to an IP.
Definition: firewall_service.c:226
int fw_set_ip_forward(void)
Set the ip forward os system param.
Definition: firewall_service.c:369
void fw_free_context(struct fwctx *context)
Frees the firewall service context.
Definition: firewall_service.c:38
int fw_remove_bridge(struct fwctx *context, char *ip_addr_left, char *ip_addr_right)
Removes bridge rule for two IPs.
Definition: firewall_service.c:323
Definition: firewall_config.h:33
hmap_vlan_conn * vlan_mapper
Definition: firewall_config.h:35
char * nat_interface
Definition: firewall_config.h:40
hmap_if_conn * if_mapper
Definition: firewall_config.h:34
bool exec_firewall
Definition: firewall_config.h:41
hmap_str_keychar * hmap_bin_paths
Definition: firewall_config.h:36
char * nat_bridge
Definition: firewall_config.h:39
UT_array * config_ifinfo_array
Definition: firewall_config.h:37
Subnet to interface connection mapper.
Definition: iface_mapper.h:76
keyd array hasmap structure definition
Definition: hashmap.h:23
VLAN to interface connection mapper.
Definition: iface_mapper.h:96