diff options
Diffstat (limited to 'scripts/stl/udp_rand_len_9k.py')
-rw-r--r-- | scripts/stl/udp_rand_len_9k.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/scripts/stl/udp_rand_len_9k.py b/scripts/stl/udp_rand_len_9k.py index ea348fe5..cf78b1c9 100644 --- a/scripts/stl/udp_rand_len_9k.py +++ b/scripts/stl/udp_rand_len_9k.py @@ -1,4 +1,3 @@ - from trex_stl_lib.api import * class STLS1(object): @@ -19,11 +18,11 @@ class STLS1(object): # vm - vm = CTRexScRaw( [ CTRexVmDescFlowVar(name="fv_rand", min_value=64, max_value=len(base_pkt), size=2, op="random"), - CTRexVmDescTrimPktSize("fv_rand"), # total packet size - CTRexVmDescWrFlowVar(fv_name="fv_rand", pkt_offset= "IP.len", add_val=l3_len_fix), # fix ip len - CTRexVmDescFixIpv4(offset = "IP"), # fix checksum - CTRexVmDescWrFlowVar(fv_name="fv_rand", pkt_offset= "UDP.len", add_val=l4_len_fix) # fix udp len + vm = CTRexScRaw( [ STLVmFlowVar(name="fv_rand", min_value=64, max_value=len(base_pkt), size=2, op="random"), + STLVmTrimPktSize("fv_rand"), # total packet size + STLVmWrFlowVar(fv_name="fv_rand", pkt_offset= "IP.len", add_val=l3_len_fix), # fix ip len + STLVmFixIpv4(offset = "IP"), # fix checksum + STLVmWrFlowVar(fv_name="fv_rand", pkt_offset= "UDP.len", add_val=l4_len_fix) # fix udp len ] ) |