anchor.diff:           ..
   ----
    
  -The Console will give the port/direction and will get the right stream in each interface
  - 
  -
  -*Tunable*::
  - 
  -[source,python]
  -----
  - 
  -class STLS1(object):
  -
  -    def __init__ (self):
  -        self.num_clients  =30000 # max is 16bit  <1>
  -        self.fsize        =64                     
  -
  -    def create_stream (self):
  -
  -        # create a base packet and pad it to size
  -        size = self.fsize - 4 # no FCS
  -        base_pkt =  Ether(src="00:00:dd:dd:00:01")/IP(src="55.55.1.1",dst="58.0.0.1")/UDP(dport=12,sport=1025)
  -        pad = max(0, size - len(base_pkt)) * 'x'
  - 
  -----
  -<1> Define object args 
  -
  - 
  -[source,bash]
  -----
  -$start -f ex1.py -t "fsize=1500,num_clients=10000" #<1>
  -----
  -<1> Change the Tunable using -t option
  -
  -Once a profile was defined, it is possible to give a tunable from Console and change the default value.
  -In this example, change the fsize to 1500 bytes 
  -
  +*Full example using the TRex Console*::
  +
  +Let's take the previous pcap_with_vm.py and examine it with the console:
  +
  +[source,bash]
  +----
  +-=TRex Console v1.1=-
  +
  +Type 'help' or '?' for supported actions
  +
  +trex>profile -f stl/pcap_with_vm.py
  +
  +Profile Information:
  +
  +
  +General Information:
  +Filename:         stl/pcap_with_vm.py
  +Stream count:          5
  +
  +Specific Information:
  +Type:             Python Module
  +Tunables:         ['direction = 0', 'ip_src_range = None', 'loop_count = 5', 'ipg_usec = 10.0',
  +                   "ip_dst_range = {'start': '10.0.0.1', 'end': '10.0.0.254'}"]
  +
  +trex>                                                                                                                                                        
  +----
  +
  +So we can provide tunables on all those fields.
  +Let's change some:
  +
  +[source,bash]
  +----
  +trex>start -f stl/pcap_with_vm.py -t ipg_usec=15.0,loop_count=25
  +
  +Removing all streams from port(s) [0, 1, 2, 3]:              [SUCCESS]
  +
  +
  +Attaching 5 streams to port(s) [0]:                          [SUCCESS]
  +
  +
  +Attaching 5 streams to port(s) [1]:                          [SUCCESS]
  +
  +
  +Attaching 5 streams to port(s) [2]:                          [SUCCESS]
  +
  +
  +Attaching 5 streams to port(s) [3]:                          [SUCCESS]
  +
  +
  +Starting traffic on port(s) [0, 1, 2, 3]:                    [SUCCESS]
  +
  +61.10 [ms]
  +
  +trex>
  +----
  +
  +[source,bash]
  +----
  +We can also customize these to different ports:
  +
  +trex>start -f stl/pcap_with_vm.py --port 0 1 -t ipg_usec=15.0,loop_count=25#ipg_usec=100,loop_count=300
  +
  +Removing all streams from port(s) [0, 1]:                    [SUCCESS]
  +
  +
  +Attaching 5 streams to port(s) [0]:                          [SUCCESS]
  +
  +
  +Attaching 5 streams to port(s) [1]:                          [SUCCESS]
  +
  +
  +Starting traffic on port(s) [0, 1]:                          [SUCCESS]
  +
  +51.00 [ms]
  +
  +trex>
  +----
   
   ==== Tutorial: Per stream statistics 
   
  
positive.code:              mode = STLTXCont())                                                        <2>
  
  
      def get_streams (self, direction = 0):                                              <3>
          # create 1 stream 
          return [ self.create_stream() ]
  
  
negative.code:              mode = STLTXCont())                                                        <2>
  
  
      def get_streams (self, direction = 0, **kwargs):
          # create 1 stream 
          return [ self.create_stream() ]
  
  