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

Source Code for Module dpkt.udp

 1  # $Id: udp.py 23 2006-11-08 15:45:33Z dugsong $ 
 2  # -*- coding: utf-8 -*- 
 3  """User Datagram Protocol.""" 
 4  from __future__ import absolute_import 
 5   
 6  from . import dpkt 
 7   
 8  UDP_HDR_LEN = 8 
 9  UDP_PORT_MAX = 65535 
10   
11   
12 -class UDP(dpkt.Packet):
13 """User Datagram Protocol. 14 15 TODO: Longer class information.... 16 17 Attributes: 18 __hdr__: Header fields of UDP. 19 TODO. 20 """ 21 22 __hdr__ = ( 23 ('sport', 'H', 0xdead), 24 ('dport', 'H', 0), 25 ('ulen', 'H', 8), 26 ('sum', 'H', 0) 27 )
28