summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2015-12-24 15:58:38 +0200
committerHanoh Haim <hhaim@cisco.com>2015-12-24 15:58:38 +0200
commit0e3021bb883b10403efab042e8c308d9fa7c4630 (patch)
tree6d813e5307236ce229cdf56a85c8d9ee61316d51 /scripts
parent4400ebfd85c5700ff11a3532ea0e01ec06bf4928 (diff)
improve multi-core random VM support
Diffstat (limited to 'scripts')
-rw-r--r--scripts/exp/stl_syn_attack-ex.pcapbin0 -> 2304 bytes
-rw-r--r--scripts/stl/imix_1pkt_vm2.yaml91
-rw-r--r--scripts/stl/syn_attack_sample.yaml96
-rw-r--r--scripts/stl/syn_packet.pcapbin0 -> 104 bytes
4 files changed, 187 insertions, 0 deletions
diff --git a/scripts/exp/stl_syn_attack-ex.pcap b/scripts/exp/stl_syn_attack-ex.pcap
new file mode 100644
index 00000000..abcda627
--- /dev/null
+++ b/scripts/exp/stl_syn_attack-ex.pcap
Binary files differ
diff --git a/scripts/stl/imix_1pkt_vm2.yaml b/scripts/stl/imix_1pkt_vm2.yaml
new file mode 100644
index 00000000..e0a6b771
--- /dev/null
+++ b/scripts/stl/imix_1pkt_vm2.yaml
@@ -0,0 +1,91 @@
+### Single stream UDP packet, 64B ###
+#####################################
+- name: udp_64B
+ stream:
+ self_start: True
+ packet:
+ binary: stl/udp_594B_no_crc.pcap # pcap should not include CRC
+ mode:
+ type: continuous
+ pps: 100
+ rx_stats: []
+
+ vm: [
+ {
+ "init_value" : 0,
+ "max_value" : 1000,
+ "min_value" : 500,
+ "name" : "l3_src",
+ "op" : "inc",
+ "size" : 4,
+ "type" : "flow_var"
+ },
+ {
+ "add_value" : 1,
+ "is_big_endian" : false,
+ "name" : "l3_src",
+ "pkt_offset" : 34,
+ "type" : "write_flow_var"
+ }
+
+ ]
+
+- name: udp_64B
+ stream:
+ self_start: True
+ packet:
+ binary: stl/udp_594B_no_crc.pcap # pcap should not include CRC
+ mode:
+ type: continuous
+ pps: 100
+ rx_stats: []
+
+ vm: [
+ {
+ "init_value" : 0,
+ "max_value" : 1000,
+ "min_value" : 500,
+ "name" : "l3_src",
+ "op" : "inc",
+ "size" : 4,
+ "type" : "flow_var"
+ },
+ {
+ "add_value" : 1,
+ "is_big_endian" : false,
+ "name" : "l3_src",
+ "pkt_offset" : 34,
+ "type" : "write_flow_var"
+ }
+
+ ]
+
+- name: udp_64B
+ stream:
+ self_start: True
+ packet:
+ binary: stl/udp_594B_no_crc.pcap # pcap should not include CRC
+ mode:
+ type: continuous
+ pps: 100
+ rx_stats: []
+
+ vm: [
+ {
+ "init_value" : 0,
+ "max_value" : 1000,
+ "min_value" : 500,
+ "name" : "l3_src",
+ "op" : "inc",
+ "size" : 4,
+ "type" : "flow_var"
+ },
+ {
+ "add_value" : 1,
+ "is_big_endian" : false,
+ "name" : "l3_src",
+ "pkt_offset" : 34,
+ "type" : "write_flow_var"
+ }
+
+ ]
diff --git a/scripts/stl/syn_attack_sample.yaml b/scripts/stl/syn_attack_sample.yaml
new file mode 100644
index 00000000..cef59fc7
--- /dev/null
+++ b/scripts/stl/syn_attack_sample.yaml
@@ -0,0 +1,96 @@
+### Single stream UDP packet, 64B ###
+#####################################
+- name: udp_64B
+ stream:
+ self_start: True
+ packet:
+ binary: stl/syn_packet.pcap # pcap should not include CRC
+ mode:
+ type: continuous
+ pps: 100
+ rx_stats: []
+
+ # program generate 4 random numbers and write them to ip.src/ip.dst/tcp.src_port/tcp.dest_port
+ vm: [
+ #define 4 bytes random ip_src
+ { "type" : "flow_var", # name of the command
+ "name" : "ip_src",
+ "op" : "random",
+
+ "init_value" : 0,
+ "min_value" : 1,
+ "max_value" : 1000000, # max ip 16.0.0.254
+ "size" : 4
+ },
+
+
+ { "type" : "flow_var",
+ "name" : "ip_dst",
+ "op" : "random",
+
+ "init_value" : 0,
+ "min_value" : 1,
+ "max_value" : 1000000,
+ "size" : 4
+ },
+
+ { "type" : "flow_var", # name of the command
+ "name" : "port_src",
+ "op" : "random",
+
+ "init_value" : 0,
+ "min_value" : 1025,
+ "max_value" : 65000,
+ "size" : 2 #size in bytes
+ },
+
+ { "type" : "flow_var", # name of the command
+ "name" : "port_dst",
+ "op" : "random",
+
+ "init_value" : 0,
+ "min_value" : 1025,
+ "max_value" : 65000,
+ "size" : 2 #size in bytes
+ },
+
+
+ {
+ "type" : "write_flow_var", # command name
+ "name" : "ip_src", # varible to write
+ "add_value" : 0x10000000, # 16.0.0.0 is src base
+ "is_big_endian" : true, # write as big edian
+ "pkt_offset" : 26, # write tuple_gen.port into udp.src_port
+ },
+
+ {
+ "type" : "write_flow_var", # command name
+ "name" : "ip_dst", # varible to write
+ "add_value" : 0x40000000, # 16.0.0.0 is src base
+ "is_big_endian" : true, # write as big edian
+ "pkt_offset" : 32, # write tuple_gen.port into udp.src_port
+ },
+
+ {
+ "type" : "fix_checksum_ipv4", # fix ipv4 header checksum
+ "pkt_offset" : 14, # offset of ipv4 header
+
+ },
+
+ {
+ "type" : "write_flow_var", # command name
+ "name" : "port_src", # varible to write
+ "add_value" : 0, # 16.0.0.0 is src base
+ "is_big_endian" : true, # write as big edian
+ "pkt_offset" : 34, # write tuple_gen.port into udp.src_port
+ },
+
+ {
+ "type" : "write_flow_var", # command name
+ "name" : "port_dst", # varible to write
+ "add_value" : 0,
+ "is_big_endian" : true, # write as big edian
+ "pkt_offset" : 36, # write tuple_gen.port into udp.src_port
+ }
+
+ ]
diff --git a/scripts/stl/syn_packet.pcap b/scripts/stl/syn_packet.pcap
new file mode 100644
index 00000000..6740e911
--- /dev/null
+++ b/scripts/stl/syn_packet.pcap
Binary files differ