summaryrefslogtreecommitdiffstats
path: root/scripts/stl
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-02-11 11:52:15 +0200
committerHanoh Haim <hhaim@cisco.com>2016-02-11 11:52:15 +0200
commit4b3092339d578f2c08de2fa1a55de5dea5ecf053 (patch)
tree237513b98ee5e748356a5094d7468dca7a4c511a /scripts/stl
parent177b486366a44e38538e33b5cd2ac1e9a141aee0 (diff)
add simple pcap file example
Diffstat (limited to 'scripts/stl')
-rw-r--r--scripts/stl/udp_1pkt_pcap.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/stl/udp_1pkt_pcap.py b/scripts/stl/udp_1pkt_pcap.py
new file mode 100644
index 00000000..a0d2ee49
--- /dev/null
+++ b/scripts/stl/udp_1pkt_pcap.py
@@ -0,0 +1,17 @@
+from trex_stl_lib.api import *
+
+# stream from pcap file. continues pps 10 in sec
+
+class STLS1(object):
+
+ def get_streams (self, direction = 0):
+ return [STLStream(packet = STLPktBuilder(pkt ="stl/yaml/udp_64B_no_crc.pcap"), # path relative to pwd
+ mode = STLTXCont(pps=10)) ] #rate continues, could be STLTXSingleBurst,STLTXMultiBurst
+
+
+# dynamic load - used for trex console or simulator
+def register():
+ return STLS1()
+
+
+