summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/examples
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-03-04 03:46:39 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2016-03-04 03:46:39 +0200
commita842b4cfd27f03db83c0bb8ed10816465cc510ad (patch)
tree34596b6959c36a2e16f9dc29131f72a20ba03b34 /scripts/automation/trex_control_plane/stl/examples
parentf749b4358cfedd1ef7e0b58f69f63ee4d00554ea (diff)
ignore python3 cache, generated code files
add option to export Profile (and thus stream too) to Python code add for each profile in functional tests generating it to Python code and comparing to same pcap result add loading Prifile via add_streams() fix IMIX rates in HLTAPI used with line % and bps Scapy packet builder: fixes to load of pcap/yaml - use MAC from pcap (with flag), remove FCS (with flag), support for VM with offsets by name
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/examples')
-rw-r--r--scripts/automation/trex_control_plane/stl/examples/hlt_udp_simple.py20
1 files changed, 8 insertions, 12 deletions
diff --git a/scripts/automation/trex_control_plane/stl/examples/hlt_udp_simple.py b/scripts/automation/trex_control_plane/stl/examples/hlt_udp_simple.py
index 19752f4f..6cd6debc 100644
--- a/scripts/automation/trex_control_plane/stl/examples/hlt_udp_simple.py
+++ b/scripts/automation/trex_control_plane/stl/examples/hlt_udp_simple.py
@@ -16,17 +16,13 @@ from trex_stl_lib.trex_stl_hltapi import *
if __name__ == "__main__":
parser = argparse.ArgumentParser(usage="""
- Connect to TRex and send burst of packets
+ Connect to TRex and send bidirectional continuous traffic
- examples
+ examples:
- hlt_udp_simple.py -s 9000 -d 30
+ hlt_udp_simple.py --server <hostname/ip>
- hlt_udp_simple.py -s 9000 -d 30 -rate_percent 10
-
- hlt_udp_simple.py -s 300 -d 30 -rate_pps 5000000
-
- hlt_udp_simple.py -s 800 -d 30 -rate_bps 500000000 --debug
+ hlt_udp_simple.py -s 300 -d 30 -rate_pps 5000000 --src <MAC> --dst <MAC>
then run the simulator on the output
./stl-sim -f example.yaml -o a.pcap ==> a.pcap include the packet
@@ -35,9 +31,9 @@ if __name__ == "__main__":
description="Example for TRex HLTAPI",
epilog=" based on hhaim's stl_run_udp_simple example");
- parser.add_argument("--ip",
- dest="ip",
- help='Remote trex ip',
+ parser.add_argument("--server",
+ dest="server",
+ help='Remote trex address',
default="127.0.0.1",
type = str)
@@ -72,7 +68,7 @@ if __name__ == "__main__":
hltapi = CTRexHltApi()
print 'Connecting to TRex'
- res = hltapi.connect(device = args.ip, port_list = [0, 1], reset = True, break_locks = True)
+ res = hltapi.connect(device = args.server, port_list = [0, 1], reset = True, break_locks = True)
check_res(res)
ports = res['port_handle']
if len(ports) < 2: