diff options
author | 2016-02-02 16:47:52 +0200 | |
---|---|---|
committer | 2016-02-02 16:47:52 +0200 | |
commit | a1cc404d690f7c1b875c364f247062be1178e202 (patch) | |
tree | f73b76f454e3c62898d195f7128789cc53bd9897 /scripts/automation/regression | |
parent | 9d6623655f0308a8cbd06cc6bf3d4ffccfcf9212 (diff) |
check scapy ipv6 packet
Diffstat (limited to 'scripts/automation/regression')
-rw-r--r-- | scripts/automation/regression/unit_tests/functional_tests/scapy_pkt_builder_test.py | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/scripts/automation/regression/unit_tests/functional_tests/scapy_pkt_builder_test.py b/scripts/automation/regression/unit_tests/functional_tests/scapy_pkt_builder_test.py index 4b19c6fa..98102dba 100644 --- a/scripts/automation/regression/unit_tests/functional_tests/scapy_pkt_builder_test.py +++ b/scripts/automation/regression/unit_tests/functional_tests/scapy_pkt_builder_test.py @@ -105,7 +105,7 @@ class CTRexPktBuilderSanitySCapy_Test(pkt_bld_general_test.CGeneralPktBld_Test): def test_simple_scapy_9k_ip_len(self): """ - build 128 byte packet with 0x35 as pyld + build 9k ipv4 len packet """ @@ -121,6 +121,24 @@ class CTRexPktBuilderSanitySCapy_Test(pkt_bld_general_test.CGeneralPktBld_Test): #hexdump(pkt); assert_equal(len(pkt),9*1024+14) + def test_simple_scapy_ipv6_1(self): + """ + build ipv6 packet + """ + + print "start " + py='\x55'*(64) + + p=Ether()/IPv6()/UDP(dport=12,sport=1025)/py + #p.build(); + #p.dump_layers_offset() + hexdump(p); + p.show2(); + + p_utl=CTRexScapyPktUtl(p); + + assert_equal(p_utl.get_field_offet_by_str("IPv6.src"),(38,16)); + def tearDown(self): |