diff options
author | 2016-03-01 13:50:20 +0200 | |
---|---|---|
committer | 2016-03-01 13:50:20 +0200 | |
commit | 4dc464d004f0dffe1381b149a7ac36508e1b4234 (patch) | |
tree | 148de052e20bb3421c391923d8443c584f0f4413 /scripts/stl | |
parent | 0af59f17029acc700b3a8bc569e05b5603d0a114 (diff) | |
parent | 37c4d0439365f70a01a3047085e7efef6d88930b (diff) |
Merge --pkt support to stl-sim
Diffstat (limited to 'scripts/stl')
-rwxr-xr-x | scripts/stl/hlt/hlt_mac_ranges.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/scripts/stl/hlt/hlt_mac_ranges.py b/scripts/stl/hlt/hlt_mac_ranges.py new file mode 100755 index 00000000..e265ba5f --- /dev/null +++ b/scripts/stl/hlt/hlt_mac_ranges.py @@ -0,0 +1,29 @@ +from trex_stl_lib.trex_stl_hltapi import STLHltStream + + +class STLS1(object): + ''' + Eth/IP/UDP stream with VM, to change the MAC addr (only 32 lsb) + ''' + + def create_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', + mac_src_step = 2, mac_src_mode = 'decrement', mac_src_count = 19, + mac_dst_step = 2, mac_dst_mode = 'increment', mac_dst_count = 19, + mac_src2_step = 2, mac_src2_mode = 'decrement', mac_src2_count = 19, + mac_dst2_step = 2, mac_dst2_mode = 'increment', mac_dst2_count = 19, + direction = direction, + 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() + + + |