|
@@ -1,214 +0,0 @@
|
|
|
-<?xml version="1.0" encoding="UTF-8"?>
|
|
|
-<CLISH_MODULE xmlns="http://clish.sourceforge.net/XMLSchema"
|
|
|
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
- xsi:schemaLocation="http://clish.sourceforge.net/XMLSchema
|
|
|
- http://clish.sourceforge.net/XMLSchema/clish.xsd">
|
|
|
- <!--=======================================================-->
|
|
|
-
|
|
|
-<VIEW name="ping-view"
|
|
|
- prompt="${SYSTEM_NAME}# ">
|
|
|
-
|
|
|
-<!-- commands set: ping, ping6, arping, traceroute, traceroute6 -->
|
|
|
-<!-- ping, ping6, arping -->
|
|
|
- <COMMAND name="ping"
|
|
|
- help="Send messages to network hosts"
|
|
|
- lock="false"
|
|
|
- interrupt="true">
|
|
|
- <PARAM name="proto"
|
|
|
- help="Protocol to use for the ping"
|
|
|
- optional="true"
|
|
|
- mode="switch"
|
|
|
- ptype="SUBCOMMAND">
|
|
|
- <PARAM name="ip"
|
|
|
- help="Send ICMP IPv4 messages to network hosts (default)"
|
|
|
- mode="subcommand"
|
|
|
- ptype="SUBCOMMAND"/>
|
|
|
- <PARAM name="ipv6"
|
|
|
- help="Send ICMP IPv6 messages to network hosts"
|
|
|
- mode="subcommand"
|
|
|
- ptype="SUBCOMMAND"/>
|
|
|
- <PARAM name="arp"
|
|
|
- help="Send ARP requests to a neighbour host"
|
|
|
- mode="subcommand"
|
|
|
- ptype="SUBCOMMAND"/>
|
|
|
- </PARAM>
|
|
|
- <PARAM name="dst"
|
|
|
- help="Hostname or IP-address to ping"
|
|
|
- ptype="STRING"/>
|
|
|
- <PARAM name="source"
|
|
|
- help="Source IP-address (ip) or interface (ip and arp)"
|
|
|
- optional="true"
|
|
|
- mode="subcommand"
|
|
|
- ptype="SUBCOMMAND">
|
|
|
- <PARAM name="src"
|
|
|
- help="Source IP-address (ip) or interface name (ip and arp)"
|
|
|
- ptype="STRING"/>
|
|
|
- </PARAM>
|
|
|
- <PARAM name="repeat"
|
|
|
- help="Requests to send count, default is 5"
|
|
|
- optional="true"
|
|
|
- mode="subcommand"
|
|
|
- ptype="SUBCOMMAND">
|
|
|
- <PARAM name="count"
|
|
|
- help="Requests count"
|
|
|
- ptype="UINT"/>
|
|
|
- </PARAM>
|
|
|
- <PARAM name="resolve"
|
|
|
- test='"${proto}"!="arp"'
|
|
|
- help="Resolve names"
|
|
|
- optional="true"
|
|
|
- mode="subcommand"
|
|
|
- ptype="SUBCOMMAND"/>
|
|
|
- <PARAM name="broadcast"
|
|
|
- test='"${proto}"!="arp"'
|
|
|
- help="Ping broadcast address"
|
|
|
- optional="true"
|
|
|
- mode="subcommand"
|
|
|
- ptype="SUBCOMMAND"/>
|
|
|
- <PARAM name="size"
|
|
|
- test='"${proto}"!="arp"'
|
|
|
- help="Packet size"
|
|
|
- optional="true"
|
|
|
- mode="subcommand"
|
|
|
- ptype="SUBCOMMAND">
|
|
|
- <PARAM name="psize"
|
|
|
- help="Number of data bytes to send"
|
|
|
- ptype="UINT"/>
|
|
|
- </PARAM>
|
|
|
- <PARAM name="interval"
|
|
|
- test='"${proto}"!="arp"'
|
|
|
- help="The time interval between packets, default is 1"
|
|
|
- optional="true"
|
|
|
- mode="subcommand"
|
|
|
- ptype="SUBCOMMAND">
|
|
|
- <PARAM name="period"
|
|
|
- help="Interval between packets"
|
|
|
- ptype="STRING"/>
|
|
|
- </PARAM>
|
|
|
- <PARAM name="flood"
|
|
|
- test='"${proto}"!="arp"'
|
|
|
- help="Flood ping"
|
|
|
- optional="true"
|
|
|
- mode="subcommand"
|
|
|
- ptype="SUBCOMMAND"/>
|
|
|
- <PARAM name="duplicate-detect"
|
|
|
- test='"${proto}"="arp"'
|
|
|
- help="Duplicate address detection mode"
|
|
|
- optional="true"
|
|
|
- mode="subcommand"
|
|
|
- ptype="SUBCOMMAND"/>
|
|
|
- <ACTION>
|
|
|
- case "${proto}" in
|
|
|
- "ipv6")
|
|
|
- cmd="ping6"
|
|
|
- ;;
|
|
|
- "arp")
|
|
|
- cmd="arping"
|
|
|
- ;;
|
|
|
- *)
|
|
|
- cmd="ping"
|
|
|
- ;;
|
|
|
- esac
|
|
|
- if test "${proto}" != "arp"; then
|
|
|
- # Resolve names
|
|
|
- if test -z "${resolve}"; then
|
|
|
- cmd=$cmd" -n"
|
|
|
- fi
|
|
|
- # Ping broadcast
|
|
|
- cmd=$cmd"`expr substr '${ -b :broadcast}' 1 3`"
|
|
|
- # Packet size
|
|
|
- cmd=$cmd"${ -s :psize}"
|
|
|
- # Interval between packets
|
|
|
- if test -n "${period}"; then
|
|
|
- cmd=$cmd"${ -i :period}"
|
|
|
- else
|
|
|
- cmd=$cmd" -i 1"
|
|
|
- fi
|
|
|
- # Flood ping
|
|
|
- cmd=$cmd"`expr substr '${ -f :flood}' 1 3`"
|
|
|
- else
|
|
|
- # Detect MAC duplicate
|
|
|
- cmd=$cmd"`expr substr '${ -D :duplicate-detect}' 1 3`"
|
|
|
- fi
|
|
|
- # Interface or address
|
|
|
- cmd=$cmd"${ -I :src}"
|
|
|
- # Request count
|
|
|
- if test -z "${count}"; then
|
|
|
- cmd=$cmd" -c 5"
|
|
|
- else
|
|
|
- cmd=$cmd"${ -c :count}"
|
|
|
- fi
|
|
|
- #
|
|
|
- cmd=$cmd" ${dst}"
|
|
|
- $cmd
|
|
|
- </ACTION>
|
|
|
- </COMMAND>
|
|
|
-
|
|
|
-<!-- traceroute, traceroute6 -->
|
|
|
- <COMMAND name="traceroute"
|
|
|
- help="Print the route packets trace to network host"
|
|
|
- lock="false"
|
|
|
- interrupt="true">
|
|
|
- <PARAM name="proto"
|
|
|
- help="Protocol to use"
|
|
|
- optional="true"
|
|
|
- mode="switch"
|
|
|
- ptype="SUBCOMMAND">
|
|
|
- <PARAM name="ip"
|
|
|
- help="IPv4"
|
|
|
- mode="subcommand"
|
|
|
- ptype="SUBCOMMAND"/>
|
|
|
- <PARAM name="ipv6"
|
|
|
- help="IPv6"
|
|
|
- mode="subcommand"
|
|
|
- ptype="SUBCOMMAND"/>
|
|
|
- </PARAM>
|
|
|
- <PARAM name="dst"
|
|
|
- help="Hostname or IP-address to trace the route"
|
|
|
- ptype="STRING"/>
|
|
|
- <PARAM name="resolve"
|
|
|
- help="Resolve names"
|
|
|
- ptype="SUBCOMMAND"
|
|
|
- mode="subcommand"
|
|
|
- optional="true"/>
|
|
|
- <PARAM name="source"
|
|
|
- help="Source IP-address"
|
|
|
- optional="true"
|
|
|
- mode="subcommand"
|
|
|
- ptype="SUBCOMMAND">
|
|
|
- <PARAM name="src"
|
|
|
- help="IP-address"
|
|
|
- ptype="STRING"/>
|
|
|
- </PARAM>
|
|
|
- <PARAM name="interface"
|
|
|
- help="Source interface"
|
|
|
- optional="true"
|
|
|
- mode="subcommand"
|
|
|
- ptype="SUBCOMMAND">
|
|
|
- <PARAM name="if"
|
|
|
- help="Interface name"
|
|
|
- ptype="STRING"/>
|
|
|
- </PARAM>
|
|
|
- <ACTION>
|
|
|
- if test -n "${ipv6}"; then
|
|
|
- cmd="traceroute6"
|
|
|
- else
|
|
|
- cmd="traceroute"
|
|
|
- fi
|
|
|
- #Resolve names
|
|
|
- if test -z "${resolve}"; then
|
|
|
- cmd=$cmd" -n"
|
|
|
- fi
|
|
|
- # Source address
|
|
|
- cmd=$cmd"${ -s :src}"
|
|
|
- # Source interface
|
|
|
- cmd=$cmd"${ -i :if}"
|
|
|
- #
|
|
|
- cmd=$cmd" ${dst}"
|
|
|
- $cmd
|
|
|
- </ACTION>
|
|
|
- </COMMAND>
|
|
|
-
|
|
|
-</VIEW>
|
|
|
-
|
|
|
-</CLISH_MODULE>
|