diff options
author | 2016-02-02 15:49:40 +0200 | |
---|---|---|
committer | 2016-02-02 15:49:40 +0200 | |
commit | ce15c5c5317de67a8cb975769aeb9b2fd97b0c74 (patch) | |
tree | de524dac41108e8955768928ac4b71ec07dc84f1 /scripts | |
parent | cce75776dbb2e05924b9628714886f11b762f1fa (diff) |
add 128 size packet test
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/automation/regression/unit_tests/functional_tests/scapy_pkt_builder_test.py | 20 |
1 files changed, 20 insertions, 0 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 11838e16..fbb17bd2 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 @@ -85,6 +85,26 @@ class CTRexPktBuilderSanitySCapy_Test(pkt_bld_general_test.CGeneralPktBld_Test): assert_equal(p_utl.get_field_offet_by_str("802|1Q:1.vlan"),(18,0)); assert_equal(p_utl.get_field_offet_by_str("IP.src"),(34,4)); + def test_simple_scapy_128_udp(self): + """ + build 128 byte packet with 0x35 as pyld + """ + + + pkt_size =128 + p1=Ether(src="00:00:00:01:00:00",dst="00:00:00:01:00:00")/ \ + IP(src="16.0.0.1",dst="48.0.0.1")/ \ + UDP(dport=12,sport=1025) + pyld_size=pkt_size-len(p1); + + pkt=p1/('5'*(pyld_size)) + + pkt.show2(); + hexdump(pkt); + assert_equal(len(pkt),128) + + + def tearDown(self): pass |