From b1c37ed9fe0e2cfac2ac46d757c6037c1c5436c2 Mon Sep 17 00:00:00 2001 From: John Southworth Date: Tue, 16 Aug 2011 18:26:24 -0500 Subject: Create new ping command with the following semantics 1. ping will use * ping for a v4 address * ping6 for a v6 address * ping or ping6 for a hostname which ever resolves prefering ipv4 2. ping ipv4 will ping 3. ping ipv6 will ping6 4. ping option * allows for options to pass down to ping * this is a stop gap while we add the most common options * to the CLI (cherry picked from commit 5145fd68da8f1c7f8289b99f58cb6eb96389fcef) --- templates/ping/ipv4/node.def | 4 ++++ templates/ping/ipv4/node.tag/node.def | 8 ++++++++ templates/ping/ipv4/node.tag/options/node.def | 8 ++++++++ templates/ping/ipv4/node.tag/options/node.tag/node.def | 8 ++++++++ 4 files changed, 28 insertions(+) create mode 100644 templates/ping/ipv4/node.def create mode 100644 templates/ping/ipv4/node.tag/node.def create mode 100644 templates/ping/ipv4/node.tag/options/node.def create mode 100644 templates/ping/ipv4/node.tag/options/node.tag/node.def (limited to 'templates/ping/ipv4') diff --git a/templates/ping/ipv4/node.def b/templates/ping/ipv4/node.def new file mode 100644 index 0000000..500ee3a --- /dev/null +++ b/templates/ping/ipv4/node.def @@ -0,0 +1,4 @@ +# +# Operational mode template for the "ping" command +# +help: Send IPv4 Internet Control Message Protocol (ICMP) echo request diff --git a/templates/ping/ipv4/node.tag/node.def b/templates/ping/ipv4/node.tag/node.def new file mode 100644 index 0000000..3b5d1a9 --- /dev/null +++ b/templates/ping/ipv4/node.tag/node.def @@ -0,0 +1,8 @@ +# +# Operational mode front-end for "ping" command +# + +help: Send IPv4 ICMP echo request to specified +allowed: echo -n ' ' + +run: /bin/ping $2 diff --git a/templates/ping/ipv4/node.tag/options/node.def b/templates/ping/ipv4/node.tag/options/node.def new file mode 100644 index 0000000..90b225d --- /dev/null +++ b/templates/ping/ipv4/node.tag/options/node.def @@ -0,0 +1,8 @@ +# +# Operational mode front-end for "ping" command +# + +help: Supply advanced options to ping +allowed: echo -n 'option text' + + diff --git a/templates/ping/ipv4/node.tag/options/node.tag/node.def b/templates/ping/ipv4/node.tag/options/node.tag/node.def new file mode 100644 index 0000000..9d4fdca --- /dev/null +++ b/templates/ping/ipv4/node.tag/options/node.tag/node.def @@ -0,0 +1,8 @@ +# +# Operational mode front-end for "ping" command +# + +help: Supply advanced options to ping +allowed: echo -n '' + +run: /bin/ping ${*:5} $3 -- cgit v1.2.3