Пример #1
0
 def __init__(self, controller, state_master, sync_uri):
   self.controller = controller
   (self.mode, self.host, self.port) = parse_openflow_uri(sync_uri)
   if state_master is None:
     raise ValueError("state_master is null")
   self.state_master = state_master
   self._on_disconnect = []
   self.io_delegate = None
   self.speaker = None
Пример #2
0
 def __init__(self, controller, state_master, sync_uri):
     self.controller = controller
     (self.mode, self.host, self.port) = parse_openflow_uri(sync_uri)
     if state_master is None:
         raise ValueError("state_master is null")
     self.state_master = state_master
     self._on_disconnect = []
     self.io_worker = None
     self.speaker = None
Пример #3
0
 def _bind_pcap(self, host_device):
   filter_string = "(not tcp port %d)" % self.config.port
   if self.config.sync is not None and self.config.sync != "":
     # TODO(cs): this is not quite correct. The *listen* port is sync_port,
     # but the sync data connection will go over over an ephermeral port.
     # Luckily this mistake is not fatal -- the kernel copies all
     # packets sent to the pcap, and we'll just drop the copied packets when
     # we realize we don't know where to route them.
     (_, _, sync_port) = parse_openflow_uri(self.config.sync)
     filter_string += " and (not tcp port %d)" % sync_port
   return bind_pcap(host_device, filter_string=filter_string)
Пример #4
0
 def _bind_pcap(self, host_device):
     filter_string = "(not tcp port %d)" % self.config.port
     if self.config.sync is not None and self.config.sync != "":
         # TODO(cs): this is not quite correct. The *listen* port is sync_port,
         # but the sync data connection will go over over an ephermeral port.
         # Luckily this mistake is not fatal -- the kernel copies all
         # packets sent to the pcap, and we'll just drop the copied packets when
         # we realize we don't know where to route them.
         (_, _, sync_port) = parse_openflow_uri(self.config.sync)
         filter_string += " and (not tcp port %d)" % sync_port
     return bind_pcap(host_device, filter_string=filter_string)
Пример #5
0
 def __init__(self, io_master, sync_uri):
   (self.mode, self.host, self.port) = parse_openflow_uri(sync_uri)
   self.io_master = io_master
   self.speaker = None
Пример #6
0
 def __init__(self, io_master, sync_uri):
     (self.mode, self.host, self.port) = parse_openflow_uri(sync_uri)
     self.io_master = io_master
     self.speaker = None