-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathProtocolType.h
235 lines (191 loc) · 3.57 KB
/
ProtocolType.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
#ifndef PCAPPP_PROTOCOL_TYPES
#define PCAPPP_PROTOCOL_TYPES
/// @file
/**
* \namespace pcpp
* \brief The main namespace for the PcapPlusPlus lib
*/
namespace pcpp
{
/**
* An enum representing all protocols supported by PcapPlusPlus
*/
enum ProtocolType
{
/**
* Unknown protocol (or unsupported by PcapPlusPlus)
*/
UnknownProtocol = 0x00,
/**
* Ethernet protocol
*/
Ethernet = 0x01,
/**
* IPv4 protocol
*/
IPv4 = 0x02,
/**
* IPv6 protocol
*/
IPv6 = 0x04,
/**
* IP protocol (aggregation bitmask of IPv4 and IPv6 protocols)
*/
IP = 0x06,
/**
* TCP protocol
*/
TCP = 0x08,
/**
* UDP protocol
*/
UDP = 0x10,
/**
* HTTP request protocol
*/
HTTPRequest = 0x20,
/**
* HTTP response protocol
*/
HTTPResponse = 0x40,
/**
* HTTP protocol (aggregation bitmask of HTTP request and HTTP response protocols)
*/
HTTP = 0x20 | 0x40,
/**
* ARP protocol
*/
ARP = 0x80,
/**
* VLAN protocol
*/
VLAN = 0x100,
/**
* ICMP protocol (currently not supported by PcapPlusPlus)
*/
ICMP = 0x200,
/**
* PPPoE session protocol
*/
PPPoESession = 0x400,
/**
* PPPoE discovery protocol
*/
PPPoEDiscovery = 0x800,
/**
* PPPoE protocol (aggregation bitmask of PPPoESession and PPPoEDiscovery protocols)
*/
PPPoE = 0x400 | 0x800,
/**
* DNS protocol
*/
DNS = 0x1000,
/**
* MPLS protocol
*/
MPLS = 0x2000,
/**
* GRE version 0 protocol
*/
GREv0 = 0x4000,
/**
* GRE version 1 protocol
*/
GREv1 = 0x8000,
/**
* GRE protocol (aggregation bitmask of GREv0 and GREv1 protocols)
*/
GRE = 0x4000 | 0x8000,
/**
* PPP for PPTP protocol
*/
PPP_PPTP = 0x10000,
/**
* SSL/TLS protocol
*/
SSL = 0x20000,
/**
* SLL (Linux cooked capture) protocol
*/
SLL = 0x40000,
/**
* DHCP/BOOTP protocol
*/
DHCP = 0x80000,
/**
* Null/Loopback protocol
*/
NULL_LOOPBACK = 0x100000,
/**
* IGMP protocol
*/
IGMP = 0xE00000,
/**
* IGMPv1 protocol
*/
IGMPv1 = 0x200000,
/**
* IGMPv2 protocol
*/
IGMPv2 = 0x400000,
/**
* IGMPv3 protocol
*/
IGMPv3 = 0x800000,
/**
* Generic payload (no specific protocol)
*/
GenericPayload = 0x1000000,
/**
* VXLAN protocol
*/
VXLAN = 0x2000000,
/**
* SIP request protocol
*/
SIPRequest = 0x4000000,
/**
* SIP response protocol
*/
SIPResponse = 0x8000000,
/**
* SIP protocol (aggregation bitmask of SIPRequest and SIPResponse protocols)
*/
SIP = 0x4000000 | 0x8000000,
/**
* SDP protocol
*/
SDP = 0x10000000,
/**
* Packet trailer
*/
PacketTrailer = 0x20000000,
/**
* RADIUS protocol
*/
Radius = 0x40000000
};
/**
* An enum representing OSI model layers
*/
enum OsiModelLayer
{
/** Physical layer (layer 1) */
OsiModelPhysicalLayer = 1,
/** Data link layer (layer 2) */
OsiModelDataLinkLayer = 2,
/** Network layer (layer 3) */
OsiModelNetworkLayer = 3,
/** Transport layer (layer 4) */
OsiModelTransportLayer = 4,
/** Session layer (layer 5) */
OsiModelSesionLayer = 5,
/** Presentation layer (layer 6) */
OsiModelPresentationLayer = 6,
/** Application layer (layer 7) */
OsiModelApplicationLayer = 7,
/** Unknown / null layer */
OsiModelLayerUnknown = 8
};
} //namespace pcpp
#endif