summaryrefslogtreecommitdiffstats
path: root/scripts/stl
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-02-11 16:13:11 +0200
committerHanoh Haim <hhaim@cisco.com>2016-02-11 16:13:11 +0200
commit04a440fc514c4cc7891b3ce187fd9c7b8ede7d0e (patch)
tree18d0aa69f252d74f8b29bdd6d4d8a543b1c4511f /scripts/stl
parentf11bbb2d9c4f0e8fb5bf2a7b8d9ade597fc1be05 (diff)
support relative path from profile - inspect stack for that
Diffstat (limited to 'scripts/stl')
-rw-r--r--scripts/stl/udp_1pkt_pcap_relative_path.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/stl/udp_1pkt_pcap_relative_path.py b/scripts/stl/udp_1pkt_pcap_relative_path.py
new file mode 100644
index 00000000..91b32d0f
--- /dev/null
+++ b/scripts/stl/udp_1pkt_pcap_relative_path.py
@@ -0,0 +1,19 @@
+from trex_stl_lib.api import *
+
+# stream from pcap file. continues pps 10 in sec
+# path_relative_to_profile = True
+
+class STLS1(object):
+
+ def get_streams (self, direction = 0):
+ return [STLStream(packet = STLPktBuilder(pkt ="yaml/udp_64B_no_crc.pcap",
+ path_relative_to_profile = True), # path relative to profile and not to loader path
+ mode = STLTXCont(pps=10)) ] #rate continues, could be STLTXSingleBurst,STLTXMultiBurst
+
+
+# dynamic load - used for trex console or simulator
+def register():
+ return STLS1()
+
+
+