1
2 """ATA over Ethernet Protocol."""
3 from __future__ import absolute_import
4
5 import struct
6
7 from . import dpkt
8 from .decorators import deprecated
9 from .compat import iteritems
10
11 -class AOE(dpkt.Packet):
12 """ATA over Ethernet Protocol.
13
14 See more about the AOE on \
15 https://en.wikipedia.org/wiki/ATA_over_Ethernet
16
17 Attributes:
18 __hdr__: Header fields of AOE.
19 data: Message data.
20 """
21
22 __hdr__ = (
23 ('ver_fl', 'B', 0x10),
24 ('err', 'B', 0),
25 ('maj', 'H', 0),
26 ('min', 'B', 0),
27 ('cmd', 'B', 0),
28 ('tag', 'I', 0),
29 )
30 _cmdsw = {}
31
32 @property
34
35 @ver.setter
37
38 @property
40
41 @fl.setter
43
44 @classmethod
47
48 @classmethod
51
59
65
66
67 AOE_CMD_ATA = 0
68 AOE_CMD_CFG = 1
69 AOE_FLAG_RSP = 1 << 3
84
87 """Post-initialization called when all dpkt modules are fully loaded"""
88 if not AOE._cmdsw:
89 __load_cmds()
90