def Filter(self, pkt):
        if _debug: AddressFilterTracer._debug("Filter %r", pkt)

        # apply the filters
        if filterSource:
            if not Match(pkt.pduSource, filterSource):
                if _debug: AddressFilterTracer._debug("    - source filter fail")
                return
        if filterDestination:
            if not Match(pkt.pduDestination, filterDestination):
                if _debug: AddressFilterTracer._debug("    - destination filter fail")
                return
        if filterHost:
            if (not Match(pkt.pduSource, filterHost)) and (not Match(pkt.pduDestination, filterHost)):
                if _debug: AddressFilterTracer._debug("    - host filter fail")
                return

        # passed all the filter tests
        print strftimestamp(pkt._timestamp), pkt.__class__.__name__
        pkt.debug_contents()
        print

#
#   __main__
#
dataset/ETHPy150Open JoelBender/bacpypes/pcap_tools/AddressFilter.py/AddressFilterTracer.Filter/original