diff options
Diffstat (limited to 'scripts/stl')
-rw-r--r-- | scripts/stl/udp_1pkt_simple_test.py | 6 | ||||
-rw-r--r-- | scripts/stl/udp_1pkt_simple_test2.py | 6 | ||||
-rw-r--r-- | scripts/stl/udp_1pkt_tuple_gen_split.py | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/scripts/stl/udp_1pkt_simple_test.py b/scripts/stl/udp_1pkt_simple_test.py index b2f80233..3915412d 100644 --- a/scripts/stl/udp_1pkt_simple_test.py +++ b/scripts/stl/udp_1pkt_simple_test.py @@ -2,9 +2,9 @@ from trex_stl_lib.api import * def generate_payload(length): word = '' - alphabet_size = len(string.letters) + alphabet_size = len(string.ascii_letters) for i in range(length): - word += string.letters[(i % alphabet_size)] + word += string.ascii_letters[(i % alphabet_size)] return word @@ -12,7 +12,7 @@ class STLS1(object): def create_stream (self): fsize_no_fcs = 129 - base_pkt_a = Ether()/IP(dst="48.0.0.1",options=IPOption('\x01\x01\x01\x00'))/UDP(dport=12,sport=1025) + base_pkt_a = Ether()/IP(dst="48.0.0.1",options=IPOption(b'\x01\x01\x01\x00'))/UDP(dport=12,sport=1025) vm1 = STLScVmRaw([ STLVmFlowVar(name="src",min_value="10.0.0.1",max_value="10.0.0.10",size=4,op="inc"), diff --git a/scripts/stl/udp_1pkt_simple_test2.py b/scripts/stl/udp_1pkt_simple_test2.py index c261d3f8..617d98b3 100644 --- a/scripts/stl/udp_1pkt_simple_test2.py +++ b/scripts/stl/udp_1pkt_simple_test2.py @@ -2,9 +2,9 @@ from trex_stl_lib.api import * def generate_payload(length): word = '' - alphabet_size = len(string.letters) + alphabet_size = len(string.ascii_letters) for i in range(length): - word += string.letters[(i % alphabet_size)] + word += string.ascii_letters[(i % alphabet_size)] return word @@ -12,7 +12,7 @@ class STLS1(object): def create_stream (self): fsize_no_fcs = 129 - base_pkt_a = Ether()/IP()/IPv6()/IP(dst="48.0.0.1",options=IPOption('\x01\x01\x01\x00'))/UDP(dport=12,sport=1025) + base_pkt_a = Ether()/IP()/IPv6()/IP(dst="48.0.0.1",options=IPOption(b'\x01\x01\x01\x00'))/UDP(dport=12,sport=1025) vm1 = STLScVmRaw([ STLVmFlowVar(name="src",min_value="10.0.0.1",max_value="10.0.0.10",size=4,op="inc"), diff --git a/scripts/stl/udp_1pkt_tuple_gen_split.py b/scripts/stl/udp_1pkt_tuple_gen_split.py index 304ed9c0..e7a33b22 100644 --- a/scripts/stl/udp_1pkt_tuple_gen_split.py +++ b/scripts/stl/udp_1pkt_tuple_gen_split.py @@ -31,7 +31,7 @@ class STLS1(object): vm = vm) stream = STLStream(packet = pkt, mode = STLTXCont()) - print stream.to_code() + #print(stream.to_code()) return stream |