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

Source Code for Module dpkt.ospf

 1  # $Id: ospf.py 271 2006-01-11 16:03:33Z dugsong $ 
 2   
 3  """Open Shortest Path First.""" 
 4   
 5  import dpkt 
 6   
 7  AUTH_NONE = 0 
 8  AUTH_PASSWORD = 1 
 9  AUTH_CRYPTO = 2 
10   
11 -class OSPF(dpkt.Packet):
12 __hdr__ = ( 13 ('v', 'B', 0), 14 ('type', 'B', 0), 15 ('len', 'H', 0), 16 ('router', 'I', 0), 17 ('area', 'I', 0), 18 ('sum', 'H', 0), 19 ('atype', 'H', 0), 20 ('auth', '8s', '') 21 )
22 - def __str__(self):
23 if not self.sum: 24 self.sum = dpkt.in_cksum(dpkt.Packet.__str__(self)) 25 return dpkt.Packet.__str__(self)
26