diff --git a/netarch/ip.py b/netarch/ip.py index 0f6ff13..3138dff 100644 --- a/netarch/ip.py +++ b/netarch/ip.py @@ -775,7 +775,14 @@ class Session(object): class HtmlSession(Session): def __init__(self, frame, packetClass=Packet, debug=True): Session.__init__(self, frame, packetClass) + self.sessfd = None self.debug = debug + self.startlog() + + def startlog(self, client="#a8a8a8", server="white"): + if self.sessfd is not None: + self.sessfd.close() + self.sessfd = self.open_out('session.html') self.sessfd.write(''' %s
-''' % self.__class__.__name__) +''' % (self.__class__.__name__, server, client)) self.sessfd.write('')