Beispiel #1
0
class IPv6RouterStack(object):
    def __init__(self, env):
        self.env = env
        self.phy = BasedPhyLayer("PHY")
        self.mac = BasedLayer("MAC")
        self.network = BasedLayer("NETWORK")
        self.app = BasedApplicationLayer()

    def initialize(self, pipeline):
        self.phy.set_upper_layer(self.mac)
        self.mac.set_upper_layer(self.network)
        self.network.set_upper_layer(self.app)
        self.phy.set_aether(pipeline)

    def handle_received_msg(self, msg):
        self.phy.handle_lower_msg(msg)
Beispiel #2
0
 def __init__(self, env):
     self.env = env
     self.phy = BasedPhyLayer("PHY")
     self.mac = BasedLayer("MAC")
     self.network = BasedLayer("NETWORK")
     self.app = BasedApplicationLayer()