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

Source Code for Module dpkt.igmp

 1  # $Id: igmp.py 23 2006-11-08 15:45:33Z dugsong $ 
 2  # -*- coding: utf-8 -*- 
 3  """Internet Group Management Protocol.""" 
 4  from __future__ import absolute_import 
 5   
 6  from . import dpkt 
 7   
 8   
9 -class IGMP(dpkt.Packet):
10 """Internet Group Management Protocol. 11 12 TODO: Longer class information.... 13 14 Attributes: 15 __hdr__: Header fields of IGMP. 16 TODO. 17 """ 18 19 __hdr__ = ( 20 ('type', 'B', 0), 21 ('maxresp', 'B', 0), 22 ('sum', 'H', 0), 23 ('group', 'I', 0) 24 ) 25
26 - def __bytes__(self):
27 if not self.sum: 28 self.sum = dpkt.in_cksum(dpkt.Packet.__bytes__(self)) 29 return dpkt.Packet.__bytes__(self)
30