NetSim Source Code Help
Loading...
Searching...
No Matches
EmulationLib.h
Go to the documentation of this file.
1#pragma once
2/************************************************************************************
3* Copyright (C) 2020 *
4* TETCOS, Bangalore. India *
5* *
6* Tetcos owns the intellectual property rights in the Product and its content. *
7* The copying, redistribution, reselling or publication of any or all of the *
8* Product or its content without express prior written consent of Tetcos is *
9* prohibited. Ownership and / or any other right relating to the software and all *
10* intellectual property rights therein shall remain at all times with Tetcos. *
11* *
12* This source code is licensed per the NetSim license agreement. *
13* *
14* No portion of this source code may be used as the basis for a derivative work, *
15* or used, for any purpose other than its intended use per the NetSim license *
16* agreement. *
17* *
18* This source code and the algorithms contained within it are confidential trade *
19* secrets of TETCOS and may not be used as the basis for any other software, *
20* hardware, product or service. *
21* *
22* Author: Shashi Kant Suman *
23* *
24* ----------------------------------------------------------------------------------*/
25#ifndef _NETSIM_EMULATIONLIB_H_
26#define _NETSIM_EMULATIONLIB_H_
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31#ifndef __IN__
32#define __IN__
33#endif
34
35#ifndef __OUT__
36#define __OUT__
37#endif
38#pragma comment(lib,"EmulationLib.lib")
39
40#pragma region _PACP_HANDLES
41#define HANDLE_COUNT 4
42
43#define ALL_HANDLES 0
44#define DISPATCH_HANDLE 1
45#define REINJECT_HANDLE 2
46#define NOTDISPATCHHANDLE 3
47
48#define captureHandle handles[ALL_HANDLES]
49#define dispatchHandle handles[DISPATCH_HANDLE]
50#define reinjectHandle handles[REINJECT_HANDLE]
51#define notdispatchHandle handles[NOTDISPATCHHANDLE]
52
53 static char* pcapFileName[HANDLE_COUNT] =
54 { "ALL_NETWORK_PACKETS.pcap","DISPATCHED_TO_EMULATOR.pcap",
55 "REINJECTED_FROM_EMULATOR.pcap","NOT_DISPATCHED_TO_EMULATOR.pcap"
56 };
57
58 static char* pipeName[HANDLE_COUNT] =
59 {
60 "NETSIM_ALL_CAPTURE","NETSIM_DISPATCHED","NETSIM_REINJECTED","NETSIM_NOT_DISPATCHED"
61 };
62
64 void create_emulation_pcap_handle(__IN__ int count, __IN__ int* pcap_logfile_status,
65 __IN__ char** pcapFileName, __IN__ char** pipeName,
66 __OUT__ void** handles);
68#pragma endregion
69
70#ifdef __cplusplus
71}
72#endif
73#endif //_NETSIM_EMULATIONLIB_H_
static char * pcapFileName[HANDLE_COUNT]
Definition: EmulationLib.h:53
void close_emulation_pcap_handle(__IN__ int count, __IN__ void **handles)
static char * pipeName[HANDLE_COUNT]
Definition: EmulationLib.h:58
#define __OUT__
Definition: EmulationLib.h:36
void create_emulation_pcap_handle(__IN__ int count, __IN__ int *pcap_logfile_status, __IN__ char **pcapFileName, __IN__ char **pipeName, __OUT__ void **handles)
#define __IN__
Definition: EmulationLib.h:32
void * handles[HANDLE_COUNT]
Definition: EmulationLib.h:63
#define HANDLE_COUNT
Definition: EmulationLib.h:41