NetSim Source Code Help v14.4
All 13 Components
 
Loading...
Searching...
No Matches
Firewall.h
1/************************************************************************************
2* Copyright (C) 2023 *
3* TETCOS, Bangalore. India *
4* *
5* Tetcos owns the intellectual property rights in the Product and its content. *
6* The copying, redistribution, reselling or publication of any or all of the *
7* Product or its content without express prior written consent of Tetcos is *
8* prohibited. Ownership and / or any other right relating to the software and all *
9* intellectual property rights therein shall remain at all times with Tetcos. *
10* *
11* Author: Shashi Kant Suman *
12* *
13* ---------------------------------------------------------------------------------*/
14#ifndef _NETSIM_FIREWALL_H_
15#define _NETSIM_FIREWALL_H_
16#ifdef __cplusplus
17extern "C" {
18#endif
19#ifndef _NETSIM_FIREWALL_CODE_
20#pragma comment(lib,"Firewall.lib")
21#endif
22
23 //ACL
24 typedef enum
25 {
26 ACLTYPE_BOTH,
27 ACLTYPE_INBOUND,
28 ACLTYPE_OUTBOUND,
29 }ACL_TYPE;
30
31 typedef enum
32 {
33 ACLACTION_PERMIT,
34 ACLACTION_DENY,
35 }ACL_ACTION;
36
37 //Firewall
38 _declspec(dllexport) int fn_NetSim_FirewallConfig(NETSIM_ID nDeviceId);
39 _declspec(dllexport) void acl_add_new_line(NETSIM_ID d, char* s);
40 _declspec(dllexport) ACL_ACTION fn_NetSim_MAC_Firewall(NETSIM_ID nDeviceId, NETSIM_ID interfaceId, NetSim_PACKET* packet, ACL_TYPE type);
41 _declspec(dllexport) ACL_ACTION fn_NetSim_NETWORK_Firewall(NETSIM_ID nDeviceId, NETSIM_ID interfaceId, NetSim_PACKET* packet, ACL_TYPE type);
42 _declspec(dllexport) void fn_NetSim_Firewall_Free(NETSIM_ID d);
43 _declspec(dllexport) char* acl_print(NETSIM_ID d);
44
45#ifdef __cplusplus
46}
47#endif
48#endif //_NETSIM_FIREWALL_H_