def adoptnetif(self, netif, ifindex, hwaddr, addrlist):
        ''' The broker builds a GreTap tunnel device to this physical node.
        When a link message is received linking this node to another part of
        the emulation, no new interface is created; instead, adopt the
        GreTap netif as the node interface.
        '''
        netif.name = ifindex % "gt%d"
        netif.node = self
        self.addnetif(netif, ifindex)
        # use a more reasonable name, e.g. "gt0" instead of "gt.56286.150"
        if self.up:
            self.cmd([IP_BIN, "link", "set", "dev", netif.localname, "down"])
            self.cmd([IP_BIN, "link", "set", netif.localname, "name", netif.name])
        netif.localname = netif.name
        if hwaddr:
            self.sethwaddr(ifindex, hwaddr)
        for addr in maketuple(addrlist):
            self.addaddr(ifindex, addr)
        if self.up:
            self.cmd([IP_BIN, "link", "set", "dev", netif.localname, "up"])
dataset/ETHPy150Open coreemu/core/daemon/core/phys/pnodes.py/PhysicalNode.adoptnetif/swapped operands of `%`