summaryrefslogtreecommitdiffstats
path: root/scripts/stl/yaml/udp_rand_size_9k.yaml
blob: 0d7d1ec7a090eb578083bbd00c4f33699f418334 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
### UDP 9K+14(MAC) random pkt size ###
#####################################
- name: "random"
  stream:
    self_start: True
    packet:
      pcap: ipv4_udp_9k.pcap # should not include CRC 9K ip+14 = 9230 +FCS(by NIC)=9234 
    mode:
      type: continuous
      pps: 100

    # random packet size 60-max packet size update ip.len/checksum/udp.len
    vm: 
       instructions: 
           -     type         : "flow_var"                   # define random varible 60-9230
                 name         : "var_rand_pkt_size"
                 op           : "random" 
                 init_value   : 0 
                 min_value    : 60   
                 max_value    : 9230                         # range must be smaller than pkt size
                 size         : 2

           -     type         : "trim_pkt_size"             # trim packet size
                 name         : "var_rand_pkt_size"     

           -     type         : "write_flow_var"            # update ip.len
                 name         : "var_rand_pkt_size" 
                 add_value    : -14
                 is_big_endian: true
                 pkt_offset   : 16 

           -     type         : "fix_checksum_ipv4"          # update ip.checksum
                 pkt_offset   : 14    

           -     type          : "write_flow_var"            # update udp.len
                 name          : "var_rand_pkt_size" 
                 add_value     : -34
                 is_big_endian : true
                 pkt_offset    : 38