def __init__(self, state_proxy_client, flow_stat_interval=7, steady_state_start=30, steady_state_end=60):
     PacketReceiver.__init__(self)
     self._flow_stat_interval = flow_stat_interval
     self._steady_state_start = steady_state_start
     self._steady_state_end = steady_state_end
     self._proxy_client = state_proxy_client
     self._proxy_client.set('flow_stat_interval', self._flow_stat_interval)
     self._proxy_client.set('flow_count_dict', {})        
 def stop(self):
     PacketReceiver.stop(self)
     result = self._tcpdump.stop_and_get_result()
     self._recvd_count = result.recvd_pkt_count
 def start(self):
     self._tcpdump.start()
     PacketReceiver.start(self)
 def __init__(self, _):
     PacketReceiver.__init__(self)
     self._tcpdump = Tcpdump(config.active_config, 
                             filter='udp and dst port ' + str(TRIGGER_PORT))
 def start(self):
     PacketReceiver.start(self)
 def stop(self):
     (self._recvd_count, start, end) = self._proxy_client.get('pkt_in_stat')
     self._pkt_in_pps = self._recvd_count / (end - start)
     PacketReceiver.stop(self)
 def __init__(self, state_proxy_client):
     PacketReceiver.__init__(self)
     self._proxy_client = state_proxy_client
     self._proxy_client.set('pkt_in_stat', (0, None, None))
     self._pkt_in_pps = None