Package dpkt :: Module rx
[hide private]
[frames] | no frames]

Source Code for Module dpkt.rx

 1  # $Id: rx.py 23 2006-11-08 15:45:33Z jonojono $ 
 2  # -*- coding: utf-8 -*- 
 3  """Rx Protocol.""" 
 4  from __future__ import absolute_import 
 5   
 6  from . import dpkt 
 7   
 8  # Types 
 9  DATA = 0x01 
10  ACK = 0x02 
11  BUSY = 0x03 
12  ABORT = 0x04 
13  ACKALL = 0x05 
14  CHALLENGE = 0x06 
15  RESPONSE = 0x07 
16  DEBUG = 0x08 
17   
18  # Flags 
19  CLIENT_INITIATED = 0x01 
20  REQUEST_ACK = 0x02 
21  LAST_PACKET = 0x04 
22  MORE_PACKETS = 0x08 
23  SLOW_START_OK = 0x20 
24  JUMBO_PACKET = 0x20 
25   
26  # Security 
27  SEC_NONE = 0x00 
28  SEC_BCRYPT = 0x01 
29  SEC_RXKAD = 0x02 
30  SEC_RXKAD_ENC = 0x03 
31   
32   
33 -class Rx(dpkt.Packet):
34 """Rx Protocol. 35 36 TODO: Longer class information.... 37 38 Attributes: 39 __hdr__: Header fields of Rx. 40 TODO. 41 """ 42 43 __hdr__ = ( 44 ('epoch', 'I', 0), 45 ('cid', 'I', 0), 46 ('call', 'I', 1), 47 ('seq', 'I', 0), 48 ('serial', 'I', 1), 49 ('type', 'B', 0), 50 ('flags', 'B', CLIENT_INITIATED), 51 ('status', 'B', 0), 52 ('security', 'B', 0), 53 ('sum', 'H', 0), 54 ('service', 'H', 0) 55 )
56