/
decap.h
68 lines (46 loc) · 1.42 KB
/
decap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef ___STREAM_HTTP_DECAP_H__
#define ___STREAM_HTTP_DECAP_H__
#define DECAP_ERROR_GRE_UNSUPPORTED 1
#define DECAP_ERROR_ERSPAN_UNSUPPORTED 2
#define DECAP_ERROR_ERSPAN_TYPEII 3
#define DECAP_ERROR_MAX 4
/*
// integrated
#include "common/fTypes.h"
#include "common/fmadio_fields.h"
#include "common/fmadio_network.h"
#include "common/fmadio_trace.h"
*/
// standalone
#include "fTypes.h"
#include "fNetwork.h"
typedef struct fDecap_t
{
bool DecapDump;
bool DecapVerbose;
bool DecapIxia;
bool DecapArista7130; // arista 7130 timestamps (metamako)
bool DecapArista7150Insert; // 7150 insert mode
bool DecapArista7150Over; // 7150 overwrite mode
bool DecapArista7280MAC48; // 7280 mac48
bool DecapArista7280ETH64; // 7280 eth64
bool DecapCisco3550; // cisco 3550 (exablaze)
bool DecapCiscoERSPAN; // cisco ERSPAN
u64 DecapErrorCnt[DECAP_ERROR_MAX]; // number of errors
u64 GREProtoHistogram[0x10000]; // gre protocol histogram
u8 ProtocolData[128*1024]; // protocol specific info
} fDecap_t;
struct fEther_t;
//void fDecap_Mode (u32 Mode);
fDecap_t* fDecap_Open(int argc, char* argv[]);
void fDecap_Close( fDecap_t* D);
void fDecap_Error( fDecap_t* D, u32 Index);
u16 fDecap_Packet( fDecap_t* D,
u64 PCAPTS,
struct fEther_t** pEther,
u8** pPayload,
u32* pPayloadLength,
u32* pMetaPort,
u64* pMetaTS,
u32* pMetaFCS);
#endif