Home | Trees | Indices | Help |
|
---|
|
1 # $Id: vrrp.py 23 2006-11-08 15:45:33Z dugsong $ 2 3 """Virtual Router Redundancy Protocol.""" 4 5 import dpkt 68 __hdr__ = ( 9 ('vtype', 'B', 0x21), 10 ('vrid', 'B', 0), 11 ('priority', 'B', 0), 12 ('count', 'B', 0), 13 ('atype', 'B', 0), 14 ('advtime', 'B', 0), 15 ('sum', 'H', 0), 16 ) 17 addrs = () 18 auth = ''4820 return self.vtype >> 423 v = property(_get_v, _set_v) 2426 return self.vtype & 0xf29 type = property(_get_v, _set_v) 3032 dpkt.Packet.unpack(self, buf) 33 l = [] 34 for off in range(0, 4 * self.count, 4): 35 l.append(self.data[off:off+4]) 36 self.addrs = l 37 self.auth = self.data[off+4:] 38 self.data = ''39 42
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Feb 19 21:29:27 2012 | http://epydoc.sourceforge.net |