summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/adl/setup.pg72
-rw-r--r--src/plugins/cdp/cdp.pg12
-rw-r--r--src/plugins/tracedump/setup.pg52
-rw-r--r--src/plugins/vrrp/setup.pg20
-rw-r--r--src/scripts/vnet/arp420
-rw-r--r--src/scripts/vnet/arp4-mpls20
-rw-r--r--src/scripts/vnet/arp620
-rw-r--r--src/scripts/vnet/bvi60
-rw-r--r--src/scripts/vnet/gre96
-rw-r--r--src/scripts/vnet/gre-teb44
-rw-r--r--src/scripts/vnet/icmp20
-rw-r--r--src/scripts/vnet/icmp620
-rw-r--r--src/scripts/vnet/ige18
-rw-r--r--src/scripts/vnet/ip622
-rw-r--r--src/scripts/vnet/ip6-hbh126
-rw-r--r--src/scripts/vnet/ipsec52
-rw-r--r--src/scripts/vnet/ipsec_spd26
-rw-r--r--src/scripts/vnet/ipsec_spd_vrf56
-rw-r--r--src/scripts/vnet/ixge15
-rw-r--r--src/scripts/vnet/l2efpfilter54
-rw-r--r--src/scripts/vnet/l2efpfilter_perf18
-rw-r--r--src/scripts/vnet/l2fib28
-rw-r--r--src/scripts/vnet/l2fib_perf14
-rw-r--r--src/scripts/vnet/l2fib_xc14
-rw-r--r--src/scripts/vnet/l2flood19
-rw-r--r--src/scripts/vnet/l2tp152
-rw-r--r--src/scripts/vnet/l3fwd88
-rw-r--r--src/scripts/vnet/lfib/ip4-to-mpls20
-rw-r--r--src/scripts/vnet/lfib/mpls-pop-to-mpls16
-rw-r--r--src/scripts/vnet/lfib/mpls-to-ip416
-rw-r--r--src/scripts/vnet/lfib/mpls-to-mpls16
-rw-r--r--src/scripts/vnet/mcast/ip420
-rw-r--r--src/scripts/vnet/mpls-o-ethernet/pg18
-rw-r--r--src/scripts/vnet/mpls-to-dot1ad32
-rw-r--r--src/scripts/vnet/mpls-tunnel80
-rw-r--r--src/scripts/vnet/nat4444
-rw-r--r--src/scripts/vnet/nat44_det144
-rw-r--r--src/scripts/vnet/nat44_lb48
-rw-r--r--src/scripts/vnet/nat44_static48
-rw-r--r--src/scripts/vnet/nat44_static_with_port48
-rw-r--r--src/scripts/vnet/nat6448
-rw-r--r--src/scripts/vnet/nat64_static48
-rw-r--r--src/scripts/vnet/pcap20
-rw-r--r--src/scripts/vnet/rewrite54
-rw-r--r--src/scripts/vnet/rpf20
-rw-r--r--src/scripts/vnet/rtt-test20
-rw-r--r--src/scripts/vnet/source_and_port_range_check60
-rw-r--r--src/scripts/vnet/speed20
-rw-r--r--src/scripts/vnet/srp20
-rw-r--r--src/scripts/vnet/tcp24
-rw-r--r--src/scripts/vnet/udp26
-rw-r--r--src/scripts/vnet/uri/udp26
-rw-r--r--src/scripts/vnet/urpf100
-rw-r--r--src/scripts/vnet/vlan24
-rw-r--r--src/vlib/unix/cli.c70
-rw-r--r--src/vnet/pg/example.script10
56 files changed, 1145 insertions, 1153 deletions
diff --git a/src/plugins/adl/setup.pg b/src/plugins/adl/setup.pg
index 7f816bc0893..7117225789a 100644
--- a/src/plugins/adl/setup.pg
+++ b/src/plugins/adl/setup.pg
@@ -6,46 +6,46 @@ set int ip6 table loop0 0
set int ip address loop0 2001:db01::1/64
set int state loop0 up
-packet-generator new {
- name ip4
- limit 100
- rate 0
- size 128-128
- interface loop0
- node adl-input
- data { IP4: 1.2.40 -> 3cfd.fed0.b6c8
- UDP: 192.168.1.2-192.168.1.10 -> 192.168.2.1
- UDP: 1234 -> 2345
- incrementing 114
- }
+packet-generator new { \
+ name ip4 \
+ limit 100 \
+ rate 0 \
+ size 128-128 \
+ interface loop0 \
+ node adl-input \
+ data { IP4: 1.2.40 -> 3cfd.fed0.b6c8 \
+ UDP: 192.168.1.2-192.168.1.10 -> 192.168.2.1 \
+ UDP: 1234 -> 2345 \
+ incrementing 114 \
+ } \
}
-packet-generator new {
- name ip6-allow
- limit 50
- rate 0
- size 128-128
- interface loop0
- node adl-input
- data { IP6: 1.2.40 -> 3cfd.fed0.b6c8
- UDP: 2001:db01::2 -> 2001:db01::1
- UDP: 1234 -> 2345
- incrementing 80
- }
+packet-generator new { \
+ name ip6-allow \
+ limit 50 \
+ rate 0 \
+ size 128-128 \
+ interface loop0 \
+ node adl-input \
+ data { IP6: 1.2.40 -> 3cfd.fed0.b6c8 \
+ UDP: 2001:db01::2 -> 2001:db01::1 \
+ UDP: 1234 -> 2345 \
+ incrementing 80 \
+ } \
}
-packet-generator new {
- name ip6-drop
- limit 50
- rate 0
- size 128-128
- interface loop0
- node adl-input
- data { IP6: 1.2.40 -> 3cfd.fed0.b6c8
- UDP: 2001:db01::3 -> 2001:db01::1
- UDP: 1234 -> 2345
- incrementing 80
- }
+packet-generator new { \
+ name ip6-drop \
+ limit 50 \
+ rate 0 \
+ size 128-128 \
+ interface loop0 \
+ node adl-input \
+ data { IP6: 1.2.40 -> 3cfd.fed0.b6c8 \
+ UDP: 2001:db01::3 -> 2001:db01::1 \
+ UDP: 1234 -> 2345 \
+ incrementing 80 \
+ } \
}
ip table 1
diff --git a/src/plugins/cdp/cdp.pg b/src/plugins/cdp/cdp.pg
index b6ba18656c2..32700463ed0 100644
--- a/src/plugins/cdp/cdp.pg
+++ b/src/plugins/cdp/cdp.pg
@@ -1,7 +1,7 @@
-packet-generator new {
- name cdp
- limit 1
- node cdp-input
- size 374-374
- data { hex 0x02b46b96000100096978676265000500bf436973636f20494f5320536f6674776172652c2043333735304520536f66747761726520284333373530452d554e4956455253414c2d4d292c2056657273696f6e2031322e32283335295345352c2052454c4541534520534f4654574152452028666331290a436f707972696768742028632920313938362d3230303720627920436973636f2053797374656d732c20496e632e0a436f6d70696c6564205468752031392d4a756c2d30372031363a3137206279206e616368656e00060018636973636f2057532d4333373530452d3234544400020011000000010101cc0004000000000003001b54656e4769676162697445746865726e6574312f302f3100040008000000280008002400000c011200000000ffffffff010221ff000000000000001e7a50f000ff000000090004000a00060001000b0005010012000500001300050000160011000000010101cc000400000000001a00100000000100000000ffffffff }
+packet-generator new { \
+ name cdp \
+ limit 1 \
+ node cdp-input \
+ size 374-374 \
+ data { hex 0x02b46b96000100096978676265000500bf436973636f20494f5320536f6674776172652c2043333735304520536f66747761726520284333373530452d554e4956455253414c2d4d292c2056657273696f6e2031322e32283335295345352c2052454c4541534520534f4654574152452028666331290a436f707972696768742028632920313938362d3230303720627920436973636f2053797374656d732c20496e632e0a436f6d70696c6564205468752031392d4a756c2d30372031363a3137206279206e616368656e00060018636973636f2057532d4333373530452d3234544400020011000000010101cc0004000000000003001b54656e4769676162697445746865726e6574312f302f3100040008000000280008002400000c011200000000ffffffff010221ff000000000000001e7a50f000ff000000090004000a00060001000b0005010012000500001300050000160011000000010101cc000400000000001a00100000000100000000ffffffff } \
}
diff --git a/src/plugins/tracedump/setup.pg b/src/plugins/tracedump/setup.pg
index 91d5ebe2d2a..1ebdb0dd7f0 100644
--- a/src/plugins/tracedump/setup.pg
+++ b/src/plugins/tracedump/setup.pg
@@ -1,33 +1,33 @@
set term pag off
-packet-generator new {
- name worker0
- worker 0
- limit 12
- rate 1.2e7
- size 128-128
- interface local0
- node ethernet-input
- data { IP4: 1.2.40 -> 3cfd.fed0.b6c8
- UDP: 192.168.40.1 - 192.168.40.100 -> 192.168.50.10
- UDP: 1234 -> 2345
- incrementing 114
- }
+packet-generator new { \
+ name worker0 \
+ worker 0 \
+ limit 12 \
+ rate 1.2e7 \
+ size 128-128 \
+ interface local0 \
+ node ethernet-input \
+ data { IP4: 1.2.40 -> 3cfd.fed0.b6c8 \
+ UDP: 192.168.40.1 - 192.168.40.100 -> 192.168.50.10 \
+ UDP: 1234 -> 2345 \
+ incrementing 114 \
+ } \
}
-packet-generator new {
- name worker1
- worker 1
- limit 12
- rate 1.2e7
- size 128-128
- interface local0
- node ethernet-input
- data { IP4: 1.2.4 -> 3cfd.fed0.b6c9
- UDP: 192.168.41.1 - 192.168.41.100 -> 192.168.51.10
- UDP: 1234 -> 2345
- incrementing 114
- }
+packet-generator new { \
+ name worker1 \
+ worker 1 \
+ limit 12 \
+ rate 1.2e7 \
+ size 128-128 \
+ interface local0 \
+ node ethernet-input \
+ data { IP4: 1.2.4 -> 3cfd.fed0.b6c9 \
+ UDP: 192.168.41.1 - 192.168.41.100 -> 192.168.51.10 \
+ UDP: 1234 -> 2345 \
+ incrementing 114 \
+ } \
}
trace add pg-input 20
diff --git a/src/plugins/vrrp/setup.pg b/src/plugins/vrrp/setup.pg
index 9275fcc46c6..6328448d79e 100644
--- a/src/plugins/vrrp/setup.pg
+++ b/src/plugins/vrrp/setup.pg
@@ -7,14 +7,14 @@ set int state loop0 up
comment { Packet generator script. Src MAC 00:de:ad:be:ef:01 }
comment { Dst mac 01:ba:db:ab:be:01 ethtype 0800 }
-packet-generator new {
- name simple
- limit 1
- size 128-128
- interface loop0
- node vrrp
- data {
- hex 0x00deadbeef0001badbabbe010800
- incrementing 30
- }
+packet-generator new { \
+ name simple \
+ limit 1 \
+ size 128-128 \
+ interface loop0 \
+ node vrrp \
+ data { \
+ hex 0x00deadbeef0001badbabbe010800 \
+ incrementing 30 \
+ } \
}
diff --git a/src/scripts/vnet/arp4 b/src/scripts/vnet/arp4
index 372d82a9ccd..24a688549bf 100644
--- a/src/scripts/vnet/arp4
+++ b/src/scripts/vnet/arp4
@@ -1,13 +1,13 @@
-packet-generator new {
- name x
- limit 1
- node ip4-input
- size 64-64
- data {
- ICMP: 1.0.0.2 -> 2.0.0.2
- ICMP echo_request
- incrementing 100
- }
+packet-generator new { \
+ name x \
+ limit 1 \
+ node ip4-input \
+ size 64-64 \
+ data { \
+ ICMP: 1.0.0.2 -> 2.0.0.2 \
+ ICMP echo_request \
+ incrementing 100 \
+ } \
}
trace add pg-input 100
diff --git a/src/scripts/vnet/arp4-mpls b/src/scripts/vnet/arp4-mpls
index 3e1561157ea..fbb68eb4711 100644
--- a/src/scripts/vnet/arp4-mpls
+++ b/src/scripts/vnet/arp4-mpls
@@ -1,13 +1,13 @@
-packet-generator new {
- name x
- limit 1
- node ip4-input
- size 64-64
- data {
- ICMP: 1.0.0.2 -> 2.2.2.2
- ICMP echo_request
- incrementing 100
- }
+packet-generator new { \
+ name x \
+ limit 1 \
+ node ip4-input \
+ size 64-64 \
+ data { \
+ ICMP: 1.0.0.2 -> 2.2.2.2 \
+ ICMP echo_request \
+ incrementing 100 \
+ } \
}
loop create
diff --git a/src/scripts/vnet/arp6 b/src/scripts/vnet/arp6
index df58fb6478f..2ade2962db8 100644
--- a/src/scripts/vnet/arp6
+++ b/src/scripts/vnet/arp6
@@ -1,13 +1,13 @@
-packet-generator new {
- name x
- limit 1
- node ip6-input
- size 64-64
- data {
- ICMP6: 2000::2 -> 2001::2
- ICMP echo_request
- incrementing 100
- }
+packet-generator new { \
+ name x \
+ limit 1 \
+ node ip6-input \
+ size 64-64 \
+ data { \
+ ICMP6: 2000::2 -> 2001::2 \
+ ICMP echo_request \
+ incrementing 100 \
+ } \
}
tr add pg-input 100
diff --git a/src/scripts/vnet/bvi b/src/scripts/vnet/bvi
index e1caf6606d6..cf55d63c2f2 100644
--- a/src/scripts/vnet/bvi
+++ b/src/scripts/vnet/bvi
@@ -3,12 +3,12 @@
set int state tuntap-0 down
set int ip address GigabitEthernet2/1/0 1.2.3.4/24
-set int state GigabitEthernet2/1/0 up
-cre sub GigabitEthernet2/1/0 1 dot1q 7
+set int state GigabitEthernet2/1/0 up
+cre sub GigabitEthernet2/1/0 1 dot1q 7
set int state GigabitEthernet2/1/0.1 up
set int state GigabitEthernet2/2/0 up
-cre sub GigabitEthernet2/2/0 1 dot1q 9
+cre sub GigabitEthernet2/2/0 1 dot1q 9
set int state GigabitEthernet2/2/0.1 up
@@ -22,7 +22,7 @@ set int l2 bridge GigabitEthernet2/1/0.1 0
set int l2 bridge GigabitEthernet2/2/0.1 0
set int l2 tag-rewrite GigabitEthernet2/1/0.1 pop 1
-set int l2 tag-rewrite GigabitEthernet2/2/0.1 pop 1
+set int l2 tag-rewrite GigabitEthernet2/2/0.1 pop 1
l2fib add 00:22:44:06:08:0a 0 GigabitEthernet2/1/0.1 static
l2fib add 00:02:04:06:08:0a 0 GigabitEthernet2/2/0.1 static
@@ -38,36 +38,36 @@ cle er
cle int
cle run
-packet-generator new {
- name bvi_to_l2
- limit 100
- node ethernet-input
- interface GigabitEthernet2/1/0
- data {
- IP4: 0050.56b7.7c83 -> 0050.56b7.296d
- GRE: 1.2.3.3 -> 8.0.0.1 mpls_unicast
+packet-generator new { \
+ name bvi_to_l2 \
+ limit 100 \
+ node ethernet-input \
+ interface GigabitEthernet2/1/0 \
+ data { \
+ IP4: 0050.56b7.7c83 -> 0050.56b7.296d \
+ GRE: 1.2.3.3 -> 8.0.0.1 mpls_unicast \
}
}
-packet-generator new {
- name l2_to_bvi
- limit 50
- node ethernet-input
- interface GigabitEthernet2/2/0
- data {
- IP4: 0050.56b7.7c83 -> dead.0000.0000 vlan 9
- GRE: 8.0.0.1 -> 1.2.3.3 mpls_unicast
- }
+packet-generator new { \
+ name l2_to_bvi \
+ limit 50 \
+ node ethernet-input \
+ interface GigabitEthernet2/2/0 \
+ data { \
+ IP4: 0050.56b7.7c83 -> dead.0000.0000 vlan 9 \
+ GRE: 8.0.0.1 -> 1.2.3.3 mpls_unicast \
+ } \
}
-packet-generator new {
- name l2_to_bvi_via_flood
- limit 25
- node ethernet-input
- interface GigabitEthernet2/2/0
- data {
- IP4: 0050.56b7.7c83 -> ffff.ffff.ffff vlan 9
- GRE: 8.0.0.1 -> 1.2.3.3 mpls_unicast
- }
+packet-generator new { \
+ name l2_to_bvi_via_flood \
+ limit 25 \
+ node ethernet-input \
+ interface GigabitEthernet2/2/0 \
+ data { \
+ IP4: 0050.56b7.7c83 -> ffff.ffff.ffff vlan 9 \
+ GRE: 8.0.0.1 -> 1.2.3.3 mpls_unicast \
+ } \
}
diff --git a/src/scripts/vnet/gre b/src/scripts/vnet/gre
index 820fc09f469..bab26353d40 100644
--- a/src/scripts/vnet/gre
+++ b/src/scripts/vnet/gre
@@ -26,60 +26,60 @@ set int ip address gre1 ::2/128
ip route add 192:168:3::0/64 via gre1
set int state gre1 up
-packet-generator new {
- name gre4-tx
- limit -1
- node ip4-input
- size 64-64
- interface pg0
- data {
- UDP: 192.168.1.2 -> 192.168.3.1
- UDP: 4321 -> 1234
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name gre4-tx \
+ limit -1 \
+ node ip4-input \
+ size 64-64 \
+ interface pg0 \
+ data { \
+ UDP: 192.168.1.2 -> 192.168.3.1 \
+ UDP: 4321 -> 1234 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name gre4-rx
- limit -1
- node ip6-input
- size 72-72
- interface pg1
- data {
- GRE: 192:168:2::2 -> 192:168:2::1
- ip4
- UDP: 192.168.3.1 -> 192.168.1.2
- UDP: 1234 -> 4321
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name gre4-rx \
+ limit -1 \
+ node ip6-input \
+ size 72-72 \
+ interface pg1 \
+ data { \
+ GRE: 192:168:2::2 -> 192:168:2::1 \
+ ip4 \
+ UDP: 192.168.3.1 -> 192.168.1.2 \
+ UDP: 1234 -> 4321 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name gre6-tx
- limit -1
- node ip6-input
- size 64-64
- interface pg0
- data {
- UDP: 192:168:1::2 -> 192:168:3::1
- UDP: 4321 -> 1234
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name gre6-tx \
+ limit -1 \
+ node ip6-input \
+ size 64-64 \
+ interface pg0 \
+ data { \
+ UDP: 192:168:1::2 -> 192:168:3::1 \
+ UDP: 4321 -> 1234 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name gre6-rx
- limit -1
- node ip4-input
- size 72-72
- interface pg1
- data {
- GRE: 192.168.2.2 -> 192.168.2.1
- ip6
- UDP: 192:168:3::1 -> 192:168:1::2
- UDP: 1234 -> 4321
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name gre6-rx \
+ limit -1 \
+ node ip4-input \
+ size 72-72 \
+ interface pg1 \
+ data { \
+ GRE: 192.168.2.2 -> 192.168.2.1 \
+ ip6 \
+ UDP: 192:168:3::1 -> 192:168:1::2 \
+ UDP: 1234 -> 4321 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
packet-generator enable
diff --git a/src/scripts/vnet/gre-teb b/src/scripts/vnet/gre-teb
index 992005cfa83..015ce73b891 100644
--- a/src/scripts/vnet/gre-teb
+++ b/src/scripts/vnet/gre-teb
@@ -10,30 +10,30 @@ set int state gre0 up
set int l2 xconnect pg0 gre0
set int l2 xconnect gre0 pg0
-packet-generator new {
- name tx
- limit -1
- node ethernet-input
- size 64-64
- interface pg0
- data {
- 0x8881: 4:4:4:4:4:4 -> 5:5:5:5:5:5
- incrementing 100
- }
+packet-generator new { \
+ name tx \
+ limit -1 \
+ node ethernet-input \
+ size 64-64 \
+ interface pg0 \
+ data { \
+ 0x8881: 4:4:4:4:4:4 -> 5:5:5:5:5:5 \
+ incrementing 100 \
+ } \
}
-packet-generator new {
- name rx
- limit -1
- node ip4-input
- size 72-72
- interface pg1
- data {
- GRE: 192.168.2.2 -> 192.168.2.1
- teb
- 0x8881: 4:4:4:4:4:4 -> 5:5:5:5:5:5
- incrementing 100
- }
+packet-generator new { \
+ name rx \
+ limit -1 \
+ node ip4-input \
+ size 72-72 \
+ interface pg1 \
+ data { \
+ GRE: 192.168.2.2 -> 192.168.2.1 \
+ teb \
+ 0x8881: 4:4:4:4:4:4 -> 5:5:5:5:5:5 \
+ incrementing 100 \
+ } \
}
packet-generator enable
diff --git a/src/scripts/vnet/icmp b/src/scripts/vnet/icmp
index 889eca82c8f..603d9d77700 100644
--- a/src/scripts/vnet/icmp
+++ b/src/scripts/vnet/icmp
@@ -1,13 +1,13 @@
-packet-generator new {
- name x
- limit 1
- node ip4-input
- size 64-64
- data {
- ICMP: 1.2.3.4 -> 5.6.7.8
- ICMP echo_request
- incrementing 100
- }
+packet-generator new { \
+ name x \
+ limit 1 \
+ node ip4-input \
+ size 64-64 \
+ data { \
+ ICMP: 1.2.3.4 -> 5.6.7.8 \
+ ICMP echo_request \
+ incrementing 100 \
+ } \
}
tr add pg-input 100
diff --git a/src/scripts/vnet/icmp6 b/src/scripts/vnet/icmp6
index 4fcb600594c..eb41470f448 100644
--- a/src/scripts/vnet/icmp6
+++ b/src/scripts/vnet/icmp6
@@ -1,13 +1,13 @@
-packet-generator new {
- name x
- limit 1
- node ip6-input
- size 64-64
- data {
- ICMP6: ::1 -> ::2
- ICMP echo_request
- incrementing 100
- }
+packet-generator new { \
+ name x \
+ limit 1 \
+ node ip6-input \
+ size 64-64 \
+ data { \
+ ICMP6: ::1 -> ::2 \
+ ICMP echo_request \
+ incrementing 100 \
+ } \
}
tr add pg-input 100
diff --git a/src/scripts/vnet/ige b/src/scripts/vnet/ige
index 80d045af36d..f721e597678 100644
--- a/src/scripts/vnet/ige
+++ b/src/scripts/vnet/ige
@@ -1,12 +1,12 @@
-packet-generator new {
- name x
- limit 1
- node ip4-lookup
- size 50-50
- data {
- ICMP: 1.0.0.1 -> 1.0.0.3 ttl 1
- incrementing 30
- }
+packet-generator new { \
+ name x \
+ limit 1 \
+ node ip4-lookup \
+ size 50-50 \
+ data { \
+ ICMP: 1.0.0.1 -> 1.0.0.3 ttl 1 \
+ incrementing 30 \
+ } \
}
comment { tr add pg-input 100 }
diff --git a/src/scripts/vnet/ip6 b/src/scripts/vnet/ip6
index e03c6fd2c91..c7e4566b2bf 100644
--- a/src/scripts/vnet/ip6
+++ b/src/scripts/vnet/ip6
@@ -1,14 +1,14 @@
-packet-generator new {
- name x
- limit 1
- node ethernet-input
- size 64-64
- data {
- IP6: 1.2.3 -> 4.5.6
- ICMP: 3002::2 -> 3001::2
- ICMP echo_request
- incrementing 100
- }
+packet-generator new { \
+ name x \
+ limit 1 \
+ node ethernet-input \
+ size 64-64 \
+ data { \
+ IP6: 1.2.3 -> 4.5.6 \
+ ICMP: 3002::2 -> 3001::2 \
+ ICMP echo_request \
+ incrementing 100 \
+ } \
}
diff --git a/src/scripts/vnet/ip6-hbh b/src/scripts/vnet/ip6-hbh
index 87be118eadd..7bb0be1a513 100644
--- a/src/scripts/vnet/ip6-hbh
+++ b/src/scripts/vnet/ip6-hbh
@@ -1,78 +1,78 @@
tap connect tap0
set int state tap-0 up
set int ip address tap-0 1::1/64
-packet-generator new {
- name hbh1
- limit 1
- node ip6-input
- size 48-48
- data {
- IP6_HOP_BY_HOP_OPTIONS: 1::2 -> 1::2
- hex 0x3B00010403040506
- incrementing 100
- }
+packet-generator new { \
+ name hbh1 \
+ limit 1 \
+ node ip6-input \
+ size 48-48 \
+ data { \
+ IP6_HOP_BY_HOP_OPTIONS: 1::2 -> 1::2 \
+ hex 0x3B00010403040506 \
+ incrementing 100 \
+ } \
}
-packet-generator new {
- name hbh2
- limit 1
- node ip6-input
- size 48-48
- data {
- IP6_HOP_BY_HOP_OPTIONS: 1::2 -> 1::2
- hex 0x3B00C10403040506
- incrementing 100
- }
+packet-generator new { \
+ name hbh2 \
+ limit 1 \
+ node ip6-input \
+ size 48-48 \
+ data { \
+ IP6_HOP_BY_HOP_OPTIONS: 1::2 -> 1::2 \
+ hex 0x3B00C10403040506 \
+ incrementing 100 \
+ } \
}
-packet-generator new {
- name hbh3
- limit 1
- node ip6-input
- size 48-48
- data {
- IP6_HOP_BY_HOP_OPTIONS: 1::2 -> 1::2
- hex 0x3BffC10403040506
- incrementing 100
- }
+packet-generator new { \
+ name hbh3 \
+ limit 1 \
+ node ip6-input \
+ size 48-48 \
+ data { \
+ IP6_HOP_BY_HOP_OPTIONS: 1::2 -> 1::2 \
+ hex 0x3BffC10403040506 \
+ incrementing 100 \
+ } \
}
-packet-generator new {
- name hbh4
- limit 1
- node ip6-input
- size 64-64
- data {
- IP6_HOP_BY_HOP_OPTIONS: 1::2 -> 1::2
- hex 0x3BffC10403040506
- incrementing 100
- }
+packet-generator new { \
+ name hbh4 \
+ limit 1 \
+ node ip6-input \
+ size 64-64 \
+ data { \
+ IP6_HOP_BY_HOP_OPTIONS: 1::2 -> 1::2 \
+ hex 0x3BffC10403040506 \
+ incrementing 100 \
+ } \
}
-packet-generator new {
- name hbh5
- limit 1
- node ip6-input
- size 56-56
- data {
- IP6_HOP_BY_HOP_OPTIONS: 1::2 -> 1::2
- length 16
- hex 0x3B010104030405060106030405060708
- incrementing 100
- }
+packet-generator new { \
+ name hbh5 \
+ limit 1 \
+ node ip6-input \
+ size 56-56 \
+ data { \
+ IP6_HOP_BY_HOP_OPTIONS: 1::2 -> 1::2 \
+ length 16 \
+ hex 0x3B010104030405060106030405060708 \
+ incrementing 100 \
+ } \
}
-packet-generator new {
- name hbh6
- limit 1
- node ip6-input
- size 56-56
- data {
- IP6_HOP_BY_HOP_OPTIONS: 1::2 -> 1::2
- length 16
- hex 0x3a00050200000100
- ICMP echo_request
- incrementing 100
- }
+packet-generator new { \
+ name hbh6 \
+ limit 1 \
+ node ip6-input \
+ size 56-56 \
+ data { \
+ IP6_HOP_BY_HOP_OPTIONS: 1::2 -> 1::2 \
+ length 16 \
+ hex 0x3a00050200000100 \
+ ICMP echo_request \
+ incrementing 100 \
+ } \
}
tr add pg-input 100
diff --git a/src/scripts/vnet/ipsec b/src/scripts/vnet/ipsec
index 6dc4dd7b780..5d186c87cb9 100644
--- a/src/scripts/vnet/ipsec
+++ b/src/scripts/vnet/ipsec
@@ -41,31 +41,31 @@ set ip neighbor pg0 192.168.0.2 00:11:22:33:44:66
trace add pg-input 100
-packet-generator new {
- name ipsec1
- limit 1
- rate 1e4
- node ip4-input
- interface pg0
- size 100-100
- data {
- UDP: 192.168.0.2 -> 192.168.1.2
- UDP: 4321 -> 1234
- length 72
- incrementing 100
- }
+packet-generator new { \
+ name ipsec1 \
+ limit 1 \
+ rate 1e4 \
+ node ip4-input \
+ interface pg0 \
+ size 100-100 \
+ data { \
+ UDP: 192.168.0.2 -> 192.168.1.2 \
+ UDP: 4321 -> 1234 \
+ length 72 \
+ incrementing 100 \
+ } \
}
-packet-generator new {
- name ipsec2
- limit 1
- rate 1e4
- node ip4-input
- interface pg1
- size 100-100
- data {
- UDP: 192.168.1.2 -> 192.168.0.2
- UDP: 4321 -> 1234
- length 72
- incrementing 100
- }
+packet-generator new { \
+ name ipsec2 \
+ limit 1 \
+ rate 1e4 \
+ node ip4-input \
+ interface pg1 \
+ size 100-100 \
+ data { \
+ UDP: 192.168.1.2 -> 192.168.0.2 \
+ UDP: 4321 -> 1234 \
+ length 72 \
+ incrementing 100 \
+ } \
}
diff --git a/src/scripts/vnet/ipsec_spd b/src/scripts/vnet/ipsec_spd
index 5acced65793..04b925c08ac 100644
--- a/src/scripts/vnet/ipsec_spd
+++ b/src/scripts/vnet/ipsec_spd
@@ -39,17 +39,17 @@ set ip neighbor pg1 192.168.1.2 00:11:22:33:44:55
trace add pg-input 100
-packet-generator new {
- name ipsec1
- limit 1
- rate 1e4
- node ip4-input
- interface pg0
- size 100-100
- data {
- UDP: 192.168.0.2 -> 10.6.0.1
- UDP: 4321 -> 1234
- length 72
- incrementing 100
- }
+packet-generator new { \
+ name ipsec1 \
+ limit 1 \
+ rate 1e4 \
+ node ip4-input \
+ interface pg0 \
+ size 100-100 \
+ data { \
+ UDP: 192.168.0.2 -> 10.6.0.1 \
+ UDP: 4321 -> 1234 \
+ length 72 \
+ incrementing 100 \
+ } \
}
diff --git a/src/scripts/vnet/ipsec_spd_vrf b/src/scripts/vnet/ipsec_spd_vrf
index faa891dc2c4..f4420eccac4 100644
--- a/src/scripts/vnet/ipsec_spd_vrf
+++ b/src/scripts/vnet/ipsec_spd_vrf
@@ -39,34 +39,34 @@ set ip neighbor pg0.3 192.168.0.2 00:11:22:33:44:55
trace add pg-input 100
-packet-generator new {
- name ipsec2
- limit 1
- rate 1e4
- node ethernet-input
- interface pg0
- size 100-100
- data {
- IP4: 1.2.3 -> 4.5.6 vlan 1
- UDP: 10.5.0.1 -> 10.6.0.1
- UDP: 4321 -> 1234
- length 72
- incrementing 100
- }
+packet-generator new { \
+ name ipsec2 \
+ limit 1 \
+ rate 1e4 \
+ node ethernet-input \
+ interface pg0 \
+ size 100-100 \
+ data { \
+ IP4: 1.2.3 -> 4.5.6 vlan 1 \
+ UDP: 10.5.0.1 -> 10.6.0.1 \
+ UDP: 4321 -> 1234 \
+ length 72 \
+ incrementing 100 \
+ } \
}
-packet-generator new {
- name ipsec3
- limit 1
- rate 1e4
- node ethernet-input
- interface pg0
- size 100-100
- data {
- IP4: 1.2.3 -> 4.5.6 vlan 1
- UDP: 10.5.0.1 -> 10.6.0.22
- UDP: 4321 -> 1234
- length 72
- incrementing 100
- }
+packet-generator new { \
+ name ipsec3 \
+ limit 1 \
+ rate 1e4 \
+ node ethernet-input \
+ interface pg0 \
+ size 100-100 \
+ data { \
+ IP4: 1.2.3 -> 4.5.6 vlan 1 \
+ UDP: 10.5.0.1 -> 10.6.0.22 \
+ UDP: 4321 -> 1234 \
+ length 72 \
+ incrementing 100 \
+ } \
}
diff --git a/src/scripts/vnet/ixge b/src/scripts/vnet/ixge
deleted file mode 100644
index 6722b5369cd..00000000000
--- a/src/scripts/vnet/ixge
+++ /dev/null
@@ -1,15 +0,0 @@
-packet-generator new {
- name x
- limit 1
- node ip4-lookup
- size 50-50
- data {
- ICMP: 1.0.0.1 -> 1.0.0.3 ttl 1
- incrementing 30
- }
-}
-
-comment { tr add pg-input 100 }
-set int ip address TenGigabitEthernet5/0/0 33.0.1.1/8
-set int state TenGigabitEthernet5/0/0 up
-
diff --git a/src/scripts/vnet/l2efpfilter b/src/scripts/vnet/l2efpfilter
index d1074ce5b0c..4a17c15779d 100644
--- a/src/scripts/vnet/l2efpfilter
+++ b/src/scripts/vnet/l2efpfilter
@@ -45,36 +45,36 @@ clear error
clear run
clear int
-packet-generator new {
- name pre_vtr_fail
- limit 10
- node ethernet-input
- interface GigabitEthernet2/1/0
- data {
- IP4: 0050.56b7.7c83 -> 00:00:00:00:00:11 vlan 1
- GRE: 8.0.0.1 -> 1.2.3.3 mpls_unicast
- }
+packet-generator new { \
+ name pre_vtr_fail \
+ limit 10 \
+ node ethernet-input \
+ interface GigabitEthernet2/1/0 \
+ data { \
+ IP4: 0050.56b7.7c83 -> 00:00:00:00:00:11 vlan 1 \
+ GRE: 8.0.0.1 -> 1.2.3.3 mpls_unicast \
+ } \
}
-packet-generator new {
- name post_vtr_pass
- limit 20
- node ethernet-input
- interface GigabitEthernet2/1/0
- data {
- IP4: 0050.56b7.7c83 -> 00:00:00:00:00:22 vlan 2
- GRE: 8.0.0.1 -> 1.2.3.3 mpls_unicast
- }
+packet-generator new { \
+ name post_vtr_pass \
+ limit 20 \
+ node ethernet-input \
+ interface GigabitEthernet2/1/0 \
+ data { \
+ IP4: 0050.56b7.7c83 -> 00:00:00:00:00:22 vlan 2 \
+ GRE: 8.0.0.1 -> 1.2.3.3 mpls_unicast \
+ } \
}
-packet-generator new {
- name post_vtr_fail
- limit 50
- node ethernet-input
- interface GigabitEthernet2/1/0
- data {
- IP4: 0050.56b7.7c83 -> 00:00:00:00:00:22 vlan 3
- GRE: 8.0.0.1 -> 1.2.3.3 mpls_unicast
- }
+packet-generator new { \
+ name post_vtr_fail \
+ limit 50 \
+ node ethernet-input \
+ interface GigabitEthernet2/1/0 \
+ data { \
+ IP4: 0050.56b7.7c83 -> 00:00:00:00:00:22 vlan 3 \
+ GRE: 8.0.0.1 -> 1.2.3.3 mpls_unicast \
+ } \
}
diff --git a/src/scripts/vnet/l2efpfilter_perf b/src/scripts/vnet/l2efpfilter_perf
index 08c1b46a01c..3856d44e8c0 100644
--- a/src/scripts/vnet/l2efpfilter_perf
+++ b/src/scripts/vnet/l2efpfilter_perf
@@ -45,13 +45,13 @@ clear error
clear run
clear int
-packet-generator new {
- name post_vtr_pass
- limit 9111003
- node ethernet-input
- interface GigabitEthernet2/1/0
- data {
- IP4: 0050.56b7.7c83 -> 00:00:00:00:00:22 vlan 2
- GRE: 8.0.0.1 -> 1.2.3.3 mpls_unicast
- }
+packet-generator new { \
+ name post_vtr_pass \
+ limit 9111003 \
+ node ethernet-input \
+ interface GigabitEthernet2/1/0 \
+ data { \
+ IP4: 0050.56b7.7c83 -> 00:00:00:00:00:22 vlan 2 \
+ GRE: 8.0.0.1 -> 1.2.3.3 mpls_unicast \
+ } \
}
diff --git a/src/scripts/vnet/l2fib b/src/scripts/vnet/l2fib
index dd5c5a803f8..4a167158260 100644
--- a/src/scripts/vnet/l2fib
+++ b/src/scripts/vnet/l2fib
@@ -25,20 +25,20 @@ clear error
clear run
clear int
-packet-generator new {
- name new_input_if_index_mac_move
- limit 4
- node ethernet-input
- interface GigabitEthernet2/1/0
- size 98-98
- data { hex 0x00010203040500020406080a080045006402b46b96000100096978676265000500bf436973636f20494f5320536f6674776172652c2040160011000000010101cc000400000000001a00100000000100000000ffffffff }
+packet-generator new { \
+ name new_input_if_index_mac_move \
+ limit 4 \
+ node ethernet-input \
+ interface GigabitEthernet2/1/0 \
+ size 98-98 \
+ data { hex 0x00010203040500020406080a080045006402b46b96000100096978676265000500bf436973636f20494f5320536f6674776172652c2040160011000000010101cc000400000000001a00100000000100000000ffffffff } \
}
-packet-generator new {
- name dmac_hit
- limit 7
- node ethernet-input
- interface GigabitEthernet2/2/0
- size 98-98
- data { hex 0x00020406080a00224406080a8100000981000011080045006402b46b96000100096978676265000500bf436973636f20494f5320536f6674776172652c2040160011000000010101cc000400000000001a00100000000100000000ffffffff }
+packet-generator new { \
+ name dmac_hit \
+ limit 7 \
+ node ethernet-input \
+ interface GigabitEthernet2/2/0 \
+ size 98-98 \
+ data { hex 0x00020406080a00224406080a8100000981000011080045006402b46b96000100096978676265000500bf436973636f20494f5320536f6674776172652c2040160011000000010101cc000400000000001a00100000000100000000ffffffff } \
}
diff --git a/src/scripts/vnet/l2fib_perf b/src/scripts/vnet/l2fib_perf
index 55565061dae..0f456c1932f 100644
--- a/src/scripts/vnet/l2fib_perf
+++ b/src/scripts/vnet/l2fib_perf
@@ -17,12 +17,12 @@ cle er
cle int
cle run
-packet-generator new {
- name perf
- limit 9111003
- node ethernet-input
- interface GigabitEthernet2/2/0.1
- size 98-98
- data { hex 0x00224406080a00020406080a81000009080045006402b46b96000100096978676265000500bf436973636f20494f5320536f6674776172652c2040160011000000010101cc000400000000001a00100000000100000000ffffffff }
+packet-generator new { \
+ name perf \
+ limit 9111003 \
+ node ethernet-input \
+ interface GigabitEthernet2/2/0.1 \
+ size 98-98 \
+ data { hex 0x00224406080a00020406080a81000009080045006402b46b96000100096978676265000500bf436973636f20494f5320536f6674776172652c2040160011000000010101cc000400000000001a00100000000100000000ffffffff } \
}
diff --git a/src/scripts/vnet/l2fib_xc b/src/scripts/vnet/l2fib_xc
index bb25bd35247..8083da008e5 100644
--- a/src/scripts/vnet/l2fib_xc
+++ b/src/scripts/vnet/l2fib_xc
@@ -19,12 +19,12 @@ clear error
clear run
clear int
-packet-generator new {
- name xc
- limit 11
- node ethernet-input
- interface GigabitEthernet2/1/0
- size 98-98
- data { hex 0x00010203040500020406080a080045006402b46b96000100096978676265000500bf436973636f20494f5320536f6674776172652c2040160011000000010101cc000400000000001a00100000000100000000ffffffff }
+packet-generator new { \
+ name xc \
+ limit 11 \
+ node ethernet-input \
+ interface GigabitEthernet2/1/0 \
+ size 98-98 \
+ data { hex 0x00010203040500020406080a080045006402b46b96000100096978676265000500bf436973636f20494f5320536f6674776172652c2040160011000000010101cc000400000000001a00100000000100000000ffffffff } \
}
diff --git a/src/scripts/vnet/l2flood b/src/scripts/vnet/l2flood
index ec82306d487..41c86975119 100644
--- a/src/scripts/vnet/l2flood
+++ b/src/scripts/vnet/l2flood
@@ -27,15 +27,14 @@ clear error
clear run
clear int
-packet-generator new {
- name flood
- limit 1
- node ethernet-input
- interface GigabitEthernet2/1/0
- data {
- IP4: 0050.56b7.7c83 -> ffff.ffff.ffff vlan 1
- GRE: 8.0.0.1 -> 1.2.3.3 mpls_unicast
- }
-
+packet-generator new { \
+ name flood \
+ limit 1 \
+ node ethernet-input \
+ interface GigabitEthernet2/1/0 \
+ data { \
+ IP4: 0050.56b7.7c83 -> ffff.ffff.ffff vlan 1 \
+ GRE: 8.0.0.1 -> 1.2.3.3 mpls_unicast \
+ } \
}
diff --git a/src/scripts/vnet/l2tp b/src/scripts/vnet/l2tp
index e9a73d579b7..c4a1fe4ad13 100644
--- a/src/scripts/vnet/l2tp
+++ b/src/scripts/vnet/l2tp
@@ -38,91 +38,91 @@ clear error
clear run
clear int
-packet-generator new {
- name decap
- limit 10
- size 200-200
- node ethernet-input
- interface GigabitEthernet2/2/0
- data {
- IP6: 00:50:00:00:00:01 -> 00:50:56:b7:29:7a
- L2TP: 11::1 -> 22::2
- L2TP: session_id 1 cookie 0xffffffffffffffff
- IP4: 00:55:55:55:00:01 -> 00:dd:dd:dd:00:01
- UDP: 1.2.3.4 -> 5.6.7.8
- incrementing 8
- }
+packet-generator new { \
+ name decap \
+ limit 10 \
+ size 200-200 \
+ node ethernet-input \
+ interface GigabitEthernet2/2/0 \
+ data { \
+ IP6: 00:50:00:00:00:01 -> 00:50:56:b7:29:7a \
+ L2TP: 11::1 -> 22::2 \
+ L2TP: session_id 1 cookie 0xffffffffffffffff \
+ IP4: 00:55:55:55:00:01 -> 00:dd:dd:dd:00:01 \
+ UDP: 1.2.3.4 -> 5.6.7.8 \
+ incrementing 8 \
+ } \
}
-packet-generator new {
- name decap_bad_sid
- limit 30
- size 200-200
- node ethernet-input
- interface GigabitEthernet2/2/0
- data {
- IP6: 00:50:00:00:00:01 -> 00:50:56:b7:29:7a
- L2TP: 11::1 -> 22::2
- L2TP: session_id 0x999 cookie 0xffffffffffffffff
- IP4: 00:55:55:55:00:01 -> 00:dd:dd:dd:00:01
- UDP: 1.2.3.4 -> 5.6.7.8
- incrementing 8
- }
+packet-generator new { \
+ name decap_bad_sid \
+ limit 30 \
+ size 200-200 \
+ node ethernet-input \
+ interface GigabitEthernet2/2/0 \
+ data { \
+ IP6: 00:50:00:00:00:01 -> 00:50:56:b7:29:7a \
+ L2TP: 11::1 -> 22::2 \
+ L2TP: session_id 0x999 cookie 0xffffffffffffffff \
+ IP4: 00:55:55:55:00:01 -> 00:dd:dd:dd:00:01 \
+ UDP: 1.2.3.4 -> 5.6.7.8 \
+ incrementing 8 \
+ } \
}
-packet-generator new {
- name decap_bad_cookie
- limit 50
- size 200-200
- node ethernet-input
- interface GigabitEthernet2/2/0
- data {
- IP6: 00:50:00:00:00:01 -> 00:50:56:b7:29:7a
- L2TP: 11::1 -> 22::2
- L2TP: session_id 1 cookie 0x3333ffffffffffff
- IP4: 00:55:55:55:00:01 -> 00:dd:dd:dd:00:01
- UDP: 1.2.3.4 -> 5.6.7.8
- incrementing 8
- }
+packet-generator new { \
+ name decap_bad_cookie \
+ limit 50 \
+ size 200-200 \
+ node ethernet-input \
+ interface GigabitEthernet2/2/0 \
+ data { \
+ IP6: 00:50:00:00:00:01 -> 00:50:56:b7:29:7a \
+ L2TP: 11::1 -> 22::2 \
+ L2TP: session_id 1 cookie 0x3333ffffffffffff \
+ IP4: 00:55:55:55:00:01 -> 00:dd:dd:dd:00:01 \
+ UDP: 1.2.3.4 -> 5.6.7.8 \
+ incrementing 8 \
+ } \
}
-packet-generator new {
- name encap
- limit 100
- node ethernet-input
- interface GigabitEthernet2/1/0
- data {
- IP4: 0000.5555.0002 -> 00:00:dd:dd:00:02 vlan 1
- UDP: 1.2.3.4 -> 5.6.7.8
- incrementing 8
- }
+packet-generator new { \
+ name encap \
+ limit 100 \
+ node ethernet-input \
+ interface GigabitEthernet2/1/0 \
+ data { \
+ IP4: 0000.5555.0002 -> 00:00:dd:dd:00:02 vlan 1 \
+ UDP: 1.2.3.4 -> 5.6.7.8 \
+ incrementing 8 \
+ } \
}
-packet-generator new {
- name decap_sublayer
- limit 300
- size 200-200
- node ethernet-input
- interface GigabitEthernet2/2/0
- data {
- IP6: 00:50:00:00:00:01 -> 00:50:56:b7:29:7a
- L2TP: 11::1 -> 22::3
- L2TP: session_id 2 cookie 0xffffffffffffffff l2_sublayer 0
- IP4: 00:55:55:55:00:01 -> 00:dd:dd:dd:00:01
- UDP: 1.2.3.4 -> 5.6.7.8
- incrementing 8
- }
+packet-generator new { \
+ name decap_sublayer \
+ limit 300 \
+ size 200-200 \
+ node ethernet-input \
+ interface GigabitEthernet2/2/0 \
+ data { \
+ IP6: 00:50:00:00:00:01 -> 00:50:56:b7:29:7a \
+ L2TP: 11::1 -> 22::3 \
+ L2TP: session_id 2 cookie 0xffffffffffffffff l2_sublayer 0 \
+ IP4: 00:55:55:55:00:01 -> 00:dd:dd:dd:00:01 \
+ UDP: 1.2.3.4 -> 5.6.7.8 \
+ incrementing 8 \
+ } \
}
-packet-generator new {
- name encap_sublayer
- limit 700
- node ethernet-input
- interface GigabitEthernet2/1/0
- data {
- IP4: 0000.5555.0002 -> 00:00:dd:dd:00:02 vlan 2
- UDP: 1.2.3.4 -> 5.6.7.8
- incrementing 8
- }
+packet-generator new { \
+ name encap_sublayer \
+ limit 700 \
+ node ethernet-input \
+ interface GigabitEthernet2/1/0 \
+ data { \
+ IP4: 0000.5555.0002 -> 00:00:dd:dd:00:02 vlan 2 \
+ UDP: 1.2.3.4 -> 5.6.7.8 \
+ incrementing 8 \
+ } \
}
diff --git a/src/scripts/vnet/l3fwd b/src/scripts/vnet/l3fwd
index 8d0aaa99e8c..1b8bff1b4d0 100644
--- a/src/scripts/vnet/l3fwd
+++ b/src/scripts/vnet/l3fwd
@@ -12,56 +12,56 @@ set ip neighbor pg1 192.168.2.2 6:5:4:3:2:1 static
set ip neighbor pg1 192:168:2::2 6:5:4:3:2:1 static
set int state pg1 up
-packet-generator new {
- name v4-1-to-2
- limit -1
- node ip4-input
- size 64-64
- interface pg0
- data {
- UDP: 192.168.1.2 -> 192.168.2.2
- UDP: 4321 -> 1234
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name v4-1-to-2 \
+ limit -1 \
+ node ip4-input \
+ size 64-64 \
+ interface pg0 \
+ data { \
+ UDP: 192.168.1.2 -> 192.168.2.2 \
+ UDP: 4321 -> 1234 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name v4-2-to-1
- limit -1
- node ip4-input
- size 64-64
- interface pg0
- data {
- UDP: 192.168.2.2 -> 192.168.1.2
- UDP: 1234 -> 4321
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name v4-2-to-1 \
+ limit -1 \
+ node ip4-input \
+ size 64-64 \
+ interface pg0 \
+ data { \
+ UDP: 192.168.2.2 -> 192.168.1.2 \
+ UDP: 1234 -> 4321 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name v6-1-to-2
- limit -1
- node ip6-input
- size 64-64
- interface pg0
- data {
- UDP: 192:168:1::2 -> 192:168:2::2
- UDP: 4321 -> 1234
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name v6-1-to-2 \
+ limit -1 \
+ node ip6-input \
+ size 64-64 \
+ interface pg0 \
+ data { \
+ UDP: 192:168:1::2 -> 192:168:2::2 \
+ UDP: 4321 -> 1234 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name v6-2-to-1
- limit -1
- node ip6-input
- size 64-64
- interface pg0
- data {
- UDP: 192:168:2::2 -> 192:168:1::2
- UDP: 1234 -> 4321
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name v6-2-to-1 \
+ limit -1 \
+ node ip6-input \
+ size 64-64 \
+ interface pg0 \
+ data { \
+ UDP: 192:168:2::2 -> 192:168:1::2 \
+ UDP: 1234 -> 4321 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
packet-generator enable
diff --git a/src/scripts/vnet/lfib/ip4-to-mpls b/src/scripts/vnet/lfib/ip4-to-mpls
index 5ec412aa21d..1170684fd1a 100644
--- a/src/scripts/vnet/lfib/ip4-to-mpls
+++ b/src/scripts/vnet/lfib/ip4-to-mpls
@@ -1,13 +1,13 @@
-packet-generator new {
- name x
- limit 1
- node ip4-input
- size 64-64
- data {
- ICMP: 1.0.0.2 -> 2.2.2.2
- ICMP echo_request
- incrementing 100
- }
+packet-generator new { \
+ name x \
+ limit 1 \
+ node ip4-input \
+ size 64-64 \
+ data { \
+ ICMP: 1.0.0.2 -> 2.2.2.2 \
+ ICMP echo_request \
+ incrementing 100 \
+ } \
}
loop create
diff --git a/src/scripts/vnet/lfib/mpls-pop-to-mpls b/src/scripts/vnet/lfib/mpls-pop-to-mpls
index 34a57901c03..83b66fd5e56 100644
--- a/src/scripts/vnet/lfib/mpls-pop-to-mpls
+++ b/src/scripts/vnet/lfib/mpls-pop-to-mpls
@@ -1,11 +1,11 @@
-packet-generator new {
- name x
- limit 1
- node mpls-input
- size 72-72
- data {
- hex 0x0001e0ff0001f1ff4500004000000000400177ba010000020202020208007a6e000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2021222324252627
- }
+packet-generator new { \
+ name x \
+ limit 1 \
+ node mpls-input \
+ size 72-72 \
+ data { \
+ hex 0x0001e0ff0001f1ff4500004000000000400177ba010000020202020208007a6e000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2021222324252627 \
+ } \
}
loop create
diff --git a/src/scripts/vnet/lfib/mpls-to-ip4 b/src/scripts/vnet/lfib/mpls-to-ip4
index 5acf5fd0e9e..2fa9b9f4025 100644
--- a/src/scripts/vnet/lfib/mpls-to-ip4
+++ b/src/scripts/vnet/lfib/mpls-to-ip4
@@ -1,11 +1,11 @@
-packet-generator new {
- name x
- limit 1
- node mpls-input
- size 68-68
- data {
- hex 0x0001e1ff4500004000000000400177ba010000020202020208007a6e000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2021222324252627
- }
+packet-generator new { \
+ name x \
+ limit 1 \
+ node mpls-input \
+ size 68-68 \
+ data { \
+ hex 0x0001e1ff4500004000000000400177ba010000020202020208007a6e000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2021222324252627 \
+ } \
}
loop create
diff --git a/src/scripts/vnet/lfib/mpls-to-mpls b/src/scripts/vnet/lfib/mpls-to-mpls
index 5de3d31979a..5e24698ab41 100644
--- a/src/scripts/vnet/lfib/mpls-to-mpls
+++ b/src/scripts/vnet/lfib/mpls-to-mpls
@@ -1,11 +1,11 @@
-packet-generator new {
- name x
- limit 1
- node mpls-input
- size 68-68
- data {
- hex 0x0001e1ff4500004000000000400177ba010000020200000208007a6e000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2021222324252627
- }
+packet-generator new { \
+ name x \
+ limit 1 \
+ node mpls-input \
+ size 68-68 \
+ data { \
+ hex 0x0001e1ff4500004000000000400177ba010000020200000208007a6e000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2021222324252627 \
+ } \
}
loop create
diff --git a/src/scripts/vnet/mcast/ip4 b/src/scripts/vnet/mcast/ip4
index 101f09b087a..e3db0ce6be1 100644
--- a/src/scripts/vnet/mcast/ip4
+++ b/src/scripts/vnet/mcast/ip4
@@ -1,13 +1,13 @@
-packet-generator new {
- name x
- limit 1
- node ip4-input
- size 512-512
- data {
- ICMP: 1.0.0.2 -> 232.1.1.1
- ICMP echo_request
- incrementing 100
- }
+packet-generator new { \
+ name x \
+ limit 1 \
+ node ip4-input \
+ size 512-512 \
+ data { \
+ ICMP: 1.0.0.2 -> 232.1.1.1 \
+ ICMP echo_request \
+ incrementing 100 \
+ } \
}
create packet-generator interface pg1
diff --git a/src/scripts/vnet/mpls-o-ethernet/pg b/src/scripts/vnet/mpls-o-ethernet/pg
index 4070cde861f..f83f55adf39 100644
--- a/src/scripts/vnet/mpls-o-ethernet/pg
+++ b/src/scripts/vnet/mpls-o-ethernet/pg
@@ -1,9 +1,9 @@
-packet-generator new {
- name x
- limit 1
- node mpls-ethernet-input
- size 68-68
- data {
- hex 0x0001e1ff4500004000000000400177ba010000020200000208007a6e000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2021222324252627
- }
-} \ No newline at end of file
+packet-generator new { \
+ name x \
+ limit 1 \
+ node mpls-ethernet-input \
+ size 68-68 \
+ data { \
+ hex 0x0001e1ff4500004000000000400177ba010000020200000208007a6e000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2021222324252627 \
+ } \
+}
diff --git a/src/scripts/vnet/mpls-to-dot1ad b/src/scripts/vnet/mpls-to-dot1ad
index ea8418e70e8..cfe0a76834e 100644
--- a/src/scripts/vnet/mpls-to-dot1ad
+++ b/src/scripts/vnet/mpls-to-dot1ad
@@ -29,24 +29,24 @@ mpls local-label add eos 33 via l2-input-on mpls-tunnel0
trace add pg-input 100
-packet-generator new {
- name g2v
- limit 1
- node ip4-input
- interface pg0
- data {
- hex 0x4500002000000000fe2f3b5bc0a80002c0a800010000884700021140000000000011005056b77c83010203040506
- }
+packet-generator new { \
+ name g2v \
+ limit 1 \
+ node ip4-input \
+ interface pg0 \
+ data { \
+ hex 0x4500002000000000fe2f3b5bc0a80002c0a800010000884700021140000000000011005056b77c83010203040506 \
+ } \
}
-packet-generator new {
- name v2g
- limit 1
- node ethernet-input
- interface pg1
- data {
- hex 0x000000000011005056b77c8388a80020810000210102030405060708
- }
+packet-generator new { \
+ name v2g \
+ limit 1 \
+ node ethernet-input \
+ interface pg1 \
+ data { \
+ hex 0x000000000011005056b77c8388a80020810000210102030405060708 \
+ } \
}
pack en g2v
diff --git a/src/scripts/vnet/mpls-tunnel b/src/scripts/vnet/mpls-tunnel
index 1c395f4c324..863379f60da 100644
--- a/src/scripts/vnet/mpls-tunnel
+++ b/src/scripts/vnet/mpls-tunnel
@@ -1,46 +1,46 @@
-packet-generator new {
- name x0
- limit 1
- node ip4-input
- size 64-64
- data {
- ICMP: 1.0.0.2 -> 2.0.0.2
- ICMP echo_request
- incrementing 100
- }
+packet-generator new { \
+ name x0 \
+ limit 1 \
+ node ip4-input \
+ size 64-64 \
+ data { \
+ ICMP: 1.0.0.2 -> 2.0.0.2 \
+ ICMP echo_request \
+ incrementing 100 \
+ } \
}
-packet-generator new {
- name x1
- limit 1
- node ip4-input
- size 64-64
- data {
- ICMP: 1.0.0.2 -> 2.0.1.2
- ICMP echo_request
- incrementing 100
- }
+packet-generator new { \
+ name x1 \
+ limit 1 \
+ node ip4-input \
+ size 64-64 \
+ data { \
+ ICMP: 1.0.0.2 -> 2.0.1.2 \
+ ICMP echo_request \
+ incrementing 100 \
+ } \
}
-packet-generator new {
- name x2
- limit 1
- node ip4-input
- size 64-64
- data {
- ICMP: 1.0.0.2 -> 2.0.2.2
- ICMP echo_request
- incrementing 100
- }
+packet-generator new { \
+ name x2 \
+ limit 1 \
+ node ip4-input \
+ size 64-64 \
+ data { \
+ ICMP: 1.0.0.2 -> 2.0.2.2 \
+ ICMP echo_request \
+ incrementing 100 \
+ } \
}
-packet-generator new {
- name x3
- limit 1
- node ip4-input
- size 64-64
- data {
- ICMP: 1.0.0.2 -> 2.0.3.2
- ICMP echo_request
- incrementing 100
- }
+packet-generator new { \
+ name x3 \
+ limit 1 \
+ node ip4-input \
+ size 64-64 \
+ data { \
+ ICMP: 1.0.0.2 -> 2.0.3.2 \
+ ICMP echo_request \
+ incrementing 100 \
+ } \
}
diff --git a/src/scripts/vnet/nat44 b/src/scripts/vnet/nat44
index 5c593233d53..3a4bfe9c961 100644
--- a/src/scripts/vnet/nat44
+++ b/src/scripts/vnet/nat44
@@ -1,31 +1,31 @@
create packet-generator interface pg0
create packet-generator interface pg1
-packet-generator new {
- name f1
- limit 1000000
- node ip4-input
- size 64-64
- interface pg0
- data {
- UDP: 10.0.0.3 -> 172.16.1.2
- UDP: 3000 -> 3001
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name f1 \
+ limit 1000000 \
+ node ip4-input \
+ size 64-64 \
+ interface pg0 \
+ data { \
+ UDP: 10.0.0.3 -> 172.16.1.2 \
+ UDP: 3000 -> 3001 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name f2
- limit 1000000
- node ip4-input
- size 64-64
- interface pg0
- data {
- UDP: 10.0.0.3 -> 172.16.1.2
- UDP: 3005 -> 3006
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name f2 \
+ limit 1000000 \
+ node ip4-input \
+ size 64-64 \
+ interface pg0 \
+ data { \
+ UDP: 10.0.0.3 -> 172.16.1.2 \
+ UDP: 3005 -> 3006 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
nat44 add address 172.16.1.3
diff --git a/src/scripts/vnet/nat44_det b/src/scripts/vnet/nat44_det
index 9b28738dc8f..9579ce10a95 100644
--- a/src/scripts/vnet/nat44_det
+++ b/src/scripts/vnet/nat44_det
@@ -1,93 +1,93 @@
create packet-generator interface pg0
create packet-generator interface pg1
-packet-generator new {
- name f1
- limit 1000000
- node ip4-input
- size 64-64
- worker 0
- interface pg0
- data {
- UDP: 10.0.0.3 -> 172.16.1.2
- UDP: 3000 -> 3001
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name f1 \
+ limit 1000000 \
+ node ip4-input \
+ size 64-64 \
+ worker 0 \
+ interface pg0 \
+ data { \
+ UDP: 10.0.0.3 -> 172.16.1.2 \
+ UDP: 3000 -> 3001 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name f2
- limit 1000000
- node ip4-input
- size 64-64
- worker 1
- interface pg0
- data {
- UDP: 10.0.0.3 -> 172.16.1.2
- UDP: 3005 -> 3006
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name f2 \
+ limit 1000000 \
+ node ip4-input \
+ size 64-64 \
+ worker 1 \
+ interface pg0 \
+ data { \
+ UDP: 10.0.0.3 -> 172.16.1.2 \
+ UDP: 3005 -> 3006 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name f3
- limit 1000000
- node ip4-input
- size 64-64
- worker 0
- interface pg1
- data {
- UDP: 172.16.1.2 -> 1.1.1.2
- UDP: 3001 -> 1141
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name f3 \
+ limit 1000000 \
+ node ip4-input \
+ size 64-64 \
+ worker 0 \
+ interface pg1 \
+ data { \
+ UDP: 172.16.1.2 -> 1.1.1.2 \
+ UDP: 3001 -> 1141 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name f4
- limit 1000000
- node ip4-input
- size 64-64
- worker 1
- interface pg1
- data {
- UDP: 172.16.1.2 -> 1.1.1.2
- UDP: 3006 -> 1146
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name f4 \
+ limit 1000000 \
+ node ip4-input \
+ size 64-64 \
+ worker 1 \
+ interface pg1 \
+ data { \
+ UDP: 172.16.1.2 -> 1.1.1.2 \
+ UDP: 3006 -> 1146 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name f5
- limit 1000000
- node ip4-input
- size 64-64
- worker 2
- interface pg0
- data {
- UDP: 10.0.0.4 -> 172.16.1.2
- UDP: 3005 -> 3006
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name f5 \
+ limit 1000000 \
+ node ip4-input \
+ size 64-64 \
+ worker 2 \
+ interface pg0 \
+ data { \
+ UDP: 10.0.0.4 -> 172.16.1.2 \
+ UDP: 3005 -> 3006 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name f6
- limit 1000000
- node ip4-input
- size 64-64
- worker 1
- interface pg1
- data {
- UDP: 172.16.1.2 -> 1.1.1.2
- UDP: 3006 -> 1177
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name f6 \
+ limit 1000000 \
+ node ip4-input \
+ size 64-64 \
+ worker 1 \
+ interface pg1 \
+ data { \
+ UDP: 172.16.1.2 -> 1.1.1.2 \
+ UDP: 3006 -> 1177 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
nat44 deterministic add in 10.0.0.0/21 out 1.1.1.2/32
diff --git a/src/scripts/vnet/nat44_lb b/src/scripts/vnet/nat44_lb
index 6b6d4e1df94..7ccd0932070 100644
--- a/src/scripts/vnet/nat44_lb
+++ b/src/scripts/vnet/nat44_lb
@@ -1,33 +1,33 @@
create packet-generator interface pg0
create packet-generator interface pg1
-packet-generator new {
- name f1
- limit 1000000
- node ip4-input
- size 64-64
- worker 0
- interface pg1
- data {
- UDP: 172.16.1.11 -> 172.16.1.3
- UDP: 3001 -> 3000
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name f1 \
+ limit 1000000 \
+ node ip4-input \
+ size 64-64 \
+ worker 0 \
+ interface pg1 \
+ data { \
+ UDP: 172.16.1.11 -> 172.16.1.3 \
+ UDP: 3001 -> 3000 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name f2
- limit 1000000
- node ip4-input
- size 64-64
- worker 1
- interface pg1
- data {
- UDP: 172.16.1.10 -> 172.16.1.3
- UDP: 3001 -> 3000
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name f2 \
+ limit 1000000 \
+ node ip4-input \
+ size 64-64 \
+ worker 1 \
+ interface pg1 \
+ data { \
+ UDP: 172.16.1.10 -> 172.16.1.3 \
+ UDP: 3001 -> 3000 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
nat44 add address 172.16.1.3
diff --git a/src/scripts/vnet/nat44_static b/src/scripts/vnet/nat44_static
index 3c761875b2c..34ec854adf2 100644
--- a/src/scripts/vnet/nat44_static
+++ b/src/scripts/vnet/nat44_static
@@ -1,33 +1,33 @@
create packet-generator interface pg0
create packet-generator interface pg1
-packet-generator new {
- name f1
- limit 1000000
- node ip4-input
- size 64-64
- worker 0
- interface pg0
- data {
- UDP: 10.0.0.3 -> 172.16.1.2
- UDP: 3000 -> 3001
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name f1 \
+ limit 1000000 \
+ node ip4-input \
+ size 64-64 \
+ worker 0 \
+ interface pg0 \
+ data { \
+ UDP: 10.0.0.3 -> 172.16.1.2 \
+ UDP: 3000 -> 3001 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name f2
- limit 1000000
- node ip4-input
- size 64-64
- worker 1
- interface pg1
- data {
- UDP: 172.16.1.2 -> 172.16.1.3
- UDP: 3001 -> 3000
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name f2 \
+ limit 1000000 \
+ node ip4-input \
+ size 64-64 \
+ worker 1 \
+ interface pg1 \
+ data { \
+ UDP: 172.16.1.2 -> 172.16.1.3 \
+ UDP: 3001 -> 3000 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
nat44 add address 172.16.1.3
diff --git a/src/scripts/vnet/nat44_static_with_port b/src/scripts/vnet/nat44_static_with_port
index 9087fbbd993..ef53e6d2966 100644
--- a/src/scripts/vnet/nat44_static_with_port
+++ b/src/scripts/vnet/nat44_static_with_port
@@ -1,33 +1,33 @@
create packet-generator interface pg0
create packet-generator interface pg1
-packet-generator new {
- name f1
- limit 1000000
- node ip4-input
- size 64-64
- worker 0
- interface pg0
- data {
- UDP: 10.0.0.3 -> 172.16.1.2
- UDP: 3000 -> 3001
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name f1 \
+ limit 1000000 \
+ node ip4-input \
+ size 64-64 \
+ worker 0 \
+ interface pg0 \
+ data { \
+ UDP: 10.0.0.3 -> 172.16.1.2 \
+ UDP: 3000 -> 3001 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name f2
- limit 1000000
- node ip4-input
- size 64-64
- worker 1
- interface pg1
- data {
- UDP: 172.16.1.2 -> 172.16.1.3
- UDP: 3001 -> 3000
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name f2 \
+ limit 1000000 \
+ node ip4-input \
+ size 64-64 \
+ worker 1 \
+ interface pg1 \
+ data { \
+ UDP: 172.16.1.2 -> 172.16.1.3 \
+ UDP: 3001 -> 3000 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
nat44 add address 172.16.1.3
diff --git a/src/scripts/vnet/nat64 b/src/scripts/vnet/nat64
index 7e37dd88ba7..87c9de339ff 100644
--- a/src/scripts/vnet/nat64
+++ b/src/scripts/vnet/nat64
@@ -1,33 +1,33 @@
create packet-generator interface pg0
create packet-generator interface pg1
-packet-generator new {
- name f1
- limit 10
- node ip6-input
- size 64-64
- worker 0
- interface pg0
- data {
- UDP: 2000::3 -> 64:ff9b::ac10:102
- UDP: 3000 -> 3001
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name f1 \
+ limit 10 \
+ node ip6-input \
+ size 64-64 \
+ worker 0 \
+ interface pg0 \
+ data { \
+ UDP: 2000::3 -> 64:ff9b::ac10:102 \
+ UDP: 3000 -> 3001 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name f2
- limit 10
- node ip6-input
- size 64-64
- interface pg0
- worker 1
- data {
- UDP: 2000::3 -> 64:ff9b::ac10:102
- UDP: 3005 -> 3006
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name f2 \
+ limit 10 \
+ node ip6-input \
+ size 64-64 \
+ interface pg0 \
+ worker 1 \
+ data { \
+ UDP: 2000::3 -> 64:ff9b::ac10:102 \
+ UDP: 3005 -> 3006 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
nat64 add pool address 172.16.1.3
diff --git a/src/scripts/vnet/nat64_static b/src/scripts/vnet/nat64_static
index 3c4dc48bd3a..d5820841862 100644
--- a/src/scripts/vnet/nat64_static
+++ b/src/scripts/vnet/nat64_static
@@ -1,33 +1,33 @@
create packet-generator interface pg0
create packet-generator interface pg1
-packet-generator new {
- name f1
- limit 10
- node ip4-input
- size 64-64
- worker 0
- interface pg1
- data {
- UDP: 172.16.1.2 -> 172.16.1.3
- UDP: 3000 -> 37678
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name f1 \
+ limit 10 \
+ node ip4-input \
+ size 64-64 \
+ worker 0 \
+ interface pg1 \
+ data { \
+ UDP: 172.16.1.2 -> 172.16.1.3 \
+ UDP: 3000 -> 37678 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name f2
- limit 10
- node ip4-input
- size 64-64
- interface pg1
- worker 1
- data {
- UDP: 172.16.1.2 -> 172.16.1.3
- UDP: 3005 -> 38678
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name f2 \
+ limit 10 \
+ node ip4-input \
+ size 64-64 \
+ interface pg1 \
+ worker 1 \
+ data { \
+ UDP: 172.16.1.2 -> 172.16.1.3 \
+ UDP: 3005 -> 38678 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
nat64 add pool address 172.16.1.3
diff --git a/src/scripts/vnet/pcap b/src/scripts/vnet/pcap
index d8f47c69074..c52ddb74587 100644
--- a/src/scripts/vnet/pcap
+++ b/src/scripts/vnet/pcap
@@ -1,15 +1,15 @@
-packet-generator new {
- name x
- limit 1
- node ethernet-input
- pcap /home/eliot/pcap-data/ISIS_level1_adjacency.cap
+packet-generator new { \
+ name x \
+ limit 1 \
+ node ethernet-input \
+ pcap /home/eliot/pcap-data/ISIS_level1_adjacency.cap \
}
-packet-generator new {
- name y
- limit 1
- node hdlc-input
- pcap /home/eliot/pcap-data/ISIS_p2p_adjacency.cap
+packet-generator new { \
+ name y \
+ limit 1 \
+ node hdlc-input \
+ pcap /home/eliot/pcap-data/ISIS_p2p_adjacency.cap \
}
tr add pg-input 10
diff --git a/src/scripts/vnet/rewrite b/src/scripts/vnet/rewrite
index d05ce89e6b8..1cb699409b1 100644
--- a/src/scripts/vnet/rewrite
+++ b/src/scripts/vnet/rewrite
@@ -23,37 +23,37 @@ cle er
cle int
cle run
-packet-generator new {
- name toport
- limit 2
- node ethernet-input
- interface GigabitEthernet2/1/0
- data {
- IP4: 0050.56b7.7c83 -> 0050.56b7.296d
- GRE: 8.0.0.1 -> 1.2.5.6 mpls_unicast
- }
+packet-generator new { \
+ name toport \
+ limit 2 \
+ node ethernet-input \
+ interface GigabitEthernet2/1/0 \
+ data { \
+ IP4: 0050.56b7.7c83 -> 0050.56b7.296d \
+ GRE: 8.0.0.1 -> 1.2.5.6 mpls_unicast \
+ } \
}
-packet-generator new {
- name tovlan
- limit 2
- node ethernet-input
- interface GigabitEthernet2/1/0
- data {
- IP4: 0050.56b7.7c83 -> 0050.56b7.296d
- GRE: 8.0.0.1 -> 1.2.6.6 mpls_unicast
- }
+packet-generator new { \
+ name tovlan \
+ limit 2 \
+ node ethernet-input \
+ interface GigabitEthernet2/1/0 \
+ data { \
+ IP4: 0050.56b7.7c83 -> 0050.56b7.296d \
+ GRE: 8.0.0.1 -> 1.2.6.6 mpls_unicast \
+ } \
}
-packet-generator new {
- name toqinq
- limit 2
- node ethernet-input
- interface GigabitEthernet2/1/0
- data {
- IP4: 0050.56b7.7c83 -> 0050.56b7.296d
- GRE: 8.0.0.1 -> 1.2.7.6 mpls_unicast
- }
+packet-generator new { \
+ name toqinq \
+ limit 2 \
+ node ethernet-input \
+ interface GigabitEthernet2/1/0 \
+ data { \
+ IP4: 0050.56b7.7c83 -> 0050.56b7.296d \
+ GRE: 8.0.0.1 -> 1.2.7.6 mpls_unicast \
+ } \
}
diff --git a/src/scripts/vnet/rpf b/src/scripts/vnet/rpf
index 7a6608e2667..80aa9bc3b67 100644
--- a/src/scripts/vnet/rpf
+++ b/src/scripts/vnet/rpf
@@ -1,13 +1,13 @@
-packet-generator new {
- name x
- limit 1
- node ip4-input
- size 64-64
- data {
- ICMP: 1.2.3.4 -> 5.6.7.8
- ICMP echo_request
- incrementing 100
- }
+packet-generator new { \
+ name x \
+ limit 1 \
+ node ip4-input \
+ size 64-64 \
+ data { \
+ ICMP: 1.2.3.4 -> 5.6.7.8 \
+ ICMP echo_request \
+ incrementing 100 \
+ } \
}
tr add pg-input 100
diff --git a/src/scripts/vnet/rtt-test b/src/scripts/vnet/rtt-test
index 5501b99dc45..73016331430 100644
--- a/src/scripts/vnet/rtt-test
+++ b/src/scripts/vnet/rtt-test
@@ -16,16 +16,16 @@ comment { trace add rtt-test-tx 100 }
comment { trace add ixge-input 100 }
comment { te rtt { 1.0.0.2 -> 2.0.0.2 count 1e4 rate 1e9 size 100 histogram-time 1e-5 } }
-packet-generator new {
- name x
- limit 1
- node ip4-input
- size 170-170
- data {
- ICMP: 1.0.0.2 -> 2.0.0.2
- ICMP echo_request
- incrementing 100
- }
+packet-generator new { \
+ name x \
+ limit 1 \
+ node ip4-input \
+ size 170-170 \
+ data { \
+ ICMP: 1.0.0.2 -> 2.0.0.2 \
+ ICMP echo_request \
+ incrementing 100 \
+ } \
}
diff --git a/src/scripts/vnet/source_and_port_range_check b/src/scripts/vnet/source_and_port_range_check
index 7eabde3127f..abe7034c576 100644
--- a/src/scripts/vnet/source_and_port_range_check
+++ b/src/scripts/vnet/source_and_port_range_check
@@ -4,40 +4,40 @@ create loop int
set int state loop0 up
set int ip addr loop0 10.10.10.10/32
-packet-generator new {
- name deny-from-default-route
- limit 1
- node ip4-input
- size 64-64
- data {
- UDP: 1.2.3.4 -> 5.6.7.8
- UDP: 3000 -> 3001
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name deny-from-default-route \
+ limit 1 \
+ node ip4-input \
+ size 64-64 \
+ data { \
+ UDP: 1.2.3.4 -> 5.6.7.8 \
+ UDP: 3000 -> 3001 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name allow
- limit 1
- node ip4-input
- size 64-64
- data {
- UDP: 1.1.1.1 -> 5.6.7.8
- UDP: 3000 -> 3001
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name allow \
+ limit 1 \
+ node ip4-input \
+ size 64-64 \
+ data { \
+ UDP: 1.1.1.1 -> 5.6.7.8 \
+ UDP: 3000 -> 3001 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name deny-from-port-range
- limit 1
- node ip4-input
- size 64-64
- data {
- UDP: 1.1.1.1 -> 5.6.7.8
- UDP: 6000 -> 6001
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name deny-from-port-range \
+ limit 1 \
+ node ip4-input \
+ size 64-64 \
+ data { \
+ UDP: 1.1.1.1 -> 5.6.7.8 \
+ UDP: 6000 -> 6001 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
set ip source-and-port-range-check 1.1.1.0/24 range 2000 - 3000 vrf 99
diff --git a/src/scripts/vnet/speed b/src/scripts/vnet/speed
index d60d671f29f..eecc1d3d1e9 100644
--- a/src/scripts/vnet/speed
+++ b/src/scripts/vnet/speed
@@ -1,13 +1,13 @@
-packet-generator new {
- name x
- limit 1
- node ip4-input
- size 50-50
- data {
- ICMP: 1.2.3.4 -> 5.6.7.8
- ICMP echo_request
- incrementing 100
- }
+packet-generator new { \
+ name x \
+ limit 1 \
+ node ip4-input \
+ size 50-50 \
+ data { \
+ ICMP: 1.2.3.4 -> 5.6.7.8 \
+ ICMP echo_request \
+ incrementing 100 \
+ } \
}
tr add pg-input 100
diff --git a/src/scripts/vnet/srp b/src/scripts/vnet/srp
index c20b38a6d20..d77b0bd27a8 100644
--- a/src/scripts/vnet/srp
+++ b/src/scripts/vnet/srp
@@ -3,16 +3,16 @@ srp create-interfaces
set int hw-class fake-srp0 srp
set int hw-class fake-srp1 srp
-packet-generator new {
- name x
- limit 1
- node ip4-input
- size 64-64
- data {
- ICMP: 1.0.0.2 -> 2.0.0.2
- ICMP echo_request
- incrementing 100
- }
+packet-generator new { \
+ name x \
+ limit 1 \
+ node ip4-input \
+ size 64-64 \
+ data { \
+ ICMP: 1.0.0.2 -> 2.0.0.2 \
+ ICMP echo_request \
+ incrementing 100 \
+ } \
}
tr add pg-input 100
diff --git a/src/scripts/vnet/tcp b/src/scripts/vnet/tcp
index 8c6c1077aa4..eaba0903c1b 100644
--- a/src/scripts/vnet/tcp
+++ b/src/scripts/vnet/tcp
@@ -2,16 +2,16 @@ loop create
set int ip address loop0 192.168.1.1/8
set int state loop0 up
-packet-generator new {
- name x
- limit 2048
- node ip4-input
- size 100-100
- interface loop0
- data {
- TCP: 192.168.1.2 -> 192.168.1.1
- TCP: 32415 -> 80
- SYN
- incrementing 100
- }
+packet-generator new { \
+ name x \
+ limit 2048 \
+ node ip4-input \
+ size 100-100 \
+ interface loop0 \
+ data { \
+ TCP: 192.168.1.2 -> 192.168.1.1 \
+ TCP: 32415 -> 80 \
+ SYN \
+ incrementing 100 \
+ } \
}
diff --git a/src/scripts/vnet/udp b/src/scripts/vnet/udp
index 8e3b75b1be1..3a8ead8c631 100644
--- a/src/scripts/vnet/udp
+++ b/src/scripts/vnet/udp
@@ -2,17 +2,17 @@ loop create
set int ip address loop0 192.168.1.1/8
set int state loop0 up
-packet-generator new {
- name udp
- limit 512
- rate 1e4
- node ip4-input
- size 100-100
- interface loop0
- data {
- UDP: 192.168.1.2 - 192.168.2.255 -> 192.168.1.1
- UDP: 4321 -> 1234
- length 72
- incrementing 100
- }
+packet-generator new { \
+ name udp \
+ limit 512 \
+ rate 1e4 \
+ node ip4-input \
+ size 100-100 \
+ interface loop0 \
+ data { \
+ UDP: 192.168.1.2 - 192.168.2.255 -> 192.168.1.1 \
+ UDP: 4321 -> 1234 \
+ length 72 \
+ incrementing 100 \
+ } \
}
diff --git a/src/scripts/vnet/uri/udp b/src/scripts/vnet/uri/udp
index bbbe2c1431d..4430b0f10cb 100644
--- a/src/scripts/vnet/uri/udp
+++ b/src/scripts/vnet/uri/udp
@@ -8,18 +8,18 @@ create host-interface name vpp1
set int state host-vpp1 up
set int ip address host-vpp1 6.0.1.1/24
-packet-generator new {
- name udp
- limit 512
- rate 1e4
- node ip4-input
- size 100-100
- interface loop0
- data {
- UDP: 192.168.1.2 - 192.168.2.255 -> 192.168.1.1
- UDP: 4321 -> 1234
- length 72
- incrementing 100
- }
+packet-generator new { \
+ name udp \
+ limit 512 \
+ rate 1e4 \
+ node ip4-input \
+ size 100-100 \
+ interface loop0 \
+ data { \
+ UDP: 192.168.1.2 - 192.168.2.255 -> 192.168.1.1 \
+ UDP: 4321 -> 1234 \
+ length 72 \
+ incrementing 100 \
+ } \
}
session enable
diff --git a/src/scripts/vnet/urpf b/src/scripts/vnet/urpf
index 1268ff50b72..48855e4b165 100644
--- a/src/scripts/vnet/urpf
+++ b/src/scripts/vnet/urpf
@@ -4,64 +4,64 @@ create loop int
set int state loop0 up
set int ip addr loop0 10.10.10.10/24
-packet-generator new {
- name transit-deny
- limit 1
- node ip4-input
- size 64-64
- data {
- UDP: 1.2.3.4 -> 2.2.2.2
- UDP: 3000 -> 3001
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name transit-deny \
+ limit 1 \
+ node ip4-input \
+ size 64-64 \
+ data { \
+ UDP: 1.2.3.4 -> 2.2.2.2 \
+ UDP: 3000 -> 3001 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name transit-allow
- limit 1
- node ip4-input
- size 64-64
- data {
- UDP: 1.1.1.1 -> 2.2.2.2
- UDP: 3000 -> 3001
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name transit-allow \
+ limit 1 \
+ node ip4-input \
+ size 64-64 \
+ data { \
+ UDP: 1.1.1.1 -> 2.2.2.2 \
+ UDP: 3000 -> 3001 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name transit-allow-from-excemption
- limit 1
- node ip4-input
- size 64-64
- data {
- UDP: 11.11.12.13 -> 2.2.2.2
- UDP: 6000 -> 6001
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name transit-allow-from-excemption \
+ limit 1 \
+ node ip4-input \
+ size 64-64 \
+ data { \
+ UDP: 11.11.12.13 -> 2.2.2.2 \
+ UDP: 6000 -> 6001 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name for-us-allow-from-excemption
- limit 1
- node ip4-input
- size 64-64
- data {
- UDP: 11.11.12.13 -> 10.10.10.10
- UDP: 6000 -> 6001
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name for-us-allow-from-excemption \
+ limit 1 \
+ node ip4-input \
+ size 64-64 \
+ data { \
+ UDP: 11.11.12.13 -> 10.10.10.10 \
+ UDP: 6000 -> 6001 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
-packet-generator new {
- name for-us-allow
- limit 1
- node ip4-input
- size 64-64
- data {
- UDP: 1.1.1.1 -> 10.10.10.10
- UDP: 3000 -> 3001
- length 128 checksum 0 incrementing 1
- }
+packet-generator new { \
+ name for-us-allow \
+ limit 1 \
+ node ip4-input \
+ size 64-64 \
+ data { \
+ UDP: 1.1.1.1 -> 10.10.10.10 \
+ UDP: 3000 -> 3001 \
+ length 128 checksum 0 incrementing 1 \
+ } \
}
tr add pg-input 100
diff --git a/src/scripts/vnet/vlan b/src/scripts/vnet/vlan
index eb3359ea499..130027b4b32 100644
--- a/src/scripts/vnet/vlan
+++ b/src/scripts/vnet/vlan
@@ -3,18 +3,18 @@ int create-sub fake-eth0 1
set int state fake-eth0 up
set int state fake-eth0.1 up
-packet-generator new {
- name x
- limit 1
- node ethernet-input
- interface fake-eth0
- size 64-64
- data {
- IP4: 1.2.3 -> 4.5.6 vlan 1
- ICMP: 1.2.3.4 -> 5.6.7.8
- ICMP echo_request
- incrementing 100
- }
+packet-generator new { \
+ name x \
+ limit 1 \
+ node ethernet-input \
+ interface fake-eth0 \
+ size 64-64 \
+ data { \
+ IP4: 1.2.3 -> 4.5.6 vlan 1 \
+ ICMP: 1.2.3.4 -> 5.6.7.8 \
+ ICMP echo_request \
+ incrementing 100 \
+ } \
}
tr add pg-input 100
diff --git a/src/vlib/unix/cli.c b/src/vlib/unix/cli.c
index 244c8df3b90..cb8aa9f165a 100644
--- a/src/vlib/unix/cli.c
+++ b/src/vlib/unix/cli.c
@@ -3366,9 +3366,10 @@ unix_cli_exec (vlib_main_t * vm,
unformat_input_t * input, vlib_cli_command_t * cmd)
{
char *file_name;
- int fd;
- unformat_input_t sub_input;
+ int fd, rv = 0;
+ unformat_input_t sub_input, in;
clib_error_t *error;
+ clib_macro_main_t *mm = 0;
unix_cli_main_t *cm = &unix_cli_main;
unix_cli_file_t *cf;
u8 *file_data = 0;
@@ -3405,8 +3406,14 @@ unix_cli_exec (vlib_main_t * vm,
goto done;
}
+ if (s.st_size < 1)
+ {
+ error = clib_error_return (0, "empty file `%s'", file_name);
+ goto done;
+ }
+
/* Read the file */
- vec_validate (file_data, s.st_size);
+ vec_validate (file_data, s.st_size - 1);
if (read (fd, file_data, s.st_size) != s.st_size)
{
@@ -3416,42 +3423,43 @@ unix_cli_exec (vlib_main_t * vm,
goto done;
}
- /* The macro expander expects a c string... */
- vec_add1 (file_data, 0);
-
unformat_init_vector (&sub_input, file_data);
- /* Run the file contents through the macro processor */
- if (vec_len (sub_input.buffer) > 1)
+ /* Initial config process? Use the global macro table. */
+ if (pool_is_free_index (cm->cli_file_pool, cm->current_input_file_index))
+ mm = &cm->macro_main;
+ else
{
- u8 *expanded;
- clib_macro_main_t *mm = 0;
+ /* Otherwise, use the per-cli-process macro table */
+ cf = pool_elt_at_index (cm->cli_file_pool, cm->current_input_file_index);
+ mm = &cf->macro_main;
+ }
- /* Initial config process? Use the global macro table. */
- if (pool_is_free_index
- (cm->cli_file_pool, cm->current_input_file_index))
- mm = &cm->macro_main;
- else
+ while (rv == 0 && unformat_user (&sub_input, unformat_vlib_cli_line, &in))
+ {
+ /* Run the file contents through the macro processor */
+ if (vec_len (in.buffer) > 1)
{
- /* Otherwise, use the per-cli-process macro table */
- cf = pool_elt_at_index (cm->cli_file_pool,
- cm->current_input_file_index);
- mm = &cf->macro_main;
+ u8 *expanded;
+
+ /* The macro expander expects a c string... */
+ vec_add1 (in.buffer, 0);
+
+ expanded =
+ (u8 *) clib_macro_eval (mm, (i8 *) in.buffer, 1 /* complain */,
+ 0 /* level */, 8 /* max_level */);
+ /* Macro processor NULL terminates the return */
+ vec_dec_len (expanded, 1);
+ vec_reset_length (in.buffer);
+ vec_append (in.buffer, expanded);
+ vec_free (expanded);
}
- expanded = (u8 *) clib_macro_eval (mm,
- (i8 *) sub_input.buffer,
- 1 /* complain */ ,
- 0 /* level */ ,
- 8 /* max_level */ );
- /* Macro processor NULL terminates the return */
- vec_dec_len (expanded, 1);
- vec_reset_length (sub_input.buffer);
- vec_append (sub_input.buffer, expanded);
- vec_free (expanded);
+ if ((rv = vlib_cli_input (vm, &in, 0, 0)) != 0)
+ error = clib_error_return (0, "CLI line error: %U",
+ format_unformat_error, &in);
+ unformat_free (&in);
}
-
- vlib_cli_input (vm, &sub_input, 0, 0);
unformat_free (&sub_input);
done:
diff --git a/src/vnet/pg/example.script b/src/vnet/pg/example.script
index 0e29b9ecae6..662088657bf 100644
--- a/src/vnet/pg/example.script
+++ b/src/vnet/pg/example.script
@@ -1,6 +1,6 @@
-packet-generator new {
- name x
- limit 1
- node ethernet-input
- data { IP: 1.2.3 -> 4.5.6 incrementing 100 }
+packet-generator new { \
+ name x \
+ limit 1 \
+ node ethernet-input \
+ data { IP: 1.2.3 -> 4.5.6 incrementing 100 } \
}