Example #1
0
    def request(self, adapter, npdu):
        if _debug: WhoIsRouterApplication._debug("request %r %r", adapter, npdu)

        # save a copy of the request
        self._request = npdu

        # forward it along
        BIPNetworkApplication.request(self, adapter, npdu)
    def request(self, adapter, npdu):
        if _debug:
            WhoIsRouterApplication._debug("request %r %r", adapter, npdu)

        # save a copy of the request
        self._request = npdu

        # forward it along
        BIPNetworkApplication.request(self, adapter, npdu)
Example #3
0
    def indication(self, adapter, npdu):
        if _debug:
            WhoIsRouterApplication._debug("indication %r %r", adapter, npdu)

        if isinstance(npdu, IAmRouterToNetwork):
            print("{} -> {}, {}".format(npdu.pduSource, npdu.pduDestination,
                                        npdu.iartnNetworkList))

        BIPNetworkApplication.indication(self, adapter, npdu)
Example #4
0
    def indication(self, adapter, npdu):
        if _debug: WhoIsRouterApplication._debug("indication %r %r", adapter, npdu)

        if isinstance(npdu, IAmRouterToNetwork):
            print("{} -> {}, {}".format(npdu.pduSource, npdu.pduDestination, npdu.iartnNetworkList))

        elif isinstance(npdu, InitializeRoutingTableAck):
            print("{} routing table".format(npdu.pduSource))
            for rte in npdu.irtaTable:
                print("    {} {} {}".format(rte.rtDNET, rte.rtPortID, rte.rtPortInfo))

        BIPNetworkApplication.indication(self, adapter, npdu)
 def confirmation(self, adapter, npdu):
     if _debug:
         WhoIsRouterApplication._debug("confirmation %r %r", adapter, npdu)
     BIPNetworkApplication.confirmation(self, adapter, npdu)
 def response(self, adapter, npdu):
     if _debug:
         WhoIsRouterApplication._debug("response %r %r", adapter, npdu)
     BIPNetworkApplication.response(self, adapter, npdu)
 def indication(self, adapter, npdu):
     if _debug:
         WhoIsRouterApplication._debug("indication %r %r", adapter, npdu)
     BIPNetworkApplication.indication(self, adapter, npdu)
    def __init__(self, *args):
        if _debug: WhoIsRouterApplication._debug("__init__ %r", args)
        BIPNetworkApplication.__init__(self, *args)

        # keep track of requests to line up responses
        self._request = None
Example #9
0
 def __init__(self, *args, **kwargs):
     if _debug:
         WhoIsRouterApplication._debug("__init__ %r %r", args, kwargs)
     BIPNetworkApplication.__init__(self, *args, **kwargs)
Example #10
0
 def confirmation(self, adapter, npdu):
     if _debug: WhoIsRouterApplication._debug("confirmation %r %r", adapter, npdu)
     BIPNetworkApplication.confirmation(self, adapter, npdu)
Example #11
0
 def response(self, adapter, npdu):
     if _debug: WhoIsRouterApplication._debug("response %r %r", adapter, npdu)
     BIPNetworkApplication.response(self, adapter, npdu)
Example #12
0
 def indication(self, adapter, npdu):
     if _debug: WhoIsRouterApplication._debug("indication %r %r", adapter, npdu)
     BIPNetworkApplication.indication(self, adapter, npdu)
Example #13
0
    def __init__(self, *args):
        if _debug: WhoIsRouterApplication._debug("__init__ %r", args)
        BIPNetworkApplication.__init__(self, *args)

        # keep track of requests to line up responses
        self._request = None
Example #14
0
 def __init__(self, *args):
     if _debug: WhoIsRouterApplication._debug("__init__ %r", args)
     BIPNetworkApplication.__init__(self, *args)