def __init__(self): super(Host, self).__init__(n_tips=1) self.tip = self.tips[0] self.mac = self.index + 1 self.framer = BitFramer(self.tip) self._status['mac'] = '{:02x}'.format(self.mac) self._status['framer'] = self.framer self._status['tip'] = self.tip
def __init__(self, n_tips=3): super(Switch, self).__init__(n_tips) self.ports = [BitFramer(tip) for tip in self.tips] self.routes = Switch.Routes(self.ports) mint.worker(self.run, priority=simulation.SWITCH_PRIORITY)