summaryrefslogtreecommitdiffstats
path: root/scripts/stl/hlt/hlt_david3.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/stl/hlt/hlt_david3.py')
-rwxr-xr-xscripts/stl/hlt/hlt_david3.py47
1 files changed, 47 insertions, 0 deletions
diff --git a/scripts/stl/hlt/hlt_david3.py b/scripts/stl/hlt/hlt_david3.py
new file mode 100755
index 00000000..01bf2431
--- /dev/null
+++ b/scripts/stl/hlt/hlt_david3.py
@@ -0,0 +1,47 @@
+from trex_stl_lib.trex_stl_hltapi import STLHltStream
+
+
+class STLS1(object):
+
+ def create_streams (self, direction = 0):
+ return STLHltStream(
+ l3_protocol = 'ipv4',
+ ip_src_addr = '100.1.1.1',
+ ip_src_mode = 'fixed',
+ ip_src_count = 1,
+ ip_src_step = '0.0.0.1',
+ ip_dst_addr = '200.1.1.1',
+ ip_dst_mode = 'fixed',
+ ip_dst_step = '0.1.0.0',
+ ip_dst_count = 1,
+ l3_length = 474,
+ ip_dscp = 10,
+ #rate_bps = 256000000, # not supported yet
+ mac_src_mode = 'fixed',
+ mac_src_step = 1,
+ mac_src_count = 1,
+ #mac_dst_mode = discovery # not supported yet,
+ mac_dst_step = 1,
+ mac_dst_count = 1,
+ #mac_src = [ip_to_mac 200.1.1.1] # not supported yet,
+ #mac_src2 = [ip_to_mac = 100.1.1.1] # not supported yet,
+ #mac_dst = [ip_to_mac 100.1.1.1] # not supported yet,
+ #mac_dst2 = [ip_to_mac = 200.1.1.1] # not supported yet,
+ vlan_id_mode = 'fixed fixed',
+ vlan_id = '200 100',
+ vlan_id_count = '1 1',
+ vlan_id_step = '1 1',
+ vlan_user_priority = '3 0',
+ vlan_cfi = '1 1',
+ direction = direction,
+ )
+
+ def get_streams (self, direction = 0):
+ return self.create_streams(direction)
+
+# dynamic load used for trex console or simulator
+def register():
+ return STLS1()
+
+
+