summaryrefslogtreecommitdiffstats
path: root/extras/pcapcli
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-09-09 16:38:17 -0400
committerDave Barach <dave@barachs.net>2019-09-10 15:20:08 -0400
commit4b943d632864949310da4c88ea00e59f6043ae40 (patch)
tree0d88295ff7420659dcd25ad79a39dea1cc41c967 /extras/pcapcli
parent1dafb7fd83b36640557be41e6aa2ea95e663c40b (diff)
misc: clean up "pcap [rx|tx] trace" debug CLI
Separate debug CLI arg parsing from the underlying action function. Fixes a number of subtle ordering dependencies, and will allow us to add a binary API to control the feature at some point in the future. Type: refactor Ticket: VPP-1770 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Id0dbeda06dad20e756c941c691e2088ce3c50ec7 (cherry picked from commit b97641c79f4aaf0069268c550f263167ddea2b34)
Diffstat (limited to 'extras/pcapcli')
-rw-r--r--extras/pcapcli/setup.pcapcli34
1 files changed, 34 insertions, 0 deletions
diff --git a/extras/pcapcli/setup.pcapcli b/extras/pcapcli/setup.pcapcli
new file mode 100644
index 00000000000..66f3caebf63
--- /dev/null
+++ b/extras/pcapcli/setup.pcapcli
@@ -0,0 +1,34 @@
+set term pag off
+loop create
+loop create
+set int ip address loop0 192.168.1.1/24
+set int state loop0 up
+
+set int ip address loop1 192.168.2.1/24
+set int state loop1 up
+
+packet-generator new {
+ name pg0
+ limit 1
+ size 300-300
+ interface loop0
+ node ethernet-input
+ data { IP4: 1.2.3 -> 4.5.6
+ UDP: 192.168.1.10 -> 192.168.2.10
+ UDP: 1234 -> 2345
+ incrementing 286
+ }
+}
+
+packet-generator new {
+ name pg1
+ limit 1
+ size 300-300
+ interface loop1
+ node ethernet-input
+ data { IP4: 1.2.3 -> 4.5.6
+ UDP: 192.168.2.10 -> 192.168.1.10
+ UDP: 1234 -> 2345
+ incrementing 286
+ }
+}