def __init__(self, connection, config): SimpleL2LearningSwitch.__init__(self, connection, False) self._connection = connection; self._serverip1 = config['server_ip1'] self._serverip2 = config['server_ip2'] #This will be the LoadBalancer IP self._serverip1_mac = config['server_ip1_mac'] self._serverip2_mac = config['server_ip2_mac'] self._ts1_total_bw = float(config['ts1_total_bw']) * 1024 * 1024 self._ts2_total_bw = float(config['ts2_total_bw']) * 1024 * 1024 self.FLAG = 0 self.Weight = 0.2 self.lock1 = threading.Lock() self.lock2 = threading.Lock() self.total_ts1_bytes = 0 self.total_ts1_queue = 0 self.total_ts2_bytes = 0 self.total_ts2_queue = 0 self.thread_flag = 1 self.threshold = 0.50 self.ts1_path_counter = 0 #These two values are purely for experimental purposes self.ts2_path_counter = 0 self.ts1_bw_threshold_more_available_bw = 0 self.ts2_bw_threshold_more_available_bw = 0 self.ts1_bw_threshold_equal_bw_lower_q = 0 self.ts2_bw_threshold_equal_bw_lower_q = 0 self.ts1_q_threshold_lower_q = 0 self.ts2_q_threshold_lower_q = 0 self.ts1_q_threshold_equal_more_available_bw = 0 self.ts2_q_threshold_equal_more_available_bw = 0 self.ts1_roundrobin = 0 self.ts2_roundrobin = 0
def __init__(self, connection, config): SimpleL2LearningSwitch.__init__(self, connection, False) self._connection = connection; #self.report = "~/testreportlog"; self._serverip1 = config['server_ip1'] self._serverip2 = config['server_ip2'] self._serverip1_mac = config['server_ip1_mac'] self._serverip2_mac = config['server_ip2_mac'] self._clientip1 = config['client_ip1'] self._clientip2 = config['client_ip2'] self._clientip3 = config['client_ip3'] self._clientip4 = config['client_ip4'] self._clientip1_mac = config['client_ip1_mac'] self._clientip2_mac = config['client_ip2_mac'] self._clientip3_mac = config['client_ip3_mac'] self._clientip4_mac = config['client_ip4_mac'] self.FLAG = 0 self.lock1 = threading.Lock() self.thread_flag = 1 #Client Threat Status - 0: Low, 1: Medium, 2: High self.client1_status = 0 self.client2_status = 0 self.client3_status = 0 #Server Threat Status - 0: Low, 1: Medium, 2: High self.server1_status = 0 #Info Counters self.server1_low_threat = 0 self.server1_medium_threat = 0 self.server1_high_threat = 0 self.client1_low_threat = 0 self.client1_medium_threat = 0 self.client1_medium_threat = 0 self.client2_low_threat = 0 self.client2_medium_threat = 0 self.client2_medium_threat = 0 self.client3_low_threat = 0 self.client3_medium_threat = 0 self.client3_medium_threat = 0 self.client1_traffic_blocked = 0 self.client2_traffic_blocked = 0 self.client3_traffic_blocked = 0 self.user_traffic = 0 self.user_traffic_redirected = 0 self.user_return_traffic_redirected = 0 self.other_traffic = 0
def __init__(self, connection, config): SimpleL2LearningSwitch.__init__(self, connection, False) self._connection = connection; self._serverip1 = config['server_ip1'] self._serverip1_mac = config['server_ip1_mac'] #MAC Address of the Neighbour connected to Backup Link self._serverip2 = config['server_ip2'] self._serverip2_mac = config['server_ip2_mac'] self._p1_total_bw = float(config['p1_total_bw']) * 1024 * 1024 self._p2_total_bw = float(config['p2_total_bw']) * 1024 * 1024 self._p1_delay = float(config['p1_delay']) self._p2_delay = float(config['p2_delay']) self._delay_threshold = float(config['delay_threshold']) self.FLAG = 0
def __init__(self, connection, config): SimpleL2LearningSwitch.__init__(self, connection, False) self._connection = connection self._serverip = config['server_ip'] self._origport = int(config['orig_port']) self._forwport = int(config['forw_port'])