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

Source Code for Module dpkt.hsrp

 1  # $Id: hsrp.py 271 2006-01-11 16:03:33Z dugsong $ 
 2   
 3  """Cisco Hot Standby Router Protocol.""" 
 4   
 5  import dpkt 
 6   
 7  # Opcodes 
 8  HELLO = 0 
 9  COUP = 1 
10  RESIGN = 2 
11   
12  # States 
13  INITIAL = 0x00 
14  LEARN = 0x01 
15  LISTEN = 0x02 
16  SPEAK = 0x04 
17  STANDBY = 0x08 
18  ACTIVE = 0x10 
19   
20 -class HSRP(dpkt.Packet):
21 __hdr__ = ( 22 ('version', 'B', 0), 23 ('opcode', 'B', 0), 24 ('state', 'B', 0), 25 ('hello', 'B', 0), 26 ('hold', 'B', 0), 27 ('priority', 'B', 0), 28 ('group', 'B', 0), 29 ('rsvd', 'B', 0), 30 ('auth', '8s', 'cisco'), 31 ('vip', '4s', '') 32 )
33