diff options
author | 2015-08-27 10:58:01 +0300 | |
---|---|---|
committer | 2015-08-27 10:58:01 +0300 | |
commit | c2154c0d362ced8f8b5181799c369e1497c958e1 (patch) | |
tree | 981b975d6f5c1ea860e462b66adab3f3bbc81360 /scripts/external_libs/dpkt-1.8.6/dpkt/rx.py | |
parent | f8ac9d14a989c8cf1535e16165551dfa370b0b74 (diff) |
reverting to dpkt v1.8.6 instead of 1.8.6.2 to avoid importing error of pystone modue
Diffstat (limited to 'scripts/external_libs/dpkt-1.8.6/dpkt/rx.py')
-rw-r--r-- | scripts/external_libs/dpkt-1.8.6/dpkt/rx.py | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/scripts/external_libs/dpkt-1.8.6/dpkt/rx.py b/scripts/external_libs/dpkt-1.8.6/dpkt/rx.py new file mode 100644 index 00000000..5b898efc --- /dev/null +++ b/scripts/external_libs/dpkt-1.8.6/dpkt/rx.py @@ -0,0 +1,44 @@ +# $Id: rx.py 23 2006-11-08 15:45:33Z jonojono $ + +"""Rx Protocol.""" + +import dpkt + +# Types +DATA = 0x01 +ACK = 0x02 +BUSY = 0x03 +ABORT = 0x04 +ACKALL = 0x05 +CHALLENGE = 0x06 +RESPONSE = 0x07 +DEBUG = 0x08 + +# Flags +CLIENT_INITIATED = 0x01 +REQUEST_ACK = 0x02 +LAST_PACKET = 0x04 +MORE_PACKETS = 0x08 +SLOW_START_OK = 0x20 +JUMBO_PACKET = 0x20 + +# Security +SEC_NONE = 0x00 +SEC_BCRYPT = 0x01 +SEC_RXKAD = 0x02 +SEC_RXKAD_ENC = 0x03 + +class Rx(dpkt.Packet): + __hdr__ = ( + ('epoch', 'I', 0), + ('cid', 'I', 0), + ('call', 'I', 1), + ('seq', 'I', 0), + ('serial', 'I', 1), + ('type', 'B', 0), + ('flags', 'B', CLIENT_INITIATED), + ('status', 'B', 0), + ('security', 'B', 0), + ('sum', 'H', 0), + ('service', 'H', 0) + ) |