summaryrefslogtreecommitdiffstats
path: root/scripts/stl/udp_1pkt_range_clients.py
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-02-11 15:17:12 +0200
committerHanoh Haim <hhaim@cisco.com>2016-02-11 15:17:12 +0200
commitf11bbb2d9c4f0e8fb5bf2a7b8d9ade597fc1be05 (patch)
treefe2a78e2d2c3297bff275808b5d6f4f53fff3536 /scripts/stl/udp_1pkt_range_clients.py
parent1a780eaa3669a296b683201ef6431a7490fdc7d6 (diff)
test add udp_1pkt_simple
Diffstat (limited to 'scripts/stl/udp_1pkt_range_clients.py')
-rw-r--r--scripts/stl/udp_1pkt_range_clients.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/stl/udp_1pkt_range_clients.py b/scripts/stl/udp_1pkt_range_clients.py
index 2078b748..6b898ed2 100644
--- a/scripts/stl/udp_1pkt_range_clients.py
+++ b/scripts/stl/udp_1pkt_range_clients.py
@@ -3,7 +3,7 @@ from trex_stl_lib.api import *
# x clients override the LSB of destination
#Base src ip : 55.55.1.1, dst ip: Fixed
-#Increment host port portion starting at 55.55.1.1 for 'n' number of clients (55.55.1.1, 55.55.1.2)
+#Increment src ipt portion starting at 55.55.1.1 for 'n' number of clients (55.55.1.1, 55.55.1.2)
#Src MAC: start with 0000.dddd.0001, increment mac in steps of 1
#Dst MAC: Fixed (will be taken from trex_conf.yaml
@@ -25,7 +25,10 @@ class STLS1(object):
STLVmFlowVar(name="mac_src_wa", min_value=0x0000dddd, max_value=0x0000dddd, size=4, op="inc"), # workaround hardcoded the src MAC MSB, will be solved as an option in the stream
STLVmWrFlowVar(fv_name="mac_src_wa", pkt_offset= 6), # write constrant 0000.ddddd
- STLVmWrFlowVar(fv_name="mac_src", pkt_offset= 10) # write it to LSB of ethernet.src
+ STLVmWrFlowVar(fv_name="mac_src", pkt_offset= 10), # write it to LSB of ethernet.src
+ STLVmWrFlowVar(fv_name="mac_src" ,pkt_offset="IP.src",offset_fixup=2), # it is 2 byte so there is a need to fixup in 2 bytes
+ STLVmFixIpv4(offset = "IP")
+
]
)