aboutsummaryrefslogtreecommitdiff
path: root/example/packet/packet_dump_run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'example/packet/packet_dump_run.sh')
-rwxr-xr-xexample/packet/packet_dump_run.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/example/packet/packet_dump_run.sh b/example/packet/packet_dump_run.sh
new file mode 100755
index 000000000..fea5d8b3c
--- /dev/null
+++ b/example/packet/packet_dump_run.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+#
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright (c) 2018 Linaro Limited
+#
+
+if [ -f ./pktio_env ]; then
+ . ./pktio_env
+else
+ echo "BUG: unable to find pktio_env!"
+ echo "pktio_env has to be in current directory"
+ exit 1
+fi
+
+setup_interfaces
+
+./odp_packet_dump${EXEEXT} -i $IF0 -n 10 -o 0 -l 64
+STATUS=$?
+if [ "$STATUS" -ne 0 ]; then
+ echo "Error: status was: $STATUS, expected 0"
+ exit 1
+fi
+
+cleanup_interfaces
+
+exit 0