summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/doc_stl
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-03-14 16:55:42 +0200
committerHanoh Haim <hhaim@cisco.com>2016-03-14 16:55:42 +0200
commit5817a4501ec08f56c3684260c8373f20e4c6c0f0 (patch)
tree81ee4fa508276f147b1f09bdfbea9f575302f9a5 /scripts/automation/trex_control_plane/doc_stl
parent9a3228de830a3517d52ab60a9ec2832dd69f62f9 (diff)
add profile doc
Diffstat (limited to 'scripts/automation/trex_control_plane/doc_stl')
-rw-r--r--scripts/automation/trex_control_plane/doc_stl/api/client_code.rst2
-rw-r--r--scripts/automation/trex_control_plane/doc_stl/api/field_engine.rst10
-rw-r--r--scripts/automation/trex_control_plane/doc_stl/api/profile_code.rst8
3 files changed, 13 insertions, 7 deletions
diff --git a/scripts/automation/trex_control_plane/doc_stl/api/client_code.rst b/scripts/automation/trex_control_plane/doc_stl/api/client_code.rst
index bc9d521a..16a00122 100644
--- a/scripts/automation/trex_control_plane/doc_stl/api/client_code.rst
+++ b/scripts/automation/trex_control_plane/doc_stl/api/client_code.rst
@@ -13,7 +13,7 @@ The API has two type of API
Example1::
- c = STLClient()
+ c = STLClient(username = "itay",server = "10.0.0.10", verbose_level = LoggerApi.VERBOSE_HIGH)
try:
# connect to server
diff --git a/scripts/automation/trex_control_plane/doc_stl/api/field_engine.rst b/scripts/automation/trex_control_plane/doc_stl/api/field_engine.rst
index 8b192491..95a23ac1 100644
--- a/scripts/automation/trex_control_plane/doc_stl/api/field_engine.rst
+++ b/scripts/automation/trex_control_plane/doc_stl/api/field_engine.rst
@@ -14,7 +14,7 @@ The FE can allocate stream variables in a Stream context, write a stream variabl
* Update IPv4 checksum
-for example this snippet will create SYN Attack::
+Snippet will create SYN Attack::
# create attack from random src_ip from 16.0.0.0-18.0.0.254 and random src_port 1025-65000
# attack 48.0.0.1 server
@@ -108,7 +108,8 @@ STLVmTupleGen
Field Engine snippet
--------------------
-Example1::
+.. code-block:: python
+ :caption: Example1
base_pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
@@ -130,9 +131,10 @@ Example1::
pkt = STLPktBuilder(pkt = base_pkt/pad,
vm = vm)
-
-Example2::
+.. code-block:: python
+ :caption: Example2
+
#range of source mac-addr
diff --git a/scripts/automation/trex_control_plane/doc_stl/api/profile_code.rst b/scripts/automation/trex_control_plane/doc_stl/api/profile_code.rst
index 9484f565..b2b23e48 100644
--- a/scripts/automation/trex_control_plane/doc_stl/api/profile_code.rst
+++ b/scripts/automation/trex_control_plane/doc_stl/api/profile_code.rst
@@ -81,7 +81,9 @@ STLProfile snippet
------------------
-Example1::
+.. code-block:: python
+ :caption: Example1
+
size = self.fsize - 4; # no FCS
base_pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)
@@ -110,7 +112,9 @@ Example1::
]).get_streams()
-Example2::
+.. code-block:: python
+ :caption: Example2
+
class STLS1(object):