forked from hsiafan/httpdump
-
Notifications
You must be signed in to change notification settings - Fork 0
/
constant.py
39 lines (28 loc) · 795 Bytes
/
constant.py
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
#coding=utf-8
__author__ = 'dongliu'
class HttpType(object):
REQUEST = 0
RESPONSE = 1
# see http://www.tcpdump.org/linktypes.html
# http://www.winpcap.org/ntar/draft/PCAP-DumpFileFormat.html#appendixLinkTypes
class LinkLayerType(object):
"""LinkType"""
ETHERNET = 1
LINUX_SLL = 113
class NetworkProtocal(object):
IP = 2048
IPV6 = 34525
# Virtual Bridged Local Area Networks
P802_1Q = 33024
class TransferProtocal(object):
TCP = 6
class BlockType(object):
SECTION_HEADER = 0x0A0D0D0A
INTERFACE_DESCRIPTOIN = 0x00000001
PACKET = 0x00000002
SIMPILE_PACKET = 0x00000003
NAME_RESOLUTION = 0x00000004
INTERFACE_STATISTICS = 0x00000005
ENHANCED_PACKET = 0x00000006
IRIG_TIMESTAMP = 0x00000007
ARINC_429 = 0x00000008