#include "main.h"
#include "List.h"
#include "../IP/IP.h"
#include "NetSim_utility.h"
#include "Firewall.h"
Go to the source code of this file.
|
| static ACL_ACTION | action_from_str (char *s) |
| |
| static NETSIM_IPAddress | num_to_subnet (int num) |
| |
| static int | perfix_from_mask (NETSIM_IPAddress mask) |
| |
| static void | ip_from_str (char *s, NETSIM_IPAddress *ip, NETSIM_IPAddress *subnet) |
| |
| static IP_PROTOCOL_NUMBER | ipprotocol_from_str (char *pro) |
| |
| static char * | str_from_proto (IP_PROTOCOL_NUMBER num) |
| |
| static ACL_TYPE | type_from_str (char *str) |
| |
| static bool | check_mac_block (NETSIM_ID d, NETSIM_ID in) |
| |
| void | acl_add_new_line (NETSIM_ID d, char *s) |
| |
| static NETSIM_IPAddress | get_dest_ip (NetSim_PACKET *packet) |
| |
| int | fn_NetSim_FirewallConfig (NETSIM_ID nDeviceId) |
| |
| static ACL_ACTION | fn_NetSim_Firewall (NETSIM_ID nDeviceId, NETSIM_ID interfaceId, NetSim_PACKET *packet, ACL_TYPE type, bool isMAC) |
| |
| ACL_ACTION | fn_NetSim_MAC_Firewall (NETSIM_ID nDeviceId, NETSIM_ID interfaceId, NetSim_PACKET *packet, ACL_TYPE type) |
| |
| ACL_ACTION | fn_NetSim_NETWORK_Firewall (NETSIM_ID nDeviceId, NETSIM_ID interfaceId, NetSim_PACKET *packet, ACL_TYPE type) |
| |
| void | fn_NetSim_Firewall_Free (NETSIM_ID d) |
| |
| char * | acl_print (NETSIM_ID d) |
| |
◆ _NETSIM_FIREWALL_CODE_
| #define _NETSIM_FIREWALL_CODE_ |
◆ ACL_ADD
◆ ACL_ALLOC
◆ ACL_GET
◆ ACL_NEXT
◆ ACL_SET
◆ NETSIM_ACL
◆ ptrACL
◆ acl_add_new_line()
| void acl_add_new_line |
( |
NETSIM_ID |
d, |
|
|
char * |
s |
|
) |
| |
◆ acl_print()
◆ action_from_str()
◆ check_mac_block()
◆ fn_NetSim_Firewall()
This function is to check whether the particular packet is blocked or allowed by firewall
Definition at line 267 of file firewall.c.
◆ fn_NetSim_Firewall_Free()
◆ fn_NetSim_FirewallConfig()
| int fn_NetSim_FirewallConfig |
( |
NETSIM_ID |
nDeviceId | ) |
|
This function is to configure the firewall.
Definition at line 235 of file firewall.c.
◆ fn_NetSim_MAC_Firewall()
◆ fn_NetSim_NETWORK_Firewall()
◆ get_dest_ip()
◆ ip_from_str()
◆ ipprotocol_from_str()
◆ num_to_subnet()
◆ perfix_from_mask()
◆ str_from_proto()
◆ type_from_str()
| static ACL_TYPE type_from_str |
( |
char * |
str | ) |
|
|
static |