diff options
author | 2016-02-09 11:18:47 -0500 | |
---|---|---|
committer | 2016-02-09 11:18:47 -0500 | |
commit | ede68c669fde984d6095e9313d49a8af295ae885 (patch) | |
tree | 3c3d52457bc94475f413a04b82f6e4e80b48b64f /scripts/stl/yaml/udp_rand_size.yaml | |
parent | 1ab9a175ca7d49f7ae843d46a76c36baa16ff39d (diff) | |
parent | 59d48a12d2c2f1e7a42e44265c4a3a4c1c8651fd (diff) |
Merge branch 'refactor'
Diffstat (limited to 'scripts/stl/yaml/udp_rand_size.yaml')
-rw-r--r-- | scripts/stl/yaml/udp_rand_size.yaml | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/scripts/stl/yaml/udp_rand_size.yaml b/scripts/stl/yaml/udp_rand_size.yaml new file mode 100644 index 00000000..ab1d21b9 --- /dev/null +++ b/scripts/stl/yaml/udp_rand_size.yaml @@ -0,0 +1,41 @@ +### UDP 1500 random pkt size ### +##################################### +- name: "random" + stream: + self_start: True + packet: + pcap: udp_1518B_no_crc.pcap + mode: + type: continuous + pps: 100 + + # random packet size 60-1500 update ip.len/checksum/udp.len + vm: + instructions: + - type : "flow_var" # define random varible 60-1500 + name : "var_rand_pkt_size" + op : "random" + init_value : 0 + min_value : 60 + max_value : 1500 # 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 + + |