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

Source Code for Module dpkt.hsrp

 1  # $Id: hsrp.py 23 2006-11-08 15:45:33Z dugsong $ 
 2  # -*- coding: utf-8 -*- 
 3  """Cisco Hot Standby Router Protocol.""" 
 4  from __future__ import absolute_import 
 5   
 6  from . import dpkt 
 7   
 8  # Opcodes 
 9  HELLO = 0 
10  COUP = 1 
11  RESIGN = 2 
12   
13  # States 
14  INITIAL = 0x00 
15  LEARN = 0x01 
16  LISTEN = 0x02 
17  SPEAK = 0x04 
18  STANDBY = 0x08 
19  ACTIVE = 0x10 
20   
21   
22 -class HSRP(dpkt.Packet):
23 """Cisco Hot Standby Router Protocol. 24 25 TODO: Longer class information.... 26 27 Attributes: 28 __hdr__: Header fields of HSRP. 29 TODO. 30 """ 31 32 __hdr__ = ( 33 ('version', 'B', 0), 34 ('opcode', 'B', 0), 35 ('state', 'B', 0), 36 ('hello', 'B', 0), 37 ('hold', 'B', 0), 38 ('priority', 'B', 0), 39 ('group', 'B', 0), 40 ('rsvd', 'B', 0), 41 ('auth', '8s', 'cisco'), 42 ('vip', '4s', '') 43 )
44