summaryrefslogtreecommitdiffstats
path: root/scripts/stl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/stl')
-rw-r--r--scripts/stl/imix.py (renamed from scripts/stl/profiles/imix.py)11
-rw-r--r--scripts/stl/imix_1pkt_tuple_gen.yaml63
-rw-r--r--scripts/stl/profiles/__init__.py0
-rw-r--r--scripts/stl/syn_attack.py (renamed from scripts/stl/profiles/syn_attack.py)13
-rw-r--r--scripts/stl/udp_1pkt.py (renamed from scripts/stl/profiles/udp_1pkt.py)12
-rw-r--r--scripts/stl/udp_1pkt_tuple_gen.py (renamed from scripts/stl/profiles/udp_1pkt_tuple_gen.py)14
-rw-r--r--scripts/stl/udp_rand_len_9k.py (renamed from scripts/stl/profiles/udp_rand_len_9k.py)11
-rw-r--r--scripts/stl/yaml/burst_1000_pkt.yaml (renamed from scripts/stl/burst_1000_pkt.yaml)16
-rw-r--r--scripts/stl/yaml/burst_1pkt.yaml (renamed from scripts/stl/burst_1pkt.yaml)0
-rw-r--r--scripts/stl/yaml/burst_1pkt_1burst.yaml (renamed from scripts/stl/burst_1pkt_1burst.yaml)5
-rw-r--r--scripts/stl/yaml/burst_1pkt_vm.yaml (renamed from scripts/stl/burst_1pkt_vm.yaml)3
-rw-r--r--[-rwxr-xr-x]scripts/stl/yaml/imix_1pkt.yaml (renamed from scripts/stl/imix_1pkt.yaml)4
-rw-r--r--scripts/stl/yaml/imix_1pkt_2.yaml (renamed from scripts/stl/imix_1pkt_2.yaml)0
-rw-r--r--scripts/stl/yaml/imix_1pkt_tuple_gen.yaml42
-rw-r--r--scripts/stl/yaml/imix_1pkt_vm.yaml (renamed from scripts/stl/imix_1pkt_vm.yaml)0
-rw-r--r--scripts/stl/yaml/imix_1pkt_vm2.yaml (renamed from scripts/stl/imix_1pkt_vm2.yaml)0
-rw-r--r--[-rwxr-xr-x]scripts/stl/yaml/imix_2pkt.yaml (renamed from scripts/stl/imix_2pkt.yaml)0
-rw-r--r--[-rwxr-xr-x]scripts/stl/yaml/imix_3pkt.yaml (renamed from scripts/stl/imix_3pkt.yaml)14
-rw-r--r--scripts/stl/yaml/imix_3pkt_vm.yaml (renamed from scripts/stl/imix_3pkt_vm.yaml)13
-rw-r--r--scripts/stl/yaml/imix_scale_1000.yaml (renamed from scripts/stl/imix_scale_1000.yaml)0
-rw-r--r--scripts/stl/yaml/imix_scale_300.yaml (renamed from scripts/stl/imix_scale_300.yaml)0
-rw-r--r--scripts/stl/yaml/ipv4_udp_9000.pcap (renamed from scripts/stl/ipv4_udp_9000.pcap)bin9082 -> 9082 bytes
-rw-r--r--scripts/stl/yaml/ipv4_udp_9k.pcap (renamed from scripts/stl/ipv4_udp_9k.pcap)bin9270 -> 9270 bytes
-rw-r--r--[-rwxr-xr-x]scripts/stl/yaml/ipv4_udp_9k_burst_10.pcap (renamed from scripts/stl/ipv4_udp_9k_burst_10.pcap)bin92484 -> 92484 bytes
-rw-r--r--scripts/stl/yaml/syn_attack_sample.yaml (renamed from scripts/stl/syn_attack_sample.yaml)0
-rw-r--r--scripts/stl/yaml/syn_packet.pcap (renamed from scripts/stl/syn_packet.pcap)bin100 -> 100 bytes
-rw-r--r--scripts/stl/yaml/udp_1518B_no_crc.pcap (renamed from scripts/stl/udp_1518B_no_crc.pcap)bin1554 -> 1554 bytes
-rw-r--r--scripts/stl/yaml/udp_594B_no_crc.pcap (renamed from scripts/stl/udp_594B_no_crc.pcap)bin630 -> 630 bytes
-rw-r--r--scripts/stl/yaml/udp_64B_no_crc.pcap (renamed from scripts/stl/udp_64B_no_crc.pcap)bin100 -> 100 bytes
-rw-r--r--scripts/stl/yaml/udp_rand_size.yaml (renamed from scripts/stl/udp_rand_size.yaml)3
-rw-r--r--scripts/stl/yaml/udp_rand_size_9k.yaml (renamed from scripts/stl/udp_rand_size_9k.yaml)3
31 files changed, 68 insertions, 159 deletions
diff --git a/scripts/stl/profiles/imix.py b/scripts/stl/imix.py
index c453222d..3abce1d4 100644
--- a/scripts/stl/profiles/imix.py
+++ b/scripts/stl/imix.py
@@ -1,13 +1,4 @@
-import sys
-import os
-
-# we need the API path
-CURRENT_PATH = os.path.dirname(os.path.realpath(__file__))
-API_PATH = os.path.join(CURRENT_PATH, "../../api/stl")
-sys.path.insert(0, API_PATH)
-
-from trex_stl_api import *
-from scapy.all import *
+from trex_stl_lib.api import *
# IMIX profile - involves 3 streams of UDP packets
# 1 - 60 bytes
diff --git a/scripts/stl/imix_1pkt_tuple_gen.yaml b/scripts/stl/imix_1pkt_tuple_gen.yaml
deleted file mode 100644
index 78156e5c..00000000
--- a/scripts/stl/imix_1pkt_tuple_gen.yaml
+++ /dev/null
@@ -1,63 +0,0 @@
-### Single stream UDP packet, 64B ###
-#####################################
-- name: udp_64B
- stream:
- self_start: True
- packet:
- binary: stl/udp_64B_no_crc.pcap # pcap should not include CRC
- mode:
- type: continuous
- pps: 100
- rx_stats: []
-
- # program that define 1M flows with IP range 16.0.0.1-16.0.0.254
- # we will create a script that do that for you
- # this is the low level instructions
- vm: [
- {
- "type" : "tuple_flow_var", # name of the command
-
- "name" : "tuple_gen", # tuple_gen.ip tuple_gen.port can be used
-
- "ip_min" : 0x10000001, # min ip 16.0.0.1
- "ip_max" : 0x100000fe, # max ip 16.0.0.254
-
- "port_min" : 1025, # min port 1025
- "port_max" : 65500, # max port 65500
-
- "limit_flows" : 1000000, # number of flows
- "flags" : 0, # 1 - for unlimited
- },
-
- {
- "type" : "write_flow_var", # command name
-
- "name" : "tuple_gen.ip", # varible to write
-
- "add_value" : 0, # no need to add value
-
- "is_big_endian" : true, # write as big edian
-
- "pkt_offset" : 26, # write tuple_gen.ip into ipv4.src_ip
- },
-
- {
- "type" : "fix_checksum_ipv4", # fix ipv4 header checksum
-
- "pkt_offset" : 14, # offset of ipv4 header
-
- },
-
- {
- "type" : "write_flow_var", # command name
-
- "name" : "tuple_gen.port", # varible to write
-
- "add_value" : 0, # no need to add value
-
- "is_big_endian" : true, # write as big edian
-
- "pkt_offset" : 34, # write tuple_gen.port into udp.src_port
- }
-
- ]
diff --git a/scripts/stl/profiles/__init__.py b/scripts/stl/profiles/__init__.py
deleted file mode 100644
index e69de29b..00000000
--- a/scripts/stl/profiles/__init__.py
+++ /dev/null
diff --git a/scripts/stl/profiles/syn_attack.py b/scripts/stl/syn_attack.py
index 0df7a740..3e3f70d3 100644
--- a/scripts/stl/profiles/syn_attack.py
+++ b/scripts/stl/syn_attack.py
@@ -1,15 +1,4 @@
-import sys
-import os
-
-# Should be removed
-# TBD fix this
-CURRENT_PATH = os.path.dirname(os.path.realpath(__file__))
-API_PATH = os.path.join(CURRENT_PATH, "../../api/stl")
-sys.path.insert(0, API_PATH)
-
-from scapy.all import *
-from trex_stl_api import *
-
+from trex_stl_lib.api import *
class STLS1(object):
""" attack 48.0.0.1 at port 80
diff --git a/scripts/stl/profiles/udp_1pkt.py b/scripts/stl/udp_1pkt.py
index d195b22c..6b86a037 100644
--- a/scripts/stl/profiles/udp_1pkt.py
+++ b/scripts/stl/udp_1pkt.py
@@ -1,14 +1,4 @@
-import sys
-import os
-
-# Should be removed
-# TBD fix this
-CURRENT_PATH = os.path.dirname(os.path.realpath(__file__))
-API_PATH = os.path.join(CURRENT_PATH, "../../api/stl")
-sys.path.insert(0, API_PATH)
-
-from scapy.all import *
-from trex_stl_api import *
+from trex_stl_lib.api import *
class STLS1(object):
diff --git a/scripts/stl/profiles/udp_1pkt_tuple_gen.py b/scripts/stl/udp_1pkt_tuple_gen.py
index f556cc31..33915cc0 100644
--- a/scripts/stl/profiles/udp_1pkt_tuple_gen.py
+++ b/scripts/stl/udp_1pkt_tuple_gen.py
@@ -1,16 +1,4 @@
-import sys
-import os
-
-#./stl-sim -f stl/profiles/udp_1pkt_tuple_gen.py -l 10 -o a.pcap
-
-# Should be removed
-# TBD fix this
-CURRENT_PATH = os.path.dirname(os.path.realpath(__file__))
-API_PATH = os.path.join(CURRENT_PATH, "../../api/stl")
-sys.path.insert(0, API_PATH)
-
-from scapy.all import *
-from trex_stl_api import *
+from trex_stl_lib.api import *
class STLS1(object):
diff --git a/scripts/stl/profiles/udp_rand_len_9k.py b/scripts/stl/udp_rand_len_9k.py
index 56d84535..ea348fe5 100644
--- a/scripts/stl/profiles/udp_rand_len_9k.py
+++ b/scripts/stl/udp_rand_len_9k.py
@@ -1,14 +1,5 @@
-import sys
-import os
-# Should be removed
-# TBD fix this
-CURRENT_PATH = os.path.dirname(os.path.realpath(__file__))
-API_PATH = os.path.join(CURRENT_PATH, "../../api/stl")
-sys.path.insert(0, API_PATH)
-
-from scapy.all import *
-from trex_stl_api import *
+from trex_stl_lib.api import *
class STLS1(object):
diff --git a/scripts/stl/burst_1000_pkt.yaml b/scripts/stl/yaml/burst_1000_pkt.yaml
index f982fa4f..99a121e2 100644
--- a/scripts/stl/burst_1000_pkt.yaml
+++ b/scripts/stl/yaml/burst_1000_pkt.yaml
@@ -1,39 +1,33 @@
### Single stream UDP packet, 64B ###
#####################################
- name: stream0
+ next: stream1
stream:
self_start: True
- next_stream_id: stream1
packet:
- binary: cap2/udp_64B.pcap
+ pcap: udp_64B_no_crc.pcap
mode:
type: single_burst
pps: 100
total_pkts : 10000
- rx_stats: []
- vm: []
- name: stream1
+ next: stream2
stream:
self_start: False
- next_stream_id: stream2
packet:
- binary: cap2/udp_64B.pcap
+ pcap: udp_64B_no_crc.pcap
mode:
type: single_burst
pps: 100
total_pkts : 10000
- rx_stats: []
- vm: []
- name: stream2
stream:
self_start: False
packet:
- binary: cap2/udp_64B.pcap
+ pcap: udp_64B_no_crc.pcap
mode:
type: single_burst
pps: 100
total_pkts : 10000
- rx_stats: []
- vm: [] \ No newline at end of file
diff --git a/scripts/stl/burst_1pkt.yaml b/scripts/stl/yaml/burst_1pkt.yaml
index 48a62e68..48a62e68 100644
--- a/scripts/stl/burst_1pkt.yaml
+++ b/scripts/stl/yaml/burst_1pkt.yaml
diff --git a/scripts/stl/burst_1pkt_1burst.yaml b/scripts/stl/yaml/burst_1pkt_1burst.yaml
index defa776f..76c411a8 100644
--- a/scripts/stl/burst_1pkt_1burst.yaml
+++ b/scripts/stl/yaml/burst_1pkt_1burst.yaml
@@ -4,11 +4,8 @@
stream:
self_start: True
packet:
- binary: cap2/udp_64B.pcap
+ pcap: udp_64B_no_crc.pcap
mode:
type: single_burst
pps: 100
total_pkts : 100
- rx_stats: []
- vm: []
-
diff --git a/scripts/stl/burst_1pkt_vm.yaml b/scripts/stl/yaml/burst_1pkt_vm.yaml
index e202b42d..246b8813 100644
--- a/scripts/stl/burst_1pkt_vm.yaml
+++ b/scripts/stl/yaml/burst_1pkt_vm.yaml
@@ -4,12 +4,11 @@
stream:
self_start: True
packet:
- binary: stl/udp_64B_no_crc.pcap # pcap should not include CRC
+ pcap: udp_64B_no_crc.pcap # pcap should not include CRC
mode:
type: single_burst
total_pkts: 100
pps: 100
- rx_stats: []
vm:
instructions: [
diff --git a/scripts/stl/imix_1pkt.yaml b/scripts/stl/yaml/imix_1pkt.yaml
index f2476024..46552c82 100755..100644
--- a/scripts/stl/imix_1pkt.yaml
+++ b/scripts/stl/yaml/imix_1pkt.yaml
@@ -4,10 +4,8 @@
stream:
self_start: True
packet:
- binary: stl/udp_64B_no_crc.pcap # pcap should not include CRC
+ pcap: udp_64B_no_crc.pcap # pcap should not include CRC
mode:
type: continuous
pps: 100
- rx_stats: []
- vm: []
diff --git a/scripts/stl/imix_1pkt_2.yaml b/scripts/stl/yaml/imix_1pkt_2.yaml
index bffc72eb..bffc72eb 100644
--- a/scripts/stl/imix_1pkt_2.yaml
+++ b/scripts/stl/yaml/imix_1pkt_2.yaml
diff --git a/scripts/stl/yaml/imix_1pkt_tuple_gen.yaml b/scripts/stl/yaml/imix_1pkt_tuple_gen.yaml
new file mode 100644
index 00000000..5ca232c4
--- /dev/null
+++ b/scripts/stl/yaml/imix_1pkt_tuple_gen.yaml
@@ -0,0 +1,42 @@
+### Single stream UDP packet, 64B ###
+#####################################
+- name: udp_64B
+ stream:
+ self_start: True
+ packet:
+ pcap: udp_64B_no_crc.pcap # pcap should not include CRC
+ mode:
+ type: continuous
+ pps: 100
+
+ # program that define 1M flows with IP range 16.0.0.1-16.0.0.254
+ # we will create a script that do that for you
+ # this is the low level instructions
+ vm:
+ instructions:
+ - type : "tuple_flow_var" # name of the command
+ name : "tuple_gen" # tuple_gen.ip tuple_gen.port can be used
+
+ ip_min : 0x10000001 # min ip 16.0.0.1
+ ip_max : 0x100000fe # max ip 16.0.0.254
+
+ port_min : 1025 # min port 1025
+ port_max : 65500 # max port 65500
+
+ limit_flows : 1000000 # number of flows
+ flags : 0 # 1 - for unlimited
+
+ - type : "write_flow_var" # command name
+ name : "tuple_gen.ip" # varible to write
+ add_value : 0 # no need to add value
+ is_big_endian : true # write as big edian
+ pkt_offset : 26 # write tuple_gen.ip into ipv4.src_ip
+
+ - type : "fix_checksum_ipv4" # fix ipv4 header checksum
+ pkt_offset : 14 # offset of ipv4 header
+
+ - type : "write_flow_var" # command name
+ name : "tuple_gen.port" # varible to write
+ add_value : 0 # no need to add value
+ is_big_endian : true # write as big edian
+ pkt_offset : 34 # write tuple_gen.port into udp.src_port
diff --git a/scripts/stl/imix_1pkt_vm.yaml b/scripts/stl/yaml/imix_1pkt_vm.yaml
index 21075fa2..21075fa2 100644
--- a/scripts/stl/imix_1pkt_vm.yaml
+++ b/scripts/stl/yaml/imix_1pkt_vm.yaml
diff --git a/scripts/stl/imix_1pkt_vm2.yaml b/scripts/stl/yaml/imix_1pkt_vm2.yaml
index e0a6b771..e0a6b771 100644
--- a/scripts/stl/imix_1pkt_vm2.yaml
+++ b/scripts/stl/yaml/imix_1pkt_vm2.yaml
diff --git a/scripts/stl/imix_2pkt.yaml b/scripts/stl/yaml/imix_2pkt.yaml
index 45f2303d..45f2303d 100755..100644
--- a/scripts/stl/imix_2pkt.yaml
+++ b/scripts/stl/yaml/imix_2pkt.yaml
diff --git a/scripts/stl/imix_3pkt.yaml b/scripts/stl/yaml/imix_3pkt.yaml
index bc28549d..d8c3ea44 100755..100644
--- a/scripts/stl/imix_3pkt.yaml
+++ b/scripts/stl/yaml/imix_3pkt.yaml
@@ -4,29 +4,25 @@
stream:
self_start: True
packet:
- binary: stl/udp_64B_no_crc.pcap # pcap should not include CRC
+ pcap: udp_64B_no_crc.pcap # pcap should not include CRC
mode:
type: continuous
pps: 28
- rx_stats: []
- vm: []
- name: udp_594B
stream:
+ isg: 50.0
self_start: True
packet:
- binary: stl/udp_594B_no_crc.pcap # pcap should not include CRC
+ pcap: udp_594B_no_crc.pcap # pcap should not include CRC
mode:
type: continuous
pps: 20
- rx_stats: []
- vm: []
- name: udp_1518B
stream:
+ isg: 100.0
self_start: True
packet:
- binary: stl/udp_1518B_no_crc.pcap # pcap should not include CRC
+ pcap: udp_1518B_no_crc.pcap # pcap should not include CRC
mode:
type: continuous
pps: 4
- rx_stats: []
- vm: [] \ No newline at end of file
diff --git a/scripts/stl/imix_3pkt_vm.yaml b/scripts/stl/yaml/imix_3pkt_vm.yaml
index d812634c..6ba2c40c 100644
--- a/scripts/stl/imix_3pkt_vm.yaml
+++ b/scripts/stl/yaml/imix_3pkt_vm.yaml
@@ -4,12 +4,11 @@
stream:
self_start: True
packet:
- binary: stl/udp_64B_no_crc.pcap # pcap should not include CRC
+ pcap: udp_64B_no_crc.pcap # pcap should not include CRC
mode:
type: single_burst
total_pkts: 100
pps: 100
- rx_stats: []
vm:
instructions: [
@@ -34,13 +33,13 @@
- name: udp_594B
stream:
+ isg: 50.0
self_start: True
packet:
- binary: stl/udp_594B_no_crc.pcap # pcap should not include CRC
+ pcap: udp_594B_no_crc.pcap # pcap should not include CRC
mode:
type: continuous
pps: 20
- rx_stats: []
vm:
instructions: [
{
@@ -64,14 +63,14 @@
- name: udp_1518B
stream:
+ isg: 100.0
self_start: True
packet:
- binary: stl/udp_1518B_no_crc.pcap # pcap should not include CRC
+ pcap: udp_1518B_no_crc.pcap # pcap should not include CRC
mode:
type: single_burst
total_pkts: 100
pps: 4
- rx_stats: []
vm:
instructions: [
{
@@ -91,4 +90,4 @@
"type" : "write_flow_var"
}
]
- split_by_var: "l3_src" \ No newline at end of file
+ split_by_var: "l3_src"
diff --git a/scripts/stl/imix_scale_1000.yaml b/scripts/stl/yaml/imix_scale_1000.yaml
index bba3df5d..bba3df5d 100644
--- a/scripts/stl/imix_scale_1000.yaml
+++ b/scripts/stl/yaml/imix_scale_1000.yaml
diff --git a/scripts/stl/imix_scale_300.yaml b/scripts/stl/yaml/imix_scale_300.yaml
index 8b04979c..8b04979c 100644
--- a/scripts/stl/imix_scale_300.yaml
+++ b/scripts/stl/yaml/imix_scale_300.yaml
diff --git a/scripts/stl/ipv4_udp_9000.pcap b/scripts/stl/yaml/ipv4_udp_9000.pcap
index 86385997..86385997 100644
--- a/scripts/stl/ipv4_udp_9000.pcap
+++ b/scripts/stl/yaml/ipv4_udp_9000.pcap
Binary files differ
diff --git a/scripts/stl/ipv4_udp_9k.pcap b/scripts/stl/yaml/ipv4_udp_9k.pcap
index c5466f78..c5466f78 100644
--- a/scripts/stl/ipv4_udp_9k.pcap
+++ b/scripts/stl/yaml/ipv4_udp_9k.pcap
Binary files differ
diff --git a/scripts/stl/ipv4_udp_9k_burst_10.pcap b/scripts/stl/yaml/ipv4_udp_9k_burst_10.pcap
index bb71ca79..bb71ca79 100755..100644
--- a/scripts/stl/ipv4_udp_9k_burst_10.pcap
+++ b/scripts/stl/yaml/ipv4_udp_9k_burst_10.pcap
Binary files differ
diff --git a/scripts/stl/syn_attack_sample.yaml b/scripts/stl/yaml/syn_attack_sample.yaml
index c5734e43..c5734e43 100644
--- a/scripts/stl/syn_attack_sample.yaml
+++ b/scripts/stl/yaml/syn_attack_sample.yaml
diff --git a/scripts/stl/syn_packet.pcap b/scripts/stl/yaml/syn_packet.pcap
index 93325547..93325547 100644
--- a/scripts/stl/syn_packet.pcap
+++ b/scripts/stl/yaml/syn_packet.pcap
Binary files differ
diff --git a/scripts/stl/udp_1518B_no_crc.pcap b/scripts/stl/yaml/udp_1518B_no_crc.pcap
index 145a44ad..145a44ad 100644
--- a/scripts/stl/udp_1518B_no_crc.pcap
+++ b/scripts/stl/yaml/udp_1518B_no_crc.pcap
Binary files differ
diff --git a/scripts/stl/udp_594B_no_crc.pcap b/scripts/stl/yaml/udp_594B_no_crc.pcap
index 5cde2f7c..5cde2f7c 100644
--- a/scripts/stl/udp_594B_no_crc.pcap
+++ b/scripts/stl/yaml/udp_594B_no_crc.pcap
Binary files differ
diff --git a/scripts/stl/udp_64B_no_crc.pcap b/scripts/stl/yaml/udp_64B_no_crc.pcap
index ab3f985b..ab3f985b 100644
--- a/scripts/stl/udp_64B_no_crc.pcap
+++ b/scripts/stl/yaml/udp_64B_no_crc.pcap
Binary files differ
diff --git a/scripts/stl/udp_rand_size.yaml b/scripts/stl/yaml/udp_rand_size.yaml
index 2bbad4a0..ab1d21b9 100644
--- a/scripts/stl/udp_rand_size.yaml
+++ b/scripts/stl/yaml/udp_rand_size.yaml
@@ -4,11 +4,10 @@
stream:
self_start: True
packet:
- binary: stl/udp_1518B_no_crc.pcap
+ pcap: udp_1518B_no_crc.pcap
mode:
type: continuous
pps: 100
- rx_stats: []
# random packet size 60-1500 update ip.len/checksum/udp.len
vm:
diff --git a/scripts/stl/udp_rand_size_9k.yaml b/scripts/stl/yaml/udp_rand_size_9k.yaml
index ecdd7ae0..0d7d1ec7 100644
--- a/scripts/stl/udp_rand_size_9k.yaml
+++ b/scripts/stl/yaml/udp_rand_size_9k.yaml
@@ -4,11 +4,10 @@
stream:
self_start: True
packet:
- binary: stl/ipv4_udp_9k.pcap # should not include CRC 9K ip+14 = 9230 +FCS(by NIC)=9234
+ pcap: ipv4_udp_9k.pcap # should not include CRC 9K ip+14 = 9230 +FCS(by NIC)=9234
mode:
type: continuous
pps: 100
- rx_stats: []
# random packet size 60-max packet size update ip.len/checksum/udp.len
vm: