"""Initialize the object with the given name."""
MonitorObject.__init__(me, name)
me.pinghook = HookList()
+ me.__dict__.update(conn.algs(name))
me.update()
def update(me, hunoz = None):
## the entry.
statslayout = \
[('Start time', '%(start-time)s'),
+ ('Private key', '%(current-key)s'),
+ ('Diffie-Hellman group',
+ '%(kx-group)s '
+ '(%(kx-group-order-bits)s-bit order, '
+ '%(kx-group-elt-bits)s-bit elements)'),
+ ('Cipher',
+ '%(cipher)s (%(cipher-keysz)s-bit key, %(cipher-blksz)s-bit block)'),
+ ('Mac', '%(mac)s (%(mac-keysz)s-bit key, %(mac-tagsz)s-bit tag)'),
+ ('Hash', '%(hash)s (%(hash-sz)s-bit output)'),
('Last key-exchange', '%(last-keyexch-time)s'),
('Last packet', '%(last-packet-time)s'),
('Packets in/out',
stat = conn.stats(me.peer.name)
for s, trans in statsxlate:
stat[s] = trans(stat[s])
+ stat.update(me.peer.__dict__)
for label, format in statslayout:
me.e[label].set_text(format % stat)
GL.timeout_add(1000, lambda: me.cr.switch() and False)