summaryrefslogtreecommitdiffstats
path: root/scripts/stl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/stl')
-rwxr-xr-xscripts/stl/hlt/hlt_4vlans.py6
-rwxr-xr-xscripts/stl/hlt/hlt_david1.py16
-rwxr-xr-xscripts/stl/hlt/hlt_david2.py5
-rwxr-xr-xscripts/stl/hlt/hlt_david3.py5
-rwxr-xr-xscripts/stl/hlt/hlt_david4.py11
-rwxr-xr-xscripts/stl/hlt/hlt_framesize_vm.py5
-rwxr-xr-xscripts/stl/hlt/hlt_imix_4rates.py8
-rwxr-xr-xscripts/stl/hlt/hlt_imix_default.py7
-rwxr-xr-xscripts/stl/hlt/hlt_ip_ranges.py23
-rwxr-xr-xscripts/stl/hlt/hlt_ipv6_default.py5
-rwxr-xr-xscripts/stl/hlt/hlt_ipv6_ranges.py5
-rwxr-xr-xscripts/stl/hlt/hlt_l3_length_vm.py6
-rwxr-xr-xscripts/stl/hlt/hlt_mac_ranges.py5
-rwxr-xr-xscripts/stl/hlt/hlt_tcp_ranges.py28
-rwxr-xr-xscripts/stl/hlt/hlt_udp_inc_dec_len_9k.py5
-rwxr-xr-xscripts/stl/hlt/hlt_udp_ports.py30
-rwxr-xr-xscripts/stl/hlt/hlt_udp_random_ports.py5
-rwxr-xr-xscripts/stl/hlt/hlt_vlan_default.py6
-rwxr-xr-xscripts/stl/hlt/hlt_vlans_vm.py6
-rwxr-xr-xscripts/stl/hlt/hlt_wentong1.py5
-rwxr-xr-xscripts/stl/hlt/hlt_wentong2.py5
-rw-r--r--scripts/stl/pcap_with_vm.py10
-rw-r--r--scripts/stl/udp_1pkt_tuple_gen_split.py6
23 files changed, 77 insertions, 136 deletions
diff --git a/scripts/stl/hlt/hlt_4vlans.py b/scripts/stl/hlt/hlt_4vlans.py
index bdbd3d31..f93ffc23 100755
--- a/scripts/stl/hlt/hlt_4vlans.py
+++ b/scripts/stl/hlt/hlt_4vlans.py
@@ -7,8 +7,7 @@ class STLS1(object):
Missing values will be filled with defaults
'''
- def create_streams (self, direction = 0):
-
+ def get_streams (self, direction = 0):
return STLHltStream(frame_size = 100,
vlan_id = [1, 2, 3, 4], # can be either array or string separated by spaces
vlan_protocol_tag_id = '8100 0x8100', # hex with optional prefix '0x'
@@ -17,9 +16,6 @@ class STLS1(object):
l4_protocol = 'tcp',
direction = direction)
- def get_streams (self, direction = 0):
- return self.create_streams(direction = direction)
-
# dynamic load - used for trex console or simulator
def register():
return STLS1()
diff --git a/scripts/stl/hlt/hlt_david1.py b/scripts/stl/hlt/hlt_david1.py
index 73d258e3..312c8971 100755
--- a/scripts/stl/hlt/hlt_david1.py
+++ b/scripts/stl/hlt/hlt_david1.py
@@ -7,7 +7,8 @@ class STLS1(object):
Creates 3 streams (imix) Eth/802.1Q/IP/TCP without VM
'''
- def create_streams (self, direction = 0):
+ def get_streams (self, direction = 0):
+ #'''
return STLHltStream(
#enable_auto_detect_instrumentation = '1', # not supported yet
ip_dst_addr = '192.168.1.3',
@@ -35,9 +36,16 @@ class STLS1(object):
vlan_id = '1',
direction = direction,
)
-
- def get_streams (self, direction = 0):
- return self.create_streams(direction)
+ '''
+ return STLHltStream(
+ frame_size = 1000,
+ length_mode = 'fixed',
+ rate_percent = 0.001,
+ transmit_mode = 'continuous',
+ l3_protocol = 'ipv4',
+ l4_protocol = 'udp',
+ )
+ '''
# dynamic load - used for trex console or simulator
def register():
diff --git a/scripts/stl/hlt/hlt_david2.py b/scripts/stl/hlt/hlt_david2.py
index d3e669a1..af40c2ae 100755
--- a/scripts/stl/hlt/hlt_david2.py
+++ b/scripts/stl/hlt/hlt_david2.py
@@ -7,7 +7,7 @@ class STLS1(object):
Creates 3 streams (imix) Eth/802.1Q/IP/TCP without VM
'''
- def create_streams (self, direction = 0):
+ def get_streams (self, direction = 0):
return STLHltStream(
#enable_auto_detect_instrumentation = '1', # not supported yet
ip_dst_addr = '192.168.3.3',
@@ -35,9 +35,6 @@ class STLS1(object):
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()
diff --git a/scripts/stl/hlt/hlt_david3.py b/scripts/stl/hlt/hlt_david3.py
index 21445700..7b5442a3 100755
--- a/scripts/stl/hlt/hlt_david3.py
+++ b/scripts/stl/hlt/hlt_david3.py
@@ -7,7 +7,7 @@ class STLS1(object):
Creates Eth/802.1Q/802.1Q/IP/TCP stream
'''
- def create_streams (self, direction = 0):
+ def get_streams (self, direction = 0):
return STLHltStream(
l3_protocol = 'ipv4',
ip_src_addr = '100.1.1.1',
@@ -40,9 +40,6 @@ class STLS1(object):
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()
diff --git a/scripts/stl/hlt/hlt_david4.py b/scripts/stl/hlt/hlt_david4.py
index 10b5e866..2f88b329 100755
--- a/scripts/stl/hlt/hlt_david4.py
+++ b/scripts/stl/hlt/hlt_david4.py
@@ -10,14 +10,13 @@ class STLS1(object):
MAC dst will have <mac_dst_count> number of incremental values
'''
- def create_streams (self, direction = 0):
+ def get_streams (self, direction = 0):
mac_dst_count = 10
mac_src_count = 10
pkts_per_burst = 10
intf_traffic_dst_ip = '48.0.0.1'
intf_traffic_src_ip = '16.0.0.1'
-
- return STLHltStream(
+ stream = STLHltStream(
#enable_auto_detect_instrumentation = 1, # not supported yet
ip_dst_addr = intf_traffic_dst_ip,
ip_dst_count = mac_src_count,
@@ -44,9 +43,9 @@ class STLS1(object):
#vlan_protocol_tag_id = '{8100 8100}',
direction = direction,
)
-
- def get_streams (self, direction = 0):
- return self.create_streams(direction)
+ #print stream.dump_to_profile()
+ #stream.dump_to_profile('stl/hlt/hlt_david4_gen.py')
+ return stream
# dynamic load used for trex console or simulator
def register():
diff --git a/scripts/stl/hlt/hlt_framesize_vm.py b/scripts/stl/hlt/hlt_framesize_vm.py
index ed1ac54e..5653e435 100755
--- a/scripts/stl/hlt/hlt_framesize_vm.py
+++ b/scripts/stl/hlt/hlt_framesize_vm.py
@@ -6,7 +6,7 @@ class STLS1(object):
Two Eth/IP/UDP streams with VM to get different size of packet by frame_size
'''
- def create_streams (self, direction = 0):
+ def get_streams (self, direction = 0):
return [STLHltStream(length_mode = 'increment',
frame_size_min = 100,
frame_size_max = 3000,
@@ -25,9 +25,6 @@ class STLS1(object):
)
]
- def get_streams (self, direction = 0):
- return self.create_streams(direction)
-
# dynamic load - used for trex console or simulator
def register():
return STLS1()
diff --git a/scripts/stl/hlt/hlt_imix_4rates.py b/scripts/stl/hlt/hlt_imix_4rates.py
index 0b245277..5b55d641 100755
--- a/scripts/stl/hlt/hlt_imix_4rates.py
+++ b/scripts/stl/hlt/hlt_imix_4rates.py
@@ -7,19 +7,17 @@ class STLS1(object):
Each stream will get rate_pps * his ratio / sum of ratios
'''
- def create_streams (self, direction = 0):
+ def get_streams (self, direction = 0):
return STLHltStream(length_mode = 'imix', rate_pps = 2,
l3_imix1_size = 60, l3_imix1_ratio = 4,
l3_imix2_size = 400, l3_imix2_ratio = 3,
l3_imix3_size = 2000, l3_imix3_ratio = 2,
l3_imix4_size = 8000, l3_imix4_ratio = 1,
l3_protocol = 'ipv4',
- l4_protocol = 'udp', direction = direction,
+ l4_protocol = 'udp',
+ 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()
diff --git a/scripts/stl/hlt/hlt_imix_default.py b/scripts/stl/hlt/hlt_imix_default.py
index 85c6b1a4..3871924b 100755
--- a/scripts/stl/hlt/hlt_imix_default.py
+++ b/scripts/stl/hlt/hlt_imix_default.py
@@ -3,12 +3,9 @@ from trex_stl_lib.trex_stl_hltapi import STLHltStream
class STLS1(object):
- def create_streams (self):
- return STLHltStream(length_mode = 'imix', rate_pps = 2,
- l3_protocol = 'ipv4', l4_protocol = 'tcp')
-
def get_streams (self, direction = 0):
- return self.create_streams()
+ return STLHltStream(length_mode = 'imix', rate_pps = 2,
+ l3_protocol = 'ipv4', l4_protocol = 'udp')
# dynamic load - used for trex console or simulator
def register():
diff --git a/scripts/stl/hlt/hlt_ip_ranges.py b/scripts/stl/hlt/hlt_ip_ranges.py
index 4346065c..3b6a0407 100755
--- a/scripts/stl/hlt/hlt_ip_ranges.py
+++ b/scripts/stl/hlt/hlt_ip_ranges.py
@@ -6,20 +6,17 @@ class STLS1(object):
Eth/IP/TCP stream with VM to get different ip addresses
'''
- def create_streams (self, direction = 0):
- return [STLHltStream(split_by_cores = 'duplicate',
- l3_protocol = 'ipv4',
- ip_src_addr = '192.168.1.1',
- ip_src_mode = 'increment',
- ip_src_count = 5,
- ip_dst_addr = '5.5.5.5',
- ip_dst_mode = 'random',
- consistent_random = True,
- rate_pps = 1),
- ]
-
def get_streams (self, direction = 0):
- return self.create_streams(direction)
+ return STLHltStream(split_by_cores = 'duplicate',
+ l3_protocol = 'ipv4',
+ ip_src_addr = '192.168.1.1',
+ ip_src_mode = 'increment',
+ ip_src_count = 5,
+ ip_dst_addr = '5.5.5.5',
+ ip_dst_mode = 'random',
+ consistent_random = True,
+ direction = direction,
+ rate_pps = 1)
# dynamic load - used for trex console or simulator
def register():
diff --git a/scripts/stl/hlt/hlt_ipv6_default.py b/scripts/stl/hlt/hlt_ipv6_default.py
index 4cc73d6a..f90e7157 100755
--- a/scripts/stl/hlt/hlt_ipv6_default.py
+++ b/scripts/stl/hlt/hlt_ipv6_default.py
@@ -6,7 +6,7 @@ class STLS1(object):
Eth/IPv6/UDP stream without VM, default values
'''
- def create_streams (self, direction = 0):
+ def get_streams (self, direction = 0):
return [STLHltStream(l3_protocol = 'ipv6',
l3_length = 150,
l4_protocol = 'udp',
@@ -14,9 +14,6 @@ class STLS1(object):
),
]
- def get_streams (self, direction = 0):
- return self.create_streams(direction)
-
# dynamic load - used for trex console or simulator
def register():
return STLS1()
diff --git a/scripts/stl/hlt/hlt_ipv6_ranges.py b/scripts/stl/hlt/hlt_ipv6_ranges.py
index 6d9c1573..f9a83b55 100755
--- a/scripts/stl/hlt/hlt_ipv6_ranges.py
+++ b/scripts/stl/hlt/hlt_ipv6_ranges.py
@@ -6,7 +6,7 @@ class STLS1(object):
Eth/IPv6/UDP stream with VM, to change the ipv6 addr (only 32 lsb)
'''
- def create_streams (self, direction = 0):
+ def get_streams (self, direction = 0):
return STLHltStream(l3_protocol = 'ipv6', l3_length = 150, l4_protocol = 'udp',
ipv6_src_addr = '1111:2222:3333:4444:5555:6666:7777:8888',
ipv6_dst_addr = '1111:1111:1111:1111:1111:1111:1111:1111',
@@ -14,9 +14,6 @@ class STLS1(object):
ipv6_dst_mode = 'decrement', ipv6_dst_step = '1111:1111:1111:1111:1111:0000:0000:0011', ipv6_dst_count = 150,
)
- def get_streams (self, direction = 0):
- return self.create_streams(direction)
-
# dynamic load - used for trex console or simulator
def register():
return STLS1()
diff --git a/scripts/stl/hlt/hlt_l3_length_vm.py b/scripts/stl/hlt/hlt_l3_length_vm.py
index e9b6654c..7b04fbec 100755
--- a/scripts/stl/hlt/hlt_l3_length_vm.py
+++ b/scripts/stl/hlt/hlt_l3_length_vm.py
@@ -6,7 +6,7 @@ class STLS1(object):
Two Eth/IP/UDP streams with VM to get different size of packet by l3_length
'''
- def create_streams (self, direction = 0):
+ def get_streams (self, direction = 0):
return [STLHltStream(length_mode = 'increment',
l3_length_min = 100,
l3_length_max = 3000,
@@ -24,9 +24,7 @@ class STLS1(object):
direction = direction,
)
]
-
- def get_streams (self, direction = 0):
- return self.create_streams(direction)
+
# dynamic load - used for trex console or simulator
def register():
diff --git a/scripts/stl/hlt/hlt_mac_ranges.py b/scripts/stl/hlt/hlt_mac_ranges.py
index e265ba5f..e6c4f0a4 100755
--- a/scripts/stl/hlt/hlt_mac_ranges.py
+++ b/scripts/stl/hlt/hlt_mac_ranges.py
@@ -6,7 +6,7 @@ class STLS1(object):
Eth/IP/UDP stream with VM, to change the MAC addr (only 32 lsb)
'''
- def create_streams (self, direction = 0):
+ def get_streams (self, direction = 0):
return STLHltStream(l3_protocol = 'ipv4', l4_protocol = 'udp',
mac_src = '10:00:00:00:00:01', mac_dst = '10:00:00:00:01:00',
mac_src2 = '11:11:00:00:00:01', mac_dst2 = '11:11:00:00:01:00',
@@ -18,9 +18,6 @@ class STLS1(object):
save_to_yaml = '/tmp/foo.yaml',
)
- def get_streams (self, direction = 0):
- return self.create_streams(direction)
-
# dynamic load - used for trex console or simulator
def register():
return STLS1()
diff --git a/scripts/stl/hlt/hlt_tcp_ranges.py b/scripts/stl/hlt/hlt_tcp_ranges.py
index 911fdecd..c29b707d 100755
--- a/scripts/stl/hlt/hlt_tcp_ranges.py
+++ b/scripts/stl/hlt/hlt_tcp_ranges.py
@@ -6,23 +6,19 @@ class STLS1(object):
Eth/IP/TCP stream with VM to get 10 different TCP ports
'''
- def create_streams (self, direction = 0):
- return [STLHltStream(l3_protocol = 'ipv4',
- l4_protocol = 'tcp',
- tcp_src_port_mode = 'decrement',
- tcp_src_port_count = 10,
- tcp_src_port = 1234,
- tcp_dst_port_mode = 'increment',
- tcp_dst_port_count = 10,
- tcp_dst_port = 1234,
- name = 'test_tcp_ranges',
- direction = direction,
- rate_pps = 1,
- ),
- ]
-
def get_streams (self, direction = 0):
- return self.create_streams(direction)
+ return STLHltStream(l3_protocol = 'ipv4',
+ l4_protocol = 'tcp',
+ tcp_src_port_mode = 'decrement',
+ tcp_src_port_count = 10,
+ tcp_src_port = 1234,
+ tcp_dst_port_mode = 'increment',
+ tcp_dst_port_count = 10,
+ tcp_dst_port = 1234,
+ name = 'test_tcp_ranges',
+ direction = direction,
+ rate_pps = 1,
+ )
# dynamic load - used for trex console or simulator
def register():
diff --git a/scripts/stl/hlt/hlt_udp_inc_dec_len_9k.py b/scripts/stl/hlt/hlt_udp_inc_dec_len_9k.py
index 5fb86875..10c778e1 100755
--- a/scripts/stl/hlt/hlt_udp_inc_dec_len_9k.py
+++ b/scripts/stl/hlt/hlt_udp_inc_dec_len_9k.py
@@ -8,7 +8,7 @@ class STLS1(object):
Seconds stream will decrease the packet size in reverse way
'''
- def create_streams (self):
+ def get_streams (self, direction = 0):
max_size = 9*1024
return [STLHltStream(length_mode = 'increment',
frame_size_max = max_size,
@@ -32,9 +32,6 @@ class STLS1(object):
)
]
- def get_streams (self, direction = 0):
- return self.create_streams()
-
# dynamic load - used for trex console or simulator
def register():
return STLS1()
diff --git a/scripts/stl/hlt/hlt_udp_ports.py b/scripts/stl/hlt/hlt_udp_ports.py
index cdb1af1c..9e551b94 100755
--- a/scripts/stl/hlt/hlt_udp_ports.py
+++ b/scripts/stl/hlt/hlt_udp_ports.py
@@ -7,24 +7,20 @@ class STLS1(object):
The ports overlap the max and min at very first packets
'''
- def create_streams (self, direction = 0):
- return [STLHltStream(l3_protocol = 'ipv4',
- l4_protocol = 'udp',
- udp_src_port_mode = 'decrement',
- udp_src_port_count = 45,
- udp_src_port_step = 20,
- udp_src_port = 123,
- udp_dst_port_mode = 'increment',
- udp_dst_port_count = 100,
- udp_dst_port_step = 300,
- udp_dst_port = 65000,
- direction = direction,
- rate_pps = 1000,
- ),
- ]
-
def get_streams (self, direction = 0):
- return self.create_streams(direction)
+ return STLHltStream(l3_protocol = 'ipv4',
+ l4_protocol = 'udp',
+ udp_src_port_mode = 'decrement',
+ udp_src_port_count = 45,
+ udp_src_port_step = 20,
+ udp_src_port = 123,
+ udp_dst_port_mode = 'increment',
+ udp_dst_port_count = 100,
+ udp_dst_port_step = 300,
+ udp_dst_port = 65000,
+ direction = direction,
+ rate_pps = 1000,
+ )
# dynamic load - used for trex console or simulator
def register():
diff --git a/scripts/stl/hlt/hlt_udp_random_ports.py b/scripts/stl/hlt/hlt_udp_random_ports.py
index 6397ba17..1ba0227d 100755
--- a/scripts/stl/hlt/hlt_udp_random_ports.py
+++ b/scripts/stl/hlt/hlt_udp_random_ports.py
@@ -7,7 +7,7 @@ class STLS1(object):
Using "consistent_random = True" to have same random ports each test
'''
- def create_streams (self, direction = 0):
+ def get_streams (self, direction = 0):
return [STLHltStream(l3_protocol = 'ipv4',
l4_protocol = 'udp',
udp_src_port_mode = 'random',
@@ -18,9 +18,6 @@ class STLS1(object):
),
]
- def get_streams (self, direction = 0):
- return self.create_streams(direction)
-
# dynamic load - used for trex console or simulator
def register():
return STLS1()
diff --git a/scripts/stl/hlt/hlt_vlan_default.py b/scripts/stl/hlt/hlt_vlan_default.py
index 8e50eef3..ea5c66d1 100755
--- a/scripts/stl/hlt/hlt_vlan_default.py
+++ b/scripts/stl/hlt/hlt_vlan_default.py
@@ -6,15 +6,11 @@ class STLS1(object):
Default Eth/802.1Q/IP/TCP stream without VM
'''
- def create_streams (self, direction = 0):
-
+ def get_streams (self, direction = 0):
return STLHltStream(l2_encap = 'ethernet_ii_vlan',
l3_protocol = 'ipv4', l4_protocol = 'tcp',
direction = direction)
- def get_streams (self, direction = 0):
- return self.create_streams(direction = direction)
-
# dynamic load - used for trex console or simulator
def register():
return STLS1()
diff --git a/scripts/stl/hlt/hlt_vlans_vm.py b/scripts/stl/hlt/hlt_vlans_vm.py
index aa4881c6..a2ad1023 100755
--- a/scripts/stl/hlt/hlt_vlans_vm.py
+++ b/scripts/stl/hlt/hlt_vlans_vm.py
@@ -7,8 +7,7 @@ class STLS1(object):
Missing values will be filled with defaults
'''
- def create_streams (self, direction = 0):
-
+ def get_streams (self, direction = 0):
return STLHltStream(frame_size = 100,
vlan_id = '1 2 1000 4 5', # 5 vlans
vlan_id_mode = 'increment fixed decrement random', # 5th vlan will be default fixed
@@ -19,9 +18,6 @@ class STLS1(object):
direction = direction,
)
- def get_streams (self, direction = 0):
- return self.create_streams(direction = direction)
-
# dynamic load - used for trex console or simulator
def register():
return STLS1()
diff --git a/scripts/stl/hlt/hlt_wentong1.py b/scripts/stl/hlt/hlt_wentong1.py
index 92af64e0..6016c73a 100755
--- a/scripts/stl/hlt/hlt_wentong1.py
+++ b/scripts/stl/hlt/hlt_wentong1.py
@@ -7,7 +7,7 @@ class STLS1(object):
Creates Eth/802.1Q/IP/UDP stream with VM on src IP
'''
- def create_streams (self, direction = 0):
+ def get_streams (self, direction = 0):
ipv4_address_step = '0.0.1.0'
num_of_sessions_per_spoke = 1000
ip_tgen_hub = '190.1.0.1'
@@ -35,9 +35,6 @@ class STLS1(object):
mac_dst = tgen_dst_mac,
)
- def get_streams (self, direction = 0):
- return self.create_streams(direction)
-
# dynamic load used for trex console or simulator
def register():
return STLS1()
diff --git a/scripts/stl/hlt/hlt_wentong2.py b/scripts/stl/hlt/hlt_wentong2.py
index 9bcfcb54..82503343 100755
--- a/scripts/stl/hlt/hlt_wentong2.py
+++ b/scripts/stl/hlt/hlt_wentong2.py
@@ -7,7 +7,7 @@ class STLS1(object):
Creates Eth/802.1Q/IPv6/UDP stream without VM (if num_of_sessions_per_spoke is 1)
'''
- def create_streams (self, direction = 0):
+ def get_streams (self, direction = 0):
ipv6_tgen_rtr = '2005:0:1::1'
num_of_sessions_per_spoke = 1 # in given example is not passed forward, taking default
ipv6_address_step = '0:0:0:1:0:0:0:0'
@@ -36,9 +36,6 @@ class STLS1(object):
mac_dst = tgen_dst_mac_rtr,
)
- def get_streams (self, direction = 0):
- return self.create_streams(direction)
-
# dynamic load used for trex console or simulator
def register():
return STLS1()
diff --git a/scripts/stl/pcap_with_vm.py b/scripts/stl/pcap_with_vm.py
index c3f34cfb..a073f959 100644
--- a/scripts/stl/pcap_with_vm.py
+++ b/scripts/stl/pcap_with_vm.py
@@ -11,25 +11,19 @@ class STLPcap(object):
if not ip_src_range and not ip_dst_range:
return None
- # until the feature of offsets will be fixed for PCAP use hard coded offsets
-
vm = []
if ip_src_range:
vm += [STLVmFlowVar(name="src", min_value = ip_src_range['start'], max_value = ip_src_range['end'], size = 4, op = "inc"),
- #STLVmWrFlowVar(fv_name="src",pkt_offset= "IP.src")
- STLVmWrFlowVar(fv_name="src",pkt_offset = 26)
+ STLVmWrFlowVar(fv_name="src",pkt_offset= "IP.src")
]
if ip_dst_range:
vm += [STLVmFlowVar(name="dst", min_value = ip_dst_range['start'], max_value = ip_dst_range['end'], size = 4, op = "inc"),
-
- #STLVmWrFlowVar(fv_name="dst",pkt_offset= "IP.dst")
STLVmWrFlowVar(fv_name="dst",pkt_offset = 30)
]
- vm += [#STLVmFixIpv4(offset = "IP")
- STLVmFixIpv4(offset = 14)
+ vm += [STLVmFixIpv4(offset = "IP")
]
return vm
diff --git a/scripts/stl/udp_1pkt_tuple_gen_split.py b/scripts/stl/udp_1pkt_tuple_gen_split.py
index 5a6feb4d..3ab87b80 100644
--- a/scripts/stl/udp_1pkt_tuple_gen_split.py
+++ b/scripts/stl/udp_1pkt_tuple_gen_split.py
@@ -29,10 +29,10 @@ class STLS1(object):
pkt = STLPktBuilder(pkt = base_pkt/pad,
vm = vm)
-
- return STLStream(packet = pkt,
+ stream = STLStream(packet = pkt,
mode = STLTXCont())
-
+ print stream.to_code()
+ return stream
def get_streams (self, direction = 0):