diff options
author | 2016-01-14 04:42:05 +0200 | |
---|---|---|
committer | 2016-01-19 04:13:53 +0200 | |
commit | 62623efc5b700d58335fa994d2e2725863527575 (patch) | |
tree | f3140936cd979c7d609bbe91c539f681ddd8e552 /scripts | |
parent | eee866f42bd0fc8472e6295b4f26bd0697e59f1f (diff) |
Adding option to pass NAT info in TCP ACK of first SYN
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/automation/regression/unit_tests/trex_nat_test.py | 22 | ||||
-rw-r--r-- | scripts/exp/bad_not_ip.pcap | bin | 0 -> 226 bytes | |||
-rwxr-xr-x | scripts/exp/http1_with_option-ex.pcap | bin | 35049 -> 35049 bytes | |||
-rw-r--r-- | scripts/exp/http1_with_option.pcap | bin | 35049 -> 0 bytes | |||
-rwxr-xr-x | scripts/exp/http1_with_option_ipv6-ex.pcap | bin | 35713 -> 35713 bytes | |||
-rw-r--r-- | scripts/exp/http1_with_option_ipv6.pcap | bin | 35713 -> 0 bytes | |||
-rw-r--r-- | scripts/exp/many_ip_options.pcap | bin | 0 -> 204 bytes | |||
-rw-r--r-- | scripts/exp/tcp_no_syn.pcap | bin | 0 -> 184 bytes |
8 files changed, 14 insertions, 8 deletions
diff --git a/scripts/automation/regression/unit_tests/trex_nat_test.py b/scripts/automation/regression/unit_tests/trex_nat_test.py index 9fe12507..c70c03a1 100755 --- a/scripts/automation/regression/unit_tests/trex_nat_test.py +++ b/scripts/automation/regression/unit_tests/trex_nat_test.py @@ -90,29 +90,35 @@ class CTRexNat_Test(CTRexGeneral_Test):#(unittest.TestCase): pass - def test_nat_simple(self): + def test_nat_simple_mode1(self): + self.nat_simple_helper(learn_mode=1) + + def test_nat_simple_mode2(self): + self.nat_simple_helper(learn_mode=2) + + def nat_simple_helper(self, learn_mode=1): # test initializtion self.router.configure_basic_interfaces() - stat_route_dict = self.get_benchmark_param('stat_route_dict') + stat_route_dict = self.get_benchmark_param('stat_route_dict', test_name="test_nat_simple") stat_route_obj = CStaticRouteConfig(stat_route_dict) self.router.config_static_routing(stat_route_obj, mode = "config") - nat_dict = self.get_benchmark_param('nat_dict') + nat_dict = self.get_benchmark_param('nat_dict', test_name="test_nat_simple") nat_obj = CNatConfig(nat_dict) self.router.config_nat(nat_obj) # self.trex.set_yaml_file('cap2/http_simple.yaml') - mult = self.get_benchmark_param('multiplier') - core = self.get_benchmark_param('cores') + mult = self.get_benchmark_param('multiplier', test_name="test_nat_simple") + core = self.get_benchmark_param('cores', test_name="test_nat_simple") # trex_res = self.trex.run(nc=False,multiplier = mult, cores = core, duration = 100, l = 1000, learn = True) ret = self.trex.start_trex( c = core, m = mult, - learn = True, - d = 100, + learn_mode = learn_mode, + d = 100, f = 'cap2/http_simple.yaml', l = 1000) @@ -124,7 +130,7 @@ class CTRexNat_Test(CTRexGeneral_Test):#(unittest.TestCase): print trex_res.get_latest_dump() trex_nat_stats = trex_res.get_last_value("trex-global.data", ".*nat.*") # extract all nat data - if self.get_benchmark_param('allow_timeout_dev'): + if self.get_benchmark_param('allow_timeout_dev', test_name="test_nat_simple"): nat_timeout_ratio = trex_nat_stats['m_total_nat_time_out']/trex_nat_stats['m_total_nat_open'] if nat_timeout_ratio > 0.005: self.fail('TRex nat_timeout ratio %f > 0.5%%' % nat_timeout_ratio) diff --git a/scripts/exp/bad_not_ip.pcap b/scripts/exp/bad_not_ip.pcap Binary files differnew file mode 100644 index 00000000..01a4d4a6 --- /dev/null +++ b/scripts/exp/bad_not_ip.pcap diff --git a/scripts/exp/http1_with_option-ex.pcap b/scripts/exp/http1_with_option-ex.pcap Binary files differindex ef5bf3c4..6981ff1b 100755 --- a/scripts/exp/http1_with_option-ex.pcap +++ b/scripts/exp/http1_with_option-ex.pcap diff --git a/scripts/exp/http1_with_option.pcap b/scripts/exp/http1_with_option.pcap Binary files differdeleted file mode 100644 index ef5bf3c4..00000000 --- a/scripts/exp/http1_with_option.pcap +++ /dev/null diff --git a/scripts/exp/http1_with_option_ipv6-ex.pcap b/scripts/exp/http1_with_option_ipv6-ex.pcap Binary files differindex f70c1114..82a14a05 100755 --- a/scripts/exp/http1_with_option_ipv6-ex.pcap +++ b/scripts/exp/http1_with_option_ipv6-ex.pcap diff --git a/scripts/exp/http1_with_option_ipv6.pcap b/scripts/exp/http1_with_option_ipv6.pcap Binary files differdeleted file mode 100644 index f70c1114..00000000 --- a/scripts/exp/http1_with_option_ipv6.pcap +++ /dev/null diff --git a/scripts/exp/many_ip_options.pcap b/scripts/exp/many_ip_options.pcap Binary files differnew file mode 100644 index 00000000..8fddf6e4 --- /dev/null +++ b/scripts/exp/many_ip_options.pcap diff --git a/scripts/exp/tcp_no_syn.pcap b/scripts/exp/tcp_no_syn.pcap Binary files differnew file mode 100644 index 00000000..fe0615ad --- /dev/null +++ b/scripts/exp/tcp_no_syn.pcap |