diff options
author | 2015-08-26 14:27:43 +0300 | |
---|---|---|
committer | 2015-08-26 14:27:43 +0300 | |
commit | cdcc62972d42f009f55e6aeb2ca5c60c3acd75eb (patch) | |
tree | 5c3fef81ac01407a89740f2d9b8b01b0f3a47c7f /scripts/automation/trex_control_plane/python_lib/dpkt-1.8.6.2/dpkt/aoeata.py | |
parent | 42053c95419042f36242b19d2416d112f7643e14 (diff) |
added dpkt package, initial stateless client implementation
Diffstat (limited to 'scripts/automation/trex_control_plane/python_lib/dpkt-1.8.6.2/dpkt/aoeata.py')
-rw-r--r-- | scripts/automation/trex_control_plane/python_lib/dpkt-1.8.6.2/dpkt/aoeata.py | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/scripts/automation/trex_control_plane/python_lib/dpkt-1.8.6.2/dpkt/aoeata.py b/scripts/automation/trex_control_plane/python_lib/dpkt-1.8.6.2/dpkt/aoeata.py deleted file mode 100644 index 1be917d3..00000000 --- a/scripts/automation/trex_control_plane/python_lib/dpkt-1.8.6.2/dpkt/aoeata.py +++ /dev/null @@ -1,35 +0,0 @@ -# -*- coding: utf-8 -*- -"""ATA over Ethernet ATA command""" - -import dpkt - -ATA_DEVICE_IDENTIFY = 0xec - - -class AOEATA(dpkt.Packet): - __hdr__ = ( - ('aflags', 'B', 0), - ('errfeat', 'B', 0), - ('scnt', 'B', 0), - ('cmdstat', 'B', ATA_DEVICE_IDENTIFY), - ('lba0', 'B', 0), - ('lba1', 'B', 0), - ('lba2', 'B', 0), - ('lba3', 'B', 0), - ('lba4', 'B', 0), - ('lba5', 'B', 0), - ('res', 'H', 0), - ) - - # XXX: in unpack, switch on ATA command like icmp does on type - - -def test_aoeata(): - s = '\x03\x0a\x6b\x19\x00\x00\x00\x00\x45\x00\x00\x28\x94\x1f\x00\x00\xe3\x06\x99\xb4\x23\x2b\x24\x00\xde\x8e\x84\x42\xab\xd1\x00\x50\x00\x35\xe1\x29\x20\xd9\x00\x00\x00\x22\x9b\xf0\xe2\x04\x65\x6b' - aoeata = AOEATA(s) - assert (str(aoeata) == s) - - -if __name__ == '__main__': - test_aoeata() - print 'Tests Successful...' |