(self, pkt)
Parse packet based on source/dest port. May need
           to allow this to be configurable in case non-default port
           is used.
Parse packet based on source/dest port. May need
           to allow this to be configurable in case non-default port
           is used.
Parse packet based on source / dest port . May need to allow this to be configurable in case non - default port is used .
def dump(self, pkt):
        """Parse packet based on source/dest port. May need
           to allow this to be configurable in case non-default port
           is used.
        """
        # mysql -tested with 5.5.27, 4.1.21
        if pkt[TCP].sport == 3306 or pkt[TCP].dport == 3306:
            self.parse_mysql(pkt[TCP].payload)
        # postgres - tested with 9.0.11
        elif pkt[TCP].sport == 5432 or pkt[TCP].dport == 5432:
            self.parse_postgres(pkt[TCP].payload)
def dump ( self , pkt ) : # mysql -tested with 5.5.27, 4.1.21 if pkt [ TCP ] . sport == 3306 or pkt [ TCP ] . dport == 3306 : self . parse_mysql ( pkt [ TCP ] . payload ) # postgres - tested with 9.0.11 elif pkt [ TCP ] . sport == 5432 or pkt [ TCP ] . dport == 5432 : self . parse_postgres ( pkt [ TCP ] . payload )