Пример #1
0
 def _send_packet(self, listener, key, value, domain, type):
     packet = Packet(Packet.STORAGE, StoragePacketContent([(key, value, domain, type)]))
     packet.src = self._myself
     packet.dst = Device.deserialize(listener)
     core.forwarding.forward(packet)
Пример #2
0
 def _send_packet(self, listener, tasks):
     packet = Packet(Packet.STORAGE, StoragePacketContent(tasks))
     packet.src = self._myself
     packet.dst = Device.deserialize(listener)
     core.forwarding.forward(packet)
Пример #3
0
 def _send_packet(self, pox_content, controllers):
     packet = Packet(Packet.CONTROL_FROM_SWITCH, pox_content)
     packet.src = self._myself
     for controller in controllers:
         packet.dst = controller
         core.forwarding.forward(packet)
Пример #4
0
 def data_to_packet(self, data):
     return Packet.deserialize(cPickle.loads(data))