Package dpkt :: Module ssl :: Class TLSRecord
[hide private]
[frames] | no frames]

Class TLSRecord

source code

 object --+    
          |    
dpkt.Packet --+
              |
             TLSRecord


SSLv3 or TLSv1+ packet.

In addition to the fields specified in the header, there are
compressed and decrypted fields, indicating whether, in the language
of the spec, this is a TLSPlaintext, TLSCompressed, or
TLSCiphertext. The application will have to figure out when it's
appropriate to change these values.

Nested Classes [hide private]

Inherited from dpkt.Packet: __metaclass__

Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
Packet constructor with ([buf], [field=val,...]) prototype.
source code
 
unpack(self, buf)
Unpack packet header fields from buf, and set self.data.
source code

Inherited from dpkt.Packet: __getitem__, __len__, __repr__, __str__, pack, pack_hdr

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  __hdr__ = (('type', 'B', 0), ('version', 'H', 0), ('length', '...
  __hdr_defaults__ = {'length': 0, 'type': 0, 'version': 0}
  __hdr_fields__ = ['type', 'version', 'length']
  __hdr_fmt__ = '>BHH'
  __hdr_len__ = 5
Properties [hide private]
  data
  length
  type
  version

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

source code 
Packet constructor with ([buf], [field=val,...]) prototype.

Arguments:

buf -- optional packet buffer to unpack

Optional keyword arguments correspond to members to set
(matching fields in self.__hdr__, or 'data').

Overrides: object.__init__
(inherited documentation)

unpack(self, buf)

source code 
Unpack packet header fields from buf, and set self.data.

Overrides: dpkt.Packet.unpack
(inherited documentation)

Class Variable Details [hide private]

__hdr__

Value:
(('type', 'B', 0), ('version', 'H', 0), ('length', 'H', 0))