diff options
author | 2016-02-04 13:34:07 +0200 | |
---|---|---|
committer | 2016-02-04 13:34:07 +0200 | |
commit | d5316dbe7b993bb980ff93d60e56aea3c62dcc20 (patch) | |
tree | a0f8ead82172b6aa54544a427e02edecfc24a8f3 /scripts/api/stl | |
parent | ef7ee5da5eeba679045c3ca5dfcd282cb72b684b (diff) |
add sample doc
Diffstat (limited to 'scripts/api/stl')
-rw-r--r-- | scripts/api/stl/examples/stl_run_udp_simple.py | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/scripts/api/stl/examples/stl_run_udp_simple.py b/scripts/api/stl/examples/stl_run_udp_simple.py index eaccc330..88dba5ac 100644 --- a/scripts/api/stl/examples/stl_run_udp_simple.py +++ b/scripts/api/stl/examples/stl_run_udp_simple.py @@ -1,7 +1,14 @@ #!/usr/bin/python import sys, getopt import argparse; +""" +Sample API application, +Connect to TRex +Send UDP packet in specific length +Each direction has its own IP range +Compare Rx-pkts to TX-pkts assuming ports are loopback +""" sys.path.insert(0, "../") @@ -141,7 +148,21 @@ def simple_burst (duration = 10, frame_size = 9000, speed = '1gbps'): def process_options (): parser = argparse.ArgumentParser(usage=""" - connect to TRex and send burst of packets + connect to TRex and send burst of packets + + examples + + stl_run_udp_simple.py -s 9001 + + stl_run_udp_simple.py -s 9000 -d 2 + + stl_run_udp_simple.py -s 3000 -d 3 -m 10mbps + + stl_run_udp_simple.py -s 3000 -d 3 -m 10mbps --debug + + then run the simulator on the output + ./stl-sim -f example.yaml -o a.pcap ==> a.pcap include the packet + """, description="example for TRex api", epilog=" written by hhaim"); |