blob: 2bbad4a0bf8b0924725773c18446c5d28a846c8d (
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
42
|
### UDP 1500 random pkt size ###
#####################################
- name: "random"
stream:
self_start: True
packet:
binary: stl/udp_1518B_no_crc.pcap
mode:
type: continuous
pps: 100
rx_stats: []
# 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
|