def add_router_references(self, adapter, address, netlist):
        if _debug: NetworkServiceAccessPoint._debug("add_router_references %r %r %r", adapter, address, netlist)

        # make a key for the router reference
        rkey = (adapter, address)

        for snet in netlist:
            # see if this is spoofing an existing routing table entry
            if snet in self.networks:
                rref = self.networks[snet]

                if rref.adapter == adapter and rref.address == address:
                    pass        # matches current entry
                else:
                    ### check to see if this source could be a router to the new network

                    # remove the network from the rref
                    i = rref.networks.index(snet)
                    del rref.networks[i]

                    # remove the network
                    del self.networks[snet]

            ### check to see if it is OK to add the new entry

            # get the router reference for this router
            rref = self.routers.get(rkey, None)
            if rref:
                if snet not in rref.networks:
                    # add the network
                    rref.networks.append(snet)

                    # reference the snet
                    self.networks[snet] = rref
            else:
                # new reference
                rref = RouterReference( adapter, address, [snet], 0)
                self.routers[rkey] = rref

                # reference the snet
                self.networks[snet] = rref
Add/update references to routers.
dataset/ETHPy150Open JoelBender/bacpypes/py25/bacpypes/netservice.py/NetworkServiceAccessPoint.add_router_references