You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2014/05/22 05:20:43 UTC

[1/7] TS-1665 Remove traffic_shell

Repository: trafficserver
Updated Branches:
  refs/heads/master a0733c40f -> 2369a1a49


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_logging.1
----------------------------------------------------------------------
diff --git a/doc/man/config_logging.1 b/doc/man/config_logging.1
deleted file mode 100644
index d00934b..0000000
--- a/doc/man/config_logging.1
+++ /dev/null
@@ -1,160 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:logging"
-.SH NAME
-config:logging \- Enables and configures logging parameters.
-.SH SYNOPSIS
-config:logging [options]
-.SH DESCRIPTION
-Use the config:logging command to enable and configure logging. Use the 
-config:logging command to specify format, type, storage, splitting, rolling, and 
-other parameters. When you execute the config:logging command, you must use one 
-of the options described below.
-.SH OPTIONS
-The following options are supported for the config:logging command:
-.SS "event <enabled | trans-only | error-only | disabled>"
-Enables and disables event logging. Type trans-only to log only transactions. 
-Type error-only to log only errors. Type enabled to enable full logging that 
-includes errors and transactions. Type disabled to disable logging completely. 
-(The default value is enabled.)
-.SS "mgmt-directory <dir>"
-Specifies the full path to the logging directory. (The default is 
-/home/inktomi/5.0.0/logs.)
-.SS "space-limit <mb>"
-Specifies the amount of space allocated to the logging directory in MB. (The 
-default value is 2000MB.)
-.SS "space-headroom <mb>"
-Specifies the tolerance for the log space limit.(The default value is 10MB.)
-.SS "collation-status <inactive | host | send-standard | send-custom | send-all>"
-Specifies the log collation mode. Type inactive to disable collation. Type host 
-to specify the local host as a collation server. Type send-standard to specify 
-the local host as collation client that sends entries using standard formats to 
-the collation server. Type send-custom to specify this host as a collation 
-client that sends entries using the traditional custom formats to the collation 
-server. Type send-all to specify this host as a collation client that sends 
-entries that use both the standard and traditional custom formats to the 
-collation server. (The default value is inactive.)
-.SS "collation-host <host>"
-Specifies the hostname of the log collation server. (The default value is NULL.)
-.SS "collation secret <secret> tagged <on | off> orphan-limit <orphan>"
-Specifies the password used to validate logging data and prevent the exchange of 
-unauthorized information when a collation server is being used. (The default 
-value is foobar.)
-Specifies the tagged option in log entry. When enabled (on), configures Traffic Server to include the hostname of the collation client that generated the log entry in each entry. (The default value is off.)
-Specifies the storage limit for orphan files in MB. (The default value is 
-25.)
-.SS "format <squid | netscape-common | netscape-ext | netscape-ext2> <on|off> type <ascii | binary> file <file> header <header>"
-Specifies which logging formats you want on/off. Also specifies the log file 
-type (ASCII or binary), file name, and header text. The default log file format 
-(on) is the Squid format. The default values for all formats are as follows:
-.PP
-.nf
-Squid Format ----------------------------- on
-  File Type ------------------------------ ASCII
-  File Name ------------------------------ squid
-  File Header ---------------------------- NULL
-
-Netscape Common -------------------------- off
-  File Type ------------------------------ ASCII
-  File Name ------------------------------ common
-  File Header ---------------------------- NULL
-
-Netscape Extended ------------------------ off
-  File Type ------------------------------ ASCII
-  File Name ------------------------------ extended
-  File Header ---------------------------- NULL
-
-Netscape Extended2 ----------------------- off
-  File Type ------------------------------ ASCII
-  File Name   ---------------------------- extended2
-  File Header ---------------------------- NULL
-
-.SS "splitting <icp | http> <on | off>"
-Enables (on) or disables (off) log splitting for ICP, and HTTP. When 
-enabled, the proxy stores the transactions for the protocol you choose in a 
-separate log file. (The default value is off for ICP and HTTP.)
-.SS"custom <on | off> format <traditional | xml>"
-Enables (on) or disables (off) custom logging. When you enable custom logging, 
-you must specify the format, traditional or XML. (The default values are off for 
-custom logging and traditional for format.)
-.SS "rolling <on | off> offset <hour> interval <num-hours> auto-delete <on | off>"
-Enables (on) or disables (off) log file rolling. (The default value is on.)
-The offset <hour> parameter specifies the hour of the day that starts the log 
-rolling period. (The default value is 0.) The interval <num-hours> parameter 
-specifies the log file rolling interval. (The default value is 86400 seconds.)  
-The auto-delete <on | off> parameter enables (on) or disables (off) the 
-automatic deletion of rolled log files. (The default value is on.)
-.SH EXAMPLES
-.SS "Example 1. Enabling error and transaction logging"
-.PP
-.nf
-traffic_shell> config:logging event enabled
-traffic_shell> 
-.SS "Example 2. Specifying the full path to the logging directory"
-.PP
-.nf
-traffic_shell> config:logging mgmt-directory /home/inktomi/rc4/logs
-traffic_shell> 
-.SS "Example 3. Specifying logging directory storage allocation (MB)"
-.PP
-.nf
-traffic_shell> config:logging space-limit 10
-traffic_shell> 
-.SS "Example 4. Specifying the tolerance for the log space limit"
-.PP
-.nf
-traffic_shell> config:logging space-headroom 100
-traffic_shell> 
-.SS "Example 5. Configuring the host to send entries using the "
-.SS "           traditional custom formats to the collation server"
-.PP
-.nf
-traffic_shell> config:logging collation-status send-custom
-traffic_shell> 
-.SS "Example 6. Specifying the hostname (jupiter) of the log"
-.SS "           collation server"
-.PP
-.nf
-traffic_shell> config:logging collation-host jupiter
-traffic_shell> 
-.SS "Example 7. Specifying the password used to validate logging"
-.SS "           data, configuring logging to include the hostname"
-.SS "           of the collation, and specifying 10MB as the "
-.SS "           storage limit for orphan files"
-.PP
-.nf
-traffic_shell> config:logging collation secret foobar tagged on orphan-limit 10
-traffic_shell> 
-.SS "Example 8. Enabling the Squid logging format, and specifying"
-.SS "           the ASCII file type and squid.log file name"
-.PP
-.nf
-traffic_shell> config:log format squid on type ascii file squid.log
-traffic_shell> 
-.SS "Example 9. Enabling custom XML logging"
-.PP
-.nf
-traffic_shell> config:logging custom on format xml
-traffic_shell> 
-.SS "Example 10. Enabling log rolling, to begin rolling at "
-.SS "            midnight, with an interval of 60 seconds and"
-.SS "            no automatic deletion of rolled files"
-.PP
-.nf
-traffic_shell> config:logging rolling on offset 0 interval 1 auto-delete off
-traffic_shell> 
-.SH "SEE ALSO"
-show:logging, show:logging-stats

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_name.1
----------------------------------------------------------------------
diff --git a/doc/man/config_name.1 b/doc/man/config_name.1
deleted file mode 100644
index c85e47a..0000000
--- a/doc/man/config_name.1
+++ /dev/null
@@ -1,36 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:name"
-.SH NAME
-config:name \- Sets the name of the proxy.
-.SH SYNOPSIS
-config:name [hostname]
-.SH DESCRIPTION
-The config:name command enables you to set the name of your proxy system. 
-.SH OPERANDS
-The following operand is supported:
-.SS "<proxyname>"
-The hostname is your name for your proxy system.
-.SH EXAMPLES
-.SS "When you execute the config:name command, you see "
-.SS "results in the following format:"
-.PP
-.nf
-traffic_shell> config:name somename
-somename.yourdomain.com
-traffic_shell> 
-.SH "SEE ALSO"
-show:network

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_network.1
----------------------------------------------------------------------
diff --git a/doc/man/config_network.1 b/doc/man/config_network.1
deleted file mode 100644
index db638b3..0000000
--- a/doc/man/config_network.1
+++ /dev/null
@@ -1,75 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:network"
-.SH NAME
-config:network \- Configures system network settings.
-.SH SYNOPSIS
-config:network [options]
-.SH DESCRIPTION
-The config:network command enables you to configure network settings such as hostname, 
-defaultrouter, search-domain, dns, and interface settings.
-You must use one of the options described below.
-.SH OPTIONS
-The following options are supported for the config:network command:
-.SS "hostname <string>"
-Specifies the fully qualified hostname.
-.SS "defaultrouter <x.x.x.x>"
-Specifies the IP address of the default router.
-.SS "search-domain <string>"
-Specifies the search domain.
-.SS "dns <a.a.a.a b.b.b.b c.c.c.c>"
-Specifies the IP addresses of one or more DNS servers.
-.SS "int"
-Displays the Network Interfaces.
-.SS "int <interface>"
-Displays information pertaining to a Network Interface.
-.SS "int <interface> down"
-Bring down a Network Interface.
-.SS "int <interface> up <onboot | not-onboot> <static | dhcp> <ip> <netmask> <gateway>"
-Bring up a Network Interface with the specified settings: boot status, static IP versus DHCP, IP address, netmask, and gateway IP (or default).
-.SS "int <interface> <onboot | not-onboot>"
-Specify the boot status of a Network Interface.  NIC must already be up.
-.SS "int <interface> <static | dhcp>
-Specify static IP or DHCP for a Network Interface.  NIC must already be up.
-.SS "int <interface> ip <x.x.x.x>"
-Specify the IP address of a network interface.  NIC must already be up.
-.SS "int <interface> netmask <x.x.x.x>"
-Specify the netmask of a network interface.  NIC must already be up.
-.SS "int <interface> gateway <x.x.x.x | default>"
-Specify the gateway IP address, or default to use the defaultrouter.
-.SH EXAMPLES
-.SS "Example 1. Specifying the hostname"
-.PP
-.nf
-traffic_shell> config:network hostname host.example.com
-traffic_shell> 
-.SS "Example 2. Specifying multiple DNS servers"
-.PP
-.nf
-traffic_shell> config:network dns "x.x.x.x y.y.y.y z.z.z.z"
-traffic_shell> 
-.SS "Example 3. Listing the Network Interfaces"
-traffic_shell> config:network int
-eth0
-eth1
-traffic_shell> 
-.SS "Example 4. Bringing up a Network Interface with IP address x.x.x.x and netmask y.y.y.y"
-.PP
-.nf
-traffic_shell> config:network int eth0 onboot static x.x.x.x y.y.y.y default
-traffic_shell>
-.SH "SEE ALSO"
-show:network

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_parent.1
----------------------------------------------------------------------
diff --git a/doc/man/config_parent.1 b/doc/man/config_parent.1
deleted file mode 100644
index ae39549..0000000
--- a/doc/man/config_parent.1
+++ /dev/null
@@ -1,53 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:parent"
-.SH NAME
-config:parent \- Configure parent proxy caching.
-.SH SYNOPSIS
-config:parent [options]
-.SH DESCRIPTION
-You use the config:parent command to enable HTTP parent caching, specify a 
-parent cache, and indicate where the proxy should locate the parent.config file, 
-which contains specific parent cache configuration information.
-.SH OPTIONS
-The following options are supported for the config:parent command:
-.SS "status <on | off>"
-Enables (on) or disables (off) the HTTP parent caching option. (The default 
-value is off.)
-.SS "name <parent>"
-Specifies the parent cache. (The default value is NULL.)
-.SS "rules <url>"
-Specifies from which location (URL) the proxy should retrieve and install your 
-parent.config file.
-.SH EXAMPLES
-.SS "Example 1. Enabling HTTP parent caching"
-.PP
-.nf
-traffic_shell> config:parent status on 
-traffic_shell> 
-.SS "Example 2. Specifying the parent cache"
-.PP
-.nf
-traffic_shell> config:parent name www.example.com
-traffic_shell> 
-.SS "Example 3. Locating the access file to specify administrators"
-.SS "           with access to the Traffic Manager UI"
-.PP
-.nf
-traffic_shell> config:parent rules http://somedomain.com/path/parent.config 
-traffic_shell> 
-.SH "SEE ALSO"
-show:parent

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_port-tunnels.1
----------------------------------------------------------------------
diff --git a/doc/man/config_port-tunnels.1 b/doc/man/config_port-tunnels.1
deleted file mode 100644
index 5dd4102..0000000
--- a/doc/man/config_port-tunnels.1
+++ /dev/null
@@ -1,35 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:port-tunnels"
-.SH NAME
-config:port-tunnels \- Configures port tunnels.
-.SH SYNOPSIS
-config:port-tunnels [server-other-ports]
-.SH DESCRIPTION
-Use the config:port-tunnels command to specify a port for the proxy to use for 
-tunneling.
-.SH OPTIONS
-The following option is supported for the config:port-tunnels command:
-.SS "server-other-ports <port>"
-Specifies a port for tunneling. (The default value is NULL.)
-.SH EXAMPLE
-.SS "Specifying a port for the proxy to use for tunneling"
-.PP
-.nf
-traffic_shell> config:port-tunnels server-other-ports 5678
-traffic_shell> 
-.SH "SEE ALSO"
-show:port-tunnels, show:remap

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_remap.1
----------------------------------------------------------------------
diff --git a/doc/man/config_remap.1 b/doc/man/config_remap.1
deleted file mode 100644
index 7d18580..0000000
--- a/doc/man/config_remap.1
+++ /dev/null
@@ -1,35 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:remap"
-.SH NAME
-config:remap \- Specify the location of your remap.config file.
-.SH SYNOPSIS
-config:remap [url]
-.SH DESCRIPTION
-You use the config:remap command to specify from which location (URL) the proxy 
-should retrieve and install your remap.config file.
-.SH OPERAND
-The following operand is supported for the config:remap command:
-.SS "<url>"
-Specifies the location of your remap.config file.
-.SH EXAMPLE
-.SS "Specifying the location of your remap.config file"
-.PP
-.nf
-traffic_shell> config:remap http://somedomain.com/path/remap.config 
-traffic_shell>
-.SH "SEE ALSO"
-show:remap

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_reset-stats.1
----------------------------------------------------------------------
diff --git a/doc/man/config_reset-stats.1 b/doc/man/config_reset-stats.1
deleted file mode 100644
index 2b09e2a..0000000
--- a/doc/man/config_reset-stats.1
+++ /dev/null
@@ -1,46 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:reset-stats"
-
-.SH NAME
-
-config:reset-stats \- Resets all statistics.
-
-.SH SYNOPSIS
-
-config:reset-stats
-
-.SH DESCRIPTION
-
-The config:reset-stats command resets all statistics. (See the "See Also" 
-section below for a list of commands that display statistics.) The config:reset-
-stats command takes no options. 
-
-.SH EXAMPLES
-
-.TP
-
-When you execute the config:reset-stats command, you see results in the 
-following format:
-
-.TP
-ts_shell>config:reset-stats
-  +OK
-ts_shell>
-
-.SH "SEE ALSO"
-show:cache-stats, show:dns-stats, show:hostdb-stats, show:http-stats, 
-show:proxy-stats, show:http-trans-stats, show:icp-stats, show:logging-stats

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_restart.1
----------------------------------------------------------------------
diff --git a/doc/man/config_restart.1 b/doc/man/config_restart.1
deleted file mode 100644
index cc4e979..0000000
--- a/doc/man/config_restart.1
+++ /dev/null
@@ -1,33 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:restart"
-.SH NAME
-config:restart \- Restarts the proxy software.
-.SH SYNOPSIS
-config:restart [options]
-.SH DESCRIPTION
-The config:restart command restarts your proxy software. When you execute the
-config:restart command, you may use one of the options described below.
-.SS "cluster"
-Specifies cluster-wide restart.
-.SH EXAMPLES
-When you execute the config:restart command, you see results in the following format.
-.PP
-.nf
-traffic_shell> config:restart
-traffic_shell>
-.SH "SEE ALSO"
-config:start, config:stop, config:hard-restart

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_root.1
----------------------------------------------------------------------
diff --git a/doc/man/config_root.1 b/doc/man/config_root.1
deleted file mode 100644
index e527c51..0000000
--- a/doc/man/config_root.1
+++ /dev/null
@@ -1,34 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:root"
-.SH NAME
-config:root \- Switch to root user.
-.SH SYNOPSIS
-config:root
-.SH DESCRIPTION
-If you want to become the root user type the config:root command.  
-You will be prompted to enter the root password.  The config:root command takes no options.
-.SH EXAMPLE 
-.TP
-.fi
-When you execute the config:root command, you see the following:
-.PP
-.nf
-traffic_shell> config:root
-Password: (enter password)
-traffic_shell#
-.SH "SEE ALSO"
-enable, disable, exit

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_scheduled-update.1
----------------------------------------------------------------------
diff --git a/doc/man/config_scheduled-update.1 b/doc/man/config_scheduled-update.1
deleted file mode 100644
index 3b82434..0000000
--- a/doc/man/config_scheduled-update.1
+++ /dev/null
@@ -1,84 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:scheduled-update"
-.SH NAME
-config:scheduled-update \- Enables and configures the scheduled update option.
-.SH SYNOPSIS
-config:scheduled-update [options]
-.SH DESCRIPTION
-When you enable scheduled update, the proxy can automatically update certain 
-objects in the local cache at a specified time. When you execute the 
-config:scheduled-update command, you must use one of the options described 
-below.
-.SH OPTIONS
-The following options are supported for the config:scheduled-update command:
-.SS "status <on | off>"
-Enables (on) or disables (off) the scheduled update option. When this option is 
-enabled, the proxy can automatically update certain objects in the local cache 
-at a specified time. (The default value is disabled.)
-.SS "retry-count <integer>"
-The retry count specifies the number of times the proxy can retry the scheduled 
-update of a URL in the event of failure. (The default value is 10.) 
-.SS "retry-interval <seconds>"
-The interval specifies the delay in seconds between each scheduled update retry for a URL in 
-the event of failure. (The default value is 2 seconds.)
-.SS "max-concurrent <integer>"
-Specifies the maximum number of simultaneous update requests allowed at any 
-point in time. This option prevents the scheduled update process from 
-overburdening the host. (The default value is 100.)
-.SS "force-immediate <on | off>"
-Enables (on) or disables (off) a force immediate update. When enabled, the proxy 
-overrides the scheduling expiration time for all scheduled update entries and 
-initiates updates until this option is disabled.(The default value is disabled.)
-.SS "rules <url>"
-Specifies the location (URL) from which the proxy should retrieve your scheduled 
-update rules file. The proxy retrieves your rules file and saves it locally as 
-update.config. The update.config file controls how the proxy performs a 
-scheduled update of specific local cache content.
-Once you use the rules option with a URL, thereby saving your update.config 
-file, you can use the rules option (without typing a URL) to display the 
-update.config file.
-.SH EXAMPLES
-.SS "Example 1. Enabling the scheduled update option"
-.PP
-.nf
-traffic_shell> config:scheduled-update on
-traffic_shell> 
-.SS "Example 2. Specifying the number of retries allowed in case of failure and the delay between each retry"
-.PP
-.nf
-traffic_shell> config:scheduled-update retry count 10 interval 2
-traffic_shell> 
-.SS "Example 3. Disabling the force immediate updates option"
-.PP
-.nf
-traffic_shell> config:scheduled-update force-immediate off
-traffic_shell> 
-.SS "Example 4. Specifying the location (URL) from which the proxy should retrieve your scheduled update rules file to be saved locally as the update.config file"
-.PP
-.nf
-traffic_shell> config:scheduled-update rules http://somedomain.com/~path/rulesfile
-traffic_shell> 
-.SS "Example 5. Displaying the update.config file"
-.PP
-.nf
-traffic_shell> config:scheduled-update rules
-  update.config rules
-  ------------------- 
-  (Displays the rules from the update.config file.)
-traffic_shell>
-.SH "SEE ALSO"
-show:scheduled-update

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_security.1
----------------------------------------------------------------------
diff --git a/doc/man/config_security.1 b/doc/man/config_security.1
deleted file mode 100644
index b3e2381..0000000
--- a/doc/man/config_security.1
+++ /dev/null
@@ -1,52 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:security"
-.SH NAME
-config:security \- This command enables you to apply Traffic Server and Traffic 
-Manager access configuration file settings to Traffic Server.
-.SH SYNOPSIS
-config:security [ip-allow | mgmt-allow | admin] [url-config-file]
-.SH DESCRIPTION
-The config:security command enables you to indicate from what URL Traffic Server 
-should retrieve the configuration file (IP_allow) that controls client access to 
-the Traffic Server proxy cache. The command also enables you to indicate from 
-what URL Traffic Server should retrieve the configuration file (mgmt_allow) that 
-controls remote host access to the Traffic Manager UI. Finally, the 
-config:security command enables you to indicate from what URL Traffic Server 
-should retrieve the configuration file (admin) (password) that controls 
-administrator access to Traffic Manager activities.
-.SH OPTIONS
-The following options are supported for the config:security command:
-.SS "ip-allow <url>"
-Specifies the configuration file that controls client access to the Traffic 
-Server proxy cache.
-.SS "mgmt-allow <url>"
-Specifies the configuration file that controls remote host access to the Traffic 
-Manager UI.
-.SS "admin <url>"
-Specifies the configuration file that controls administrator access to Traffic 
-Manager activities.
-.SS "password <string>"
-Specifies the administrator password that the administrator must use to access 
-the Traffic Manager UI.
-.SH EXAMPLES
-.SS "Example 1. Locating the access file to specify client access"
-.PP
-.nf
-traffic_shell> config:security ip-allow http://something.com/ip_allow.config
-traffic_shell> 
-.SH "SEE ALSO"
-show:security

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_set.1
----------------------------------------------------------------------
diff --git a/doc/man/config_set.1 b/doc/man/config_set.1
deleted file mode 100644
index 9d08faa..0000000
--- a/doc/man/config_set.1
+++ /dev/null
@@ -1,36 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:set"
-.SH NAME
-config:set \- Sets the value of a variable.
-.SH SYNOPSIS
-config:set [variable]
-.SH DESCRIPTION
-The config:set command enables you to set the value of a variable from the 
-records.config file. 
-.SH OPERANDS
-The following operand is supported:
-.SS "<variable> <value>"
-You must type the name of the records.config file variable for which you want to 
-set a value.
-.SH EXAMPLES
-When you execute the config:set command, you see results in the following format:
-.PP
-.nf
-traffic_shell> config:set proxy.config.http.server_port 8080
-traffic_shell>
-.SH "SEE ALSO"
-config:get

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_socks.1
----------------------------------------------------------------------
diff --git a/doc/man/config_socks.1 b/doc/man/config_socks.1
deleted file mode 100644
index c2f6839..0000000
--- a/doc/man/config_socks.1
+++ /dev/null
@@ -1,60 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:socks"
-.SH NAME
-config:socks \- Enable and configure SOCKS.
-.SH SYNOPSIS
-config:socks [options]
-.SH DESCRIPTION
-You use the config:socks command to enable the SOCKS option and configure SOCKS 
-parameters, including default servers, version, and port values.
-.SH OPTIONS
-The following options are supported for the config:socks command:
-.SS "status <on | off>"
-Enables (on) or disables (off) the SOCKS option. (The default value is 
-disabled.)
-.SS "version <integer>"
-Specifies the SOCKS version number.
-.SS "default-servers <string>"
-Specifies the IP address of the SOCKS server.
-.SS "accept <on | off>"
-Specifies whether SOCKS accept is on or off.
-.SS "accept-port <integer>"
-Specifies the port used by the proxy to communicate with the SOCKS server. (The 
-default value is 1080.)
-.SH EXAMPLES
-.SS "Example 1. Enabling the SOCKS option"
-.PP
-.nf
-traffic_shell> config:socks mode on
-traffic_shell> 
-.SS "Example 2. Specifying the SOCKS server IP address"
-.PP
-.nf
-traffic_shell> config:socks server-ip 209.1.1.1
-traffic_shell> 
-.SS "Example 3. Specifying the port used by the proxy to communicate with the SOCKS server"
-.PP
-.nf
-traffic_shell> config:socks port 1080
-traffic_shell> 
-.SS "Example 4. Specifying the timeout duration for the proxy to wait for a SOCKS server response"
-.PP
-.nf
-traffic_shell> config:socks timeout 100
-traffic_shell> 
-.SH "SEE ALSO"
-show:socks

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_ssl.1
----------------------------------------------------------------------
diff --git a/doc/man/config_ssl.1 b/doc/man/config_ssl.1
deleted file mode 100644
index 8f7d4e9..0000000
--- a/doc/man/config_ssl.1
+++ /dev/null
@@ -1,43 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:ssl"
-.SH NAME
-config:ssl \- Configures SSL protocol settings.
-.SH SYNOPSIS
-config:ssl [options]
-.SH DESCRIPTION
-The config:ssl command enables you to configure SSL protocol settings
-through a variety of options. 
-You must use one of the options described below.
-.SH OPTIONS
-The following options are supported for the config:ssl command:
-.SS "status <on | off>"
-Enables (on) or disables (off) SSL connections.
-.SS "ports <portno>"
-Specifies the port number for SSL.
-.SH EXAMPLES
-.SS "Example 1. Enabling SSL"
-.PP
-.nf
-traffic_shell> config:ssl status on
-traffic_shell> 
-.SS "Example 2. Specifying the SSL port number"
-.PP
-.nf
-traffic_shell> config:ssl port 4443
-traffic_shell> 
-.SH "SEE ALSO"
-show:ssl

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_start.1
----------------------------------------------------------------------
diff --git a/doc/man/config_start.1 b/doc/man/config_start.1
deleted file mode 100644
index 28be29b..0000000
--- a/doc/man/config_start.1
+++ /dev/null
@@ -1,32 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:start"
-.SH NAME
-config:start \- Starts the proxy software.
-.SH SYNOPSIS
-config:start
-.SH DESCRIPTION
-The config:start command starts your proxy software. The config:start command 
-takes no options. 
-.SH EXAMPLES
-When you execute the config:start command, you see results in the following 
-format:
-.PP
-.nf
-traffic_shell> config:start
-traffic_shell>
-.SH "SEE ALSO"
-config:stop, config:restart, config:hard-restart

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_stop.1
----------------------------------------------------------------------
diff --git a/doc/man/config_stop.1 b/doc/man/config_stop.1
deleted file mode 100644
index e7b15ea..0000000
--- a/doc/man/config_stop.1
+++ /dev/null
@@ -1,31 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:stop"
-.SH NAME
-config:stop \- Stops the proxy software.
-.SH SYNOPSIS
-config:stop
-.SH DESCRIPTION
-The config:stop command stops your proxy software. The config:stop command takes 
-no options. 
-.SH EXAMPLES
-When you execute the config:stop command, you see results in the following format.
-.PP
-.nf
-traffic_shell> config:stop
-traffic_shell>
-.SH "SEE ALSO"
-config:start, config:restart, config:hard-restart

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_upgrade.1
----------------------------------------------------------------------
diff --git a/doc/man/config_upgrade.1 b/doc/man/config_upgrade.1
deleted file mode 100644
index c393559..0000000
--- a/doc/man/config_upgrade.1
+++ /dev/null
@@ -1,52 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:upgrade"
-.SH NAME
-config:upgrade \- Perform an over-the-wire software upgrade.
-.SH SYNOPSIS
-config:upgrade <upgrade-type> <url> [username] [password]
-.SH DESCRIPTION
-You use the config:upgrade command to perform over-the-wire software upgrades.
-This command supports three types of upgrades: silent, interactive, and reinstall.
-When you use this command, you must specify an upgrade server URL, 
-and optionally specify a username and password.  This command requires root privileges.
-Use the config:root command to switch to root user.
-.SH OPTIONS
-The following options are required for the config:upgrade command:
-.SS "<silent | interactive | reinstall>"
-Silent upgrade automatically chooses the appropriate upgrade from the upgrade server.
-Interactive upgrade allows you to choose the upgrade package from a list.
-Reinstall allows you to install an older version of software with default 
-configuration settings.
-.SS "<url>"
-Specifies the URL which is the location of the upgrade files on a remote
-server.If the URL is for HTTP or HTTPS, then username and password are optional.
-.SS "<username>"
-Specifies the username that is used to access the URL on the remote server.
-.SS "<password>"
-Specifies the password that is used to access the URL on the remote server. 
-If a username is specified, but the password is omitted, then the config:upgrade command
-will prompt you to enter a password.
-
-.SH EXAMPLES
-.SS "Example 1. Perform a silent upgrade"
-.PP
-.nf
-traffic_shell> config:upgrade silent http://upgradeserver.domain.com user password
-(Upgrade command status messages)
-traffic_shell>
-.SH "SEE ALSO"
-config:root

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_virtual-ip.1
----------------------------------------------------------------------
diff --git a/doc/man/config_virtual-ip.1 b/doc/man/config_virtual-ip.1
deleted file mode 100644
index 62f4e55..0000000
--- a/doc/man/config_virtual-ip.1
+++ /dev/null
@@ -1,52 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:virtual-ip"
-.SH NAME
-config:virtual-ip \- Enables and configures virtual IP addressing.
-.SH SYNOPSIS
-config:virtual-ip [options]
-.SH DESCRIPTION
-You use the config:virtual-ip command to enable and configure virtual IP 
-addressing, including IP address, device, and subinterface.
-.SH OPTIONS
-The following options are supported for the config:virtual-ip command:
-.SS "status <on | off>"
-Enables (on) or disables (off) the virtual IP option. (The default value is 
-off.)
-.SS "list"
-List the virtual IP addresses in use.
-.SS "add <ip_address> device <string> sub-intf <integer>"
-Specifies IP address, device and subinterface.
-.SS "delete <integer>"
-Specified Virtual IP address element to be deleted.
-.SH EXAMPLES
-.SS "Example 1. Enabling the virtual IP option"
-.PP
-.nf
-traffic_shell> config:virtual-ip on 
-traffic_shell>
-.SS "Example 2. Specifying an IP address, device, and subinterface"
-.PP
-.nf
-traffic_shell> config:virtual-ip add ip 202.112.105.89 device hme0 sub-intf 28
-traffic_shell>
-.SS "Example 3. Deleting a virtual IP address."
-.PP
-.nf
-traffic_shell> config:virtual-ip delete 1
-traffic_shell>
-.SH "SEE ALSO"
-show:virtual-ip

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/disable.1
----------------------------------------------------------------------
diff --git a/doc/man/disable.1 b/doc/man/disable.1
deleted file mode 100644
index 1254d84..0000000
--- a/doc/man/disable.1
+++ /dev/null
@@ -1,33 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "disable"
-.SH NAME
-disable \- Disable privileged commands.
-.SH SYNOPSIS
-disable
-.SH DESCRIPTION
-If you are in Configure mode and want to return to Monitor mode, type 
-the disable command. The disable command has no options.
-.SH EXAMPLE 
-.TP
-.fi
-When you execute the disable command, you see the following:
-.PP
-.nf
-traffic_shell> disable
-traffic_shell>
-.SH "SEE ALSO"
-enable, config:root, exit

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/enable.1
----------------------------------------------------------------------
diff --git a/doc/man/enable.1 b/doc/man/enable.1
deleted file mode 100644
index bb60cb6..0000000
--- a/doc/man/enable.1
+++ /dev/null
@@ -1,42 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "enable"
-.SH NAME
-enable \- Enable privileged commands.
-.SH SYNOPSIS
-enable
-.SH DESCRIPTION
-If you are in Monitor mode and want to enter Configure mode, type 
-the enable command.  You will be prompted to enter the administrator password.
-.SH OPTIONS
-The following options are supported for the enable command:
-.SS "status"
-Display the enable status, on or off.
-.SH EXAMPLE 
-.TP
-.fi
-When you execute the enable command, you see the following:
-.PP
-.nf
-traffic_shell> enable status
-off
-traffic_shell> enable
-Password: (enter password)
-traffic_shell> enable status
-on
-traffic_shell>
-.SH "SEE ALSO"
-config:root, disable, exit

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/exit.1
----------------------------------------------------------------------
diff --git a/doc/man/exit.1 b/doc/man/exit.1
deleted file mode 100644
index 33e4e96..0000000
--- a/doc/man/exit.1
+++ /dev/null
@@ -1,34 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "exit"
-.SH NAME
-exit \- Type exit to end your CLI session.
-.SH SYNOPSIS
-exit
-.SH DESCRIPTION
-Use the exit command while in show or configure mode to end your CLI 
-session. After you use the exit command, you return to your normal UNIX 
-prompt. The exit command has no options.
-.SH EXAMPLE 
-.PP
-.fi
-When you execute the exit command, you see results in the following format:
-.PP
-traffic_shell> exit
-.TP
-[username@hostname bin]#
-.SH "SEE ALSO"
-enable, disable

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/traffic_shell.1
----------------------------------------------------------------------
diff --git a/doc/man/traffic_shell.1 b/doc/man/traffic_shell.1
deleted file mode 100644
index abbd68c..0000000
--- a/doc/man/traffic_shell.1
+++ /dev/null
@@ -1,165 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.Dd January 22, 2012
-.Dt TRAFFIC.ShELL 1
-.sp
-.Sh NAME
-.Nm traffic_shell
-.Nd Traffic Server configuration shell
-.sp
-.Sh SYNOPSIS
-.Nm
-.Op Fl V
-.Op Ar filename
-.sp
-.Sh DESCRIPTION
-.Nm
-is a command-line interface to monitor and configure Apache Traffic Server.
-.Nm
-enables you to monitor and configure Traffic Server using a
-UNIX shell-like command interface.  Using
-.Nm
-is an alternative to manually editing Traffic Server's configuration
-files or using the
-.Xr traffic_line 1
-interface.
-.Pp
-You use
-.Nm
-interactively by typing individual commands at the
-.Li trafficserver>
-prompt. As you enter a command,
-.Nm
-processes it
-and displays the result.
-.Nm
-embeds a Tcl interpreter, so you can use the Tcl language to display status or
-make configuration changes programmatically.
-.Pp
-When invoked with the
-.Ar filename
-argument,
-.Nm
-will read and execute commands from the given file prior to entering interactive
-mode.
-.sp
-.Sh USING TRAFFIC SHELL COMMANDS
-Once you start
-.Nm
-, you use one of two modes:
-.Pp
-The Monitor mode allows you to run Show commands, which display system
-information and Traffic Server statistics. You use Show commands to monitor
-Traffic Server performance. When you start
-.Nm ,
-you are automatically in Monitor mode.
-.Pp
-To see a list of Show commands, type
-.Sq show
-at the prompt. To use a Show command, enter the command at the
-.Li trafficserver>
-prompt.
-.Pp
-The Enable mode allows you to run Config commands, which set Traffic Server
-and network parameters. The Enable mode is password-protected. To enter Enable
-mode use the
-.Sq enable
-command.
-.Pp
-You must enter Enable mode to use Config commands. You can use both
-Show and Config commands when you are in Enable mode. It is not
-necessary to return to Monitor mode to use Show commands.
-.Pp
-Once you enter Enable mode, you can use the Config commands.  To
-see a list of Config commands, type
-.Sq config
-at the
-.Li trafficserver>
-prompt. To use a Config command, enter the command at the prompt.
-.Pp
-To return to Monitor mode, in which you cannot use Config commands to
-set parameters, use the
-.Sp disable
-command.
-.Pp
-Type
-.Sq exit
-at the
-.Li trafficserver>
-prompt to exit
-.Nm .
-.sp
-.Sh TRAFFIC SHELL COMMAND SHORTCUTS
-.Nm
-supports the following shortcuts for entering commands.
-.Bl -bullet
-.It
-Command completion. Type the initial characters of a valid command, and then
-press the tab key. Traffic Shell completes the command.
-.It
-Command abbreviation. Type the initial characters of a valid command, and then
-press the Enter key.
-.Nm
-displays all commands that begin with the characters that you
-enter. If only one command begins with those characters,
-.Nm
-immediately executes that command.
-.It
-Command history. From the
-.Li trafficserver>
-prompt, press the Up and Down arrow keys to scroll
-through commands that you previously entered.
-.El
-.sp
-.Sh ACCESSING ON-LINE HELP
-.Nm
-includes manual pages that describe each command.  To access
-.Nm
-'s man pages, type
-.Sq help ,
-followed by any
-.Nm
-command at the prompt.
-.Sh OPTIONS
-.Bl -tag -width indent
-.It Fl V
-Print version information and exit.
-.El
-.sp
-.Sh EXAMPLES
-Displaying the on-line help for a command:
-.Bd -ragged -offset 12345678
-trafficserver> help show:security
-.Ed
-.Pp
-Use a monitor command to show a Traffic Server configuration setting:
-.Bd -ragged -offset 12345678
-trafficserver> show:http
-.Ed
-.Pp
-Use a config command to alter a Traffic Server configuration setting:
-.Bd -ragged -offset 12345678
-trafficserver> config:icp multicast on
-.Ed
-.Pp
-Use a Tcl command to show multiple configuration parameters:
-.Bd -ragged -offset 12345678
-trafficserver> foreach i {http proxy socks ssl} {show:$i}
-.Ed
-.sp
-.Sh SEE ALSO
-.Xr traffic_line 1 ,
-.Xr Tcl n .


[7/7] git commit: TS-1665 Remove traffic_shell

Posted by zw...@apache.org.
TS-1665 Remove traffic_shell


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/2369a1a4
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/2369a1a4
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/2369a1a4

Branch: refs/heads/master
Commit: 2369a1a499135ba146a74316f2ea424a75a75fb1
Parents: a0733c4
Author: Leif Hedstrom <zw...@apache.org>
Authored: Wed May 21 21:20:30 2014 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Wed May 21 21:20:30 2014 -0600

----------------------------------------------------------------------
 CHANGES                                         |    2 +
 cmd/Makefile.am                                 |    2 +-
 cmd/traffic_shell/CliCreateCommands.cc          |  310 --
 cmd/traffic_shell/CliCreateCommands.h           |   39 -
 cmd/traffic_shell/CliDisplay.cc                 |  221 -
 cmd/traffic_shell/CliDisplay.h                  |   91 -
 cmd/traffic_shell/CliMgmtUtils.cc               |  586 ---
 cmd/traffic_shell/CliMgmtUtils.h                |  150 -
 cmd/traffic_shell/ConfigCmd.cc                  | 4156 ------------------
 cmd/traffic_shell/ConfigCmd.h                   |  837 ----
 cmd/traffic_shell/ConfigUpgradeCmd.cc           |  634 ---
 cmd/traffic_shell/ConfigUpgradeCmd.h            |  252 --
 cmd/traffic_shell/ConfigUpgradeReadCmd.cc       |  498 ---
 cmd/traffic_shell/ConfigUpgradeWriteCmd.cc      |  517 ---
 cmd/traffic_shell/Makefile.am                   |   77 -
 cmd/traffic_shell/ShowCmd.cc                    | 2322 ----------
 cmd/traffic_shell/ShowCmd.h                     |  247 --
 cmd/traffic_shell/UtilCmds.cc                   |  196 -
 cmd/traffic_shell/UtilCmds.h                    |   94 -
 cmd/traffic_shell/cliAppInit.cc                 |  165 -
 cmd/traffic_shell/cliParseArg.cc                |  457 --
 cmd/traffic_shell/cli_detailed_command_list.txt | 1605 -------
 cmd/traffic_shell/cli_feature_spec.txt          |  230 -
 cmd/traffic_shell/commandOptions.h              |   47 -
 cmd/traffic_shell/createArgument.cc             |  387 --
 cmd/traffic_shell/createArgument.h              |  119 -
 cmd/traffic_shell/createCommand.cc              |  166 -
 cmd/traffic_shell/createCommand.h               |   59 -
 cmd/traffic_shell/definitions.h                 |   77 -
 cmd/traffic_shell/hashtable.cc                  |  219 -
 cmd/traffic_shell/hashtable.h                   |   45 -
 cmd/traffic_shell/processArgument.cc            |   57 -
 cmd/traffic_shell/traffic_shell.cc              |  115 -
 configure.ac                                    |    1 -
 doc/Makefile.am                                 |   32 +-
 doc/man/config_alarms.1                         |   52 -
 doc/man/config_cache.1                          |  140 -
 doc/man/config_clock.1                          |   64 -
 doc/man/config_dns.1                            |   46 -
 doc/man/config_get.1                            |   37 -
 doc/man/config_hard-restart.1                   |   31 -
 doc/man/config_hostdb.1                         |   72 -
 doc/man/config_http.1                           |   78 -
 doc/man/config_icp.1                            |   72 -
 doc/man/config_logging.1                        |  160 -
 doc/man/config_name.1                           |   36 -
 doc/man/config_network.1                        |   75 -
 doc/man/config_parent.1                         |   53 -
 doc/man/config_port-tunnels.1                   |   35 -
 doc/man/config_remap.1                          |   35 -
 doc/man/config_reset-stats.1                    |   46 -
 doc/man/config_restart.1                        |   33 -
 doc/man/config_root.1                           |   34 -
 doc/man/config_scheduled-update.1               |   84 -
 doc/man/config_security.1                       |   52 -
 doc/man/config_set.1                            |   36 -
 doc/man/config_socks.1                          |   60 -
 doc/man/config_ssl.1                            |   43 -
 doc/man/config_start.1                          |   32 -
 doc/man/config_stop.1                           |   31 -
 doc/man/config_upgrade.1                        |   52 -
 doc/man/config_virtual-ip.1                     |   52 -
 doc/man/disable.1                               |   33 -
 doc/man/enable.1                                |   42 -
 doc/man/exit.1                                  |   34 -
 doc/man/traffic_shell.1                         |  165 -
 66 files changed, 4 insertions(+), 16823 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index fe04ce5..0e81b9b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.0.0
 
+  *) [TS-1665] Remove the old traffic_shell (R.I.P.).
+
   *) [TS-2830] Make SPDY configurable.
 
   *) [TS-2684] Add a text-log format to background_fetch plugin.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/Makefile.am
----------------------------------------------------------------------
diff --git a/cmd/Makefile.am b/cmd/Makefile.am
index 6a7d258..58a8a68 100644
--- a/cmd/Makefile.am
+++ b/cmd/Makefile.am
@@ -15,4 +15,4 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-SUBDIRS = traffic_top traffic_cop traffic_line traffic_shell
+SUBDIRS = traffic_top traffic_cop traffic_line

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/CliCreateCommands.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/CliCreateCommands.cc b/cmd/traffic_shell/CliCreateCommands.cc
deleted file mode 100644
index 7d1ae5e..0000000
--- a/cmd/traffic_shell/CliCreateCommands.cc
+++ /dev/null
@@ -1,310 +0,0 @@
-/** @file
-
-  A brief file description
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-/****************************************************************
- * Filename: CliCreateCommands.cc
- * Purpose: This file contains the CLI command creation function.
- *
- *
- ****************************************************************/
-
-#include "CliCreateCommands.h"
-#include "createCommand.h"
-#include "ShowCmd.h"
-#include "ConfigCmd.h"
-#include "UtilCmds.h"
-#include "CliDisplay.h"
-#include "I_Layout.h"
-#include <stdlib.h>
-#include <unistd.h>
-#include <string>
-#include <sstream>
-#include <algorithm>
-
-////////////////////////////////////////////////////////////////
-// Called during Tcl_AppInit, this function creates the CLI commands
-//
-int
-CliCreateCommands()
-{
-  createCommand("config:root", Cmd_ConfigRoot, NULL, CLI_COMMAND_EXTERNAL, "config:root", "Switch to root user");
-
-  createCommand("show", Cmd_Show, NULL, CLI_COMMAND_EXTERNAL, "show", "Show command");
-
-  createCommand("config", Cmd_Config, NULL, CLI_COMMAND_EXTERNAL, "config", "Config command");
-
-  createCommand("show:status", Cmd_ShowStatus, NULL, CLI_COMMAND_EXTERNAL, "show:status", "Proxy status");
-
-  createCommand("show:version", Cmd_ShowVersion, NULL, CLI_COMMAND_EXTERNAL, "show:version", "Version information");
-
-
-  createCommand("show:security", Cmd_ShowSecurity, NULL, CLI_COMMAND_EXTERNAL, "show:security", "Security information");
-
-  createCommand("show:http", Cmd_ShowHttp, NULL, CLI_COMMAND_EXTERNAL, "show:http", "HTTP protocol configuration");
-
-  createCommand("show:icp", Cmd_ShowIcp, CmdArgs_ShowIcp, CLI_COMMAND_EXTERNAL,
-                "show:icp [peer]", "ICP protocol configuration");
-
-  createCommand("show:proxy", Cmd_ShowProxy, NULL, CLI_COMMAND_EXTERNAL, "show:proxy", "Proxy configuration");
-
-  createCommand("show:cache", Cmd_ShowCache, CmdArgs_ShowCache, CLI_COMMAND_EXTERNAL,
-                "show:cache [rules|storage]", "Cache configuration");
-
-  createCommand("show:virtual-ip", Cmd_ShowVirtualIp, NULL, CLI_COMMAND_EXTERNAL,
-                "show:virtual-ip", "Virtual-ip configuration");
-
-  createCommand("show:hostdb", Cmd_ShowHostDb, NULL, CLI_COMMAND_EXTERNAL,
-                "show:hostdb", "Host database configuration");
-
-  createCommand("show:dns-resolver", Cmd_ShowDnsResolver, NULL, CLI_COMMAND_EXTERNAL,
-                "show:dns-resolver", "DNS resolver configuration");
-
-  createCommand("show:logging", Cmd_ShowLogging, NULL, CLI_COMMAND_EXTERNAL, "show:logging", "Logging configuration");
-
-  createCommand("show:ssl", Cmd_ShowSsl, NULL, CLI_COMMAND_EXTERNAL, "show:ssl", "SSL configuration");
-
-  createCommand("show:parent", Cmd_ShowParents, CmdArgs_ShowParents, CLI_COMMAND_EXTERNAL,
-                "show:parent", "Parent configuration");
-
-  createCommand("show:remap", Cmd_ShowRemap, NULL, CLI_COMMAND_EXTERNAL, "show:remap", "Remap configuration");
-
-  createCommand("show:socks", Cmd_ShowSocks, CmdArgs_ShowSocks, CLI_COMMAND_EXTERNAL,
-                "show:socks", "SOCKS configuration");
-
-  createCommand("show:scheduled-update", Cmd_ShowScheduledUpdate, CmdArgs_ShowScheduledUpdate, CLI_COMMAND_EXTERNAL,
-                "show:scheduled-update", "Scheduled update configuration");
-
-  createCommand("show:proxy-stats", Cmd_ShowProxyStats, NULL, CLI_COMMAND_EXTERNAL,
-                "show:proxy-stats", "Proxy statistics");
-
-  createCommand("show:http-trans-stats", Cmd_ShowHttpTransStats, NULL, CLI_COMMAND_EXTERNAL,
-                "show:http-trans-stats", "HTTP transaction statistics");
-
-  createCommand("show:http-stats", Cmd_ShowHttpStats, NULL, CLI_COMMAND_EXTERNAL, "show:http-stats", "HTTP statistics");
-
-  createCommand("show:icp-stats", Cmd_ShowIcpStats, NULL, CLI_COMMAND_EXTERNAL, "show:icp-stats", "ICP statistics");
-
-  createCommand("show:cache-stats", Cmd_ShowCacheStats, NULL, CLI_COMMAND_EXTERNAL,
-                "show:cache-stats", "Cache statistics");
-
-  createCommand("show:hostdb-stats", Cmd_ShowHostDbStats, NULL, CLI_COMMAND_EXTERNAL,
-                "show:hostdb-stats", "Host database statistics");
-
-  createCommand("show:dns-stats", Cmd_ShowDnsStats, NULL, CLI_COMMAND_EXTERNAL, "show:dns-stats", "DNS statistics");
-
-  createCommand("show:logging-stats", Cmd_ShowLoggingStats, NULL, CLI_COMMAND_EXTERNAL,
-                "show:logging-stats", "Logging statistics");
-
-  createCommand("show:alarms", Cmd_ShowAlarms, NULL, CLI_COMMAND_EXTERNAL, "show:alarms", "Show active alarms");
-
-  createCommand("show:cluster", Cmd_ShowCluster, NULL, CLI_COMMAND_EXTERNAL,
-                "show:cluster", "Show Cluster Ports Settings");
-
-  createCommand("config:get", Cmd_ConfigGet, NULL, CLI_COMMAND_EXTERNAL,
-                "config:get <variable>", "Display a variable value");
-
-  createCommand("config:set", Cmd_ConfigSet, NULL, CLI_COMMAND_EXTERNAL,
-                "config:set <variable> <value>", "Set variable to specified value");
-
-  createCommand("config:name", Cmd_ConfigName, NULL, CLI_COMMAND_EXTERNAL,
-                "config:name <string>", "Set proxy name <string>");
-
-  createCommand("config:start", Cmd_ConfigStart, NULL, CLI_COMMAND_EXTERNAL, "config:start", "Start proxy software");
-
-  createCommand("config:stop", Cmd_ConfigStop, NULL, CLI_COMMAND_EXTERNAL, "config:stop", "Stop proxy software");
-
-  createCommand("config:restart", Cmd_ConfigRestart, CmdArgs_ConfigRestart, CLI_COMMAND_EXTERNAL,
-                "config:restart [cluster]", "Perform Restart of proxy software");
-
-  createCommand("config:ssl", Cmd_ConfigSsl, CmdArgs_ConfigSsl, CLI_COMMAND_EXTERNAL,
-                "config:ssl status <on | off>\n" "config:ssl ports <int>", "Configure ssl");
-
-  createCommand("config:parent", Cmd_ConfigParents, CmdArgs_ConfigParents, CLI_COMMAND_EXTERNAL,
-                "config:parent status <on | off>\n"
-                "config:parent name <parent>\n" "config:parent rules <url>", "Update parent configuration");
-
-
-  createCommand("config:remap", Cmd_ConfigRemap, NULL, CLI_COMMAND_EXTERNAL,
-                "config:remap <url>", "Update remap configuration file <url>");
-
-  createCommand("config:security", Cmd_ConfigSecurity, CmdArgs_ConfigSecurity, CLI_COMMAND_EXTERNAL,
-                "config:security <ip-allow | mgmt-allow | admin> <url-config-file>\n"
-                "config:security password", "Update security configuration");
-
-  createCommand("config:http", Cmd_ConfigHttp, CmdArgs_ConfigHttp, CLI_COMMAND_EXTERNAL,
-                "config:http status <on | off>\n"
-                "config:http <keep-alive-timeout-in | keep-alive-timeout-out> <seconds>\n"
-                "config:http <inactive-timeout-in | inactive-timeout-out> <seconds>\n"
-                "config:http <active-timeout-in | active-timeout-out> <seconds>\n"
-                "config:http <remove-from | remove-referer> <on | off>\n"
-                "config:http <remove-user | remove-cookie> <on | off>\n"
-                "config:http <remove-header> <string>\n"
-                "config:http <insert-ip | remove-ip> <on | off>\n"
-                "config:http proxy <fwd | rev | fwd-rev>", "Configure HTTP");
-
-  createCommand("config:icp", Cmd_ConfigIcp, CmdArgs_ConfigIcp, CLI_COMMAND_EXTERNAL,
-                "config:icp mode <disabled | receive | send-receive>\n"
-                "config:icp port <int>\n"
-                "config:icp multicast <on | off>\n"
-                "config:icp query-timeout <seconds>\n" "config:icp peers <url-config-file>", "Configure ICP");
-
-  createCommand("config:scheduled-update", Cmd_ConfigScheduledUpdate, CmdArgs_ConfigScheduledUpdate,
-                CLI_COMMAND_EXTERNAL,
-                "config:scheduled-update status <on | off>\n" "config:scheduled-update retry-count <int>\n"
-                "config:scheduled-update retry-interval <sec>\n" "config:scheduled-update max-concurrent <int>\n"
-                "config:scheduled-update force-immediate <on | off>\n"
-                "config:scheduled-update rules <url-config-file>", "Configure Scheduled Update");
-
-  createCommand("config:socks", Cmd_ConfigSocks, CmdArgs_ConfigSocks, CLI_COMMAND_EXTERNAL,
-                "config:socks status <on | off>\n"
-                "config:socks version <version>\n"
-                "config:socks default-servers <string>\n"
-                "config:socks accept <on | off>\n" "config:socks accept-port <int>", "Configure Socks");
-
-  createCommand("config:cache", Cmd_ConfigCache, CmdArgs_ConfigCache, CLI_COMMAND_EXTERNAL,
-                "config:cache <http> <on | off>\n"
-                "config:cache ignore-bypass <on | off>\n"
-                "config:cache <max-object-size | max-alternates> <int>\n"
-                "config:cache file <url-config-file>\n"
-                "config:cache freshness verify <when-expired | no-date | always | never>\n"
-                "config:cache freshness minimum <explicit | last-modified | nothing>\n"
-                "config:cache freshness no-expire-limit greater-than <sec> less-than <sec>\n"
-                "config:cache <dynamic | alternates> <on | off>\n"
-                "config:cache vary <text | images | other> <string>\n"
-                "config:cache cookies <none | all | images | non-text>\n" "config:cache clear", "Configure Cache");
-
-
-  createCommand("config:hostdb", Cmd_ConfigHostdb, CmdArgs_ConfigHostdb, CLI_COMMAND_EXTERNAL,
-                "config:hostdb <lookup-timeout | foreground-timeout> <seconds>\n"
-                "config:hostdb <background-timeout | invalid-host-timeout> <seconds>\n"
-                "config:hostdb <re-dns-on-reload> <on | off>\n" "config:hostdb clear", "Configure Host Database");
-
-  createCommand("config:logging", Cmd_ConfigLogging, CmdArgs_ConfigLogging, CLI_COMMAND_EXTERNAL,
-                "config:logging event <enabled | trans-only | error-only | disabled>\n"
-                "config:logging mgmt-directory <string>\n"
-                "config:logging <space-limit | space-headroom> <megabytes>\n"
-                "config:logging collation-status <inactive | host | send-standard |\n"
-                "                                 send-custom | send-all>\n"
-                "config:logging collation-host <string>\n"
-                "config:logging collation secret <string> tagged <on | off> orphan-limit <int>\n"
-                "config:logging format <squid | netscape-common | netscape-ext | netscape-ext2> <on | off>\n"
-                "               type <ascii | binary> file <string> header <string>\n"
-                "config:logging splitting <icp | http> <on | off>\n"
-                "config:logging custom <on | off> format <traditional | xml>\n"
-                "config:logging rolling <on | off> offset <hour> interval <hours>\n"
-                "               auto-delete <on | off>", "Configure Logging");
-
-
-  createCommand("config:dns", Cmd_ConfigDns, CmdArgs_ConfigDns, CLI_COMMAND_EXTERNAL,
-                "config:dns resolve-timeout <seconds>\n" "config:dns retries <int>", "Configure DNS");
-
-  createCommand("config:virtual-ip", Cmd_ConfigVirtualip, CmdArgs_ConfigVirtualip, CLI_COMMAND_EXTERNAL,
-                "config:virtual-ip status <on | off>\n"
-                "config:virtual-ip list\n"
-                "config:virtual-ip add <x.x.x.x> device <string> sub-intf <int>\n"
-                "config:virtual-ip delete <virtual ip number>", "Configure virtual-ip");
-
-  createCommand("config:alarms", Cmd_ConfigAlarm, CmdArgs_ConfigAlarm, CLI_COMMAND_EXTERNAL,
-                "config:alarms resolve-name <string>\n"
-                "config:alarms resolve-number <int>\n"
-                "config:alarms resolve-all\n"
-                "config:alarms notify <on | off>", "Resolve Alarms, Turn notification on/off");
-
-  createCommand("enable", Cmd_Enable, CmdArgs_Enable, CLI_COMMAND_EXTERNAL,
-                "enable \n" "enable status ", "Enable Restricted Commands");
-
-  createCommand("disable", Cmd_Disable, NULL, CLI_COMMAND_EXTERNAL, "disable", "Disable Restricted Commands");
-
-
-  createCommand("debug", DebugCmd, DebugCmdArgs, CLI_COMMAND_EXTERNAL,
-                "debug <on|off>", "Turn debugging print statements on/off");
-
-  createCommand("help", Cmd_Help, NULL, CLI_COMMAND_EXTERNAL,
-                "help [topic]", "Display online help");
-
-  return CLI_OK;
-}
-
-#if defined(__SUNPRO_CC)
-
-// Solaris doesn't like to link libstdc++ code. I don't have a system to test. Sorry.
-
-int
-Cmd_Help(ClientData, Tcl_Interp *, int, const char *[])
-{
-  return CMD_OK;
-}
-
-#else
-
-struct replace_colon
-{
-  char operator() (char c) const {
-    return (c == ':') ? '_' : c;
-  }
-};
-
-static int
-xsystem(const char * cmd)
-{
-  // Some versions of glibc declare system(3) with the warn_unused_result
-  // attribute. Pretend to use the return value so it will shut the hell up.
-  return system(cmd);
-}
-
-int
-Cmd_Help(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * /* interp ATS_UNUSED */, int argc, const char *argv[])
-{
-  Cli_Debug("looking for online help in %s\n", Layout::get()->datadir);
-
-  for (int i = 1; i < argc; ++i) {
-    std::ostringstream  cmd;
-    std::string         topic(argv[i]);
-
-    // Replace ':' with '_' so we can find the right on-disk man page.
-    std::transform(topic.begin(), topic.end(), topic.begin(), replace_colon());
-
-    // Check whether we have the man page on disk before we pass any user input
-    // to the shell via system(3).
-    cmd << Layout::get()->datadir << "/trafficshell/" << topic << ".1";
-    if (access(cmd.str().c_str(), R_OK) != 0) {
-      Cli_Debug("missing %s\n", cmd.str().c_str());
-      continue;
-    }
-
-    cmd.clear();
-    cmd.seekp(std::ios_base::beg);
-
-    cmd << "man "
-      << Layout::get()->datadir << "/trafficshell/" << topic << ".1";
-
-    Cli_Debug("%s\n", cmd.str().c_str());
-    xsystem(cmd.str().c_str());
-  }
-
-  return CMD_OK;
-}
-
-#endif  /* __SUNPRO_C */
-
-// vim: set ts=2 sw=2 et :

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/CliCreateCommands.h
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/CliCreateCommands.h b/cmd/traffic_shell/CliCreateCommands.h
deleted file mode 100644
index da49ae7..0000000
--- a/cmd/traffic_shell/CliCreateCommands.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/** @file
-
-  A brief file description
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-/****************************************************************
- * Filename: CliCreateCommands.h
- * Purpose: This file contains the CLI command creation function.
- *
- *
- ****************************************************************/
-
-#ifndef __CLI_CREATE_COMMANDS_H__
-#define __CLI_CREATE_COMMANDS_H__
-
-////////////////////////////////////////////////////////////////
-// Called during Tcl_AppInit, this function creates generic the CLI commands
-//
-int CliCreateCommands();
-
-#endif // __CLI_CREATE_COMMANDS_H__

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/CliDisplay.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/CliDisplay.cc b/cmd/traffic_shell/CliDisplay.cc
deleted file mode 100644
index 74dda07..0000000
--- a/cmd/traffic_shell/CliDisplay.cc
+++ /dev/null
@@ -1,221 +0,0 @@
-/** @file
-
-  Implementation of CliDisplay routines for the use of TB
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-
-#include "libts.h"
-#include "CliDisplay.h"
-#include "definitions.h"
-#include <string.h>
-
-
-#define BUF_SIZE 1024
-
-extern Tcl_Interp *interp;
-static CliPrintLevelT CliPrintLevel = CLI_PRINT_DEFAULT;
-
-int CliDisplayPrintf = 0;
-
-/*****************************************************************
- * Display one of the predefined error messages.
- */
-int
-Cli_Error(const char *errString, ...)
-{
-  char buffer[BUF_SIZE];
-
-  va_list ap;
-  va_start(ap, errString);
-  // XXX/amitk ugh. easy buffer overrun.
-  // why isn't vsnprintf always available??
-  vsprintf(buffer, errString, ap);
-  va_end(ap);
-
-  // fix for BZ27769
-  //   libtrafficshell.a standalone uses Tcl_AppendResult
-  //   traffic_shell binary uses printf
-  if (CliDisplayPrintf) {
-    printf("%s", buffer);
-  } else {
-    Tcl_AppendResult(interp, buffer, (char *) NULL);
-  }
-
-  return CLI_OK;
-}
-
-/****************************************************************
- * Set print level
- *   level = CLI_PRINT_DEFAULT (Cli_Printf)
- *   level = CLI_PRINT_INFO    (Cli_Printf, Cli_Info)
- *   level = CLI_PRINT_DEBUG   (Cli_Printf, Cli_Debug)
- *   level = CLI_PRINT_INFO | CLI_PRINT_DEBUG  (Cli_Printf, Cli_Debug, Cli_Info)
- */
-int
-Cli_SetPrintLevel(CliPrintLevelT level)
-{
-  CliPrintLevel = level;
-  return CLI_OK;
-
-}
-
-/****************************************************************
- * return the current print level
- */
-CliPrintLevelT
-Cli_GetPrintLevel()
-{
-  return CliPrintLevel;
-}
-
-/****************************************************************
- * Display string
- */
-int
-Cli_Printf(const char *string, ...)
-{
-  char buffer[BUF_SIZE];
-  va_list ap;
-
-  va_start(ap, string);
-  vsprintf(buffer, string, ap);
-  va_end(ap);
-
-  // fix for BZ27769
-  //   libtrafficshell.a standalone uses Tcl_AppendResult
-  //   traffic_shell binary uses printf
-  if (CliDisplayPrintf) {
-    printf("%s", buffer);
-  } else {
-    Tcl_AppendResult(interp, buffer, (char *) NULL);
-  }
-
-  return CLI_OK;
-}
-
-/****************************************************************
- * Display informative message
- */
-int
-Cli_Info(const char *string, ...)
-{
-  char buffer[BUF_SIZE];
-  va_list ap;
-
-  va_start(ap, string);
-  if (CliPrintLevel & CLI_PRINT_INFO) {
-    vsprintf(buffer, string, ap);
-
-    // fix for BZ27769
-    //   libtrafficshell.a standalone uses Tcl_AppendResult
-    //   traffic_shell binary uses printf
-    if (CliDisplayPrintf) {
-      printf("%s", buffer);
-    } else {
-      Tcl_AppendResult(interp, buffer, (char *) NULL);
-    }
-  }
-  va_end(ap);
-
-  return CLI_OK;
-}
-
-
-/****************************************************************
- * Display debug statement
- */
-int
-Cli_Debug(const char *string, ...)
-{
-  char buffer[BUF_SIZE];
-  va_list ap;
-
-  // allocate enough room for "debug: " at beginning of string
-  const size_t new_string_size = strlen(string) + 8;
-  char *new_string = (char *)alloca(new_string_size);
-  ink_strlcpy(new_string, "debug: ", new_string_size);
-  ink_strlcat(new_string, string, new_string_size );
-
-  va_start(ap, string);
-  if (CliPrintLevel & CLI_PRINT_DEBUG) {
-    vsprintf(buffer, new_string, ap);
-
-    // fix for BZ27769
-    //   libtrafficshell.a standalone uses Tcl_AppendResult
-    //   traffic_shell binary uses printf
-    if (CliDisplayPrintf) {
-      printf("%s", buffer);
-    } else {
-      Tcl_AppendResult(interp, buffer, (char *) NULL);
-    }
-  }
-  va_end(ap);
-
-  return CLI_OK;
-}
-
-int
-Cli_PrintEnable(const char *string, int flag)
-{
-  if (flag == 0)
-    Cli_Printf("%soff\n", string);
-  else if (flag == 1)
-    Cli_Printf("%son\n", string);
-  else {
-    Cli_Debug(ERR_INVALID_PARAMETER);
-    return CLI_ERROR;
-  }
-
-  return CLI_OK;
-}
-
-int
-Cli_PrintOnOff(int flag)
-{
-  switch (flag) {
-  case 0:
-    Cli_Printf("off\n");
-    break;
-  case 1:
-    Cli_Printf("on\n");
-    break;
-  default:
-    Cli_Printf("?\n");
-    break;
-  }
-  return CLI_OK;
-}
-
-int
-Cli_PrintArg(int arg_index, const cli_parsedArgInfo * argtable)
-{
-
-
-
-  if (arg_index >= 0) {
-    Cli_Debug("%d %d %s\n", argtable[arg_index].parsed_args,
-              argtable[arg_index].arg_int, argtable[arg_index].arg_string);
-    return CLI_OK;
-  }
-  return CLI_ERROR;
-}
-
-#undef BUF_SIZE

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/CliDisplay.h
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/CliDisplay.h b/cmd/traffic_shell/CliDisplay.h
deleted file mode 100644
index be47db4..0000000
--- a/cmd/traffic_shell/CliDisplay.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/** @file
-
-  A brief file description
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-/****************************************************************
- * Filename: CliDisplay.h
- * Purpose: This file contains the CLI display routines.
- *
- *
- ****************************************************************/
-
-#include <stdarg.h>
-#include <stdio.h>
-#include "createArgument.h"
-
-#ifndef __CLI_ERROR_HANDLE_H__
-#define __CLI_ERROR_HANDLE_H__
-
-/* CLI print levels
- */
-typedef enum
-{
-  CLI_PRINT_DEFAULT = 0x0,
-  CLI_PRINT_INFO = 0x2,
-  CLI_PRINT_DEBUG = 0x4
-} CliPrintLevelT;
-
-/* All possible error strings are defined below.
- *    In the future, this could be changed to a message_id/lookup mechanism.
- */
-
-#define ERR_RECORD_GET         "INKRecordGet: failed to retrieve %s\n"
-#define ERR_RECORD_GET_INT     "INKRecordGetInt: failed to retrieve %s\n"
-#define ERR_RECORD_GET_COUNTER "INKRecordGetCounter: failed to retrieve %s\n"
-#define ERR_RECORD_GET_FLOAT   "INKRecordGetFloat: failed to retrieve %s\n"
-#define ERR_RECORD_GET_STRING  "INKRecordGetString: failed to retrieve %s\n"
-#define ERR_RECORD_SET         "INKRecordSet: failed to set %s value %s\n"
-#define ERR_RECORD_SET_INT     "INKRecordSetInt: failed to set %s value %d\n"
-#define ERR_RECORD_SET_FLOAT   "INKRecordSetFloat: failed to set %s value %f\n"
-#define ERR_RECORD_SET_STRING  "INKRecordSetString: failed to set %s value %s\n"
-
-
-#define ERR_COMMAND_SYNTAX    "\nCommand Syntax: \n%s\n\n"
-#define ERR_REQ_ACTION_UNDEF  "Undefined Action Required before Changes Take Effect\n"
-#define ERR_TOO_MANY_ARGS     "\nToo many arguments specified.\n"
-
-#define ERR_INVALID_COMMAND   "wrong # args: should be \n"
-#define ERR_INVALID_PARAMETER "Invalid Parameter\n"
-#define ERR_MISSING_PARAMETER "Missing Parameter\n"
-
-#define ERR_PROXY_STATE_ALREADY "Proxy is already %s\n" // on/off
-#define ERR_PROXY_STATE_SET     "Unable to set Proxy %s\n"      // on/off
-
-#define ERR_CONFIG_FILE_READ  "Error Reading Rules File %d\n"
-#define ERR_CONFIG_FILE_WRITE "Error Writing Rules File %d\n"
-#define ERR_READ_FROM_URL     "Error Reading File from URL %s\n"
-
-#define ERR_ALARM_LIST        "Error Retrieving Alarm List\n"
-#define ERR_ALARM_STATUS      "Error Determining Active/Inactive status of alarm %s\n"
-#define ERR_ALARM_RESOLVE_INACTIVE "Error: Attempt to resolve inactive alarm %s\n"
-#define ERR_ALARM_RESOLVE     "Errur: Unable to resolve alarm %s\n"
-#define ERR_ALARM_RESOLVE_NUMBER "Error: Alarm number non-existent\n"
-
-int Cli_Error(const char *errString, ...);
-int Cli_SetPrintLevel(CliPrintLevelT level);
-CliPrintLevelT Cli_GetPrintLevel();
-int Cli_Printf(const char *string, ...);
-int Cli_Debug(const char *string, ...);
-int Cli_PrintEnable(const char *string, int flag);
-int Cli_PrintOnOff(int flag);
-int Cli_PrintArg(int arg_index, const cli_parsedArgInfo * argtable);
-#endif // __CLI_ERROR_HANDLE_H__

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/CliMgmtUtils.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/CliMgmtUtils.cc b/cmd/traffic_shell/CliMgmtUtils.cc
deleted file mode 100644
index 1701b7e..0000000
--- a/cmd/traffic_shell/CliMgmtUtils.cc
+++ /dev/null
@@ -1,586 +0,0 @@
-/** @file
-
-  This file contains various utility functions which call the TSMgmtAPI.
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-
-#include "libts.h"
-#include "I_Layout.h"
-#include <stdlib.h>
-#include <unistd.h>
-#include "CliMgmtUtils.h"
-#include "CliDisplay.h"
-#include "definitions.h"
-#include "ConfigCmd.h"
-
-
-void Cli_DisplayMgmtAPI_Error(TSMgmtError status);
-
-// Get a records.config variable by name
-TSMgmtError
-Cli_RecordGet(const char *rec_name, TSRecordEle * rec_val)
-{
-  TSMgmtError status;
-  if ((status = TSRecordGet((char *) rec_name, rec_val))) {
-    Cli_Debug(ERR_RECORD_GET, rec_name);
-    Cli_DisplayMgmtAPI_Error(status);
-  }
-  return status;
-}
-
-// Get an integer type records.config variable
-TSMgmtError
-Cli_RecordGetInt(const char *rec_name, TSInt * int_val)
-{
-  TSMgmtError status;
-  if ((status = TSRecordGetInt(rec_name, int_val))) {
-    Cli_Debug(ERR_RECORD_GET_INT, rec_name);
-    Cli_DisplayMgmtAPI_Error(status);
-  }
-  return status;
-}
-
-// Get an counter type records.config variable
-TSMgmtError
-Cli_RecordGetCounter(const char *rec_name, TSCounter * ctr_val)
-{
-  TSMgmtError status;
-  if ((status = TSRecordGetCounter(rec_name, ctr_val))) {
-    Cli_Debug(ERR_RECORD_GET_COUNTER, rec_name);
-    Cli_DisplayMgmtAPI_Error(status);
-  }
-  return status;
-}
-
-// Get a float type records.config variable
-TSMgmtError
-Cli_RecordGetFloat(const char *rec_name, TSFloat * float_val)
-{
-  TSMgmtError status;
-  if ((status = TSRecordGetFloat(rec_name, float_val))) {
-    Cli_Debug(ERR_RECORD_GET_FLOAT, rec_name);
-    Cli_DisplayMgmtAPI_Error(status);
-  }
-  return status;
-}
-
-// Get a string type records.config variable
-TSMgmtError
-Cli_RecordGetString(const char *rec_name, char **string_val)
-{
-  TSMgmtError status;
-  if ((status = TSRecordGetString(rec_name, string_val))) {
-    Cli_Debug(ERR_RECORD_GET_STRING, rec_name);
-    Cli_DisplayMgmtAPI_Error(status);
-  }
-  return status;
-}
-
-// Use a string to set a records.config variable
-TSMgmtError
-Cli_RecordSet(const char *rec_name, const char *rec_value, TSActionNeedT * action_need)
-{
-  TSMgmtError status;
-  if ((status = TSRecordSet((char *) rec_name, (TSString) rec_value, action_need))) {
-    Cli_Debug(ERR_RECORD_SET, rec_name, rec_value);
-    Cli_DisplayMgmtAPI_Error(status);
-  }
-  return status;
-}
-
-// Set an integer type records.config variable
-TSMgmtError
-Cli_RecordSetInt(const char *rec_name, TSInt int_val, TSActionNeedT * action_need)
-{
-  TSMgmtError status;
-  if ((status = TSRecordSetInt(rec_name, int_val, action_need))) {
-    Cli_Debug(ERR_RECORD_SET_INT, rec_name, int_val);
-    Cli_DisplayMgmtAPI_Error(status);
-  }
-  return status;
-}
-
-// Set a float type records.config variable
-TSMgmtError
-Cli_RecordSetFloat(const char *rec_name, TSFloat float_val, TSActionNeedT * action_need)
-{
-  TSMgmtError status;
-  if ((status = TSRecordSetFloat(rec_name, float_val, action_need))) {
-    Cli_Debug(ERR_RECORD_SET_FLOAT, rec_name, float_val);
-    Cli_DisplayMgmtAPI_Error(status);
-  }
-  return status;
-}
-
-
-// Set a string type records.config variable
-TSMgmtError
-Cli_RecordSetString(const char *rec_name, TSString str_val, TSActionNeedT * action_need)
-{
-  TSMgmtError status;
-  if ((status = TSRecordSetString(rec_name, str_val, action_need))) {
-    Cli_Debug(ERR_RECORD_SET_STRING, rec_name, str_val);
-    Cli_DisplayMgmtAPI_Error(status);
-  }
-  return status;
-}
-
-void
-Cli_DisplayMgmtAPI_Error(TSMgmtError status)
-{
-  switch (status) {
-  case TS_ERR_OKAY:           // do nothing
-    break;
-  case TS_ERR_READ_FILE:
-    Cli_Printf("\nERROR: Unable to read config file.\n\n");
-    break;
-  case TS_ERR_WRITE_FILE:
-    Cli_Printf("\nERROR: Unable to write config file.\n\n");
-    break;
-  case TS_ERR_PARSE_CONFIG_RULE:
-    Cli_Printf("\nERROR: Unable to parse config file.\n\n");
-    break;
-  case TS_ERR_INVALID_CONFIG_RULE:
-    Cli_Printf("\nERROR: Invalid Configuration Rule in config file.\n\n");
-    break;
-  case TS_ERR_NET_ESTABLISH:
-    Cli_Printf("\nERROR: Unable to establish connection to traffic_manager.\n"
-               "       Ability to make configuration changes depends on traffic_manager.\n");
-    break;
-  case TS_ERR_NET_READ:
-    Cli_Printf("\nERROR: Unable to read data from traffic_manager.\n"
-               "       Ability to monitor the system changes depends on traffic_manager.\n");
-    break;
-  case TS_ERR_NET_WRITE:
-    Cli_Printf("\nERROR: Unable to write configuration data to traffic_manager.\n"
-               "       Ability to make configuration changes depends on traffic_manager.\n");
-    break;
-  case TS_ERR_NET_EOF:
-    Cli_Printf("\nERROR: Unexpected EOF while communicating with traffic_manager.\n"
-               "       Ability to make configuration changes depends on traffic_manager.\n");
-    break;
-  case TS_ERR_NET_TIMEOUT:
-    Cli_Printf("\nERROR: Timed-out while communicating with traffic_manager.\n"
-               "       Ability to make configuration changes depends on traffic_manager.\n");
-    break;
-  case TS_ERR_SYS_CALL:
-    Cli_Printf("\nERROR: Internal System Call failed.\n\n");
-    break;
-  case TS_ERR_PARAMS:
-    Cli_Printf("\nERROR: Invalid parameters passed to a function.\n\n");
-    break;
-  case TS_ERR_FAIL:
-    Cli_Printf("\nERROR: Invalid parameter specified.\n" "       Check parameters for correct syntax and type.\n\n");
-    break;
-  default:
-    Cli_Printf("\nERROR: Undocumented Error. Status = %d.\n\n", status);
-    break;
-  }
-}
-
-// Retrieve and display contents of a rules file
-TSMgmtError
-Cli_DisplayRules(TSFileNameT fname)
-{
-  TSMgmtError status;
-  char *text;
-  int size = 0, version = 0;
-
-  if ((status = TSConfigFileRead(fname, &text, &size, &version))) {
-    Cli_Debug(ERR_CONFIG_FILE_READ, fname);
-    Cli_DisplayMgmtAPI_Error(status);
-  } else {
-    if (size) {
-      // Fix TSqa12220: use printf directly since Cli_Printf may
-      // not allocate enough buffer space to display the file contents
-      puts(text);
-      ats_free(text);
-    } else {
-      Cli_Printf("no rules\n");
-    }
-  }
-
-  return status;
-}
-
-// Retrieve and use config file from remote URL
-TSMgmtError
-Cli_SetConfigFileFromUrl(TSFileNameT file, const char *url)
-{
-  char *buf;
-  int size = 0;
-  int version = -1;
-  TSMgmtError status;
-
-  Cli_Debug("Cli_SetConfigFileFromUrl: file %d url %s\n", file, url);
-
-  // read config file from Url
-  if ((status = TSReadFromUrl((char *) url, NULL, NULL, &buf, &size))) {
-    Cli_Debug(ERR_READ_FROM_URL, url);
-    Cli_DisplayMgmtAPI_Error(status);
-    return status;
-  }
-
-  Cli_Debug("Cli_SetConfigFileFromUrl: size %d version %d\n", size, version);
-
-  Cli_Debug("Cli_SetConfigFileFromUrl: buf\n%s\n", buf);
-
-  // write config file
-  if ((status = TSConfigFileWrite(file, buf, size, version))) {
-    Cli_Debug(ERR_CONFIG_FILE_WRITE, file);
-    Cli_DisplayMgmtAPI_Error(status);
-    if (size)
-      ats_free(buf);
-    return status;
-  }
-
-  if (size)
-    ats_free(buf);
-
-  Cli_Printf("Successfully updated config file.\n");
-
-  return status;
-}
-
-// enable recent configuration changes by performing the action specified
-// by the action_need value
-TSMgmtError
-Cli_ConfigEnactChanges(TSActionNeedT action_need)
-{
-  TSMgmtError status;
-
-  Cli_Debug("Cli_ConfigEnactChanges: action_need %d\n", action_need);
-
-  switch (action_need) {
-  case TS_ACTION_SHUTDOWN:
-    Cli_Debug("Cli_ConfigEnactChanges: TS_ACTION_SHUTDOWN\n");
-    Cli_Printf("\nHard Restart required.\n"
-               "  Change will take effect after next Hard Restart.\n");
-    break;
-
-  case TS_ACTION_RESTART:
-    Cli_Debug("Cli_ConfigEnactChanges: TS_ACTION_RESTART\n");
-    Cli_Printf("\nRestart required.\n"
-               "  Change will take effect after next Restart.\n"
-               "  Use the \"config:restart\" command to restart now.\n\n");
-    break;
-
-  case TS_ACTION_DYNAMIC:
-    Cli_Debug("Cli_ConfigEnactChanges: TS_ACTION_DYNAMIC\n");
-    // no additional action required
-    break;
-
-  case TS_ACTION_RECONFIGURE:
-    Cli_Debug("Cli_ConfigEnactChanges: TS_ACTION_RECONFIGURE\n");
-    status = TSActionDo(TS_ACTION_RECONFIGURE);
-    if (status) {
-      Cli_Error("\nERROR %d: Failed to reread configuration files.\n\n", status);
-      return TS_ERR_FAIL;
-    }
-    break;
-
-  default:
-    Cli_Debug("  Status Message #%d\n", action_need);
-    Cli_Error("\nYou may need to use the \"config:hard-restart\" command\n" "to enable this configuration change.\n\n");
-    return TS_ERR_OKAY;
-  }
-
-  return TS_ERR_OKAY;
-}
-
-// evaluate "stringval" and return 1 if "on", otherwise 0
-int
-Cli_EvalOnOffString(char *stringval)
-{
-  if (strcmp(stringval, "on") == 0) {
-    return 1;
-  }
-  if (strcmp(stringval, "off") == 0) {
-    return 0;
-  }
-
-  return -1;
-}
-
-////////////////////////////////////////////////////////////////
-// Cli_RecordOnOff_Action
-//
-// used for records.config INT variables when 1 = on, 0 = off
-//
-// action = RECORD_GET retrieve and display the variable
-//          RECORD_SET set the variable
-//
-// record = variable in records.config
-//
-// on_off = "on" mean 1, "off" mean 0
-//
-int
-Cli_RecordOnOff_Action(int action, const char *record, const char *on_off)
-{
-  TSActionNeedT action_need;
-  TSMgmtError status;
-  TSInt int_val;
-
-  switch (action) {
-  case RECORD_SET:
-    if (on_off) {
-      if (!strcasecmp(on_off, "on")) {
-        int_val = 1;
-      } else if (!strcasecmp(on_off, "off")) {
-        int_val = 0;
-      } else {
-        Cli_Error("Expected \"on\" or \"off\" but got %s\n", on_off);
-        return CLI_ERROR;
-      }
-    } else {
-      Cli_Error("Expected <on | off> but got nothing.\n");
-      return CLI_ERROR;
-    }
-    status = Cli_RecordSetInt(record, int_val, &action_need);
-    if (status != TS_ERR_OKAY) {
-      return status;
-    }
-    return (Cli_ConfigEnactChanges(action_need));
-
-  case RECORD_GET:
-    int_val = -1;
-    status = Cli_RecordGetInt(record, &int_val);
-    Cli_PrintEnable("", int_val);
-    return CLI_OK;
-  }
-  return CLI_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// Cli_RecordInt_Action
-//
-// used for records.config INT variables
-//
-// action = RECORD_GET retrieve and display the variable
-//          RECORD_SET set the variable
-//
-// record = variable in records.config
-//
-// value = the integer value used by RECORD_SET
-//
-int
-Cli_RecordInt_Action(int action, const char *record, int value)
-{
-  switch (action) {
-  case RECORD_SET:
-    {
-      TSActionNeedT action_need = TS_ACTION_UNDEFINED;
-      TSMgmtError status = Cli_RecordSetInt(record, value, &action_need);
-
-      if (status) {
-        return status;
-      }
-      return (Cli_ConfigEnactChanges(action_need));
-    }
-  case RECORD_GET:
-    {
-      TSInt value_in = -1;
-      TSMgmtError status = Cli_RecordGetInt(record, &value_in);
-
-      if (status) {
-        return status;
-      }
-      Cli_Printf("%d\n", value_in);
-      return CLI_OK;
-    }
-  }
-  return CLI_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// Cli_RecordHostname_Action
-//
-// used for records.config STRING variables
-// performs checking to see if string is a valid fully qualified hostname
-//
-// action = RECORD_GET retrieve and display the variable
-//          RECORD_SET set the variable
-//
-// record = variable in records.config
-//
-// hostname = string to set
-//
-int
-Cli_RecordHostname_Action(int action, char *record, char *hostname)
-{
-  TSMgmtError status;
-  TSActionNeedT action_need = TS_ACTION_UNDEFINED;
-  TSString str_val = NULL;
-
-  switch (action) {
-  case RECORD_SET:
-    if (IsValidFQHostname(hostname) == CLI_OK) {
-      status = Cli_RecordSetString(record, (TSString) hostname, &action_need);
-
-      if (status) {
-        return status;
-      }
-      return (Cli_ConfigEnactChanges(action_need));
-    }
-    Cli_Error("ERROR: %s is an invalid name.\n", hostname);
-    return CLI_ERROR;
-
-  case RECORD_GET:
-    status = Cli_RecordGetString(record, &str_val);
-    if (status) {
-      return status;
-    }
-    if (str_val)
-      Cli_Printf("%s\n", str_val);
-    else
-      Cli_Printf("none\n");
-    return CLI_OK;
-  }
-  return CLI_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// Cli_RecordString_Action
-//
-// used for records.config STRING variables
-//
-// action = RECORD_GET retrieve and display the variable
-//          RECORD_SET set the variable
-//
-// record = variable in records.config
-//
-// string_val = string to set
-//
-int
-Cli_RecordString_Action(int action, const char *record, char *string_val)
-{
-  TSMgmtError status;
-  TSActionNeedT action_need = TS_ACTION_UNDEFINED;
-  TSString str_val = NULL;
-
-  switch (action) {
-  case RECORD_SET:
-    status = Cli_RecordSetString(record, (TSString) string_val, &action_need);
-
-    if (status) {
-      return status;
-    }
-    return (Cli_ConfigEnactChanges(action_need));
-
-  case RECORD_GET:
-    status = Cli_RecordGetString(record, &str_val);
-    if (status) {
-      return status;
-    }
-    if (str_val)
-      Cli_Printf("%s\n", str_val);
-    else
-      Cli_Printf("none\n");
-    return CLI_OK;
-  }
-  return CLI_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// Cli_ConfigFileURL_Action
-//
-// used for config files other than records.config
-//
-// file = integer which specifies config file
-//
-// filename = config file name to display
-//
-// url = if non-NULL, update the file using contents of URL
-//
-int
-Cli_ConfigFileURL_Action(TSFileNameT file, const char *filename, const char *url)
-{
-  TSMgmtError status;
-  // Retrieve  file from url
-
-  if (url == NULL) {
-    Cli_Printf("%s File Rules\n", filename);
-    Cli_Printf("----------------------------\n");
-    status = Cli_DisplayRules(file);
-    return status;
-  }
-  Cli_Printf("Retrieve and Install %s file from url %s\n", filename, url);
-
-  status = Cli_SetConfigFileFromUrl(file, url);
-
-  return (status);
-}
-
-int
-cliCheckIfEnabled(const char *command)
-{
-  if (enable_restricted_commands == false) {
-    Cli_Error("\n%s is a restricted command only accessible from enable mode\n\n", command);
-    return CLI_ERROR;
-  }
-  return CLI_OK;
-}
-
-int
-GetTSDirectory(char *ts_path, size_t ts_path_len)
-{
-
-  ink_strlcpy(ts_path, Layout::get()->bindir, ts_path_len);
-  if (access(ts_path, R_OK) == -1) {
-    Cli_Error("unable to access() '%s': %d, %s\n",
-              ts_path, errno, strerror(errno));
-    Cli_Error(" Please set correct path in env variable TS_ROOT \n");
-    return -1;
-  }
-
-  return 0;
-}
-
-int
-Cli_CheckPluginStatus(TSString plugin)
-{
-
-  int match = 0;
-  TSCfgContext ctx;
-  TSCfgIterState ctx_state;
-  TSPluginEle *ele;
-
-  ctx = TSCfgContextCreate(TS_FNAME_PLUGIN);
-  if (TSCfgContextGet(ctx) != TS_ERR_OKAY) {
-    printf("ERROR READING FILE\n");
-  }
-  ele = (TSPluginEle *) TSCfgContextGetFirst(ctx, &ctx_state);
-
-  while (ele) {
-    if (!strcasecmp(plugin, ele->name)) {
-      match = 1;
-      break;
-    }
-    ele = (TSPluginEle *) TSCfgContextGetNext(ctx, &ctx_state);
-  }
-
-  if (match) {
-    return CLI_OK;
-  } else {
-    return CLI_ERROR;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/CliMgmtUtils.h
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/CliMgmtUtils.h b/cmd/traffic_shell/CliMgmtUtils.h
deleted file mode 100644
index 1234e77..0000000
--- a/cmd/traffic_shell/CliMgmtUtils.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/** @file
-
-  This file declares various utility functions which call the TSMgmtAPI.
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-#include "mgmtapi.h"
-
-#define RECORD_GET 0
-#define RECORD_SET 1
-
-// Get a records.config variable by name
-TSMgmtError Cli_RecordGet(const char *rec_name, TSRecordEle * rec_val);
-
-// Get an integer type records.config variable
-TSMgmtError Cli_RecordGetInt(const char *rec_name, TSInt * int_val);
-
-// Get an counter type records.config variable
-TSMgmtError Cli_RecordGetCounter(const char *rec_name, TSCounter * ctr_val);
-
-// Get a float type records.config variable
-TSMgmtError Cli_RecordGetFloat(const char *rec_name, TSFloat * float_val);
-
-// Get a string type records.config variable
-TSMgmtError Cli_RecordGetString(const char *rec_name, char **string_val);
-
-// Use a string to set a records.config variable
-TSMgmtError Cli_RecordSet(const char *rec_name, const char *rec_value, TSActionNeedT * action_need);
-
-// Set an integer type records.config variable
-TSMgmtError Cli_RecordSetInt(const char *rec_name, TSInt int_val, TSActionNeedT * action_need);
-
-//Set a float type records.config variable
-TSMgmtError Cli_RecordSetFloat(const char *rec_name, TSFloat float_val, TSActionNeedT * action_need);
-
-// Set a string type records.config variable
-TSMgmtError Cli_RecordSetString(const char *rec_name, TSString str_val, TSActionNeedT * action_need);
-
-// Retrieve and display contents of a rules file
-TSMgmtError Cli_DisplayRules(TSFileNameT fname);
-
-// Retrieve and use config file from remote URL
-TSMgmtError Cli_SetConfigFileFromUrl(TSFileNameT file, const char *url);
-
-// enable recent configuration changes by performing the action specified
-// by the action_need value
-TSMgmtError Cli_ConfigEnactChanges(TSActionNeedT action_need);
-
-// evaluate "stringval" and return 1 if "on", otherwise 0
-int Cli_EvalOnOffString(char *stringval);
-
-////////////////////////////////////////////////////////////////
-// Cli_Record functions are used by various config commands
-// to get/display and set variables in records.config
-//
-
-////////////////////////////////////////////////////////////////
-// Cli_RecordOnOff_Action
-//
-// used for records.config INT variables when 1 = on, 0 = off
-//
-// action = RECORD_GET retrieve and display the variable
-//          RECORD_SET set the variable
-//
-// record = variable in records.config
-//
-// on_off = "on" mean 1, "off" mean 0
-//
-int Cli_RecordOnOff_Action(int action, const char *record, const char *on_off);
-
-////////////////////////////////////////////////////////////////
-// Cli_RecordInt_Action
-//
-// used for records.config INT variables
-//
-// action = RECORD_GET retrieve and display the variable
-//          RECORD_SET set the variable
-//
-// record = variable in records.config
-//
-// value = the integer value used by RECORD_SET
-//
-int Cli_RecordInt_Action(int action, const char *record, int value);
-
-////////////////////////////////////////////////////////////////
-// Cli_RecordHostname_Action
-//
-// used for records.config STRING variables
-// performs checking to see if string is a valid fully qualified hostname
-//
-// action = RECORD_GET retrieve and display the variable
-//          RECORD_SET set the variable
-//
-// record = variable in records.config
-//
-// hostname = string to set
-//
-int Cli_RecordHostname_Action(int action, const char *record, char *hostname);
-
-////////////////////////////////////////////////////////////////
-// Cli_RecordString_Action
-//
-// used for records.config STRING variables
-//
-// action = RECORD_GET retrieve and display the variable
-//          RECORD_SET set the variable
-//
-// record = variable in records.config
-//
-// string_val = string to set
-//
-int Cli_RecordString_Action(int action, const char *record, char *string_val);
-
-////////////////////////////////////////////////////////////////
-// Cli_ConfigFileURL_Action
-//
-// used for config files other than records.config
-//
-// file = integer which specifies config file
-//
-// filename = config file name to display
-//
-// url = if non-NULL, update the file using contents of URL
-//
-int Cli_ConfigFileURL_Action(TSFileNameT file, const char *filename, const char *url);
-
-extern bool enable_restricted_commands;
-
-int cliCheckIfEnabled(const char *command);
-
-int GetTSDirectory(char *ts_path, size_t ts_path_len);
-
-int Cli_CheckPluginStatus(TSString plugin);


[5/7] TS-1665 Remove traffic_shell

Posted by zw...@apache.org.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/ConfigCmd.h
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/ConfigCmd.h b/cmd/traffic_shell/ConfigCmd.h
deleted file mode 100644
index 38d3d74..0000000
--- a/cmd/traffic_shell/ConfigCmd.h
+++ /dev/null
@@ -1,837 +0,0 @@
-/** @file
-
-  A brief file description
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-/****************************************************************
- * Filename: ConfigCmd.h
- * Purpose: This file contains the CLI's "config" command definitions.
- *
- *
- ****************************************************************/
-
-#include "mgmtapi.h"
-#include <tcl.h>
-#include "createArgument.h"
-#include "definitions.h"
-
-#ifndef __CONFIG_CMD_H__
-#define __CONFIG_CMD_H__
-
-
-// enumerated type which captures all "config" commands
-typedef enum
-{
-  CMD_CONFIG_GET = 100,
-  CMD_CONFIG_SET,
-  CMD_CONFIG_SET_VALUE,
-  CMD_ENABLE_STATUS,
-  CMD_CONFIG_NAME,
-  CMD_CONFIG_RESTART_CLUSTER,
-  CMD_CONFIG_PORTS,
-  CMD_CONFIG_PORTS_HTTP_SERVER,
-  CMD_CONFIG_PORTS_CLUSTER,
-  CMD_CONFIG_PORTS_CLUSTER_RS,
-  CMD_CONFIG_PORTS_CLUSTER_MC,
-  CMD_CONFIG_PORTS_CONNECT,
-  CMD_CONFIG_PORTS_SOCKS_SERVER,
-  CMD_CONFIG_PORTS_ICP,
-  CMD_CONFIG_DATE,
-  CMD_CONFIG_TIME,
-  CMD_CONFIG_TIMEZONE,
-  CMD_CONFIG_TIMEZONE_LIST,
-  CMD_HALT,
-  CMD_REBOOT,
-  CMD_CONFIG_START,
-  CMD_CONFIG_STOP,
-  CMD_CONFIG_WRITE,
-  CMD_CONFIG_WRITE_IFC_HEAD,
-  CMD_CONFIG_WRITE_TS_VERSION,
-  CMD_CONFIG_WRITE_BUILD_DATE,
-  CMD_CONFIG_WRITE_PLATFORM,
-  CMD_CONFIG_WRITE_NODES,
-  CMD_CONFIG_WRITE_FEATURE,
-  CMD_CONFIG_WRITE_TAR,
-  CMD_CONFIG_WRITE_TAR_INFO,
-  CMD_CONFIG_WRITE_FILELIST,
-  CMD_CONFIG_WRITE_TAR_COMMON,
-  CMD_CONFIG_WRITE_BIN_DIR,
-  CMD_CONFIG_WRITE_BIN_GROUP,
-  CMD_CONFIG_WRITE_BIN_COMMON,
-  CMD_CONFIG_WRITE_LIB_DIR,
-  CMD_CONFIG_WRITE_LIB_GROUP,
-  CMD_CONFIG_WRITE_LIB_COMMON,
-  CMD_CONFIG_WRITE_CONFIG_DIR,
-  CMD_CONFIG_WRITE_CONFIG_GROUP,
-  CMD_CONFIG_WRITE_CONFIG_COMMON,
-  CMD_CONFIG_WRITE_COMMON_FILE,
-  CMD_CONFIG_READ,
-  CMD_CONFIG_READ_IFC_HEAD,
-  CMD_CONFIG_UPGRADE_READ_URL,
-  CMD_CONFIG_READ_FEATURE,
-  CMD_CONFIG_READ_TAR,
-  CMD_CONFIG_READ_TAR_INFO,
-  CMD_CONFIG_READ_TAR_COMMON,
-  CMD_CONFIG_READ_BIN_DIR,
-  CMD_CONFIG_READ_BIN_GROUP,
-  CMD_CONFIG_READ_BIN_COMMON,
-  CMD_CONFIG_READ_LIB_DIR,
-  CMD_CONFIG_READ_LIB_GROUP,
-  CMD_CONFIG_READ_LIB_COMMON,
-  CMD_CONFIG_READ_CONFIG_DIR,
-  CMD_CONFIG_READ_CONFIG_GROUP,
-  CMD_CONFIG_READ_CONFIG_COMMON,
-  CMD_CONFIG_READ_COMMON_FILE,
-  CMD_CONFIG_FILTER,
-  CMD_CONFIG_SECURITY,
-  CMD_CONFIG_SECURITY_IP,
-  CMD_CONFIG_SECURITY_PASSWORD,
-  CMD_CONFIG_PARENTS_STATUS,
-  CMD_CONFIG_PARENTS_CACHE,
-  CMD_CONFIG_PARENTS_CONFIG_FILE,
-  CMD_CONFIG_REMAP,
-  CMD_CONFIG_HTTP_STATUS,
-  CMD_CONFIG_HTTP_KEEP_ALIVE_TIMEOUT_IN,
-  CMD_CONFIG_HTTP_KEEP_ALIVE_TIMEOUT_OUT,
-  CMD_CONFIG_HTTP_INACTIVE_TIMEOUT_IN,
-  CMD_CONFIG_HTTP_INACTIVE_TIMEOUT_OUT,
-  CMD_CONFIG_HTTP_ACTIVE_TIMEOUT_IN,
-  CMD_CONFIG_HTTP_ACTIVE_TIMEOUT_OUT,
-  CMD_CONFIG_HTTP_REMOVE_FROM,
-  CMD_CONFIG_HTTP_REMOVE_REFERER,
-  CMD_CONFIG_HTTP_REMOVE_USER,
-  CMD_CONFIG_HTTP_REMOVE_COOKIE,
-  CMD_CONFIG_HTTP_REMOVE_HEADER,
-  CMD_CONFIG_HTTP_GLOBAL_USER_AGENT,
-  CMD_CONFIG_HTTP_INSERT_IP,
-  CMD_CONFIG_HTTP_REMOVE_IP,
-  CMD_CONFIG_HTTP_PROXY,
-  CMD_CONFIG_HTTP_FWD,
-  CMD_CONFIG_HTTP_REV,
-  CMD_CONFIG_HTTP_FWD_REV,
-  CMD_CONFIG_ICP,
-  CMD_CONFIG_ICP_MODE,
-  CMD_CONFIG_ICP_MODE_RECEIVE,
-  CMD_CONFIG_ICP_MODE_SENDRECEIVE,
-  CMD_CONFIG_ICP_MODE_DISABLED,
-  CMD_CONFIG_ICP_PORT,
-  CMD_CONFIG_ICP_MCAST,
-  CMD_CONFIG_ICP_QTIMEOUT,
-  CMD_CONFIG_ICP_PEERS,
-  CMD_CONFIG_PORT_TUNNELS_SERVER_OTHER_PORTS,
-  CMD_CONFIG_SCHEDULED_UPDATE_STATUS,
-  CMD_CONFIG_SCHEDULED_UPDATE_RETRY_COUNT,
-  CMD_CONFIG_SCHEDULED_UPDATE_RETRY_INTERVAL,
-  CMD_CONFIG_SCHEDULED_UPDATE_MAX_CONCURRENT,
-  CMD_CONFIG_SCHEDULED_UPDATE_FORCE_IMMEDIATE,
-  CMD_CONFIG_SCHEDULED_UPDATE_RULES,
-  CMD_CONFIG_SOCKS_STATUS,
-  CMD_CONFIG_SOCKS_VERSION,
-  CMD_CONFIG_SOCKS_DEFAULT_SERVERS,
-  CMD_CONFIG_SOCKS_ACCEPT,
-  CMD_CONFIG_SOCKS_ACCEPT_PORT,
-  CMD_CONFIG_CACHE,
-  CMD_CONFIG_CACHE_ON,
-  CMD_CONFIG_CACHE_OFF,
-  CMD_CONFIG_CACHE_HTTP,
-  CMD_CONFIG_CACHE_CLUSTER_BYPASS,
-  CMD_CONFIG_CACHE_IGNORE_BYPASS,
-  CMD_CONFIG_CACHE_MAX_OBJECT_SIZE,
-  CMD_CONFIG_CACHE_MAX_ALTERNATES,
-  CMD_CONFIG_CACHE_FILE,
-  CMD_CONFIG_CACHE_FRESHNESS,
-  CMD_CONFIG_CACHE_FRESHNESS_VERIFY,
-  CMD_CONFIG_CACHE_FRESHNESS_VERIFY_WHEN_EXPIRED,
-  CMD_CONFIG_CACHE_FRESHNESS_VERIFY_NO_DATE,
-  CMD_CONFIG_CACHE_FRESHNESS_VERIFY_ALWALYS,
-  CMD_CONFIG_CACHE_FRESHNESS_VERIFY_NEVER,
-  CMD_CONFIG_CACHE_FRESHNESS_MINIMUM,
-  CMD_CONFIG_CACHE_FRESHNESS_MINIMUM_EXPLICIT,
-  CMD_CONFIG_CACHE_FRESHNESS_MINIMUM_LAST_MODIFIED,
-  CMD_CONFIG_CACHE_FRESHNESS_MINIMUM_NOTHING,
-  CMD_CONFIG_CACHE_FRESHNESS_NO_EXPIRE_LIMIT,
-  CMD_CONFIG_CACHE_FRESHNESS_NO_EXPIRE_LIMIT_GREATER_THAN,
-  CMD_CONFIG_CACHE_FRESHNESS_NO_EXPIRE_LIMIT_LESS_THAN,
-  CMD_CONFIG_CACHE_DYNAMIC,
-  CMD_CONFIG_CACHE_ALTERNATES,
-  CMD_CONFIG_CACHE_VARY,
-  CMD_CONFIG_CACHE_VARY_TEXT,
-  CMD_CONFIG_CACHE_VARY_COOKIES_IMAGES,
-  CMD_CONFIG_CACHE_VARY_OTHER,
-  CMD_CONFIG_CACHE_COOKIES,
-  CMD_CONFIG_CACHE_COOKIES_NONE,
-  CMD_CONFIG_CACHE_COOKIES_ALL,
-  CMD_CONFIG_CACHE_COOKIES_NON_TEXT,
-  CMD_CONFIG_CACHE_COOKIES_NON_TEXT_EXT,
-  CMD_CONFIG_CACHE_CLEAR,
-  CMD_CONFIG_HOSTDB,
-  CMD_CONFIG_HOSTDB_LOOKUP_TIMEOUT,
-  CMD_CONFIG_HOSTDB_FOREGROUND_TIMEOUT,
-  CMD_CONFIG_HOSTDB_BACKGROUND_TIMEOUT,
-  CMD_CONFIG_HOSTDB_INVALID_HOST_TIMEOUT,
-  CMD_CONFIG_HOSTDB_RE_DNS_ON_RELOAD,
-  CMD_CONFIG_HOSTDB_CLEAR,
-  CMD_CONFIG_DNS,
-  CMD_CONFIG_DNS_RESOLVE_TIMEOUT,
-  CMD_CONFIG_DNS_RETRIES,
-  CMD_CONFIG_VIRTUALIP,
-  CMD_CONFIG_VIRTUALIP_STATUS,
-  CMD_CONFIG_VIRTUALIP_LIST,
-  CMD_CONFIG_VIRTUALIP_ADD,
-  CMD_CONFIG_VIRTUALIP_ADD_IP,
-  CMD_CONFIG_VIRTUALIP_ADD_DEVICE,
-  CMD_CONFIG_VIRTUALIP_ADD_SUBINTERFACE,
-  CMD_CONFIG_VIRTUALIP_DELETE,
-  CMD_CONFIG_LOGGING_ON,
-  CMD_CONFIG_LOGGING_OFF,
-  CMD_CONFIG_LOGGING_EVENT,
-  CMD_CONFIG_LOGGING_EVENT_ENABLED,
-  CMD_CONFIG_LOGGING_EVENT_TRANS_ONLY,
-  CMD_CONFIG_LOGGING_EVENT_ERROR_ONLY,
-  CMD_CONFIG_LOGGING_EVENT_DISABLED,
-  CMD_CONFIG_LOGGING_MGMT_DIRECTORY,
-  CMD_CONFIG_LOGGING_SPACE_LIMIT,
-  CMD_CONFIG_LOGGING_SPACE_HEADROOM,
-  CMD_CONFIG_LOGGING_COLLATION_STATUS,
-  CMD_CONFIG_LOGGING_COLLATION_STATUS_INACTIVE,
-  CMD_CONFIG_LOGGING_COLLATION_STATUS_HOST,
-  CMD_CONFIG_LOGGING_COLLATION_STATUS_SEND_STANDARD,
-  CMD_CONFIG_LOGGING_COLLATION_STATUS_SEND_CUSTOM,
-  CMD_CONFIG_LOGGING_COLLATION_STATUS_SEND_ALL,
-  CMD_CONFIG_LOGGING_COLLATION_HOST,
-  CMD_CONFIG_LOGGING_COLLATION,
-  CMD_CONFIG_LOGGING_COLLATION_SECRET,
-  CMD_CONFIG_LOGGING_COLLATION_TAGGED,
-  CMD_CONFIG_LOGGING_COLLATION_ORPHAN_LIMIT,
-  CMD_CONFIG_LOGGING_AND_CUSTOM_FORMAT,
-  CMD_CONFIG_LOGGING_FORMAT_SQUID,
-  CMD_CONFIG_LOGGING_FORMAT_NETSCAPE_COMMON,
-  CMD_CONFIG_LOGGING_FORMAT_NETSCAPE_EXT,
-  CMD_CONFIG_LOGGING_FORMAT_NETSCAPE_EXT2,
-  CMD_CONFIG_LOGGING_TYPE,
-  CMD_CONFIG_LOGGING_TYPE_ASCII,
-  CMD_CONFIG_LOGGING_TYPE_BINARY,
-  CMD_CONFIG_LOGGING_FILE,
-  CMD_CONFIG_LOGGING_HEADER,
-  CMD_CONFIG_LOGGING_SPLITTING,
-  CMD_CONFIG_LOGGING_SPLITTING_ICP,
-  CMD_CONFIG_LOGGING_SPLITTING_HTTP,
-  CMD_CONFIG_LOGGING_CUSTOM,
-  CMD_CONFIG_LOGGING_ROLLING,
-  CMD_CONFIG_LOGGING_OFFSET,
-  CMD_CONFIG_LOGGING_INTERVAL,
-  CMD_CONFIG_LOGGING_AUTO_DELETE,
-  CMD_CONFIG_SSL,
-  CMD_CONFIG_SSL_STATUS,
-  CMD_CONFIG_SSL_PORT,
-  CMD_CONFIG_IP_ADDRESS,
-  CMD_CONFIG_HOSTNAME,
-  CMD_CONFIG_NETMASK,
-  CMD_CONFIG_DOMAIN,
-  CMD_CONFIG_DNS_IP,
-  CMD_CONFIG_DEFAULT_ROUTER,
-  CMD_CONFIG_NETWORK_INT,
-  CMD_CONFIG_NETWORK_STATUS,
-  CMD_CONFIG_NETWORK_START,
-  CMD_CONFIG_NETWORK_PROTOCOL,
-  CMD_CONFIG_GATEWAY,
-  CMD_CONFIG_ALARM_RESOLVE_NAME,
-  CMD_CONFIG_ALARM_RESOLVE_NUMBER,
-  CMD_CONFIG_ALARM_RESOLVE_ALL,
-  CMD_CONFIG_ALARM_NOTIFY
-} cliConfigCommand;
-
-typedef struct DateTime
-{
-  char str_hh[16];
-  char str_min[16];
-  char str_ss[16];
-  char str_dd[16];
-  char str_mm[16];
-  char str_yy[16];
-} DateTime;
-
-////////////////////////////////////////////////////////////////
-// ConfigCmd
-//
-// This is the callback function for the "config" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_Config(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// ConfigCmdArgs
-//
-// Register "config" command arguments with the Tcl interpreter.
-//
-int CmdArgs_Config();
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigGet
-//
-// This is the callback function for the "config:get" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_ConfigGet(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigSet
-//
-// This is the callback function for the "config:set" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_ConfigSet(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigName
-//
-// This is the callback function for the "config:name" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_ConfigName(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigStart
-//
-// This is the callback function for the "config:start" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_ConfigStart(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigStop
-//
-// This is the callback function for the "config:stop" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_ConfigStop(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-int Cmd_ConfigRestart(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int CmdArgs_ConfigRestart();
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigParents
-//
-// This is the callback function for the "config:parents" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_ConfigParents(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigParents
-//
-// Register "config:parents" arguments with the Tcl interpreter.
-//
-int CmdArgs_ConfigParents();
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigRemap
-//
-// This is the callback function for the "config:remap" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_ConfigRemap(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigPorts
-//
-// This is the callback function for the "config:ports" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_ConfigPorts(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigPorts
-//
-// Register "config:ports" arguments with the Tcl interpreter.
-//
-int CmdArgs_ConfigPorts();
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigPortTunnles
-//
-// Register "config:PortTunnles" arguments with the Tcl interpreter.
-//
-int CmdArgs_ConfigPortTunnels();
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigScheduledUpdate
-//
-// This is the callback function for the "config:scheduled-update" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_ConfigScheduledUpdate(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigScheduled-Update
-//
-// Register "config:Scheduled-Update" arguments with the Tcl interpreter.
-//
-int CmdArgs_ConfigScheduledUpdate();
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigSocks
-//
-// This is the callback function for the "config:scheduled-update" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_ConfigSocks(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigSocks
-//
-// Register "config:socks" arguments with the Tcl interpreter.
-//
-int CmdArgs_ConfigSocks();
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigSecurity
-//
-// This is the callback function for the "config:security" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_ConfigSecurity(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigSecurity
-//
-// Register "config:security" arguments with the Tcl interpreter.
-//
-int CmdArgs_ConfigSecurity();
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigHttp
-//
-// This is the callback function for the "config:http" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_ConfigHttp(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigHttp
-//
-// Register "config:http" arguments with the Tcl interpreter.
-//
-int CmdArgs_ConfigHttp();
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigIcp
-//
-// This is the callback function for the "config:icp" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_ConfigIcp(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigIcp
-//
-// Register "config:Icp" arguments with the Tcl interpreter.
-//
-int CmdArgs_ConfigIcp();
-
-////////////////////////////////////////////////////////////////
-//
-// Cmd_ConfigHostdb
-// This is the callback function for the "config:hostdb" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigCache
-//
-// This is the callback function for the "config:cache" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_ConfigCache(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigCache
-//
-// Register "config:cache" arguments with the Tcl interpreter.
-//
-int CmdArgs_ConfigCache();
-
-
-int Cmd_ConfigHostdb(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigHostdb
-//
-// Register "config:hostdb" arguments with the Tcl interpreter.
-//
-int CmdArgs_ConfigHostdb();
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigDns
-//
-// This is the callback function for the "config:dns" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_ConfigDns(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigDns
-//
-// Register "config:dns" arguments with the Tcl interpreter.
-//
-int CmdArgs_ConfigDns();
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigVirtualip
-//
-// This is the callback function for the "config:virtualip" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_ConfigVirtualip(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigVirtualip
-//
-// Register "config:virtualip" arguments with the Tcl interpreter.
-//
-int CmdArgs_ConfigVirtualip();
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigLogging
-//
-// This is the callback function for the "config:logging" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_ConfigLogging(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigLogging
-//
-// Register "config:logging" arguments with the Tcl interpreter.
-//
-int CmdArgs_ConfigLogging();
-// Cmd_ConfigSsl
-//
-// This is the callback function for the "config:ssl" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_ConfigSsl(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigSsl
-//
-// Register "config:ssl" arguments with the Tcl interpreter.
-//
-int CmdArgs_ConfigSsl();
-
-////////////////////////////////////////////////////////////////
-// Functions to implement network settings
-//
-int IsValidHostname(char *str);
-int IsValidFQHostname(char *str);
-int IsValidDomainname(char *str);
-int IsValidIpAddress(char *str);
-#if defined(solaris)
-int getnetmask(char *mask);
-#endif
-char *pos_after_string(char const *haystack, char const *needle);
-int StartBinary(char *abs_bin_path, char *bin_options, int isScript);
-int getrouter(char *router, int len);
-int getnameserver(char *nameserver, int len);
-int setnameserver(char *nameserver);
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigAlarm
-//
-// This is the callback function for the "config:alarm" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_ConfigAlarm(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigAlarm
-//
-// Register "config:alarm" arguments with the Tcl interpreter.
-//
-int CmdArgs_ConfigAlarm();
-
-////////////////////////////////////////////////////////////////
-// Cmd_Enable
-//
-// This is the callback function for the "enable" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_Enable(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigParents
-//
-// Register "config:parents" arguments with the Tcl interpreter.
-//
-int CmdArgs_Enable();
-
-int cliCheckIfEnabled(char *command);
-
-////////////////////////////////////////////////////////////////
-// Cmd_Disable
-//
-// This is the callback function for the "enable" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_Disable(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// Cmd_Help
-//
-// This is the callback function for the "help" command. It displays the
-// online help for the requested topic(s).
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_Help(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-
-////////////////////////////////////////////////////////////////
-//
-// "config" sub-command implementations
-//
-////////////////////////////////////////////////////////////////
-
-// config start sub-command
-int ConfigStart();
-
-// config stop sub-command
-int ConfigStop();
-
-// config get sub-command
-int ConfigGet(const char *rec_name);
-
-// config set sub-command
-int ConfigSet(const char *rec_name, const char *rec_value);
-
-// config name sub-command
-int ConfigName(const char *proxy_name);
-
-// config ports sub-command
-int ConfigPortsSet(int arg_ref, void *valuePtr);
-int ConfigPortsGet(int arg_ref);
-
-// config Timezone sub-command
-int ConfigTimezone(int, int);
-
-//config Timezone List
-int ConfigTimezoneList();
-
-// config security password sub-command
-int ConfigSecurityPasswd();
-
-// config remap sub-command
-int ConfigRemap(const char *url);
-
-// config http proxy sub-command
-int ConfigHttpProxy(int arg_ref, int setvar);
-
-// config icp mode sub-command
-int ConfigIcpMode(int arg_ref, int setvar);
-
-// config Cache Freshness Verify sub-command
-int ConfigCacheFreshnessVerify(int arg_ref, int setvar);
-
-// config Cache Freshness Minimum sub-command
-int ConfigCacheFreshnessMinimum(int arg_ref, int setvar);
-
-// config Cache FreshnessNoExpireLimit
-int ConfigCacheFreshnessNoExpireLimit(TSInt min, TSInt max, int setvar);
-
-// config Cache Vary sub-command
-int ConfigCacheVary(int arg_ref, char *field, int setvar);
-
-// config Cache Cookies sub-command
-int ConfigCacheCookies(int arg_ref, int setvar);
-
-// config Cache Clear sub-command
-int ConfigCacheClear();
-
-// config HostDB Clear sub-command
-int ConfigHostdbClear();
-
-//config virtualip list
-int ConfigVirtualIpList();
-
-//config virtualip add
-int ConfigVirtualipAdd(char *ip, char *device, int subinterface, int set_var);
-
-//config virtualip delete
-int ConfigVirtualipDelete(int ip_no, int set_var);
-
-// config Logging Event sub-command
-int ConfigLoggingEvent(int arg_ref, int setvar);
-
-// config Logging collation status sub-command
-int ConfigLoggingCollationStatus(int arg_ref, int setvar);
-
-// config Logging collation sub-command
-int ConfigLoggingCollation(TSString secret, int arg_ref, TSInt orphan, int setvar);
-
-// config Logging Format Type File sub-command
-int ConfigLoggingFormatTypeFile(int arg_ref_format, int arg_ref,
-                                int arg_ref_type, TSString file, TSString header, int setvar);
-
-// config Logging splitting sub-command
-int ConfigLoggingSplitting(int arg_ref_protocol, int arg_ref_on_off, int setvar);
-
-// config Logging Custom Format sub-command
-int ConfigLoggingCustomFormat(int arg_ref_on_off, int arg_ref_format, int setvar);
-
-// config Logging rolling offset interval autodelete sub-command
-int ConfigLoggingRollingOffsetIntervalAutodelete(int arg_ref_rolling, TSInt offset, TSInt num_hours,
-                                                 int arg_ref_auto_delete, int setvar);
-
-// config icp peers sub-command
-int ConfigIcpPeers(char *url);
-
-// config:alarm resolve-name
-int ConfigAlarmResolveName(char *name);
-
-// config:alarm resolve-number
-int ConfigAlarmResolveNumber(int number);
-
-// config:alarm resolve-all
-int ConfigAlarmResolveAll();
-
-// config:alarm notify
-int ConfigAlarmNotify(char *stringval);
-
-#endif // __CONFIG_CMD_H__

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/ConfigUpgradeCmd.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/ConfigUpgradeCmd.cc b/cmd/traffic_shell/ConfigUpgradeCmd.cc
deleted file mode 100644
index a16615e..0000000
--- a/cmd/traffic_shell/ConfigUpgradeCmd.cc
+++ /dev/null
@@ -1,634 +0,0 @@
-/** @file
-
-  A brief file description
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-/****************************************************************
- * Filename: ConfigUpgradeCmd.cc
- * Purpose: This file contains the CLI's "config:write/read/install/upgrade"
-   command implementation.
- *
- ****************************************************************/
-
-
-#include <ConfigCmd.h>
-#include <CliDisplay.h>
-#include <CliMgmtUtils.h>
-#include <CliDisplay.h>
-#include <CliMgmtUtils.h>
-#include <ConfigUpgradeCmd.h>
-#include <string.h>
-
-
-CIFCEntry::CIFCEntry(char *keyword, int counton, const char *string, ...)
-{
-
-  char Buffer[CONFIG_UPGRADE_BUF_SIZE];
-
-  KeyWord = new char[strlen(keyword) + 1];
-  sprintf(KeyWord, keyword);
-  CountOn = counton;
-
-  va_start(ap, string);
-  vsprintf(Buffer, string, ap);
-  va_end(ap);
-  Input = new char[strlen(Buffer) + 1];
-  sprintf(Input, Buffer);
-
-  Version = NULL;
-  FileName = NULL;
-
-}
-
-CIFCEntry::~CIFCEntry()
-{
-
-  if (Version != NULL)
-    delete[]Version;
-  if (FileName != NULL)
-    delete[]FileName;
-  if (KeyWord != NULL)
-    delete[]KeyWord;
-  if (Input != NULL)
-    delete[]Input;
-
-}
-
-// check IFCVERSION IFCPATH and IFCFILENAME setup
-INKError
-CIFCEntry::ConfigWriteCheckIFCEnv()
-{
-
-  char *pathPtr;
-  char *filenamePtr;
-  char *versionPtr;
-
-
-  pathPtr = getenv("IFCPATH");
-  filenamePtr = getenv("IFCFILENAME");
-  versionPtr = getenv("IFCVERSION");
-
-  if (pathPtr == NULL || filenamePtr == NULL || versionPtr == NULL ||
-      strlen(pathPtr) == 0 || strlen(filenamePtr) == 0 || strlen(versionPtr) == 0) {
-    return INK_ERR_READ_FILE;
-  }
-
-  FileName = new char[strlen(pathPtr) + strlen(filenamePtr) + 1];
-  sprintf(FileName, "%s%s", pathPtr, filenamePtr);
-
-  Version = new char[strlen(versionPtr) + 1];
-  sprintf(Version, "%s", versionPtr);
-
-  return INK_ERR_OKAY;
-}
-
-INKError
-CIFCEntry::Cli_NewIFCFile()
-{
-
-  FILE *Fptr;
-
-  Fptr = fopen(FileName, "r+");
-  if (Fptr != NULL) {
-    fclose(Fptr);
-    return INK_ERR_OKAY;
-  } else {                      /* need to create new file */
-    Fptr = fopen(FileName, "w");
-    if (Fptr == NULL) {
-      Cli_Error("Error in creating new IFC file\n");
-      return INK_ERR_WRITE_FILE;
-    }
-    fprintf(Fptr, "############################\n");
-    fprintf(Fptr, "#IFCHEAD FORMAT\n");
-    fprintf(Fptr, "#\n");
-    fprintf(Fptr, "#<TRAFFIC SERVER VERSION>\n");
-    fprintf(Fptr, "#<BUILD DATE>\n");
-    fprintf(Fptr, "#<PLATFORM>\n");
-    fprintf(Fptr, "#<NUMBER OF NODES>\n");
-    fprintf(Fptr, "\n");
-    fprintf(Fptr, "IfcHead\n");
-    fprintf(Fptr, "\n");
-
-    fprintf(Fptr, "############################\n");
-    fprintf(Fptr, "#FEATURE FORMAT\n");
-    fprintf(Fptr, "#\n");
-    fprintf(Fptr, "#<FEATURE STRING LIST>\n");
-    fprintf(Fptr, "\n");
-    fprintf(Fptr, "Feature\n");
-    fprintf(Fptr, "\n");
-
-    fprintf(Fptr, "############################\n");
-    fprintf(Fptr, "#TAR FORMAT\n");
-    fprintf(Fptr, "#\n");
-    fprintf(Fptr, "#<NUMBER OF TAR FILES>\n");
-    fprintf(Fptr, "#<LIST OF TAR FILES>\n");
-    fprintf(Fptr, "\n");
-    fprintf(Fptr, "Tar\n");
-    fprintf(Fptr, "0\n");
-    fprintf(Fptr, "\n");
-
-    fprintf(Fptr, "############################\n");
-    fprintf(Fptr, "#COMMONTAR FORMAT\n");
-    fprintf(Fptr, "#\n");
-    fprintf(Fptr, "#<NUMBER OF TAR FILES>\n");
-    fprintf(Fptr, "#<LIST OF TAR FILES>\n");
-    fprintf(Fptr, "\n");
-    fprintf(Fptr, "CommonTar\n");
-    fprintf(Fptr, "0\n");
-    fprintf(Fptr, "\n");
-
-    fprintf(Fptr, "############################\n");
-    fprintf(Fptr, "#TAR INFO FORMAT\n");
-    fprintf(Fptr, "#\n");
-    fprintf(Fptr, "#<TAR FILE NAME>:<LIST OF FILES>\n");
-    fprintf(Fptr, "\n");
-    fprintf(Fptr, "TarInfo\n");
-    fprintf(Fptr, "\n");
-
-    fprintf(Fptr, "############################\n");
-    fprintf(Fptr, "#BIN GROUP FORMAT\n");
-    fprintf(Fptr, "#\n");
-    fprintf(Fptr, "#<NUMBER OF FILES>\n");
-    fprintf(Fptr, "#<LIST OF FILES>\n");
-    fprintf(Fptr, "#\n");
-    fprintf(Fptr, "BinGroup\n");
-    fprintf(Fptr, "0\n");
-    fprintf(Fptr, "\n");
-
-    fprintf(Fptr, "############################\n");
-    fprintf(Fptr, "#BIN DIR FORMAT\n");
-    fprintf(Fptr, "#\n");
-    fprintf(Fptr, "#<Number of SubDirectories>\n");
-    fprintf(Fptr, "#<SubDirectory>:<List of Files>\n");
-    fprintf(Fptr, "\n");
-    fprintf(Fptr, "BinDir\n");
-    fprintf(Fptr, "0\n");
-    fprintf(Fptr, "\n");
-
-    fprintf(Fptr, "############################\n");
-    fprintf(Fptr, "#BIN COMMON FORMAT\n");
-    fprintf(Fptr, "#\n");
-    fprintf(Fptr, "#<Number of Files>\n");
-    fprintf(Fptr, "#<List of Files>\n");
-    fprintf(Fptr, "\n");
-    fprintf(Fptr, "BinCommon\n");
-    fprintf(Fptr, "0\n");
-    fprintf(Fptr, "\n");
-
-    fprintf(Fptr, "############################\n");
-    fprintf(Fptr, "#LIB GROUP FORMAT\n");
-    fprintf(Fptr, "#\n");
-    fprintf(Fptr, "#<Number of Files>\n");
-    fprintf(Fptr, "#<List of Files>\n");
-    fprintf(Fptr, "\n");
-    fprintf(Fptr, "LibGroup\n");
-    fprintf(Fptr, "0\n");
-    fprintf(Fptr, "\n");
-
-    fprintf(Fptr, "############################\n");
-    fprintf(Fptr, "#LIB DIR FORMAT\n");
-    fprintf(Fptr, "#\n");
-    fprintf(Fptr, "#<Number of SubDirectories>\n");
-    fprintf(Fptr, "#<SubDirectory>:<List of Files>\n");
-    fprintf(Fptr, "\n");
-    fprintf(Fptr, "LibDir\n");
-    fprintf(Fptr, "0\n");
-    fprintf(Fptr, "\n");
-
-    fprintf(Fptr, "############################\n");
-    fprintf(Fptr, "#LIB COMMON FORMAT\n");
-    fprintf(Fptr, "#\n");
-    fprintf(Fptr, "#<Number of Files>\n");
-    fprintf(Fptr, "#<List of Files>\n");
-    fprintf(Fptr, "\n");
-    fprintf(Fptr, "LibCommon\n");
-    fprintf(Fptr, "0\n");
-    fprintf(Fptr, "\n");
-
-    fprintf(Fptr, "############################\n");
-    fprintf(Fptr, "#CONFIG GROUP FORMAT>\n");
-    fprintf(Fptr, "#\n");
-    fprintf(Fptr, "#<Number of Files>\n");
-    fprintf(Fptr, "#<List of Files>\n");
-    fprintf(Fptr, "\n");
-    fprintf(Fptr, "ConfigGroup\n");
-    fprintf(Fptr, "0\n");
-    fprintf(Fptr, "\n");
-
-    fprintf(Fptr, "############################\n");
-    fprintf(Fptr, "#CONFIG DIR FORMAT\n");
-    fprintf(Fptr, "#\n");
-    fprintf(Fptr, "#<Number of SubDirectories>\n");
-    fprintf(Fptr, "#<SubDirectory>:<List of Files>\n");
-    fprintf(Fptr, "\n");
-    fprintf(Fptr, "ConfigDir\n");
-    fprintf(Fptr, "0\n");
-    fprintf(Fptr, "\n");
-
-    fprintf(Fptr, "############################\n");
-    fprintf(Fptr, "#CONFIG COMMON FORMAT\n");
-    fprintf(Fptr, "#\n");
-    fprintf(Fptr, "#<Number of Files>\n");
-    fprintf(Fptr, "#<List of Files>\n");
-    fprintf(Fptr, "\n");
-    fprintf(Fptr, "ConfigCommon\n");
-    fprintf(Fptr, "0\n");
-    fprintf(Fptr, "\n");
-
-    fprintf(Fptr, "############################\n");
-    fprintf(Fptr, "#COMMON FORMAT\n");
-    fprintf(Fptr, "#\n");
-    fprintf(Fptr, "#<Number of Files>\n");
-    fprintf(Fptr, "#<List of Files>\n");
-    fprintf(Fptr, "\n");
-    fprintf(Fptr, "CommonFile\n");
-    fprintf(Fptr, "0\n");
-    fprintf(Fptr, "\n");
-
-    fclose(Fptr);
-    return INK_ERR_OKAY;
-  }
-
-}
-
-
-int
-CIFCEntry::ConfigWriteIFC()
-{
-
-  FILE *Fptr;
-  char *filebuffer, *in_buffer;
-  char *p1;
-  char OldCountString[CONFIG_UPGRADE_INT_STRING_SIZE];
-  int Count = -1;
-  long size, amount_read, addsize;
-
-  if (ConfigWriteCheckIFCEnv() == INK_ERR_READ_FILE) {
-    Cli_Error("Set $IFCVERSION, $IFCPATH and $IFCFILENAME First\n");
-    return CLI_ERROR;
-  }
-  if (Cli_NewIFCFile() == INK_ERR_WRITE_FILE) {
-    return CLI_ERROR;
-  }
-  if ((Fptr = fopen(FileName, "r")) == NULL) {
-    Cli_Error("ERROR Open IFC File to read\n");
-    return CLI_ERROR;
-  }
-
-  fseek(Fptr, 0, SEEK_END);
-  size = ftell(Fptr);
-  if (size <= 0) {
-    fclose(Fptr);
-    Cli_Error("Error Reading IFC File\n");
-    return CLI_ERROR;
-  }
-
-  filebuffer = new char[size + 1];
-  fseek(Fptr, 0, SEEK_SET);
-  amount_read = fread((void *) filebuffer, sizeof(char), size, Fptr);
-  fclose(Fptr);
-  filebuffer[size] = '\0';
-
-  if (size * (int) sizeof(char) != amount_read) {
-    Cli_Error("Error Reading IFC File\n");
-    delete[]filebuffer;
-    return CLI_ERROR;
-  }
-  // look for KeyWord
-  if ((p1 = strstr(filebuffer, KeyWord)) == NULL) {
-    delete[]filebuffer;
-    Cli_Error("Error Finding Keyword\n");
-    return CLI_ERROR;
-  }
-
-  p1 += strlen(KeyWord);
-  p1++;
-
-  // writeback
-  Fptr = fopen(FileName, "r+");
-  fseek(Fptr, p1 - filebuffer, SEEK_SET);
-
-  switch (CountOn) {
-  case 1:
-
-    // coverity[secure_coding]
-    sscanf(p1, "%d\n", &Count);
-    sprintf(OldCountString, "%d", Count);
-    p1 += (strlen(OldCountString) + 1);
-    Count++;
-    addsize = strlen(Input) + CONFIG_UPGRADE_INT_STRING_SIZE + 2;
-    in_buffer = new char[addsize + 1];
-    sprintf(in_buffer, "%d\n%s\n", Count, Input);
-    in_buffer[addsize] = '\0';
-    fwrite(in_buffer, sizeof(char), strlen(in_buffer), Fptr);
-    delete[]in_buffer;
-    break;
-
-  case 0:
-
-    fwrite(Input, sizeof(char), strlen(Input), Fptr);
-    fwrite("\n", sizeof(char), strlen("\n"), Fptr);
-    break;
-
-  default:
-
-    Cli_Error("Unexpected Value of CountOn\n");
-    fclose(Fptr);
-    delete[]filebuffer;
-    return CLI_ERROR;
-  }
-
-  fwrite(p1, sizeof(char), size - (p1 - filebuffer), Fptr);
-  fclose(Fptr);
-  delete[]filebuffer;
-  return CLI_OK;
-
-}
-
-//config read subcommand
-int
-CIFCEntry::ConfigReadIFC()
-{
-
-  FILE *Fptr;
-  char *filebuffer;
-  long size, amount_read;
-  INKError CLI_CHECK;
-
-  if (ConfigWriteCheckIFCEnv() == INK_ERR_READ_FILE) {
-    Cli_Error("Set $IFCVERSION, $IFCPATH and $IFCFILENAME First\n");
-    return CLI_ERROR;
-  }
-
-  if ((Fptr = fopen(FileName, "r")) == NULL) {
-    Cli_Printf("ERROR Opening IFC file for read\n");
-    return CLI_ERROR;
-  }
-
-  fseek(Fptr, 0, SEEK_END);
-  size = ftell(Fptr);
-  if (size <= 0) {
-    Cli_Error("Error Empty IFC FILE\n", FileName);
-    fclose(Fptr);
-    return CLI_ERROR;
-  }
-
-  filebuffer = new char[size + 1];
-  fseek(Fptr, 0, SEEK_SET);
-  amount_read = fread((void *) filebuffer, (int) sizeof(char), size, Fptr);
-
-  if (size * (int) sizeof(char) != amount_read) {
-    Cli_Error("Error Reading IFC File\n");
-    delete[]filebuffer;
-    return CLI_ERROR;
-  }
-
-  filebuffer[amount_read] = '\0';
-  fclose(Fptr);
-
-  printf("%s\n", filebuffer);
-  delete[]filebuffer;
-  return CLI_OK;
-}
-
-void
-CIFCEntry::PrintEle()
-{
-  printf("%s:%d:%s\n", KeyWord, CountOn, Input);
-}
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigWrite
-//
-// This is the callback function for the "config:write" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigWrite(ClientData clientData, Tcl_Interp * interp, int argc, char *argv[])
-{
-  CIFCEntry *EntryPtr;
-  int CLI_RETURN;
-
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (cliCheckIfEnabled("config:write") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable, *infoPtr;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-  infoPtr = argtable;
-  Cli_Debug("Cmd_ConfigWrite argc %d\n", argc);
-
-  if (argtable->parsed_args != CLI_PARSED_ARGV_END) {
-    switch (argtable->parsed_args) {
-    case CMD_CONFIG_WRITE_IFC_HEAD:
-      EntryPtr = new CIFCEntry("IfcHead", 0, "%s\n%s\n%s\n%d", argtable[1].arg_string, argtable[2].arg_string,
-                               argtable[3].arg_string, argtable[4].arg_int);
-      break;
-    case CMD_CONFIG_WRITE_FEATURE:
-      EntryPtr = new CIFCEntry("Feature", 0, argtable[0].arg_string);
-      break;
-    case CMD_CONFIG_WRITE_TAR:
-      EntryPtr = new CIFCEntry("Tar", 1, argtable[0].arg_string);
-      break;
-    case CMD_CONFIG_WRITE_TAR_INFO:
-      EntryPtr = new CIFCEntry("TarInfo", 0, "%s:%s", argtable[0].arg_string, argtable[1].arg_string);
-      break;
-    case CMD_CONFIG_WRITE_TAR_COMMON:
-      EntryPtr = new CIFCEntry("CommonTar", 1, argtable[0].arg_string);
-      break;
-    case CMD_CONFIG_WRITE_BIN_DIR:
-      EntryPtr = new CIFCEntry("BinDir", 1, "%s:%s", argtable[0].arg_string, argtable[1].arg_string);
-      break;
-    case CMD_CONFIG_WRITE_BIN_GROUP:
-      EntryPtr = new CIFCEntry("BinGroup", 1, argtable[0].arg_string);
-      break;
-    case CMD_CONFIG_WRITE_BIN_COMMON:
-      EntryPtr = new CIFCEntry("BinCommon", 1, argtable[0].arg_string);
-      break;
-    case CMD_CONFIG_WRITE_LIB_DIR:
-      EntryPtr = new CIFCEntry("LibDir", 1, "%s:%s", argtable[0].arg_string, argtable[1].arg_string);
-      break;
-    case CMD_CONFIG_WRITE_LIB_GROUP:
-      EntryPtr = new CIFCEntry("LibGroup", 1, argtable[0].arg_string);
-      break;
-    case CMD_CONFIG_WRITE_LIB_COMMON:
-      EntryPtr = new CIFCEntry("LibCommon", 1, argtable[0].arg_string);
-      break;
-    case CMD_CONFIG_WRITE_CONFIG_DIR:
-      EntryPtr = new CIFCEntry("ConfigDir", 1, "%s:%s", argtable[0].arg_string, argtable[1].arg_string);
-      break;
-    case CMD_CONFIG_WRITE_CONFIG_GROUP:
-      EntryPtr = new CIFCEntry("ConfigGroup", 1, argtable[0].arg_string);
-      break;
-    case CMD_CONFIG_WRITE_CONFIG_COMMON:
-      EntryPtr = new CIFCEntry("ConfigCommon", 1, argtable[0].arg_string);
-      break;
-    case CMD_CONFIG_WRITE_COMMON_FILE:
-      EntryPtr = new CIFCEntry("CommonFile", 1, argtable[0].arg_string);
-    }
-
-    if (EntryPtr == NULL) {
-      Cli_Error("Error Allocate Memory\n");
-      return CLI_ERROR;
-    } else {
-      CLI_RETURN = EntryPtr->ConfigWriteIFC();
-      delete EntryPtr;
-      return CLI_RETURN;
-    }
-  }
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigWrite
-//
-// Register "config:write" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ConfigWrite()
-{
-
-  createArgument("ifc-head", 1, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_WRITE_IFC_HEAD, "Specify the head information of ifc file", (char *) NULL);
-  createArgument("ts-version", CMD_CONFIG_WRITE_IFC_HEAD, CLI_ARGV_STRING,
-                 (char *) NULL, CMD_CONFIG_WRITE_TS_VERSION, "Specify the version of Traffic Server installed",
-                 (char *) NULL);
-  createArgument("build-date", CMD_CONFIG_WRITE_TS_VERSION, CLI_ARGV_STRING,
-                 (char *) NULL, CMD_CONFIG_WRITE_BUILD_DATE, "Specify date of the Traffic Server Build", (char *) NULL);
-  createArgument("platform", CMD_CONFIG_WRITE_BUILD_DATE, CLI_ARGV_STRING,
-                 (char *) NULL, CMD_CONFIG_WRITE_PLATFORM, "Specify the platform of installation", (char *) NULL);
-  createArgument("nodes", CMD_CONFIG_WRITE_PLATFORM, CLI_ARGV_INT,
-                 (char *) NULL, CMD_CONFIG_WRITE_NODES, "Specify the number of node in the cluster", (char *) NULL);
-  createArgument("feature", 1, CLI_ARGV_STRING,
-                 (char *) NULL, CMD_CONFIG_WRITE_FEATURE, "Specify the feature string", (char *) NULL);
-  createArgument("tar", 1, CLI_ARGV_STRING,
-                 (char *) NULL, CMD_CONFIG_WRITE_TAR, "Specify the tar file list", (char *) NULL);
-  createArgument("tar-common", 1, CLI_ARGV_STRING,
-                 (char *) NULL, CMD_CONFIG_WRITE_TAR_COMMON, "Specify the MUST-HAVE tar files", (char *) NULL);
-  createArgument("tar-info", 1, CLI_ARGV_STRING,
-                 (char *) NULL, CMD_CONFIG_WRITE_TAR_INFO, "Specify the file contained in this named tar file",
-                 (char *) NULL);
-  createArgument("filelist", CLI_ARGV_NO_POS, CLI_ARGV_STRING,
-                 (char *) NULL, CMD_CONFIG_WRITE_FILELIST, "Specify the filelist contained in this named tar file",
-                 (char *) NULL);
-  createArgument("bin-dir", 1, CLI_ARGV_STRING,
-                 (char *) NULL, CMD_CONFIG_WRITE_BIN_DIR,
-                 "Specify the subdirectories and the files in each of them in bin directory", (char *) NULL);
-  createArgument("bin-group", 1, CLI_ARGV_STRING, (char *) NULL, CMD_CONFIG_WRITE_BIN_GROUP,
-                 "Specify the file listed in the bin directory", (char *) NULL);
-  createArgument("bin-common", 1, CLI_ARGV_STRING, (char *) NULL, CMD_CONFIG_WRITE_BIN_COMMON,
-                 "Specify the MUST-HAVE bin files", (char *) NULL);
-  createArgument("lib-dir", 1, CLI_ARGV_STRING, (char *) NULL, CMD_CONFIG_WRITE_LIB_DIR,
-                 "Specify the subdirectories and the files in each of them in lib directory", (char *) NULL);
-  createArgument("lib-group", 1, CLI_ARGV_STRING, (char *) NULL, CMD_CONFIG_WRITE_LIB_GROUP,
-                 "Specify the file listed in the lib directory", (char *) NULL);
-  createArgument("lib-common", 1, CLI_ARGV_STRING, (char *) NULL, CMD_CONFIG_WRITE_LIB_COMMON,
-                 "Specify the MUST-HAVE lib files", (char *) NULL);
-  createArgument("config-dir", 1, CLI_ARGV_STRING, (char *) NULL, CMD_CONFIG_WRITE_CONFIG_DIR,
-                 "Specify the subdirectories and the files in each of them in the config directory", (char *) NULL);
-  createArgument("config-group", 1, CLI_ARGV_STRING, (char *) NULL, CMD_CONFIG_WRITE_CONFIG_GROUP,
-                 "Specify the file listed in the config directory", (char *) NULL);
-  createArgument("config-common", 1, CLI_ARGV_STRING, (char *) NULL, CMD_CONFIG_WRITE_CONFIG_COMMON,
-                 "Specify the MUST-HAVE config files", (char *) NULL);
-  createArgument("common-file", 1, CLI_ARGV_STRING, (char *) NULL, CMD_CONFIG_WRITE_COMMON_FILE,
-                 "Specify the MUST-HAVE files", (char *) NULL);
-
-  return CLI_OK;
-}
-
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigRead
-//
-// This is the callback function for the "config:read" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigRead(ClientData clientData, Tcl_Interp * interp, int argc, char *argv[])
-{
-
-  CIFCEntry *EntryPtr;
-  int CLI_RETURN;
-
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (cliCheckIfEnabled("config:read") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable, *infoPtr;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-  infoPtr = argtable;
-  Cli_Debug("Cmd_ConfigRead argc %d\n", argc);
-
-  if (argtable->parsed_args == CLI_PARSED_ARGV_END) {
-    EntryPtr = new CIFCEntry("", 0, "");
-    if (EntryPtr == NULL) {
-      Cli_Error("Error Allocate Memory\n");
-      return CLI_ERROR;
-    } else {
-      CLI_RETURN = EntryPtr->ConfigReadIFC();
-      delete EntryPtr;
-      return CLI_RETURN;
-    }
-  }
-
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-
-}

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/ConfigUpgradeCmd.h
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/ConfigUpgradeCmd.h b/cmd/traffic_shell/ConfigUpgradeCmd.h
deleted file mode 100644
index a01af43..0000000
--- a/cmd/traffic_shell/ConfigUpgradeCmd.h
+++ /dev/null
@@ -1,252 +0,0 @@
-/** @file
-
-  A brief file description
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-/************C****************************************************
- * Filename: ConfigUpgradeCmd.h
- * Purpose: This file contains the CLI's "config:" command definitions.
- ****************************************************************/
-
-
-
-#include <tcl.h>
-#include <stdlib.h>
-#include <createArgument.h>
-#include <definitions.h>
-
-
-
-#ifndef __CONFIG_UPGRADE_CMD_H__
-#define __CONFIG_UPGRADE_CMD_H__
-
-
-#define CONFIG_UPGRADE_INT_STRING_SIZE 5
-#define CONFIG_UPGRADE_STRING_SIZE 256
-#define CONFIG_UPGRADE_BUF_SIZE 10240
-
-
-#define IFC_BEGIN         "Begin"
-#define IFC_HEAD          "IfcHead"
-#define IFC_FEATURE       "Feature"
-#define IFC_TAR           "Tar"
-#define IFC_COMMON_TAR    "CommonTar"
-#define IFC_TAR_INFO      "TarInfo"
-#define IFC_BIN_GROUP     "BinGroup"
-#define IFC_BIN_DIR       "BinDir"
-#define IFC_BIN_COMMON    "BinCommon"
-#define IFC_LIB_GROUP     "LibGroup"
-#define IFC_LIB_DIR       "LibDir"
-#define IFC_LIB_COMMON    "LibCommon"
-#define IFC_CONFIG_GROUP  "ConfigGroup"
-#define IFC_CONFIG_DIR    "ConfigDir"
-#define IFC_CONFIG_COMMON "ConfigCommon"
-#define IFC_COMMON_FILE   "CommonFile"
-#define IFC_END           "End"
-#define IFC_LIST_BEGIN    "{"
-#define IFC_LIST_END      "}"
-
-typedef enum
-{
-  IFC_KEY_IFCHEAD = 10,
-  IFC_KEY_FEATURE,
-  IFC_KEY_TAR,
-  IFC_KEY_COMMON_TAR,
-  IFC_KEY_TAR_INFO,
-  IFC_KEY_BIN_GROUP,
-  IFC_KEY_BIN_DIR,
-  IFC_KEY_BIN_COMMON,
-  IFC_KEY_LIB_GROUP,
-  IFC_KEY_LIB_DIR,
-  IFC_KEY_LIB_COMMON,
-  IFC_KEY_CONFIG_GROUP,
-  IFC_KEY_CONFIG_DIR,
-  IFC_KEY_CONFIG_COMMON,
-  IFC_KEY_COMMON_FILE,
-  IFC_KEY_END
-} IfcKeyWord;
-
-class CIFCWriteEntry
-{
-
-  char FileName[CONFIG_UPGRADE_STRING_SIZE];
-  char Version[CONFIG_UPGRADE_STRING_SIZE];
-  char KeyWord[CONFIG_UPGRADE_STRING_SIZE];
-  char Input[CONFIG_UPGRADE_BUF_SIZE];
-  int CountOn;
-
-  // write IFC file
-  int ConfigWriteIFCEle();
-
-public:
-
-    CIFCWriteEntry();
-   ~CIFCWriteEntry();
-
-  // PrintOut the Element of this Entry
-  void PrintEle();
-
-  TSMgmtError Cli_NewIFCFile();
-
-  static TSMgmtError ConfigWriteCheckIFCEnv();
-
-  int ConfigWriteIFCHead(char *ts_version, char *build_date, char *platform, int nodes);
-
-  int ConfigWriteIFCFeature(char *input);
-
-  int ConfigWriteIFCTar(char *input);
-
-  int ConfigWriteIFCCommonTar(char *input);
-
-  int ConfigWriteIFCTarInfo(char *tar, char *filelist);
-
-  int ConfigWriteIFCBinCommon(char *input);
-
-  int ConfigWriteIFCBinGroup(char *input);
-
-  int ConfigWriteIFCBinDir(char *subdir, char *filelist);
-
-  int ConfigWriteIFCLibCommon(char *input);
-
-  int ConfigWriteIFCLibGroup(char *input);
-
-  int ConfigWriteIFCLibDir(char *subdir, char *filelist);
-
-  int ConfigWriteIFCConfigCommon(char *input);
-
-  int ConfigWriteIFCConfigGroup(char *input);
-
-  int ConfigWriteIFCConfigDir(char *subdir, char *filelist);
-
-  int ConfigWriteIFCCommonFile(char *input);
-
-};
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigWrite
-//
-// This is the callback function for the "config:write" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_ConfigWrite(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigWrite
-//
-// Register "config:write" arguments with the Tcl interpreter.
-//
-int CmdArgs_ConfigWrite();
-
-
-class CIFCReadEntry
-{
-
-  char FileName[CONFIG_UPGRADE_STRING_SIZE];
-  char Version[CONFIG_UPGRADE_STRING_SIZE];
-  char KeyWord[CONFIG_UPGRADE_STRING_SIZE];
-  char Output[CONFIG_UPGRADE_BUF_SIZE];
-  int CountOn;
-  int Count;
-
-  // read IFC file
-  int ConfigReadIFCEle();
-
-  int ConfigReadPrintIFCEle();
-
-public:
-
-    CIFCReadEntry();
-   ~CIFCReadEntry();
-
-  static TSMgmtError ConfigReadCheckIFCEnv();
-
-  int ConfigReadIFCHead();
-
-  int ConfigReadIFCFeature();
-
-  int ConfigReadIFCTar();
-
-  int ConfigReadIFCCommonTar();
-
-  int ConfigReadIFCTarInfo();
-
-  int ConfigReadIFCBinCommon();
-
-  int ConfigReadIFCBinGroup();
-
-  int ConfigReadIFCBinDir();
-
-  int ConfigReadIFCLibCommon();
-
-  int ConfigReadIFCLibGroup();
-
-  int ConfigReadIFCLibDir();
-
-  int ConfigReadIFCConfigCommon();
-
-  int ConfigReadIFCConfigGroup();
-
-  int ConfigReadIFCConfigDir();
-
-  int ConfigReadIFCCommonFile();
-
-};
-
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigRead
-//
-// This is the callback function for the "config:read" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_ConfigRead(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigRead
-//
-// Register "config:read" arguments with the Tcl interpreter.
-//
-int CmdArgs_ConfigRead();
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigSaveUrl
-//
-// Register "config:save-url" arguments with the Tcl interpreter.
-//
-
-int Cmd_ConfigSaveUrl(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-int CmdArgs_ConfigSaveUrl();
-
-
-#endif /* __CONFIG_UPGRADE_CMD_H__ */

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/ConfigUpgradeReadCmd.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/ConfigUpgradeReadCmd.cc b/cmd/traffic_shell/ConfigUpgradeReadCmd.cc
deleted file mode 100644
index bd849b0..0000000
--- a/cmd/traffic_shell/ConfigUpgradeReadCmd.cc
+++ /dev/null
@@ -1,498 +0,0 @@
-/** @file
-
-  This file contains the CLI's "config:read" command implementation
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-
-
-#include "libts.h"
-#include <ConfigCmd.h>
-#include <CliDisplay.h>
-#include <CliMgmtUtils.h>
-#include <ConfigUpgradeCmd.h>
-#include <string.h>
-#include <mgmtapi.h>
-
-
-extern Tcl_Interp *interp;
-CIFCReadEntry::CIFCReadEntry():
-CountOn(0), Count(0)
-{
-  KeyWord[0] = 0;
-  Output[0] = 0;
-  const char *pathPtr = getenv("IFCPATH");
-  const char *filenamePtr = getenv("IFCFILENAME");
-  const char *versionPtr = getenv("IFCVERSION");
-
-  snprintf(FileName, sizeof(FileName), "%s%s", pathPtr, filenamePtr);
-  snprintf(Version, sizeof(Version), "%s", versionPtr);
-}
-
-CIFCReadEntry::~CIFCReadEntry()
-{
-}
-
-// check IFCVERSION IFCPATH and IFCFILENAME setup
-TSMgmtError
-CIFCReadEntry::ConfigReadCheckIFCEnv()
-{
-  char *pathPtr;
-  char *filenamePtr;
-  char *versionPtr;
-
-  pathPtr = getenv("IFCPATH");
-  filenamePtr = getenv("IFCFILENAME");
-  versionPtr = getenv("IFCVERSION");
-
-  if (pathPtr == NULL || filenamePtr == NULL || versionPtr == NULL ||
-      strlen(pathPtr) == 0 || strlen(filenamePtr) == 0 || strlen(versionPtr) == 0) {
-    return TS_ERR_READ_FILE;
-  }
-
-  return TS_ERR_OKAY;
-}
-
-
-int
-CIFCReadEntry::ConfigReadPrintIFCEle()
-{
-  Tcl_AppendResult(interp, Output, (char *) NULL);
-  return CLI_OK;
-}
-
-int
-CIFCReadEntry::ConfigReadIFCEle()
-{
-  FILE *Fptr;
-  char *filebuffer;
-  char *p1, *p2;
-  char CountString[CONFIG_UPGRADE_INT_STRING_SIZE];
-  long size, amount_read;
-
-  if ((Fptr = fopen(FileName, "r")) == NULL) {
-    Cli_Error("ERROR Open IFC File to read\n");
-    return CLI_ERROR;
-  }
-
-  fseek(Fptr, 0, SEEK_END);
-  size = ftell(Fptr);
-  if (size <= 0) {
-    fclose(Fptr);
-    Cli_Error("Error Reading IFC File\n");
-    return CLI_ERROR;
-  }
-
-  filebuffer = new char[size + 1];
-  fseek(Fptr, 0, SEEK_SET);
-  amount_read = fread((void *) filebuffer, sizeof(char), size, Fptr);
-  fclose(Fptr);
-  Fptr = NULL;
-  filebuffer[size] = '\0';
-
-  if (size * (int) sizeof(char) != amount_read) {
-    Cli_Error("Error Reading IFC File\n");
-    delete[]filebuffer;
-    return CLI_ERROR;
-  }
-  // look for KeyWord
-  if ((p1 = strstr(filebuffer, KeyWord)) == NULL) {
-    delete[]filebuffer;
-    Cli_Error("Error Finding Keyword\n");
-    return CLI_ERROR;
-  }
-
-  p1 += strlen(KeyWord);
-  p1++;
-
-  // look for the end tag
-  if ((p2 = strstr(p1, IFC_LIST_END)) == NULL) {
-    delete[]filebuffer;
-    Cli_Error("Error Finding End Keyword\n");
-    return CLI_ERROR;
-  }
-
-  switch (CountOn) {
-  case 1:
-
-    // coverity[secure_coding]
-    sscanf(p1, "%d\n", &Count);
-    snprintf(CountString, sizeof(CountString), "%d", Count);
-    p1 += (strlen(CountString));
-    //fall through
-
-  case 0:
-    p1++;
-    snprintf(Output, p2 - p1, "%s", p1);
-    //memset(Output + (p2-p1), 1, 0);
-    delete[]filebuffer;
-    return (ConfigReadPrintIFCEle());
-
-  default:
-
-    Cli_Error("Unexpected Value of CountOn\n");
-    delete[]filebuffer;
-    return CLI_ERROR;
-  }
-}
-
-
-int
-CIFCReadEntry::ConfigReadIFCHead()
-{
-  ink_strlcpy(KeyWord, IFC_HEAD, sizeof(KeyWord));
-  CountOn = 0;
-  return (ConfigReadIFCEle());
-}
-
-int
-CIFCReadEntry::ConfigReadIFCFeature()
-{
-  ink_strlcpy(KeyWord, IFC_FEATURE, sizeof(KeyWord));
-  CountOn = 0;
-  return (ConfigReadIFCEle());
-}
-
-int
-CIFCReadEntry::ConfigReadIFCTar()
-{
-  ink_strlcpy(KeyWord, IFC_TAR, sizeof(KeyWord));
-  CountOn = 1;
-  return (ConfigReadIFCEle());
-}
-
-int
-CIFCReadEntry::ConfigReadIFCCommonTar()
-{
-  ink_strlcpy(KeyWord, IFC_COMMON_TAR, sizeof(KeyWord));
-  CountOn = 1;
-  return (ConfigReadIFCEle());
-}
-
-int
-CIFCReadEntry::ConfigReadIFCTarInfo()
-{
-  ink_strlcpy(KeyWord, IFC_TAR_INFO, sizeof(KeyWord));
-  CountOn = 0;
-  return (ConfigReadIFCEle());
-}
-
-int
-CIFCReadEntry::ConfigReadIFCBinGroup()
-{
-  ink_strlcpy(KeyWord, IFC_BIN_GROUP, sizeof(KeyWord));
-  CountOn = 1;
-  return (ConfigReadIFCEle());
-}
-
-int
-CIFCReadEntry::ConfigReadIFCBinDir()
-{
-  ink_strlcpy(KeyWord, IFC_BIN_DIR, sizeof(KeyWord));
-  CountOn = 1;
-  return (ConfigReadIFCEle());
-}
-
-int
-CIFCReadEntry::ConfigReadIFCBinCommon()
-{
-  ink_strlcpy(KeyWord, IFC_BIN_COMMON, sizeof(KeyWord));
-  CountOn = 1;
-  return (ConfigReadIFCEle());
-}
-
-int
-CIFCReadEntry::ConfigReadIFCLibGroup()
-{
-  ink_strlcpy(KeyWord, IFC_LIB_GROUP, sizeof(KeyWord));
-  CountOn = 1;
-  return (ConfigReadIFCEle());
-}
-
-int
-CIFCReadEntry::ConfigReadIFCLibDir()
-{
-  ink_strlcpy(KeyWord, IFC_LIB_DIR, sizeof(KeyWord));
-  CountOn = 1;
-  return (ConfigReadIFCEle());
-}
-
-int
-CIFCReadEntry::ConfigReadIFCLibCommon()
-{
-  ink_strlcpy(KeyWord, IFC_LIB_COMMON, sizeof(KeyWord));
-  CountOn = 1;
-  return (ConfigReadIFCEle());
-}
-
-int
-CIFCReadEntry::ConfigReadIFCConfigGroup()
-{
-  ink_strlcpy(KeyWord, IFC_CONFIG_GROUP, sizeof(KeyWord));
-  CountOn = 1;
-  return (ConfigReadIFCEle());
-}
-
-int
-CIFCReadEntry::ConfigReadIFCConfigDir()
-{
-  ink_strlcpy(KeyWord, IFC_CONFIG_DIR, sizeof(KeyWord));
-  CountOn = 1;
-  return (ConfigReadIFCEle());
-}
-
-int
-CIFCReadEntry::ConfigReadIFCConfigCommon()
-{
-  ink_strlcpy(KeyWord, IFC_CONFIG_COMMON, sizeof(KeyWord));
-  CountOn = 1;
-  return (ConfigReadIFCEle());
-}
-
-
-int
-CIFCReadEntry::ConfigReadIFCCommonFile()
-{
-  ink_strlcpy(KeyWord, IFC_COMMON_FILE, sizeof(KeyWord));
-  CountOn = 1;
-  return (ConfigReadIFCEle());
-}
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigRead
-//
-// This is the callback function for the "config:read" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigRead(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  /*   if(cliCheckIfEnabled("config:read") == CLI_ERROR) {
-     return CMD_ERROR;
-     }
-   */
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-  Cli_Debug("Cmd_ConfigRead argc %d\n", argc);
-
-  if (CIFCWriteEntry::ConfigWriteCheckIFCEnv() == TS_ERR_READ_FILE) {
-    Cli_Error("Set $IFCVERSION, $IFCPATH and $IFCFILENAME First\n");
-    return CLI_ERROR;
-  }
-
-  CIFCReadEntry Entry;
-
-  if (argtable->parsed_args != CLI_PARSED_ARGV_END) {
-
-    switch (argtable->parsed_args) {
-
-    case CMD_CONFIG_READ_IFC_HEAD:
-      return (Entry.ConfigReadIFCHead());
-
-    case CMD_CONFIG_READ_FEATURE:
-      return (Entry.ConfigReadIFCFeature());
-
-    case CMD_CONFIG_READ_TAR:
-      return (Entry.ConfigReadIFCTar());
-
-    case CMD_CONFIG_READ_TAR_INFO:
-      return (Entry.ConfigReadIFCTarInfo());
-
-    case CMD_CONFIG_READ_TAR_COMMON:
-      return (Entry.ConfigReadIFCCommonTar());
-
-    case CMD_CONFIG_READ_BIN_DIR:
-      return (Entry.ConfigReadIFCBinDir());
-
-    case CMD_CONFIG_READ_BIN_GROUP:
-      return (Entry.ConfigReadIFCBinGroup());
-
-    case CMD_CONFIG_READ_BIN_COMMON:
-      return (Entry.ConfigReadIFCBinCommon());
-
-    case CMD_CONFIG_READ_LIB_DIR:
-      return (Entry.ConfigReadIFCLibDir());
-
-    case CMD_CONFIG_READ_LIB_GROUP:
-      return (Entry.ConfigReadIFCLibGroup());
-
-    case CMD_CONFIG_READ_LIB_COMMON:
-      return (Entry.ConfigReadIFCLibCommon());
-
-    case CMD_CONFIG_READ_CONFIG_DIR:
-      return (Entry.ConfigReadIFCConfigDir());
-
-    case CMD_CONFIG_READ_CONFIG_GROUP:
-      return (Entry.ConfigReadIFCConfigGroup());
-
-    case CMD_CONFIG_READ_CONFIG_COMMON:
-      return (Entry.ConfigReadIFCConfigCommon());
-
-    case CMD_CONFIG_READ_COMMON_FILE:
-      return (Entry.ConfigReadIFCCommonFile());
-    }
-  }
-
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigRead
-//
-// Register "config:read" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ConfigRead()
-{
-  createArgument("ifc-head", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_READ_IFC_HEAD, "Read the head information of ifc file", (char *) NULL);
-  createArgument("feature", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_READ_FEATURE, "Read the feature string", (char *) NULL);
-  createArgument("tar", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_READ_TAR, "Read the tar file list", (char *) NULL);
-  createArgument("tar-common", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_READ_TAR_COMMON, "Read the MUST-HAVE tar files", (char *) NULL);
-  createArgument("tar-info", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_READ_TAR_INFO, "Read the file contained in this named tar file",
-                 (char *) NULL);
-  createArgument("bin-dir", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_READ_BIN_DIR,
-                 "Read the subdirectories and the files in each of them in bin directory", (char *) NULL);
-  createArgument("bin-group", 1, CLI_ARGV_OPTION_NAME_VALUE, (char *) NULL, CMD_CONFIG_READ_BIN_GROUP,
-                 "Read the file listed in the bin directory", (char *) NULL);
-  createArgument("bin-common", 1, CLI_ARGV_OPTION_NAME_VALUE, (char *) NULL, CMD_CONFIG_READ_BIN_COMMON,
-                 "Read the MUST-HAVE bin files", (char *) NULL);
-  createArgument("lib-dir", 1, CLI_ARGV_OPTION_NAME_VALUE, (char *) NULL, CMD_CONFIG_READ_LIB_DIR,
-                 "Read the subdirectories and the files in each of them in lib directory", (char *) NULL);
-  createArgument("lib-group", 1, CLI_ARGV_OPTION_NAME_VALUE, (char *) NULL, CMD_CONFIG_READ_LIB_GROUP,
-                 "Read the file listed in the lib directory", (char *) NULL);
-  createArgument("lib-common", 1, CLI_ARGV_OPTION_NAME_VALUE, (char *) NULL, CMD_CONFIG_READ_LIB_COMMON,
-                 "Read the MUST-HAVE lib files", (char *) NULL);
-  createArgument("config-dir", 1, CLI_ARGV_OPTION_NAME_VALUE, (char *) NULL, CMD_CONFIG_READ_CONFIG_DIR,
-                 "Read the subdirectories and the files in each of them in the config directory", (char *) NULL);
-  createArgument("config-group", 1, CLI_ARGV_OPTION_NAME_VALUE, (char *) NULL, CMD_CONFIG_READ_CONFIG_GROUP,
-                 "Read the file listed in the config directory", (char *) NULL);
-  createArgument("config-common", 1, CLI_ARGV_OPTION_NAME_VALUE, (char *) NULL, CMD_CONFIG_READ_CONFIG_COMMON,
-                 "Read the MUST-HAVE config files", (char *) NULL);
-  createArgument("common-file", 1, CLI_ARGV_OPTION_NAME_VALUE, (char *) NULL, CMD_CONFIG_READ_COMMON_FILE,
-                 "Read the MUST-HAVE files", (char *) NULL);
-
-  return CLI_OK;
-}
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigSaveUrl
-//
-// This is the callback function for the "config:saveUrl" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigSaveUrl(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* Call to processArgForCommand must appear at the beginning
-     of each command's cb function.
-   */
-
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-/*   if(cliCheckIfEnabled("config:save-url") == CLI_ERROR) {
-     return CMD_ERROR;
-   }
-*/
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable, *infoPtr;
-  char *Url = NULL;
-  char *outputFile = NULL;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-  Cli_Debug("Cmd_ConfigSaveUrl argc %d\n", argc);
-  char **header = 0;            /* lv: useless variable - never changed */
-  int headerSize;
-  char **body = 0;              /* lv: useless variable - never changed */
-  int bodySize;
-
-  for (infoPtr = argtable; infoPtr->parsed_args != CLI_PARSED_ARGV_END; infoPtr++) {
-    switch (infoPtr->parsed_args) {
-
-    case CMD_CONFIG_UPGRADE_READ_URL:
-      Url = argtable->arg_string;
-      infoPtr++;
-      outputFile = argtable->arg_string;
-      break;
-    }
-  }
-  if (Url == NULL || outputFile == NULL) {
-    return CMD_ERROR;
-  } else {
-    if (TSReadFromUrl(Url, header, &headerSize, body, &bodySize) == TS_ERR_FAIL) {
-      return CMD_ERROR;
-    }
-
-  }
-
-  return CMD_OK;
-}
-
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigSaveUrl
-//
-// Register "config:read" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ConfigSaveUrl()
-{
-  createArgument("url", 1, CLI_ARGV_STRING, (char *) NULL, CMD_CONFIG_UPGRADE_READ_URL, "Read the url", (char *) NULL);
-
-  return CMD_OK;
-}

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/ConfigUpgradeWriteCmd.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/ConfigUpgradeWriteCmd.cc b/cmd/traffic_shell/ConfigUpgradeWriteCmd.cc
deleted file mode 100644
index ad527fe..0000000
--- a/cmd/traffic_shell/ConfigUpgradeWriteCmd.cc
+++ /dev/null
@@ -1,517 +0,0 @@
-/** @file
-
-  This file contains the CLI's "config:write" command implementation
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-
-#include "libts.h"
-#include <ConfigCmd.h>
-#include <CliDisplay.h>
-#include <CliMgmtUtils.h>
-#include <CliDisplay.h>
-#include <CliMgmtUtils.h>
-#include <ConfigUpgradeCmd.h>
-#include <string.h>
-
-
-CIFCWriteEntry::CIFCWriteEntry():CountOn(0)
-{
-  char *pathPtr;
-  char *filenamePtr;
-  char *versionPtr;
-
-  pathPtr = getenv("IFCPATH");
-  filenamePtr = getenv("IFCFILENAME");
-  versionPtr = getenv("IFCVERSION");
-
-  snprintf(FileName, sizeof(FileName), "%s%s", pathPtr, filenamePtr);
-  snprintf(Version, sizeof(Version), "%s", versionPtr);
-
-  KeyWord[0] = '\0';
-  Input[0] = '\0';
-}
-
-CIFCWriteEntry::~CIFCWriteEntry()
-{
-}
-
-// check IFCVERSION IFCPATH and IFCFILENAME setup
-TSMgmtError
-CIFCWriteEntry::ConfigWriteCheckIFCEnv()
-{
-  char *pathPtr;
-  char *filenamePtr;
-  char *versionPtr;
-
-  pathPtr = getenv("IFCPATH");
-  filenamePtr = getenv("IFCFILENAME");
-  versionPtr = getenv("IFCVERSION");
-
-  if (pathPtr == NULL || filenamePtr == NULL || versionPtr == NULL ||
-      strlen(pathPtr) == 0 || strlen(filenamePtr) == 0 || strlen(versionPtr) == 0) {
-    return TS_ERR_READ_FILE;
-  }
-
-  return TS_ERR_OKAY;
-}
-
-TSMgmtError
-CIFCWriteEntry::Cli_NewIFCFile()
-{
-  FILE *Fptr;
-
-  Fptr = fopen(FileName, "r+");
-  if (Fptr != NULL) {
-    fclose(Fptr);
-    return TS_ERR_OKAY;
-  } else {                      /* need to create new file */
-    Fptr = fopen(FileName, "w");
-    if (Fptr == NULL) {
-      Cli_Error("Error in creating new IFC file\n");
-      return TS_ERR_WRITE_FILE;
-    }
-
-    fprintf(Fptr, "%s\n\n", IFC_BEGIN);
-    fprintf(Fptr, "%s%s\n%s\n\n", IFC_HEAD, IFC_LIST_BEGIN, IFC_LIST_END);
-    fprintf(Fptr, "%s%s\n%s\n\n", IFC_FEATURE, IFC_LIST_BEGIN, IFC_LIST_END);
-    fprintf(Fptr, "%s%s%d\n%s\n\n", IFC_TAR, IFC_LIST_BEGIN, 0, IFC_LIST_END);
-    fprintf(Fptr, "%s%s\n%s\n\n", IFC_TAR_INFO, IFC_LIST_BEGIN, IFC_LIST_END);
-    fprintf(Fptr, "%s%s%d\n%s\n\n", IFC_COMMON_TAR, IFC_LIST_BEGIN, 0, IFC_LIST_END);
-    fprintf(Fptr, "%s%s%d\n%s\n\n", IFC_BIN_GROUP, IFC_LIST_BEGIN, 0, IFC_LIST_END);
-    fprintf(Fptr, "%s%s%d\n%s\n\n", IFC_BIN_DIR, IFC_LIST_BEGIN, 0, IFC_LIST_END);
-    fprintf(Fptr, "%s%s%d\n%s\n\n", IFC_BIN_COMMON, IFC_LIST_BEGIN, 0, IFC_LIST_END);
-    fprintf(Fptr, "%s%s%d\n%s\n\n", IFC_LIB_GROUP, IFC_LIST_BEGIN, 0, IFC_LIST_END);
-    fprintf(Fptr, "%s%s%d\n%s\n\n", IFC_LIB_DIR, IFC_LIST_BEGIN, 0, IFC_LIST_END);
-    fprintf(Fptr, "%s%s%d\n%s\n\n", IFC_LIB_COMMON, IFC_LIST_BEGIN, 0, IFC_LIST_END);
-    fprintf(Fptr, "%s%s%d\n%s\n\n", IFC_CONFIG_GROUP, IFC_LIST_BEGIN, 0, IFC_LIST_END);
-    fprintf(Fptr, "%s%s%d\n%s\n\n", IFC_CONFIG_DIR, IFC_LIST_BEGIN, 0, IFC_LIST_END);
-    fprintf(Fptr, "%s%s%d\n%s\n\n", IFC_CONFIG_COMMON, IFC_LIST_BEGIN, 0, IFC_LIST_END);
-    fprintf(Fptr, "%s%s%d\n%s\n\n", IFC_COMMON_FILE, IFC_LIST_BEGIN, 0, IFC_LIST_END);
-    fprintf(Fptr, "%s\n\n", IFC_END);
-
-    fclose(Fptr);
-
-    return TS_ERR_OKAY;
-  }
-}
-
-
-int
-CIFCWriteEntry::ConfigWriteIFCEle()
-{
-  FILE *Fptr;
-  char *filebuffer, *in_buffer;
-  char *p1;
-  char OldCountString[CONFIG_UPGRADE_INT_STRING_SIZE];
-  int Count = -1;
-  long size, amount_read, addsize;
-
-  if ((Fptr = fopen(FileName, "r")) == NULL) {
-    Cli_Error("ERROR Open IFC File to read\n");
-    return CLI_ERROR;
-  }
-
-  fseek(Fptr, 0, SEEK_END);
-  size = ftell(Fptr);
-  if (size <= 0) {
-    fclose(Fptr);
-    Cli_Error("Error Reading IFC File\n");
-    return CLI_ERROR;
-  }
-
-  filebuffer = new char[size + 1];
-  fseek(Fptr, 0, SEEK_SET);
-  amount_read = fread((void *) filebuffer, sizeof(char), size, Fptr);
-  fclose(Fptr);
-  filebuffer[size] = '\0';
-
-  if (size * (int) sizeof(char) != amount_read) {
-    Cli_Error("Error Reading IFC File\n");
-    fclose(Fptr);
-    delete[]filebuffer;
-    return CLI_ERROR;
-  }
-  // look for KeyWord
-  if ((p1 = strstr(filebuffer, KeyWord)) == NULL) {
-    delete[]filebuffer;
-    fclose(Fptr);
-    Cli_Error("Error Finding Keyword\n");
-    return CLI_ERROR;
-  }
-
-  p1 += strlen(KeyWord);
-  p1++;
-
-  // writeback
-  Fptr = fopen(FileName, "r+");
-  fseek(Fptr, p1 - filebuffer, SEEK_SET);
-
-  switch (CountOn) {
-  case 1:
-    {
-      // coverity[secure_coding]
-      sscanf(p1, "%d\n", &Count);
-      snprintf(OldCountString, sizeof(OldCountString), "%d", Count);
-      p1 += (strlen(OldCountString) + 1);
-      Count++;
-      addsize = strlen(Input) + CONFIG_UPGRADE_INT_STRING_SIZE + 2;
-      const size_t in_buffer_size = addsize + 1;
-      in_buffer = new char[in_buffer_size];
-      snprintf(in_buffer, in_buffer_size, "%d\n%s\n", Count, Input);
-      in_buffer[addsize] = '\0';
-      if (fwrite(in_buffer, sizeof(char), strlen(in_buffer), Fptr) != strlen(in_buffer)) {
-        Cli_Error("Unable to fwrite() buffer\n");
-        delete[]in_buffer;
-        delete[]filebuffer;
-        fclose(Fptr);
-        return CLI_ERROR;
-      }
-      delete[]in_buffer;
-      break;
-    }
-  case 0:
-    if ((fwrite("\n", sizeof(char), 1, Fptr) != 1) ||
-        (fwrite(Input, sizeof(char), strlen(Input), Fptr) != strlen(Input))) {
-      Cli_Error("Unable to fwrite() buffer\n");
-      fclose(Fptr);
-      delete[]filebuffer;
-      return CLI_ERROR;
-    }
-    break;
-
-  default:
-    Cli_Error("Unexpected Value of CountOn\n");
-    fclose(Fptr);
-    delete[]filebuffer;
-    return CLI_ERROR;
-  }
-
-  if (fwrite(p1, sizeof(char), size - (p1 - filebuffer), Fptr) != (size_t)(size - (p1 - filebuffer))) {
-    Cli_Error("Unable to fwrite() buffer\n");
-    fclose(Fptr);
-    delete[]filebuffer;
-    return CLI_ERROR;
-  }
-  fclose(Fptr);
-  delete[]filebuffer;
-  return CLI_OK;
-
-}
-
-
-void
-CIFCWriteEntry::PrintEle()
-{
-  printf("%s:%d:%s\n", KeyWord, CountOn, Input);
-}
-
-int
-CIFCWriteEntry::ConfigWriteIFCHead(char *ts_version, char *build_date, char *platform, int nodes)
-{
-  ink_strlcpy(KeyWord, IFC_HEAD, sizeof(KeyWord));
-  snprintf(Input, sizeof(Input), "%s\n%s\n%s\n%d", ts_version, build_date, platform, nodes);
-  CountOn = 0;
-  return (ConfigWriteIFCEle());
-}
-
-int
-CIFCWriteEntry::ConfigWriteIFCFeature(char *input)
-{
-  ink_strlcpy(KeyWord, IFC_FEATURE, sizeof(KeyWord));
-  CountOn = 0;
-  ink_strlcpy(Input, input, sizeof(Input));
-  return (ConfigWriteIFCEle());
-}
-
-int
-CIFCWriteEntry::ConfigWriteIFCTar(char *input)
-{
-  ink_strlcpy(KeyWord, IFC_TAR, sizeof(KeyWord));
-  CountOn = 1;
-  ink_strlcpy(Input, input, sizeof(Input));
-  return (ConfigWriteIFCEle());
-}
-
-int
-CIFCWriteEntry::ConfigWriteIFCCommonTar(char *input)
-{
-  ink_strlcpy(KeyWord, IFC_COMMON_TAR, sizeof(KeyWord));
-  CountOn = 1;
-  ink_strlcpy(Input, input, sizeof(Input));
-  return (ConfigWriteIFCEle());
-}
-
-int
-CIFCWriteEntry::ConfigWriteIFCTarInfo(char *tar, char *filelist)
-{
-  ink_strlcpy(KeyWord, IFC_TAR_INFO, sizeof(KeyWord));
-  CountOn = 0;
-  snprintf(Input, sizeof(Input), "%s:\n%s", tar, filelist);
-  return (ConfigWriteIFCEle());
-}
-
-int
-CIFCWriteEntry::ConfigWriteIFCBinGroup(char *input)
-{
-  ink_strlcpy(KeyWord, IFC_BIN_GROUP, sizeof(KeyWord));
-  CountOn = 1;
-  ink_strlcpy(Input, input, sizeof(Input));
-  return (ConfigWriteIFCEle());
-}
-
-int
-CIFCWriteEntry::ConfigWriteIFCBinDir(char *subdir, char *filelist)
-{
-  ink_strlcpy(KeyWord, IFC_BIN_DIR, sizeof(KeyWord));
-  CountOn = 1;
-  snprintf(Input, sizeof(Input), "%s:%s", subdir, filelist);
-  return (ConfigWriteIFCEle());
-}
-
-int
-CIFCWriteEntry::ConfigWriteIFCBinCommon(char *input)
-{
-  ink_strlcpy(KeyWord, IFC_BIN_COMMON, sizeof(KeyWord));
-  CountOn = 1;
-  ink_strlcpy(Input, input, sizeof(Input));
-  return (ConfigWriteIFCEle());
-}
-
-int
-CIFCWriteEntry::ConfigWriteIFCLibGroup(char *input)
-{
-  ink_strlcpy(KeyWord, IFC_LIB_GROUP, sizeof(KeyWord));
-  CountOn = 1;
-  ink_strlcpy(Input, input, sizeof(Input));
-  return (ConfigWriteIFCEle());
-}
-
-int
-CIFCWriteEntry::ConfigWriteIFCLibDir(char *subdir, char *filelist)
-{
-  ink_strlcpy(KeyWord, IFC_LIB_DIR, sizeof(KeyWord));
-  CountOn = 1;
-  snprintf(Input, sizeof(Input), "%s:%s", subdir, filelist);
-  return (ConfigWriteIFCEle());
-}
-
-int
-CIFCWriteEntry::ConfigWriteIFCLibCommon(char *input)
-{
-  ink_strlcpy(KeyWord, IFC_LIB_COMMON, sizeof(KeyWord));
-  CountOn = 1;
-  ink_strlcpy(Input, input, sizeof(Input));
-  return (ConfigWriteIFCEle());
-}
-
-int
-CIFCWriteEntry::ConfigWriteIFCConfigGroup(char *input)
-{
-  ink_strlcpy(KeyWord, IFC_CONFIG_GROUP, sizeof(KeyWord));
-  CountOn = 1;
-  ink_strlcpy(Input, input, sizeof(Input));
-  return (ConfigWriteIFCEle());
-}
-
-int
-CIFCWriteEntry::ConfigWriteIFCConfigDir(char *subdir, char *filelist)
-{
-  ink_strlcpy(KeyWord, IFC_CONFIG_DIR, sizeof(KeyWord));
-  CountOn = 1;
-  snprintf(Input, sizeof(Input), "%s:%s", subdir, filelist);
-  return (ConfigWriteIFCEle());
-}
-
-int
-CIFCWriteEntry::ConfigWriteIFCConfigCommon(char *input)
-{
-  ink_strlcpy(KeyWord, IFC_CONFIG_COMMON, sizeof(KeyWord));
-  CountOn = 1;
-  ink_strlcpy(Input, input, sizeof(Input));
-  return (ConfigWriteIFCEle());
-}
-
-
-int
-CIFCWriteEntry::ConfigWriteIFCCommonFile(char *input)
-{
-  ink_strlcpy(KeyWord, IFC_COMMON_FILE, sizeof(KeyWord));
-  CountOn = 1;
-  ink_strlcpy(Input, input, sizeof(Input));
-  return (ConfigWriteIFCEle());
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigWrite
-//
-// This is the callback function for the "config:write" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigWrite(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  /*if(cliCheckIfEnabled("config:write") == CLI_ERROR)
-     {
-     return CMD_ERROR;
-     } */
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-  Cli_Debug("Cmd_ConfigWrite argc %d\n", argc);
-
-  if (CIFCWriteEntry::ConfigWriteCheckIFCEnv() == TS_ERR_READ_FILE) {
-    Cli_Error("Set $IFCVERSION, $IFCPATH and $IFCFILENAME First\n");
-    return CLI_ERROR;
-  }
-
-  CIFCWriteEntry Entry;
-
-  if (Entry.Cli_NewIFCFile() == TS_ERR_WRITE_FILE) {
-    return CLI_ERROR;
-  }
-
-  if (argtable->parsed_args != CLI_PARSED_ARGV_END) {
-    switch (argtable->parsed_args) {
-    case CMD_CONFIG_WRITE_IFC_HEAD:
-      return (Entry.ConfigWriteIFCHead(argtable[1].arg_string,
-                                       argtable[2].arg_string, argtable[3].arg_string, argtable[4].arg_int));
-
-    case CMD_CONFIG_WRITE_FEATURE:
-      return (Entry.ConfigWriteIFCFeature(argtable[0].arg_string));
-
-    case CMD_CONFIG_WRITE_TAR:
-      return (Entry.ConfigWriteIFCTar(argtable[0].arg_string));
-
-    case CMD_CONFIG_WRITE_TAR_INFO:
-      return (Entry.ConfigWriteIFCTarInfo(argtable[0].arg_string, argtable[1].arg_string));
-
-    case CMD_CONFIG_WRITE_TAR_COMMON:
-      return (Entry.ConfigWriteIFCCommonTar(argtable[0].arg_string));
-
-    case CMD_CONFIG_WRITE_BIN_DIR:
-      return (Entry.ConfigWriteIFCBinDir(argtable[0].arg_string, argtable[1].arg_string));
-
-    case CMD_CONFIG_WRITE_BIN_GROUP:
-      return (Entry.ConfigWriteIFCBinGroup(argtable[0].arg_string));
-
-    case CMD_CONFIG_WRITE_BIN_COMMON:
-      return (Entry.ConfigWriteIFCBinCommon(argtable[0].arg_string));
-
-    case CMD_CONFIG_WRITE_LIB_DIR:
-      return (Entry.ConfigWriteIFCLibDir(argtable[0].arg_string, argtable[1].arg_string));
-
-    case CMD_CONFIG_WRITE_LIB_GROUP:
-      return (Entry.ConfigWriteIFCLibGroup(argtable[0].arg_string));
-
-    case CMD_CONFIG_WRITE_LIB_COMMON:
-      return (Entry.ConfigWriteIFCLibCommon(argtable[0].arg_string));
-
-    case CMD_CONFIG_WRITE_CONFIG_DIR:
-      return (Entry.ConfigWriteIFCConfigDir(argtable[0].arg_string, argtable[1].arg_string));
-
-    case CMD_CONFIG_WRITE_CONFIG_GROUP:
-      return (Entry.ConfigWriteIFCConfigGroup(argtable[0].arg_string));
-
-    case CMD_CONFIG_WRITE_CONFIG_COMMON:
-      return (Entry.ConfigWriteIFCConfigCommon(argtable[0].arg_string));
-
-    case CMD_CONFIG_WRITE_COMMON_FILE:
-      return (Entry.ConfigWriteIFCCommonFile(argtable[0].arg_string));
-    }
-  }
-
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigWrite0
-//
-// Register "config:write" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ConfigWrite()
-{
-  createArgument("ifc-head", 1, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_WRITE_IFC_HEAD, "Specify the head information of ifc file", (char *) NULL);
-  createArgument("ts-version", CMD_CONFIG_WRITE_IFC_HEAD, CLI_ARGV_STRING,
-                 (char *) NULL, CMD_CONFIG_WRITE_TS_VERSION, "Specify the version of Traffic Server installed",
-                 (char *) NULL);
-  createArgument("build-date", CMD_CONFIG_WRITE_TS_VERSION, CLI_ARGV_STRING,
-                 (char *) NULL, CMD_CONFIG_WRITE_BUILD_DATE, "Specify date of the Traffic Server Build", (char *) NULL);
-  createArgument("platform", CMD_CONFIG_WRITE_BUILD_DATE, CLI_ARGV_STRING,
-                 (char *) NULL, CMD_CONFIG_WRITE_PLATFORM, "Specify the platform of installation", (char *) NULL);
-  createArgument("nodes", CMD_CONFIG_WRITE_PLATFORM, CLI_ARGV_INT,
-                 (char *) NULL, CMD_CONFIG_WRITE_NODES, "Specify the number of node in the cluster", (char *) NULL);
-  createArgument("feature", 1, CLI_ARGV_STRING,
-                 (char *) NULL, CMD_CONFIG_WRITE_FEATURE, "Specify the feature string", (char *) NULL);
-  createArgument("tar", 1, CLI_ARGV_STRING,
-                 (char *) NULL, CMD_CONFIG_WRITE_TAR, "Specify the tar file list", (char *) NULL);
-  createArgument("tar-common", 1, CLI_ARGV_STRING,
-                 (char *) NULL, CMD_CONFIG_WRITE_TAR_COMMON, "Specify the MUST-HAVE tar files", (char *) NULL);
-  createArgument("tar-info", 1, CLI_ARGV_STRING,
-                 (char *) NULL, CMD_CONFIG_WRITE_TAR_INFO, "Specify the file contained in this named tar file",
-                 (char *) NULL);
-  createArgument("filelist", CLI_ARGV_NO_POS, CLI_ARGV_STRING,
-                 (char *) NULL, CMD_CONFIG_WRITE_FILELIST, "Specify the filelist contained in this named tar file",
-                 (char *) NULL);
-  createArgument("bin-dir", 1, CLI_ARGV_STRING,
-                 (char *) NULL, CMD_CONFIG_WRITE_BIN_DIR,
-                 "Specify the subdirectories and the files in each of them in bin directory", (char *) NULL);
-  createArgument("bin-group", 1, CLI_ARGV_STRING, (char *) NULL, CMD_CONFIG_WRITE_BIN_GROUP,
-                 "Specify the file listed in the bin directory", (char *) NULL);
-  createArgument("bin-common", 1, CLI_ARGV_STRING, (char *) NULL, CMD_CONFIG_WRITE_BIN_COMMON,
-                 "Specify the MUST-HAVE bin files", (char *) NULL);
-  createArgument("lib-dir", 1, CLI_ARGV_STRING, (char *) NULL, CMD_CONFIG_WRITE_LIB_DIR,
-                 "Specify the subdirectories and the files in each of them in lib directory", (char *) NULL);
-  createArgument("lib-group", 1, CLI_ARGV_STRING, (char *) NULL, CMD_CONFIG_WRITE_LIB_GROUP,
-                 "Specify the file listed in the lib directory", (char *) NULL);
-  createArgument("lib-common", 1, CLI_ARGV_STRING, (char *) NULL, CMD_CONFIG_WRITE_LIB_COMMON,
-                 "Specify the MUST-HAVE lib files", (char *) NULL);
-  createArgument("config-dir", 1, CLI_ARGV_STRING, (char *) NULL, CMD_CONFIG_WRITE_CONFIG_DIR,
-                 "Specify the subdirectories and the files in each of them in the config directory", (char *) NULL);
-  createArgument("config-group", 1, CLI_ARGV_STRING, (char *) NULL, CMD_CONFIG_WRITE_CONFIG_GROUP,
-                 "Specify the file listed in the config directory", (char *) NULL);
-  createArgument("config-common", 1, CLI_ARGV_STRING, (char *) NULL, CMD_CONFIG_WRITE_CONFIG_COMMON,
-                 "Specify the MUST-HAVE config files", (char *) NULL);
-  createArgument("common-file", 1, CLI_ARGV_STRING, (char *) NULL, CMD_CONFIG_WRITE_COMMON_FILE,
-                 "Specify the MUST-HAVE files", (char *) NULL);
-
-  return CLI_OK;
-}

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/Makefile.am
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/Makefile.am b/cmd/traffic_shell/Makefile.am
deleted file mode 100644
index 2a28086..0000000
--- a/cmd/traffic_shell/Makefile.am
+++ /dev/null
@@ -1,77 +0,0 @@
-#
-# Makefile.am for the Enterprise Management module.
-#
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-
-AM_CPPFLAGS = \
-  $(iocore_include_dirs) \
-  -I$(top_srcdir)/lib \
-  -I$(top_srcdir)/lib/ts \
-  -I$(top_srcdir)/mgmt/api/include
-
-bin_PROGRAMS = traffic_shell
-traffic_shell_SOURCES = \
-  cliAppInit.cc \
-  CliCreateCommands.h \
-  traffic_shell.cc \
-  CliMgmtUtils.h \
-  ConfigCmd.h \
-  createArgument.h \
-  createCommand.h \
-  definitions.h \
-  hashtable.h \
-  ShowCmd.h
-
-noinst_LIBRARIES = libtrafficshell.a
-libtrafficshell_a_SOURCES = \
-  CliCreateCommands.cc \
-  CliCreateCommands.h \
-  CliDisplay.cc \
-  CliDisplay.h \
-  CliMgmtUtils.cc \
-  CliMgmtUtils.h \
-  cliParseArg.cc \
-  commandOptions.h \
-  ConfigCmd.cc \
-  ConfigCmd.h \
-  ConfigUpgradeCmd.h \
-  ConfigUpgradeReadCmd.cc \
-  ConfigUpgradeWriteCmd.cc \
-  createArgument.cc \
-  createArgument.h \
-  createCommand.cc \
-  createCommand.h \
-  definitions.h \
-  hashtable.cc \
-  hashtable.h \
-  processArgument.cc \
-  ShowCmd.cc \
-  ShowCmd.h \
-  UtilCmds.cc \
-  UtilCmds.h
-
-traffic_shell_LDFLAGS =	@EXTRA_CXX_LDFLAGS@ @LIBTOOL_LINK_FLAGS@
-traffic_shell_LDADD = \
-  libtrafficshell.a \
-  $(top_builddir)/mgmt/api/libtsmgmtshare.la \
-  $(top_builddir)/mgmt/api/libtsmgmt.la \
-  $(top_builddir)/mgmt/utils/libutils_lm.a \
-  $(top_builddir)/lib/ts/libtsutil.la \
-  $(LIBTCL) $(LIBREADLINE) \
-  @LIBRESOLV@ @LIBEXPAT@ @OPENSSL_LIBS@ \
-  @LIBPCRE@ @LIBREADLINE@ \
-  -lm


[3/7] TS-1665 Remove traffic_shell

Posted by zw...@apache.org.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/UtilCmds.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/UtilCmds.cc b/cmd/traffic_shell/UtilCmds.cc
deleted file mode 100644
index 74ed09e..0000000
--- a/cmd/traffic_shell/UtilCmds.cc
+++ /dev/null
@@ -1,196 +0,0 @@
-/** @file
-
-  A brief file description
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-/****************************************************************
- * Filename: UtilCmds.cc
- * Purpose: This file contains the CLI's utility commands.
- *
- *
- ****************************************************************/
-
-#include "UtilCmds.h"
-#include "createArgument.h"
-#include "CliMgmtUtils.h"
-#include "CliDisplay.h"
-#include "ink_error.h"
-#include "ink_defs.h"
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-
-////////////////////////////////////////////////////////////////
-// DebugCmd
-//
-// This is the callback function for the "debug" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-DebugCmd(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable, *infoPtr;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-
-  Cli_Debug("DebugCmd\n");
-
-  for (infoPtr = argtable; (infoPtr->parsed_args != 0); infoPtr++) {
-
-    // call appropriate function based on the 1st argument
-
-    switch (infoPtr->parsed_args) {
-    case CMD_DEBUG_ON:
-      Cli_Debug("debug on sub-command\n");
-      return (DebugOn());
-
-    case CMD_DEBUG_OFF:
-      Cli_Debug("debug off sub-command\n");
-      return (DebugOff());
-    }
-  }
-  return CLI_OK;
-}
-
-
-////////////////////////////////////////////////////////////////
-// DebugCmdArgs
-//
-// Register "debug" command arguments with the Tcl interpreter.
-//
-int
-DebugCmdArgs()
-{
-  Cli_Debug("DebugCmdArgs\n");
-
-  createArgument("on", 1, CLI_ARGV_CONSTANT, (char *) NULL, CMD_DEBUG_ON, "Turn Debug Statements ON", (char *) NULL);
-
-  createArgument("off", 1, CLI_ARGV_CONSTANT, (char *) NULL, CMD_DEBUG_OFF, "Turn Debug Statements OFF", (char *) NULL);
-
-  return CLI_OK;
-}
-
-////////////////////////////////////////////////////////////////
-//
-// "debug" sub-command implementations
-//
-////////////////////////////////////////////////////////////////
-
-
-// debug on sub-command
-//   used to turn on debug print statements
-int
-DebugOn()
-{
-  CliPrintLevelT level = Cli_GetPrintLevel();
-  level = (CliPrintLevelT) ((int) level | (int) CLI_PRINT_DEBUG);
-  Cli_SetPrintLevel(level);
-  return CLI_OK;
-}
-
-// debug off sub-command
-//   used to turn off debug print statements
-int
-DebugOff()
-{
-  CliPrintLevelT level = Cli_GetPrintLevel();
-  level = (CliPrintLevelT) ((int) level & ~(int) CLI_PRINT_DEBUG);
-  Cli_SetPrintLevel(level);
-  return CLI_OK;
-}
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigRoot
-//
-// This is the callback function for the "config:root" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigRoot(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (cliCheckIfEnabled("config:root") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-
-  Cli_Debug("Cmd_ConfigRoot\n");
-
-  if (getuid() == 0) {
-    Cli_Printf("Already root user.\n");
-    return CLI_OK;
-
-  }
-  char ts_path[1024];
-  if (GetTSDirectory(ts_path,sizeof(ts_path))) {
-    return CLI_ERROR;
-  }
-
-  char command[1024];
-  snprintf(command, sizeof(command),
-           "/bin/su - root -c \"%s/start_traffic_shell\"", ts_path);
-
-  // start traffic_shell as root user
-  // su will prompt user for root password
-  int pid = fork();
-  if (pid == 0) {
-    if (system(command) == -1)
-      exit(2);
-    else
-      exit(1);
-  }
-
-  waitpid(pid, NULL, 0);
-
-  return CLI_OK;
-}

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/UtilCmds.h
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/UtilCmds.h b/cmd/traffic_shell/UtilCmds.h
deleted file mode 100644
index ad1c705..0000000
--- a/cmd/traffic_shell/UtilCmds.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/** @file
-
-  A brief file description
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-/****************************************************************
- * Filename: UtilCmds.h
- * Purpose: This file contains the CLI's utility commands.
- *
- *
- ****************************************************************/
-
-
-/* This includes a commited hacked version of tcl which has an external dependancy
-   on cli-specific code and thus, this tcl build cannot be used with other
-   code, and normal non-hacked tcl cannot be used with cli.  Even more beutiful
-   is the fact that the hacks are no-where documented.  I managed to scrape
-   them up and role them into a patch which can be found in
-   $CVSROOT/contrib/tcl-tclx/common/patches for reference in case someone
-   ever should feel like comming up with something a little more well thought out.
-   Oh, did I mention also that apperently, no thought was put toward how to make
-   this work with more than one platform, or is that obvious just by looking
-   at the structure?
-*/
-//#include "inktcl/include/tcl.h"
-/* There is is in all it's glory :( */
-
-
-#include "createArgument.h"
-#include "definitions.h"
-
-#ifndef __UTIL_CMDS_H__
-#define __UTIL_CMDS_H__
-
-// enumerated type which captures all "debug" command options
-typedef enum
-{
-  CMD_DEBUG_ON = 1,
-  CMD_DEBUG_OFF
-} cliDebugCommand;
-
-////////////////////////////////////////////////////////////////
-// DebugCmd
-//
-// This is the callback function for the "debug" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int DebugCmd(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// DebugCmdArgs
-//
-// Register "debug" command arguments with the Tcl interpreter.
-//
-int DebugCmdArgs();
-
-////////////////////////////////////////////////////////////////
-//
-// "debug" sub-command implementations
-//
-////////////////////////////////////////////////////////////////
-
-// debug on sub-command
-int DebugOn();
-
-// debug off sub-command
-int DebugOff();
-
-int Cmd_ConfigRoot(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-#endif // __UTIL_CMDS_H__

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/cliAppInit.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/cliAppInit.cc b/cmd/traffic_shell/cliAppInit.cc
deleted file mode 100644
index 461b9f6..0000000
--- a/cmd/traffic_shell/cliAppInit.cc
+++ /dev/null
@@ -1,165 +0,0 @@
-/** @file
-
-  A brief file description
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-/*
- *   cliAppInit.c --
- *
- *
- *    This file initiliazes the application by calling all
- *    the new commands and thier respective arguments
- *
- *
- *
- *    Dated  : 12/13/2000.
- */
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <iostream>
-
-//#include "tclExtend.h"
-#include "tcl.h"
-#include <unistd.h>
-#include <sys/types.h>
-#include "CliMgmtUtils.h"
-#include "createCommand.h"
-#include "hashtable.h"
-#include "createArgument.h"
-#include "definitions.h"
-#include "ShowCmd.h"
-#include "ConfigCmd.h"
-#include "CliCreateCommands.h"
-#include "ink_defs.h"
-
-#if HAVE_EDITLINE_READLINE_H
-#include <editline/readline.h>
-#elif HAVE_READLINE_READLINE_H
-#include <readline/readline.h>
-#if HAVE_READLINE_HISTORY_H
-#include <readline/history.h>
-#endif
-#endif
-
-
-Tcl_Interp *interp;
-extern Tcl_HashTable CommandHashtable;
-
-int
-Tcl_AppInit(Tcl_Interp * app_interp)
-{
-  /*
-   * Intialize the Tcl interpreter.
-   */
-  if (Tcl_Init(app_interp) == TCL_ERROR)
-    return TCL_ERROR;
-
-  interp = app_interp;
-
-#ifdef TCL_MEM_DEBUG
-  Tcl_InitMemory(interp);
-#endif
-
-  cliCreateCommandHashtable();
-
-  // root users are automatically enabled
-  if (getuid() == 0) {
-    enable_restricted_commands = true;
-  }
-
-
-  if (CliCreateCommands() != CLI_OK)
-    return CMD_ERROR;
-
-  Tcl_SetVar(interp, "tcl_rcFileName", "~/.tshellstartup", TCL_GLOBAL_ONLY);
-
-/* Evaluating a application specific tcl script After creating
-   all the commands and sourcing the statup file */
-/* Always this should be at the end of this function. */
-  /*
-   * Parse command-line arguments.  A leading "-file" argument is
-   * ignored (a historical relic from the distant past).  If the
-   * next argument doesn't start with a "-" then strip it off and
-   * use it as the name of a script file to process.
-   */
-
-  const char *fileName = Tcl_GetVar(interp, "argv", TCL_LEAVE_ERR_MSG);
-  /*
-   * Invoke the script specified on the command line, if any.
-   */
-
-  if (fileName[0] != '\0') {
-    int listArgc;
-    const char **listArgv;
-
-    if (Tcl_SplitList(interp, fileName, &listArgc, &listArgv) != TCL_OK) {
-      return TCL_ERROR;
-    }
-    int length = strlen(listArgv[0]);
-    if ((length >= 2) && (strncmp(listArgv[0], "-file", length) == 0)) {
-      for (int index = 1; index < listArgc; index++) {
-        Tcl_ResetResult(interp);
-        if (Tcl_EvalFile(interp, listArgv[index]) != TCL_OK) {
-          Tcl_AddErrorInfo(interp, "");
-          Tcl_DeleteInterp(interp);
-          Tcl_Exit(1);
-        }
-      }
-    }
-    ckfree((char *) listArgv);
-  }
-
-  Tcl_ResetResult(interp);
-
-  return TCL_OK;
-}
-
-#if HAVE_LIBREADLINE
-
-// TCL main read, eval, print loop. We don't use Tcl_Main because we want to
-// use readline to get line editing and command history.
-void Tcl_ReadlineMain(void)
-{
-  char * line;
-
-  for (;;) {
-    line = readline("trafficserver> ");
-    if (line == NULL) {
-      // Received EOF. Bound this into a TCL exit command just like Tcl_Main
-      // does.
-      Tcl_Eval(interp, "exit;");
-    }
-
-    if (*line) {
-      add_history(line);
-      Tcl_Eval(interp, line);
-    }
-
-    free(line);
-  }
-
-  exit(0);
-}
-
-#endif // HAVE_LIBREADLINE
-
-// vim: set ts=2 sw=2 et :

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/cliParseArg.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/cliParseArg.cc b/cmd/traffic_shell/cliParseArg.cc
deleted file mode 100644
index 72e6039..0000000
--- a/cmd/traffic_shell/cliParseArg.cc
+++ /dev/null
@@ -1,457 +0,0 @@
-/** @file
-
-  contains the implementation for parsing CLI arguments
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
-  @section Description
-  cliParseArgument(int argc,char **argv,cli_ArgvInfo *argTable)
-  compares the given arguments with the expected arguments and
-  returns error if they are not same
-  If arguments are are valid it converts string arguments to the proper type
- */
-
-#include <tcl.h>
-#include <string.h>
-#include <stdlib.h>
-#include "createArgument.h"
-#include "definitions.h"
-#include "CliDisplay.h"
-#include "ink_string.h"
-#include "ink_defs.h"
-
-int checkintrange(char *range, int value);
-int checkfloatrange(char *range, float value);
-char **findRequired(cli_ArgvInfo * argtable);
-extern Tcl_Interp *interp;
-
-/*
- * Forward declarations for procedures defined in this file:
- */
-static void PrintUsage _ANSI_ARGS_((Tcl_Interp * interp, cli_CommandInfo * commandinfo));
-
-
-
-int
-cliParseArgument(int argc, const char **argv, cli_CommandInfo * commandInfo)
-{
-  cli_ArgvInfo *infoPtr, *prevMatchPtr = NULL, *prevPtr = NULL;
-  cli_parsedArgInfo *parsedInfoPtr, *prev_parsedInfoPtr = NULL;
-  int srcIndex = 1;
-  bool gotMatch = false, gotInt = false;
-  int missing = 0;
-  int length, i;
-  char curArg[256], buf[256];
-  char *endPtr;
-  bool got_required;
-  cli_ArgvInfo *argTable = commandInfo->argtable;
-  char **reqd_args = commandInfo->reqd_args;
-  cli_parsedArgInfo *parsedArgTable = commandInfo->parsedArgTable;
-
-
-
-  argc--;                       /*first argument is command name */
-
-
-/* Special option for help handled here, No need to create an -help */
-  /* I assume that the first thing will always start with - */
-
-  if (argc == 1) {
-    length = strlen(argv[1]);
-    if ((length >= 2) && ((strncmp(argv[1], "-help", length) == 0) || (strncmp(argv[1], "-h", length) == 0))) {
-      PrintUsage(interp, commandInfo);
-      return TCL_OK;
-    } else if (strcmp(argv[1], "----") == 0) {
-      /* Special case with readline options */
-      /* Readline always sends "----" */
-      return TCL_OK;
-    }
-  }
-
-
-  /* check for required arguments */
-  if (reqd_args != (char **) NULL) {
-    missing = 0;
-    for (i = 0; reqd_args[i] != NULL; i++) {
-      got_required = false;
-      srcIndex = 1;
-      while (srcIndex <= argc) {
-        if (!strcmp(reqd_args[i], argv[srcIndex])) {
-          got_required = true;
-          break;
-        }
-        srcIndex++;
-      }
-      if (got_required == false) {
-        missing++;
-        if (missing == 1)
-          Tcl_AppendResult(interp, reqd_args[i], (char *) NULL);
-        else
-          Tcl_AppendResult(interp, " , ", reqd_args[i], (char *) NULL);
-      }
-    }
-
-    if (missing == 1) {
-      Tcl_AppendResult(interp, " is required ", (char *) NULL);
-      return TCL_ERROR;
-    } else if (missing > 1) {
-      Tcl_AppendResult(interp, " are required ", (char *) NULL);
-      return TCL_ERROR;
-    }
-
-  }
-/* Initialise Parsed Argtable */
-  for (i = 0; i < 100; i++) {
-    parsedArgTable[i].parsed_args = CLI_PARSED_ARGV_DATA;
-    parsedArgTable[i].arg_float = CLI_DEFAULT_INT_OR_FLOAT_VALUE;
-    parsedArgTable[i].arg_int = CLI_DEFAULT_INT_OR_FLOAT_VALUE;
-
-    if (parsedArgTable[i].data && (parsedArgTable[i].data != (char *) NULL)) {
-      ats_free(parsedArgTable[i].data);
-      parsedArgTable[i].data = (char *) NULL;
-
-    }
-    if (parsedArgTable[i].arg_string && parsedArgTable[i].arg_string != (char *) NULL) {
-      ats_free(parsedArgTable[i].arg_string);
-      parsedArgTable[i].arg_string = (char *) NULL;
-    }
-  }
-
-/* Error checking for commandline arguments based on createargument options */
-  parsedInfoPtr = parsedArgTable;
-  srcIndex = 1;
-  while (argc > 0) {
-    ink_strlcpy(curArg, argv[srcIndex], sizeof(curArg));
-    argc--;
-    srcIndex++;
-    length = strlen(curArg);
-    gotMatch = false;
-    for (infoPtr = argTable; (infoPtr->key != NULL); infoPtr++) {
-      if (!strcmp(infoPtr->key, curArg)) {
-        gotMatch = true;
-        if (infoPtr->position != CLI_ARGV_NO_POS) {     /* Don't do position checking for
-                                                           CLI_ARGV_NO_POS */
-          /* check if the 1st position argument comes at 1st position */
-          if ((infoPtr->position == CLI_PARENT_ARGV) && (srcIndex - 1) != 1) {
-            Tcl_AppendResult(interp, "\"", curArg, "\" is at wrong place Try ", argv[0], " -help", (char *) NULL);
-            return TCL_ERROR;
-          }
-
-          if (infoPtr->position != CLI_PARENT_ARGV) {
-            if ((srcIndex - 1) == 1) {
-              Tcl_AppendResult(interp, "\"", curArg, "\" is at wrong place Try ", argv[0], " -help", (char *) NULL);
-              return TCL_ERROR;
-            } else {
-              if (prevMatchPtr != NULL) {
-                if (prevMatchPtr->arg_ref != infoPtr->position) {
-                  Tcl_AppendResult(interp, "\"", curArg, "\" is at wrong place Try ", argv[0], " -help", (char *) NULL);
-                  return TCL_ERROR;
-                }
-              }
-
-            }
-          }
-        }
-
-        if (prevMatchPtr != NULL && prevPtr == prevMatchPtr) {
-          if (prevMatchPtr->type == CLI_ARGV_OPTION_NAME_VALUE) {
-            if (prev_parsedInfoPtr->arg_string) {
-              ats_free(prev_parsedInfoPtr->arg_string);
-              prev_parsedInfoPtr->arg_string = NULL;
-            }
-          }
-        }
-
-        parsedInfoPtr->arg_usage = infoPtr->help;
-
-        /* Position checking over check for type */
-
-        switch (infoPtr->type) {
-        case CLI_ARGV_CONSTANT:
-          parsedInfoPtr->parsed_args = infoPtr->arg_ref;
-          if (argc != 0) {
-            snprintf(buf, sizeof(buf), "Too many arguments Try %s -help", argv[0]);
-            Tcl_AppendResult(interp, buf, (char *) NULL);
-            return TCL_ERROR;
-          }
-          break;
-        case CLI_ARGV_INT:
-          if (argc <= 0) {
-            Tcl_AppendResult(interp, "\"", curArg, "\" option requires an additional integer argument", "\n",
-                             infoPtr->help, (char *) NULL);
-            return TCL_ERROR;
-          }
-          parsedInfoPtr->arg_int = strtol(argv[srcIndex], &endPtr, 0);
-          if ((endPtr == argv[srcIndex]) || (*endPtr != 0)) {
-            Tcl_AppendResult(interp, infoPtr->key, " requires integer argument ", "\n", infoPtr->help, (char *) NULL);
-            return TCL_ERROR;
-          }
-          if (infoPtr->range_set == true) {
-            if (parsedInfoPtr->arg_int < infoPtr->l_range.int_r1 || parsedInfoPtr->arg_int > infoPtr->u_range.int_r2) {
-              snprintf(buf, sizeof(buf), "value of %s is out of range %d - %d", infoPtr->key, infoPtr->l_range.int_r1,
-                       infoPtr->u_range.int_r2);
-
-              Tcl_AppendResult(interp, buf, (char *) NULL);
-              return TCL_ERROR;
-            }
-
-          }
-          srcIndex++;
-          argc--;
-          parsedInfoPtr->parsed_args = infoPtr->arg_ref;
-          break;
-
-        case CLI_ARGV_OPTION_INT_VALUE:
-          gotInt = 0;
-          if (argc > 0) {
-            parsedInfoPtr->arg_int = strtol(argv[srcIndex], &endPtr, 0);
-            if ((endPtr == argv[srcIndex]) || (*endPtr != 0)) {
-              parsedInfoPtr->arg_int = CLI_DEFAULT_INT_OR_FLOAT_VALUE;
-              parsedInfoPtr->parsed_args = infoPtr->arg_ref;
-              break;
-            }
-            gotInt = 1;
-            if (infoPtr->range_set == true) {
-              if (parsedInfoPtr->arg_int < infoPtr->l_range.int_r1 || parsedInfoPtr->arg_int > infoPtr->u_range.int_r2) {
-                snprintf(buf, sizeof(buf), "value of %s is out of range %d - %d", infoPtr->key, infoPtr->l_range.int_r1,
-                         infoPtr->u_range.int_r2);
-
-                Tcl_AppendResult(interp, buf, (char *) NULL);
-                return TCL_ERROR;
-              }
-            }
-            srcIndex++;
-            argc--;
-          }
-          parsedInfoPtr->parsed_args = infoPtr->arg_ref;
-          break;
-
-        case CLI_ARGV_STRING:
-          if (argc <= 0) {
-            Tcl_AppendResult(interp, "\"", curArg, "\" option requires an additional argument", (char *) NULL);
-            return TCL_ERROR;
-          }
-          parsedInfoPtr->arg_string = ats_strdup(argv[srcIndex]);
-          parsedInfoPtr->parsed_args = infoPtr->arg_ref;
-          srcIndex++;
-          argc--;
-          break;
-        case CLI_ARGV_OPTION_NAME_VALUE:
-          if (argc > 0) {
-            parsedInfoPtr->arg_string = ats_strdup(argv[srcIndex]);
-          }
-          parsedInfoPtr->parsed_args = infoPtr->arg_ref;
-          break;
-        case CLI_ARGV_FLOAT:
-          if (argc <= 0) {
-            Tcl_AppendResult(interp, "\"", curArg, "\" option requires an additional floating-point argument",
-                             (char *) NULL);
-            return TCL_ERROR;
-          }
-
-          // Solaris is messed up, in that strtod() does not honor C99/SUSv3 mode.
-          parsedInfoPtr->arg_float = strtold(argv[srcIndex], &endPtr);
-          if ((endPtr == argv[srcIndex]) || (*endPtr != 0)) {
-            Tcl_AppendResult(interp, infoPtr->key, " requires floating-point argument",
-                             "\n", infoPtr->help, (char *) NULL);
-            return TCL_ERROR;
-          }
-          if (infoPtr->range_set == true) {
-            if (parsedInfoPtr->arg_float < infoPtr->l_range.float_r1 ||
-                parsedInfoPtr->arg_float > infoPtr->u_range.float_r2) {
-              snprintf(buf, sizeof(buf), "value of %s out of range %f - %f", infoPtr->key, infoPtr->l_range.float_r1,
-                       infoPtr->u_range.float_r2);
-              Tcl_AppendResult(interp, buf, (char *) NULL);
-              return TCL_ERROR;
-            }
-
-          }
-          srcIndex++;
-          argc--;
-          parsedInfoPtr->parsed_args = infoPtr->arg_ref;
-          break;
-
-        case CLI_ARGV_OPTION_FLOAT_VALUE:
-          if (argc > 0) {
-            parsedInfoPtr->arg_float = strtold(argv[srcIndex], &endPtr);
-            if ((endPtr == argv[srcIndex]) || (*endPtr != 0)) {
-              parsedInfoPtr->arg_float = CLI_DEFAULT_INT_OR_FLOAT_VALUE;
-              parsedInfoPtr->parsed_args = infoPtr->arg_ref;
-              break;
-            }
-            if (infoPtr->range_set == true) {
-              if (parsedInfoPtr->arg_float < infoPtr->l_range.float_r1 ||
-                  parsedInfoPtr->arg_float > infoPtr->u_range.float_r2) {
-                snprintf(buf, sizeof(buf), "value of %s out of range %f - %f", infoPtr->key, infoPtr->l_range.float_r1,
-                         infoPtr->u_range.float_r2);
-                Tcl_AppendResult(interp, buf, (char *) NULL);
-                return TCL_ERROR;
-              }
-
-            }
-            srcIndex++;
-            argc--;
-          }
-          parsedInfoPtr->parsed_args = infoPtr->arg_ref;
-          break;
-
-        case CLI_ARGV_FUNC:
-          break;
-
-        case CLI_ARGV_CONST_OPTION:
-
-          parsedInfoPtr->parsed_args = infoPtr->arg_ref;
-          break;
-        default:
-          parsedInfoPtr->parsed_args = infoPtr->arg_ref;
-          break;
-
-
-        }
-        prevMatchPtr = infoPtr;
-      }
-      if (gotMatch == true)
-        break;
-
-    }
-    if (gotMatch == false) {
-      if (prevMatchPtr != NULL) {
-        /*if prev argument is of type CLI_ARGV_CONST_OPTION then this has to be valid
-           argument so return error */
-        if (prevMatchPtr->type == CLI_ARGV_CONST_OPTION) {
-          snprintf(buf, sizeof(buf), "unrecognized argument %s\n %s", curArg, prevMatchPtr->help);
-          Tcl_AppendResult(interp, buf, (char *) NULL);
-          return TCL_ERROR;
-        }
-
-        if ((prevPtr == prevMatchPtr) && (prevMatchPtr->type == CLI_ARGV_OPTION_FLOAT_VALUE)) {
-          Tcl_AppendResult(interp, prevMatchPtr->key, " requires floating point argument", "\n", prevMatchPtr->help,
-                           (char *) NULL);
-          return TCL_ERROR;
-        }
-
-        if ((prevPtr == prevMatchPtr) && (prevMatchPtr->type == CLI_ARGV_OPTION_INT_VALUE)) {
-          if (gotInt == 0) {
-            Tcl_AppendResult(interp, prevMatchPtr->key, " requires integer argument", "\n", prevMatchPtr->help,
-                             (char *) NULL);
-            return TCL_ERROR;
-          }
-        }
-
-
-        if (prevMatchPtr->type != CLI_ARGV_OPTION_NAME_VALUE) {
-          parsedInfoPtr->data = ats_strdup(curArg);
-          parsedInfoPtr->parsed_args = CLI_PARSED_ARGV_DATA;
-        } else
-          parsedInfoPtr--;
-
-      } else {
-        parsedInfoPtr->data = ats_strdup(curArg);
-        parsedInfoPtr->parsed_args = CLI_PARSED_ARGV_DATA;
-      }
-    }
-    prev_parsedInfoPtr = parsedInfoPtr;
-    parsedInfoPtr++;
-    prevPtr = infoPtr;
-
-  }
-  parsedInfoPtr->parsed_args = CLI_PARSED_ARGV_END;
-
-  return TCL_OK;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * PrintUsage --
- *
- *	Generate a help string describing command-line options.
- *
- * Results:
- *	The interp's result will be modified to hold a help string
- *	describing all the options in argTable, plus all those
- *	in the default table unless CLI_ARGV_NO_DEFAULTS is
- *	specified in flags.
- *
- * Side effects:
- *	None.
- *
- *----------------------------------------------------------------------
- */
-static void
-PrintUsage(Tcl_Interp * /* interp ATS_UNUSED */, cli_CommandInfo * commandInfo)
-{
-  cli_ArgvInfo *infoPtr;
-  cli_ArgvInfo *argTable = commandInfo->argtable;
-  int width, numSpaces;
-
-  /*
-   * First, compute the width of the widest option key, so that we
-   * can make everything line up.
-   */
-  width = 4;
-  char *cmdHelpString = commandInfo->helpString;
-  int length = strlen(commandInfo->command_name);
-
-  if (length > width) {
-    width = length;
-  }
-
-  /* Now for arguments */
-
-  for (infoPtr = argTable; infoPtr->key != NULL; infoPtr++) {
-    length = strlen(infoPtr->key);
-    if (length > width) {
-      width = length;
-    }
-  }
-
-  // display command name
-  Cli_Printf("\n%s", commandInfo->command_name);
-  numSpaces = width + 1 - strlen(commandInfo->command_name);
-
-  while (numSpaces > 0) {
-    Cli_Printf(" ");
-    numSpaces--;
-  }
-
-  // display command help string
-  Cli_Printf("    %s", cmdHelpString);
-
-  for (infoPtr = argTable; infoPtr->key != NULL; infoPtr++) {
-    if (infoPtr->position >= 100) {
-      Cli_Printf("\n    ");
-    } else {
-      Cli_Printf("\n  ");
-    }
-
-    // display option name
-    Cli_Printf("%s", infoPtr->key);
-    numSpaces = width + 1 - strlen(infoPtr->key);
-
-    while (numSpaces > 0) {
-      Cli_Printf(" ");
-      numSpaces--;
-    }
-    // display option parameters
-    Cli_Printf("  %s", infoPtr->help);
-  }
-
-  Cli_Printf("\n\n");
-}

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/cli_detailed_command_list.txt
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/cli_detailed_command_list.txt b/cmd/traffic_shell/cli_detailed_command_list.txt
deleted file mode 100644
index c297a95..0000000
--- a/cmd/traffic_shell/cli_detailed_command_list.txt
+++ /dev/null
@@ -1,1605 +0,0 @@
-FEATURE INTRODUCTION
-
-Feature name:
-
-	traffic_shell
-
-Synopsis of Feature:
-
-	traffic_shell is a true "command line interface."  It accepts
-commands in a unix shell-like fashion.  traffic_shell supports command
-completion, command history, man pages, and context sensitive help.
-Not only is this type of interface more familiar to network engineers
-everywhere, but it is also easier to document, maintain, and extend.
-	traffic_shell is TCL-based which simplifies the development of new
-commands.  It also supports scripting which means that a user can
-source and execute a file that contains traffic_shell commands. 
-	traffic_shell currently provides full configuration and monitoring
-functionality for Traffic Server. 
-	traffic_shell is built on the same Management API as the
-Traffic Server WebUI.  The Management API (written in C code) handles
-updating config files and restarting TS or reloading config variables
-for changes to take effect. 
- 
-Configurations of Traffic Server affected:
-
-	Platforms: Linux, Linux for OEMs, Solaris SPARC
-	Configurations: All TS configurations
-
-References on Feature:
-
-	Scroll down to the section of this document titled:
-	  COMPLETE COMMAND SET SPECIFICATION
-        This section contains an exhaustive list of all traffic_shell
-	commands, along with a description of syntax and sample output.
-
-ENGINEERING DESCRIPTION
-
-Modes of operation of Feature:
-
-	No special records.config setup is required.
-
-	The CLI supports the following operation modes.  Note that a
-	"user" can be a person, a script, or some other mechanism for remote
-	control of network devices via command line interface.
-
-   -- Interactive:
-         "traffic_shell"
-         Similar to unix shell, CLI can be the login shell for administrators.
-         User types command at a prompt.
-         CLI processes command and displays the result.
-         User can execute a file which contains a list of commands.
-
-   -- Execute file:
-         "traffic_shell -f filename" where file contains a list of CLI commands.
-         CLI runs commands and sends results to stdout.
-    
-	When entered at the Unix shell prompt, the "traffic_shell -f
-filename" command starts traffic_shell and runs a TCL script
-"filename" which typically contains traffic_shell commands.  Since
-traffic_shell is a TCL interpreter, the script can also contain any
-valid combination of TCL constructs.  If the TCL interpreter
-encounters the "exit" keyword, then control returns to the shell from
-which the user typed "traffic_shell -f <filename>".  If the
-interpreter reaches the end of script execution without encountering
-"exit", then the traffic_shell prompt appears and the user can
-continue to use traffic_shell interactively.
-
-Risk points of feature:
-
-	Certain configuration changes force a reset of Traffic
-	Server.  These restarts are performed by functions in the
-	Management API. 
-
-Effect on SDK/API:
-
-	None.  In the future, traffic_shell may be enhanced to provide
-	configurability of certain plugins.
-
-Module tests, diagnostic output, and statistics on feature
-
-	None.
-
-Engineering description of Feature:
-
-	The CLI is a standalone executable that is part of a Traffic
-	Server installation.  
-
-	The CLI is implemented in a combination of TCL and C++.  The
-	shell and parsing functionality uses TCL.  Commands themselves are
-	typically written in C++.  The CLI uses the traffic_manager Management
-	API to make Traffic Server configuration changes.
-
- The overall CLI architecture is as follows:
-
-  - traffic_shell ---------------------------
- |                                           |
- |  ---------------------------------------  |
- |  Shell and parser implemented in TCL/C++  |
- |  ---------------------------------------  |
- |                  ^                        |
- |  ----------------|-------------------     |
- |  CLI commands implemented in C++ (.a)     |
- |  ------------------------------------     |
- |                  ^                        |
- |          --------|----------              |
- |          Management API (.a)              |
- |          -------------------              |
- |                                           |
-  -------------------------------------------
-
-Notes and comments by developing engineer:
-
-	None.
-
-TESTS DESCRIPTIONS
-
-Test description:
-
-	QA developed expect scripts for each traffic_shell command to
-	simulate commands from user level, and also to check the output
-	of CLI.
-
-	Each script covers one command along with all of its
-	sub-commands and arguments. 
-
-  Each Config Command script has a flow as follows:
-  - Valid test:
-    . Send valid syntax command to CLI.
-    . Check the value of affected variable from either the CLI or 
-      from traffic_line -r <variable>.
-    . Set errors if the output of CLI does not match expected result.
-  - Negative test:
-    . Send commands with invalid arguments to CLI.
-    . CLI should handled unregconized arguments gracefully.
-    . Set error if CLI does not handle invalid arguments correctly.
-
-  Same logic flow for Show commands.
-
-
-   To run the test scripts:
-   ----------------------------
-   There are two files:
-	cli-config-tests.tar for config commands.
-	cli-show-tests.tar for show commands.
-
-Copy these files into a "cli" subdirectory of the traffic_server "bin"
-directory, and untar them.  Start traffic_server and run scripts
-within cli directory.
-
-- For Config, run cli-test.exp + <individual test>
-
-  For example:
-  cli% ./cli-test.exp config-name 
-  This will test config:name command
-      
-- For Show, run show-test.exp + <individual test>
-
-Test development notes:
-
-- These scripts are by no means complete.  Anyone can add more testcases 
-in by copying/modifying existing testcases. These tests are pretty primitive
-for now. 
-
-- When running tests, please make sure you enlarge your terminal as large as
-possible to accomodate the CLI output. The EOL character might affect string
-comparision in expect.
-
-- Some of variables are set to random values. So please be sure to save your
-config directory or install new traffic server after you complete CLI test :-)
-This will be make better in the future.
-
-*******************************************************
-COMPLETE COMMAND SET SPECIFICATION
-*******************************************************
-
-
-
-traffic_shell command set specification
-
-NOTE: This document does not distinguish phase-1 commands and functionality.
-
-There may be some inconsistencies between the command descriptions and the 
-actual implementation.  In particular, column alignment is not exactly specified 
-in this document.  Also, the values below are for example purposes only.
-
-==============
-CLI Features
-==============
-
-   1) CLI supports command completion i.e if the user types first one
-   or two characters of a valid command and presses tab key it completes
-   the command.
-
-   2) CLI supports command abbreviation i.e if user types first one or two
-   characters of a valid command and presses enter CLI will display all
-   the commands whic start with the abbreviation typed by user If there
-   is only one command matching the command abbreviation CLI directly
-   executes the command.
-
-   3) CLI supports history command which shows the history of previously
-   typed commands.
-
-   4) CLI supports up and down arrow keys to see through previous
-   commands.
-
-   5) All CLI commands can be classified in two catogories Show commands
-   and Config commands.  Show Commands display system information. Show
-   Commands can be executed in normal mode.  A list of possible show
-   commands described below can be seen by just typing show on command
-   line.
-
-   6) Config commands let the user configure or set system information
-   and settings Config commands can be executed in  privileged mode
-   enabled by admin password.  A list of possible  config commands
-   described below can be seen by just typing config on command line.
-
-
-================
-Command Overview
-================
-
-Normal mode commands
-  % prompt
-----------------------------
-
-enable		Enable privileged commands
-  Prompt for password.  Password can be blank.
-  syntax: enable
-  args:   none
-
-  ts> enable
-  Password: (no characters displayed)
-  ts#
-
-exit		Exit CLI
-  syntax: exit
-  args:   none
-
-  ts> exit
-
-help		Help
-  Display list of commands with one line description.
-  Or display help for a particular subcommand.
-  syntax: help [ subcommand ]
-  args:   subcommand (optional)
-
-show		Show system information
-
-  See "Show Command" below for list of subcommands.
-  syntax: show:< show-sub-command >
-  args:   show-sub-command = optional subcommand
-  behavior:  If show-sub-command is ommitted, then display the list of
-             possible show-sub-commands.
-
-Enable mode commands
-  includes all Normal mode commands
-  # prompt
-----------------------------
-
-config		Enter configuration mode
-  See "Configure Command" below for list of subcommands.
-  syntax: config:< config-sub-command >
-  args:   config-sub-command = optional subcommand
-  behavior:  If config-sub-command is ommitted, then display the list of
-             possible config-sub-commands.
-
-disable		Disable privileged commands
-  No parameters.  Puts CLI back into Normal Mode.
-  syntax: disable
-  args:   none
-  behavior:  Switch to Normal Mode.
-
-  ts# disable
-  ts>
-
-exit		Exit CLI
-  syntax: exit
-  args:   none
-
-help		Help
-  Same as Normal Mode but includes Configure Command.
-  Display list of commands with one line description.
-  Or display help for a particular subcommand.
-  syntax: help [ subcommand ]
-  args:   subcommand (optional)
-  
-show		Show system information
-  Same as Normal Mode but includes privileged commands.
-  See "Show Command" below for list of subcommands.
-  syntax: show:< show-sub-command >
-  args:   show-sub-command = optional subcommand
-  behavior:  If show-sub-command is ommitted, then display the list of
-             possible show-sub-commands.
-
-
-Show command
-------------
-Parameter		Description
------------------------------------
-status			Proxy status on/off
-  syntax: show:status
-  args:   none
-  behavior:  Display status as follows:
-
-    ts> show:status
-    Proxy -- on
-    ts>
-
-  implementation: Determine whether proxy is up and running.
-
-version			Traffic Server and Traffic Manager version
-  syntax: show:version
-  args:   none
-  behavior:  Display Traffic_Server and Traffic Manager version number as follows:
-
-    ts> show:version
-    traffic_server version --- 5.0.0
-    traffic_manager version -- 5.0.0
-    ts>
-
-security		Security Configuration (only in Enable Mode)
-			(TS IP allow, MGMT allow, Login allow)
-
-  syntax: show:security
-  args:   none
-  behavior:  Display IP address access lists for TS, MGMT, and login.
-
-    ts> show:security
-
-    Traffic Server Access
-    (ip_allow.config contents)
-
-    ts>
-
-  implementation:
-    Traffic Server Access specified in ip_allow.config (use MGMT API)
-
-cluster                Cluster Configuration
-
-   syntax: show:cluster
-   args:   none
-   behavior: Display cluster port
-
-  ts> show:cluster
- 
-      Cluster Port ----------- 14988 (proxy.config.cluster.cluster_port)
-      Cluster RS Port -------- 14990 (proxy.config.cluster.rsport)
-      Cluster MC Port -------- 14991 (proxy.config.cluster.mcport)
-
-http			HTTP Configuration
-			(timeout values, headers, authorization)
-
-  syntax: show:http
-  args:   none
-  behavior:  Display HTTP Configuration
-
-    ts> show:http
-    HTTP Caching ------------------ on      (proxy.config.http.cache.http)
-    HTTP Server Port -------------- 14980   (proxy.config.http.server_port)
-
-    Keep-Alive Timeout Inbound ---- 10 s    (proxy.config.http.keep_alive_no_activity_timeout_in)
-    Keep-Alive Timeout Outbound --- 10 s    (proxy.config.http.keep_alive_no_activity_timeout_out)
-    Inactivity Timeout Inbound ---- 120 s   (proxy.config.http.transaction_no_activity_timeout_in)
-    Inactivity Timeout Outbound --- 120 s   (proxy.config.http.transaction_no_activity_timeout_out)
-    Activity Timeout Inbound ------ 7200 s  (proxy.config.http.transaction_active_timeout_in)
-    Activity Timeout Outbound ----- 7200 s  (proxy.config.http.transaction_active_timeout_out)
-    Maximum Number of Alternates -- 3       (proxy.config.cache.limits.http.max_alts)
-    Remove the following common headers
-      From         (proxy.config.http.anonymize_remove_from)
-      Referer      (proxy.config.http.anonymize_remove_referer)
-      User-Agent   (proxy.config.http.anonymize_remove_user_agent)
-      Cookie       (proxy.config.http.anonymize_remove_cookie)
-    Remove additional headers
-      list         (proxy.config.http.anonymize_other_header_list)
-    Insert or Remove Client IP address
-      Insert       (proxy.config.http.anonymize_insert_client_ip)
-      Remove       (proxy.config.http.anonymize_remove_client_ip)
-    ts>
-    
-icp			ICP Configuration
-			(on/off, rules, port, timeouts)
-  syntax: show:icp [ peers ]
-  args:   optional "peers" argument
-  behavior:  Display ICP Configuration
-
-  ts> show:icp
-  ICP Mode --------------- off   (proxy.config.icp.enabled)
-  ICP Port --------------- 3130  (proxy.config.icp.icp_port)
-  ICP Multicast Enabled -- off   (proxy.config.icp.multicast_enabled)
-  ICP Query Timeout ------ 2 s   (proxy.config.icp.query_timeout)
-  ts>
-
-  ts> show:icp peers
-  icp.config rules
-  ----------------
-  (Display rules from icp.config)
-  ts>
-
-proxy			Proxy Configuration
-
-  syntax: show:proxy
-  args:   none
-  behavior:  Display basic proxy configuration
-
-  ts> show:proxy
-  Name -- foo         (proxy.config.proxy_name)
-  ts>
-
-cache			Cache Configuration
-			(active protocols, bypass, storage, freshness, 
-			expires, variable content, rules)
-  syntax: show:cache [ rules | storage ]
-  args:   optional "rules" or "storage"
-
-  ts> show:cache
-  HTTP Caching ------------------- on    (proxy.config.http.cache.http)
-  Ignore User Requests To Bypass Cluster --- off  (proxy.config.http.cache.cluster_cache_local)
-  Ignore User Requests To Bypass Cache --- off  (proxy.config.http.cache.ignore_client_no_cache)
-  Maximum HTTP Object Size --- NONE        (proxy.config.cache.max_doc_size)
-
-  Freshness
-    Verify Freshness By Checking --   (proxy.config.http.cache.when_to_revalidate)
-      When the object has expired
-    Minimum freshness information for a document to be cacheable --  (proxy.config.http.cache.required_headers)
-      Nothing
-    If object has no expiration date:
-      leave it in cache for at least ---- 3600 s   (proxy.config.http.cache.heuristic_min_lifetime)
-      but no more than ------------------ 86400 s  (proxy.config.http.cache.heuristic_max_lifetime)
-
-  Variable Content
-    Do not cache responses to URLs that contain "?", ";", "cgi" or end in ".asp"  (proxy.config.http.cache.cache_urls_that_look_dynamic value)
-    Alternates ------------ on    (proxy.config.http.cache.enable_default_vary_headers)
-    Vary on HTTP Header Fields:
-      Text ---------------- Cookie  (proxy.config.http.cache.vary_default_text)
-      Images -------------- NULL    (proxy.config.http.cache.vary_default_images)
-      Other --------------- NULL    (proxy.config.http.cache.vary_default_other)
-    Cache responses to requests containing cookies for:  (proxy.config.http.cache.cache_responses_to_cookies)
-      content-types which are not text
-  ts>
-
-  ts> show:cache rules
-  Display rules from cache.config
-  ts>
-
-  ts> show:cache storage
-  Display rules from storage.config
-  ts>
-
-virtual-ip		Virtual IP Address Configuration
-  syntax: show:virtual-ip
-  args:   none
-  behavior:  Display virtual IP configuration
-
-
-  ts_shell>show:virtual-ip 
-
-  2 Elements in Record
-
-  0 1.1.1.1 23 23
-  1 1.1.1.1 23 24
-
-  ts>
-
-
-hostdb			Host Database Configuration
-  syntax: show:hostdb
-  args:   none
-  behavior:  Display Host DB Configuration
-
-  ts> show:hostdb
-  Lookup Timeout ----------- 120 s   (proxy.config.hostdb.lookup_timeout)
-  Foreground Timeout ------- 1440 s  (proxy.config.hostdb.timeout)
-  Background Timeout ------- 720 s   (proxy.config.hostdb.verify_after)
-  Invalid Host Timeout ----- 0 s     (proxy.config.hostdb.fail.timeout)
-  Re-DNS on Reload --------- off     (proxy.config.hostdb.re_dns_on_reload)
-  Resolve Attempt Timeout -- 20 s    (proxy.config.dns.lookup_timeout)
-  Number of Retries -------- 5       (proxy.config.dns.retries)
-  ts>
-
-dns-resolver		DNS Resolver Configuration
-  syntax: show:dns-resolver
-  args:   none
-  behavior:  Display DNS Resolver Configuration
-
-  ts> show:dns-resolver
-  Local Domain Expansion -- on   (proxy.config.dns.search_default_domains)
-  .com Domain Expansion --- on   (proxy.config.http.enable_url_expandomatic)
-  ts>
-
-logging			Logging Configuration
-  syntax: show:logging
-  args: none
-  behavior:  Display Logging Configuration
-
-  ts> show:logging
-  Logging Mode ------------- xxx       (proxy.config.log.logging_enabled)
-
-  Management  
-    Log Space Limit -------- 2000 MB  (proxy.config.log.max_space_mb_for_logs)
-    Log Space Headroom ----- 10 MB    (proxy.config.log.max_space_mb_headroom)
-
-  Log Collation ------------ off      (proxy.local.log.collation_mode)
-    Host ------------------- NULL     (proxy.config.log.collation_host)
-    Port ------------------- 8085     (proxy.config.log.collation_port)
-    Secret ----------------- foobar   (proxy.config.log.collation_secret)
-    Host Tagged ------------ off      (proxy.config.log.collation_host_tagged)
-    Space Limit for Orphan Files -- 25 MB   (proxy.config.log.max_space_mb_for_orphan_logs)
-
-  Squid Format ---- on             (proxy.config.log.squid_log_enabled)
-    File Type ----- ASCII          (proxy.config.log.squid_log_is_ascii)
-    File Name ----- squid          (proxy.config.log.squid_log_name)
-    File Header --- NULL           (proxy.config.log.squid_log_header)
-
-  Netscape Common -- off         (proxy.config.log.common_log_enabled)
-    File Type ------ ASCII       (proxy.config.log.common_log_is_ascii)
-    File Name ------ common      (proxy.config.log.common_log_name)
-    File Header ---- NULL        (proxy.config.log.common_log_header)
-
-  Netscape Extended -- off       (proxy.config.log.extended_log_enabled)
-    File Type -------- ASCII     (proxy.config.log.extended_log_is_ascii)
-    File Name -------- extended  (proxy.config.log.extended_log_name)
-    File Header ------ NULL      (proxy.config.log.extended_log_header)
-
-  Netscape Extended2 -- off       (proxy.config.log.extended2_log_enabled)
-    File Type --------- ASCII     (proxy.config.log.extended2_log_is_ascii)
-    File Name --------- extended2 (proxy.config.log.extended2_log_name)
-    File Header ------- NULL      (proxy.config.log.extended2_log_header)
-
-  Splitting
-    ICP Log Splitting -- off        (proxy.config.log.separate_icp_logs)
-    HTTP Host Log Splitting -- off  (proxy.config.log.separate_host_logs)
-
-  Custom Logs -- off              (proxy.config.log.custom_logs_enabled)
-
-  Rolling -------- on               (proxy.config.log.rolling_enabled)
-    Roll Offset Hour --- 0          (proxy.config.log.rolling_offset_hr)
-    Roll Interval ------ 86400 s               (proxy.config.log.rolling_interval_sec)
-  Auto-delete rolled files when space is low -- on  (proxy.config.log.auto_delete_rolled_files)
-  ts>
-
-ssl			SSL Ports
-  syntax: show:ssl
-  args:   none
-  behavior:  Display SSL Port related configuration.
-
-  ts> show:ssl
-  Restrict CONNECT connections to Ports -- 443 563   (proxy.config.http.connect_ports)
-  ts>
-
-parent			Parent Configuration
-			(on/off, parents, rules)
-  syntax: show:parent
-  args:   none
-  behavior:  Display Parent Configuration.
-
-  ts> show:parent
-  Parent Caching: OFF    (proxy.config.http.parent_proxy_routing_enable)
-  Parent Cache:   NONE   (proxy.config.http.parent_proxies)
-  ts>
-
-  syntax: show:parent rules
-  behavior: Display Parent configuration rules file.
-
-  ts> show:parent rules
-  parent.config rules
-  -------------------
-  Display rules from parent.config
-  ts>
-
-remap			Remap Rules
-  syntax: show:remap
-  args:   none
-  behavior:  Display remap configuration.
-
-  ts> show:remap
-  remap.config rules
-  ------------------
-  (Display rules from remap.config)
-  ts>
-
-socks			SOCKS Configuration
-			(on/off, stats)
-  syntax: show:socks [ rules ]
-  args:   none
-  behavior:  Display SOCKS Configuration.
-
-  ts> show:socks
-  SOCKS -------------------- off      (proxy.config.socks.socks_needed)
-  SOCKS Default Servers ---- x.x.x.x  (proxy.config.socks.default_servers)
-  SOCKS Accept Port -------- 1080     (proxy.config.socks.accept_port)
-  SOCKS HTTP Port ---------- 80       (proxy.config.socks.http_port)
-  SOCKS Timeout ------------ 100 s    (proxy.config.socks.socks_timeout)
-  ts>
-
-  ts> show:socks rules
-  socks.config rules
-  ------------------
-  (Display socks.config rules)
-  ts>
-
-port-tunnels		Port Tunnelling Configuration
-
-  syntax: show:port-tunnels 
-
-  ts# show:port-tunnels
- 
-  server-other-ports -- 7890
-  
-  To view the corresponding rule of the remap.config file in the following format
-      map tunnel://<proxy_ip>:<port_num>/tunnel://<dest_server>:<dest_port>
-      Use show:remap
-
-scheduled-update        Scheduled Update Configuration
-  syntax: show:scheduled-update [ rules ]
-  args:   show update.config file
-  behavior:  Display Scheduled Update Configuration.
-
-  ts> show:scheduled-update
-  Scheduled Update -------------- on   (proxy.config.update.enabled)
-  Update Error Retry Count ------ 10   (proxy.config.update.retry_count)
-  Update Error Retry Interval --- 2 s  (proxy.config.update.retry_interval)
-  Maximum Concurrent Updates ---- 100  (proxy.config.update.concurrent_updates)
-  Force Immediate Update -------- off  (proxy.config.update.force)
-  ts>
-
-  ts> show:scheduled-update rules
-  update.config rules
-  ------------------- 
-  (Display list of rules from update.config)
-  ts>
-
-
-Status subcommands
-------------------
-Parameter		Description
------------------------------------
-proxy-stats		Proxy Vital Stats 
-			oldCLI->root->monitor->node
-			(hit rate, bandwidth savings, open connections)
-  syntax: show:proxy-stats
-  args:   none
-  behavior:  Display statistics related to the overall proxy.
-
-  ts> show:proxy-stats
-  Document Hit Rate ------------ 0% *    (proxy.node.cache_hit_ratio)
-  Bandwidth Savings ------------ 0% *    (proxy.node.bandwidth_hit_ratio)
-  Cache Percent Free ----------- 0%      (proxy.node.cache.percent_free)
-
-  Open Server Connections ------ 0       (proxy.node.current_server_connections)
-  Open Client Connections ------ 0       (proxy.node.current_client_connections)
-  Cache Transfers In Progress -- 0       (proxy.node.current_cache_connections)
-
-  Client Throughput ------------ 0.00 MBit/Sec  (proxy.node.client_throughput_out)
-  Transactions Per Second ------ 0       (proxy.node.user_agent_xacts_per_second)
-
-  * Value represents 10 second average.
-  ts>
-
-http-trans-stats	HTTP Transaction Summary
-			(hits, misses, aborts, other)
-			oldCLI->root->monitor->protocols->http-trans
-  syntax: show:http-trans-state
-  args:   none
-  behavior:  Display statistics related to HTTP transactions.
-
-  ts> show:http-trans-stats
-  HTTP Transaction Frequency and Speeds     (proxy.node.http.transaction_*)
-  Transaction Type              Frequency  Speed (ms)
-  --Hits--
-  Fresh ----------------------- 0%         0    (frac_avg_10s.hit_fresh, 
-                                                 msec_avg_10s.hit_fresh)
-  Stale Revalidated ----------- 0%         0    (frac_avg_10s.hit_revalidated, 
-                                                 msec_avg_10s.hit_revalidated)
-  --Misses--
-  Now Cached ------------------ 0%         0    (frac_avg_10s.miss_cold, 
-                                                 msec_avg_10s.miss_cold)
-  Server No Cache ------------- 0%         0    (frac_avg_10s.miss_not_cacheable, 
-                                                 msec_avg_10s.miss_not_cacheable)
-  Stale Reloaded -------------- 0%         0    (frac_avg_10s.miss_changed, 
-                                                 msec_avg_10s.miss_changed)
-  Client No Cache ------------- 0%         0    (frac_avg_10s.miss_client_no_cache, 
-                                                 msec_avg_10s.miss_client_no_cache)
-  --Errors--
-  Connection Failures --------- 0%         0    (frac_avg_10s.errors.connect_failed,
-                                                 msec_avg_10s.errors.connect_failed)
-  Other Errors ---------------- 0%         0    (frac_avg_10s.errors.other,
-                                                 msec_avg_10s.errors.other)
-  --Aborted Transactions--
-  Client Aborts --------------- 0%         0    (frac_avg_10s.errors.aborts,
-                                                 msec_avg_10s.errors.aborts)
-  Questionable Client Aborts -- 0%         0    (frac_avg_10s.errors.possible_aborts,
-                                                 msec_avg_10s.errors.possible_aborts)
-  Partial Request Hangups ----- 0%         0    (frac_avg_10s.errors.early_hangups,
-                                                 msec_avg_10s.errors.early_hangups)
-  Pre-Request Hangups --------- 0%         0    (frac_avg_10s.errors.empty_hangups,
-                                                 msec_avg_10s.errors.empty_hangups)
-  Pre-Connect Hangups --------- 0%         0    (frac_avg_10s.errors.pre_accept_hangups,
-                                                 msec_avg_10s.errors.pre_accept_hangups)
-  --Other Transactions--
-  Unclassified ---------------- 0%         0    (frac_avg_10s.other.unclassified,
-                                                 msec_avg_10s.other.unclassified)  
-  ts>
-
-http-stats		HTTP Protocol Summary
-			oldCLI->root->monitor->protocols->http
-  syntax: show:http-stats
-  args:   none
-  behavior:  Display HTTP Protocol statistics.
-
-  ts> show:http-stats
-  --Client--                          (proxy.process.http.*)
-  Total Document Bytes ------ 150.5 MB  (user_agent_response_document_total_size)
-  Total Header Bytes -------- 23.5 MB   (user_agent_response_header_total_size)
-  Total Connections --------- 0         (current_client_connections)
-  Transactions In Progress -- 0         (current_client_transactions)
-  --Server--
-  Total Document Bytes ------ 150.4 MB  (origin_server_response_document_total_size)
-  Total Header Bytes -------- 16.3 MB   (origin_server_response_header_total_size)
-  Total Connections --------- 0         (current_server_connections)
-  Transactions In Progress -- 0         (current_server_transactions)
-  ts>
-
-icp-stats		ICP Statistics
-  syntax: show:icp-stats
-  args:   none
-  behavior:  Display ICP statistics.
-
-  ts> show:icp-stats
-  --Queries Originating From This Node--      (proxy.process.icp.*)
-  Query Requests ------------------------------ 0    (icp_query_requests)
-  Query Messages Sent ------------------------- 0    (total_udp_send_queries)
-  Peer Hit Messages Received ------------------ 0    (icp_query_hits)
-  Peer Miss Messages Received ----------------- 0    (icp_query_misses)
-  Total Responses Received -------------------- 0    (icp_remote_responses)
-  Average ICP Message Response Time ----------- 0.00 ms (total_icp_response_time)
-  Average ICP Request Time -------------------- 0.00 ms (total_icp_request_time)
-  --Queries Originating from ICP Peers--
-  Query Messages Received --------------------- 0    (icp_remote_query_requests)
-  Remote Query Hits --------------------------- 0    (cache_lookup_success)
-  Remote Query Misses ------------------------- 0    (cache_lookup_fail)
-  Successful Response Messages Sent to Peers -- 0  (query_response_write)
-  ts>
-
-cache-stats		Overall Cache Statistics
-			oldCLI->root->monitor->cache
-  syntax: show:cache-stats
-  args:   none
-  behavior:  Display overall cache statistics.
-
-  ts> show:cache-stats     (proxy.process.cache.*)
-  Bytes Used --- 42.3 GB     (bytes_used)
-  Cache Size --- 42.4 GB     (bytes_total)
-  --RAM Cache--
-  Bytes -------- 45443072  (ram_cache.bytes)
-  Hits --------- 31339939  (ram_cache.hits)
-  Misses ------- 18382137  (ram_cache.misses)
-  --Lookups--
-  In Progress -- 0           (lookup.active)
-  Hits --------- 0           (lookup.success)
-  Misses ------- 0           (lookup.failure)
-  --Reads--
-  In Progress -- 0           (read.active)
-  Hits --------- 30116923  (read.success)
-  Misses ------- 26817128  (read.failure)
-  --Writes--
-  In Progress -- 1           (write.active)
-  Successes ---- 25354918  (write.success)
-  Failures ----- 75520      (write.failure)
-  --Updates--
-  In Progress -- 0           (update.active)
-  Successes ---- 101888     (update.success)
-  Failures ----- 1753       (update.failure)
-  --Removes--
-  In Progress -- 0           (remove.active)
-  Successes ---- 0           (remove.success)
-  Failures ----- 0           (remove.failure)
-  ts>
-
-hostdb-stats		Host Database Statistics
-  syntax: show:hostdb-stats
-  args:   none
-  behavior:  Display Host Database statistics.
-
-  ts> show:hostdb-stats
-  Host Database Hit Rate -- 100% *  (proxy.node.hostdb.hit_ratio)
-  DNS Lookups Per Second -- 0.00    (proxy.node.dns.lookups_per_second)
-
-  *Value represents 10 second average.
-  ts>
-
-dns-stats		DNS Statistics
-  syntax: show:dns-stats
-  args:   none
-  behavior:  Display DNS statistics.
-
-  ts> show:dns-stats
-  DNS Lookups Per Second -- 0.00    (proxy.node.dns.lookups_per_second)
-  ts>
-
-logging-stats		Logging Statistics
-  syntax: show:logging-stats
-  args:   none
-  behavior:  Display Logging statistics.
-
-  ts> show:logging-stats
-  Currently Open Log Files --------- 0       (proxy.process.log.log_files_open)
-  Space Used For Log Files --------- 0       (proxy.process.log.log_files_space_used)
-  Number of Access Events Logged --- 0       (proxy.process.log.event_log_access)
-  Number of Access Events Skipped -- 0       (proxy.process.log.event_log_access_skip)
-  Number of Error Events Logged ---- 0       (proxy.process.log.event_log_error)
-  ts>
-
-network                Network Settings
-   syntax:  show:network
-   args:    none
-   behavior:  Display information about different Network Parameters
-
-   traffic_shell> show:network 
-
-   Hostname ---------------- foo.example.com
-   Default Gateway --------- 192.168.0.1
-   Search Domain ----------- example.com
-   DNS IP Addresses--------- 192.168.0.2
-
-   NIC eth0
-     Status ---------------- up
-     Start on Boot --------- onboot
-     Start Protocol -------- none
-     IP Address ------------ 192.168.0.10
-     Netmask --------------- 255.255.255.0
-     Gateway --------------- default
-
-   NIC eth1
-     Status ---------------- up
-     Start on Boot --------- onboot
-     Start Protocol -------- none
-     IP Address ------------ 192.168.0.11
-     Netmask --------------- 255.255.255.0
-     Gateway --------------- default
-
-   traffic_shell> 
-
-
-Configure submodes (from Enable mode)
-
-Some config commands require hard restart or restart for changes to take effect.
-In these cases, one of the following messages will appear onscreen.
-
-Restart required.
-  Change will take effect after next Restart.
-  Use the "config:restart" command to restart now.
-
-Hard Restart required.
-  Change will take effect after next Hard Restart.
-  Use the "config:hard-restart" command to restart now.
-
--------------------------------------
-Parameter		Description
------------------------------------
-get			Get records.config variable value
-  syntax: config:get <variable>
-  args:   <variable> = variable from records.config
-  behavior:  Retrieve and display the variable from records.config.
-
-  ts# config:get proxy.config.http.server_port
-  proxy.config.http.server_port = 8080
-  ts#
-
-set			Set records.config variable value
-  syntax: config:set <variable> <value>
-  args:   <variable> = variable from records.config
-          <value> = value of variable
-  behavior:  Set the variable from records.config to the specified value.
-
-  ts# config:set proxy.config.http.server_port 8080
-  +OK
-  ts#
-
-name			Proxy Name
-  syntax: config:name <proxyname>
-  args:   <proxyname> = name of proxy
-  behavior:  Set proxyname to <proxyname>
-
-  ts# config:name config1
-  +OK
-  ts#
-
-  ts# config:name
-  config1
-  ts#
-
-write			Write Upgrade File (IFC file)
-  syntax: config:write ifc-head ts-version <ts_version> build-date <date> platform <platform> nodes <no_of_nodes> 
-	  config:write feature <feature-string>
-	  config:write tar <tarfilelist>
-	  config:write tar-info <tarball-name> filelist <filelist>
-	  config:write tar-common <filelist>
-	  config:write bin-dir <dir-file-lists> 
-	  config:write bin-group <filelist>
-	  config:write bin-common <filelist>
-	  config:write lib-dir <dir-file-lists>
-	  config:write lib-group <filelist>
-	  config:write lib-common <filelist> 
-	  config:write config-dir <dir-file-filelists>
-	  config:write config-group <filelist>
-	  config:write config-common <filelist>
-	  config:write common <filelist>
-  args: 
-	<ts_version> = <int>.<int>.<int>
-	<date> = <mm>:<dd>:<yy>
-	<platform> = <string>
-	<no_of_nodes> = -1 (default) | 0 (single node) | n (n+1 nodes)
-	<feature-string> = <string>
-        <filelists> = list of files, separated by ,
-	<dir-file-filelists> =  list of subdirectory, followed by filelists in each subdirectory. Subdirectories are separated by ; and file lists are separated by ,
-	
-behavior: Write the text IFC file according to the current install status.
-
-
-read			Read Update File
-  syntax: config:read path <path> file <filename> 
-  args: <path> = <string>
-	<filename> = <string>
-
-behavior: Read the upgrade file and display it. For debugging purpose only.
-	
-reset-stats		Reset Statistics
-  syntax: config:reset-stats
-  args:   none
-  behavior:  Reset all statistics.
-
-  ts# config:reset-stats
-  +OK
-  ts#
-
-http			HTTP Configuration
-			(timeout values, headers, authorization)
-  syntax: config:http status <on | off>
-  record: (proxy.config.http.cache.http)
-    
-    ts# config:http status on
-    ts#
-
-  syntax: config:http <timeout> <seconds>
-  args:   <timeout> can be one of the following
-          keep-alive-timeout-in    (proxy.config.http.keep_alive_no_activity_timeout_in)
-          keep-alive-timeout-out   (proxy.config.http.keep_alive_no_activity_timeout_out)
-          inactive-timeout-in      (proxy.config.http.transaction_no_activity_timeout_in)
-          inactive-timeout-out     (proxy.config.http.transaction_no_activity_timeout_out)
-          active-timeout-in        (proxy.config.http.transaction_active_timeout_in)
-          active-timeout-out       (proxy.config.http.transaction_active_timeout_out)
-
-    ts# config:http keep-alive-timeout-in 10
-    ts#
-          
-  syntax: config:http <remove-from | remove-referer | remove-user | remove-cookie> <on | off>
-  behavior: remove the specified header
-  args:   <remove-from>            (proxy.config.http.anonymize_remove_from)
-          <remove-referer>         (proxy.config.http.anonymize_remove_referer)
-          <remove-user>            (proxy.config.http.anonymize_remove_user_agent)
-          (remove-cookie>          (proxy.config.http.anonymize_remove_cookie)
-
-    ts# config:http remove-from on
-    ts#
-
-  syntax: config:http remove-header <headers>
-  behavior: remove headers specified in list of headers
-  args:     <headers>              (proxy.config.http.anonymize_other_header_list)
-
-    ts# config:http remove-header "field1 field2"
-    ts#
-
-  syntax: config:http <insert-ip | remove-ip> <on | off>
-  behavior: insert or remove client IP from header
-  args:     <insert-ip>            (proxy.config.http.anonymize_insert_client_ip)
-            <remove-ip>            (proxy.config.http.anonymize_remove_client_ip)
-
-  syntax: config:http proxy <fwd | rev | fwd-rev>
-  behavior: enable http proxying in fwd/rev/fwd-rev modes
-
-    ts# config:http proxy
-    fwd
-    ts# config:http proxy rev
-    ts#
-
-
-ssl			SSL Configuration
-                        (on,off,port)
-  syntax: config:ssl status <on | off>
-  record: (proxy.config.ssl.enabled)
-
-    ts# config:ssl status on
-    ts# config:ssl status off
-
-  syntax: config:ssl port <portnum>
-  record: (proxy.config.ssl.server_port)
-    
-    ts# config:ssl port 1234
-    ts#
-   
-
-icp			ICP Configuration
-			(on/off, rules, port, timeouts)
-  syntax: config:icp mode <receive | send-receive | disabled>
-  record: (proxy.config.icp.enabled value)
-          receive = 1, send-receive = 2, disabled = 0
-
-    ts# config:icp mode receive
-    ts#
-
-  syntax: config:icp port <portnum>
-  record: (proxy.config.icp.icp_port)
-
-    ts# config:icp port 3130
-    ts#
-
-  syntax: config:icp multicast <on | off>
-  record: (proxy.config.icp.multicast_enabled)
-  
-    ts# config:icp multicast on
-    ts#
-
-  syntax: config:icp query-timeout <seconds>
-  record: (proxy.config.icp.query_timeout)
-  
-    ts# config:icp query-timeout 2
-    ts#
-
-  syntax: config:icp peers <url>
-  behavior: Retrieve icp.config file from URL.
-
-    ts# config:icp peers http://example.com/icp.config
-    ts#
-
-cache			Cache Configuration
-			(active protocols, bypass, storage, freshness, 
-                         expires, variable content, rules, clear)
-  syntax: config:cache <protocol> <on | off>
-  args:   <protocol> = <http>
-          <on | off> specifies the given protocol is cached
-  behavior:  Enable/Disable caching of various protocols.
-
-    ts# config:cache http on      (proxy.config.http.cache.http)
-    +OK
-    ts#
-
-    ts# config:cache http
-    on
-    ts#
-
-  syntax: config:cache cluster-bypass <on | off>
-  args:   <on | off> turn cluster-bypass on/off.
-  
-    ts# config:cache cluster-bypass on   (proxy.config.http.cache.cluster_cache_local)
-    +OK
-    ts#
-
-    ts# config:cache cluster-bypass
-    on
-    ts#
-
-  syntax: config:cache ignore-bypass <on | off>
-  args:   <on | off> turn ignore-bypass on/off.
-  
-    ts# config:cache ignore-bypass on   (proxy.config.http.cache.ignore_client_no_cache)
-    +OK
-    ts#
-
-    ts# config:cache ignore-bypass
-    on
-    ts#
-
-  syntax: config:cache max-object-size <bytes>
-  args:   if bytes=0 then there is no maximum
-
-    ts# config:cache max-object-size 0  (proxy.config.cache.max_doc_size)
-    +OK
-    ts#
-
-    ts# config:cache max-object-size
-    0
-    ts#
-
-  syntax: config:cache max-alternates <num>
-  args:   if num=0 then there is no maximum
-
-    ts# config:cache max-alternates 0
-    +OK
-    ts#
-
-    ts# config:cache max-alternates
-    0
-    ts#
-
-  syntax: config:cache file [url]
-  args:   [url] = location of remote cache.config file
-  behavior:  Retrieve and install cache.config file from URL.
-
-    ts# config:cache file http://example.com/cache.config
-    +OK
-    ts#
-
-  syntax: config:cache freshness verify <when-expired | no-date | always | never>
-  records.config: proxy.config.http.cache.when_to_revalidate
-  args: when-expired = 0, no-date=1, always=2, never=3
-
-    ts# config:cache freshness verify when-expired
-    +OK
-    ts#
-
-  syntax: config:cache freshness minimum <explicit | last-modified | nothing>
-  records.config: proxy.config.http.cache.required_headers
-  args:   explicit = 2, last-modified = 1, nothing = 0
-
-    ts# config:cache freshness minimum explicit
-    +OK
-    ts#
-
-  syntax: config:cache freshness no-expire-limit greater-than <seconds> less-than <seconds>
-  records.config: proxy.config.http.cache.heuristic_min_lifetime, heuristic_max_lifetime
-  args:   <seconds> is an integer
-
-    ts# config:cache freshness no-expire-limit greater-than 900 less-than 7200
-    +OK
-    ts#
-
-  syntax: config:cache dynamic <on | off>
-  records: proxy.config.http.cache.cache_urls_that_look_dynamic
-  
-    ts# config:cache dynamic on
-    +OK
-    ts#
-
-  syntax: config:cache alternates <on | off>
-  records: proxy.config.http.cache.enable_default_vary_headers
-
-    ts# config:cache alternates on
-    +OK
-    ts#
-
-  syntax: config:cache vary <text | images | other> <field>
-  records: proxy.config.http.cache.vary_default_(text,images,other)
-  args:   <field> is a string
-
-    ts# config:cache vary text Cookie
-    +OK
-    ts#
-
-  syntax: config:cache cookies <none | all | images | non-text>
-  records: proxy.config.http.cache.cache_responses_to_cookies
-  args: none = 0, all = 1, images = 2, non-text = 3
-
-    ts# config:cache cookies none
-    +OK
-    ts#
-
-  syntax: config:cache clear (clear cache and start traffic server)
-  args: none
-
-   ts# config:cache clear
-   Traffic Server is running.
-   Clear Cache failed.
-   ts# config:cache clear
-   +OK
-
-
-hostdb			Host Database Configuration
-  syntax:  config:hostdb lookup-timeout <seconds>
-  records: proxy.config.hostdb.lookup_timeout
-
-    ts# config:hostdb lookup-timeout 30
-    +OK
-    ts#
-
-  syntax:  config:hostdb foreground-timeout <seconds>
-  records: proxy.config.hostdb.timeout (seconds)
-
-    ts# config:hostdb foreground-timeout 12
-    +OK
-    ts#
-
-  syntax:  config:hostdb background-timeout <seconds>
-  records: proxy.config.hostdb.verify_after 24
-
-    ts# config:hostdb background-timeout 24
-    +OK
-    ts#
-
-  syntax:  config:hostdb invalid-host-timeout <seconds>
-  records: proxy.config.hostdb.fail.timeout
-
-    ts# config:hostdb invalid-host-timeout 30
-    +OK
-    ts#
-
-  syntax:  config:hostdb re-dns-on-reload <on | off>
-  records: proxy.config.hostdb.re_dns_on_reload
-
-    ts# config:hostdb re-dns-on-reload on
-    +OK
-    ts#
-
-  syntax: config:hostdb clear  (clear hostdb and start traffic server)
-  args: none
-
-   ts# config:hostdb clear
-   Traffic Server is running.
-   Clear HostDB failed.
-
-   ts# config:hostdb clear 
-   +OK
-   ts#
-
-dns			DNS Configuration
-  syntax:  config:dns resolve-timeout <seconds>
-  records: proxy.config.dns.lookup_timeout
-
-    ts# config:dns resolve-timeout 10
-    +OK
-    ts#
-
-  syntax:  config:dns retries <number>
-  records: proxy.config.dns.retries
-
-    ts# config:dns retries 3
-    +OK
-    ts#
-
-logging			Logging Configuration
-  syntax:  config:logging event <enabled | trans-only | error-only | disabled>
-  records: proxy.config.log.logging_enabled
-
-    ts# config:logging event enabled
-    +OK
-    ts#
-
-    ts# config:logging event
-    enabled
-    ts#
-
-  syntax:  config:logging mgmt-directory <dir>
-  records: proxy.config.log.logfile_dir
-
-    ts# config:logging mgmt-directory /usr/local/var/log/trafficserver
-    +OK
-    ts#
-
-  syntax:  config:logging space-limit <mb>
-  args:    <mb> = log space limit (MB)
-  records: proxy.config.log.max_space_mb_for_logs
-
-    ts# config:logging space-limit 10
-    +OK
-    ts#
-
-  syntax:  config:logging space-headroom <mb>
-  args:    <mb> = log space headroom (MB)
-  records: proxy.config.log.max_space_mb_headroom
-
-    ts# config:logging space-headroom 100
-    +OK
-    ts#
-
-  syntax:  config:logging collation-status <inactive | host | send-standard | send-custom | send-all>
-  args:    inactive = 0, host = 1, send-standard = 2, send-custom = 3, send-all = 4
-  records: proxy.local.log.collation_mode
-
-    ts# config:logging collation-status inactive
-    +OK
-    ts#
-
-    ts# config:log collation-status send-custom 
-    +OK
-    ts#
-
-  syntax:  config:logging collation-host <host>
-  args:    <host> is a remote collation host
-  records: proxy.config.log.collation_host
-
-    ts# config:log collation-host config1
-    +OK
-    ts#
-
-  syntax:  config:logging collation secret <secret> tagged <on | off> orphan-limit <orphan>
-  args:    <secret> = string
-           <orphan> = size in MB
-  records: <secret> = proxy.config.log.collation_port
-           tagged   = proxy.config.log.collation_host_tagged
-           <orphan> = proxy.config.log.collation_secret
-
-    ts# config:logging collation secret foobar tagged on orphan-limit 10
-    +OK
-    ts#
-
-  syntax:  config:logging format <squid | netscape-common | netscape-ext | netscape-ext2> 
-                  <on | off> type <ascii | binary> file <file> header <header>
-
-  squid
-    args:    <on | off> = proxy.config.log.squid_log_enabled
-             type       = proxy.config.log.squid_log_is_ascii <ascii=1, binary=0>
-             file       = proxy.config.log.squid_log_name
-             header     = proxy.config.log.squid_log_header
-  netscape-common
-    args:    <on | off> = proxy.config.log.common_log_enabled
-             type       = proxy.config.log.common_log_is_ascii <ascii=1, binary=0>
-             file       = proxy.config.log.common_log_name
-             header     = proxy.config.log.common_log_header
-  netscape-ext
-    args:    <on | off> = proxy.config.log.extended_log_enabled
-             type       = proxy.config.log.extended_log_is_ascii <ascii=1, binary=0>
-             file       = proxy.config.log.extended_log_name
-             header     = proxy.config.log.extended_log_header
-  netscape-ext2
-    args:    <on | off> = proxy.config.log.extended2_log_enabled
-             type       = proxy.config.log.extended2_log_is_ascii <ascii=1, binary=0>
-             file       = proxy.config.log.extended2_log_name
-             header     = proxy.config.log.extended2_log_header
-
-    ts# config:log format squid on type ascii file squid.log
-    +OK
-    ts#
-
-  syntax:  config:logging splitting <icp | http> <on | off>
-  records:  proxy.config.log.separate_icp_logs  <icp>
-            proxy.config.log.separate_host_logs <http>
-
-    ts# config:log split icp on
-    +OK
-    ts#
-
-  syntax:  config:logging custom <on | off> format <traditional | xml>
-  records:  proxy.config.log.custom_logs_enabled
-
-    ts# config:logging custom on format xml
-    +OK
-    ts#
-
-  syntax:  config:logging rolling <on | off> offset <hour> interval <num-hours> auto-delete <on | off>
-  records: proxy.config.log.rolling_enabled
-           proxy.config.log.rolling_offset_hr (24hour format)
-           proxy.config.log.rolling_interval_sec (seconds)
-
-    ts# config:logging rolling on offset 0 interval 1 auto-delete off
-    +OK
-    ts#
-
-ssl			SSL Ports
-
-security		Security Configuration
-			(TS IP allow, MGMT allow, Admin Access)
-  syntax: config:security ip-allow <url>
-  
-    ts# config:security ip-allow http://example.com/ip_allow.config
-    ts#
-
-  syntax: config:security admin <url>
-
-    ts# config:parent status on 
-    ts#
-
-    ts# config:parent name parent.example.com
-    ts#
-
-    ts# config:parent rules http://example.com/parent.config
-    ts#
-
-remap			Remap Rules
-  syntax: config:remap <url>
-  args:   <url> = retrieve file and use as remap.config
-
-    ts# config:remap http://example.com/remap.config
-    ts#
-
-ports			Ports used by Traffic Server
-*** config:ports command is not implemented or supported ***
-			(including mgmt port)
-  syntax: config:ports <http-server | http-other | webui | cluster
-                        cluster-rs | cluster-mc |
-                        ssl | socks-server | icp> <port | ports>
-  args:   some variables are single-port while other can be a list of ports
-          <http-server>     (proxy.config.http.server_port) single
-          <cluster>         (proxy.config.cluster_port) single
-          <cluster-rs>      (proxy.config.cluster.rsport) single
-          <cluster-mc>      (proxy.config.cluster.mcport) single
-          <connect>         (proxy.config.http.connect_ports) list
-          <socks-server>    (proxy.config.socks.socks_server_port) single
-          <icp>             (proxy.config.icp.icp_port) single
-
-socks			SOCKS Configuration
-  syntax: config:socks status <on | off> version <int> default-servers <string> 
-                       accept <on | off> accept-port <port> 
-  args:   socks            (proxy.config.socks_socks_needed)
-          version          (proxy.config.socks.socks_version)
-          default-servers  (proxy.config.socks.default_servers)
-          accept           (proxy.config.socks.accept_enabled)
-          accept-port      (proxy.config.socks.accept_port)
-
-  ts# config:socks status on 
-  ts#
-  ts# config:socks version 4
-  ts#
-  ts# config:socks default-servers "s1.example.com:1080;socks2:4080"
-  ts#
-  ts# config:socks accept on
-  ts#
-  ts# config:socks accept-port 1080 
-  ts#
-
-
-
-scheduled-update        Scheduled Update Configuration
-  syntax: config:scheduled-update status <on | off>
-                                  retry-count <int>
-                                  retry-interval <sec>
-				  max-concurrent <value>
-				  force-immediate <on | off>
-				  rules <url>
-
-  args:   config update.config file
-  behavior: Scheduled Update Configuration.
-
-  ts> config:scheduled-update on
-  ts>
-
-  ts> config:scheduled-update retry-count 10 
-  ts>
-
-  ts> config:scheduled-update retry-interval 2
-
-  ts> config:scheduled-update force-immediate off
-  ts>
-
-  ts> config:scheduled-update rules http://example.com
-
-  ts> config:scheduled-update rules
-  update.config rules
-  ------------------- 
-  (Display list of rules from update.config)
-  ts>
-
-
-Appliance-Specific commands (Linux only)
-========================================
-
-Normal Mode
------------
-  ping		Send ICMP ECHO_REQUEST packets to host.
-    syntax: ping <host>
-    args:   hostname
-
-    ts> ping foo
-    foo is alive
-    ts>
-
-  traceroute    Display the route packets take to host.
-    syntax: traceroute <host>
-    args:   hostname
-
-    ts> traceroute foo
-    Traceroute output appears here...
-    ts>
-
-Configure Mode
---------------
-
-config:network	Make System Network configuration changes
-
-   traffic_shell> config:network
-
-   Command Syntax: 
-   config:network hostname <string>
-   config:network defaultrouter <x.x.x.x>
-   config:network search-domain <string>
-   config:network dns [a.a.a.a] [b.b.b.b] [c.c.c.c]
-   config:network int <interface>
-   config:network int <interface> down
-   config:network int <interface> up <onboot | not-onboot>
-                 <static | dhcp> <ip> <netmask> <gateway>
-   config:network int <interface> <onboot | not-onboot>
-   config:network int <interface> <static | dhcp>
-   config:network int <interface> ip <x.x.x.x>
-   config:network int <interface> netmask <x.x.x.x>
-   config:network int <interface> gateway <x.x.x.x | default>
-
-   traffic_shell> 
-
-  hostname      Specify appliance hostname
-    syntax: config:network hostname <name>
-    ts# config:network hostname xxxx
-    ts# config:network hostname
-    xxxx
-    ts#
-
-  defaultrouter  Specify default router
-    syntax: config:network defaultrouter <x.x.x.x>
-
-    ts# config:network defaultrouter x.x.x.x
-    ts# config:network defaultrouter
-    x.x.x.x
-    ts#
-
-  search-domain  Specify DNS search domain
-    syntax: config:network search-domain <x.x.x.x>
-
-    ts# config:network search-domain example.com
-    ts# config:network search-domain
-    example.com
-    ts#
-
-  dns		Specify one or more DNS servers
-    syntax: config:network dns <string of IP addresses>
-
-    ts# config:network dns "192.168.0.2 192.168.0.3"
-    ts# config:network dns
-    192.168.0.2 192.168.0.3
-    ts#
-
-  int		Configure Network Interface Card
-
-	config:network int
-		List network interface cards by name.
-
-	config:network int <interface>
-		Display NIC configuration.
-
-	config:network int <interface> down
-		Bring down the specified interface.
-
-	config:network int <interface> up <onboot | not-onboot>
-			   <static | dhcp> <ip> <netmask> <gateway>
-		Bring up a NIC with the specified parameters.
-
-	config:network int <interface> <onboot | not-onboot>
-		Change the boot start status of a NIC that is already up.
-
-	config:network int <interface> <static | dhcp>
-		Change the static/dhcp status of a NIC that is already up.
-
-	config:network int <interface> ip <x.x.x.x>
-		Change the IP address of a NIC that is already up.
-
-	config:network int <interface> netmask <x.x.x.x>
-		Change the netmask of a NIC that is already up.
-
-	config:network int <interface> gateway <x.x.x.x | default>
-		Change the gateway of a NIC that is already up.
-
-   traffic_shell> config:network int     
-   eth0
-   eth1
-   traffic_shell> config:network int eth0
-
-   NIC eth0
-     Status -------------- up
-     Start on Boot ------- onboot
-     Start Protocol ------ none
-     IP Address ---------- 192.168.0.10
-     Netmask ------------- 255.255.255.0
-     Gateway ------------- default
-
-   traffic_shell> 
-    
-
-  date		Specify system date.
-    syntax: config:clock date <date>
-    args:   <date> = mm/dd/yyyy
-
-    ts# config:clock date 01/01/2001
-    ts# config:clock date
-    01/01/2001
-    ts#
-  
-  time		Specify system time.
-    syntax: config time <time>
-    args:   <time> = hh:mm:ss
-
-    ts# config:clock time 14:00:00
-    ts# config:clock time
-    14:00:03
-    ts#
-
-  timezone	Specify time zone.
-    syntax: config:clock timezone [zone | list]
-    args:   [zone] optional time zone from numbered list
-            if not present, display current time zones
-	    [list] display list of time zone
-
-    ts# config:clock timezone
-    Display numbered current timezones.
-
-    ts# config:clock timezone 3
-    ts#
-    
-    ts# config:clock timezone list
-    Display list of time zone. (85 in total currently)
-
-  halt		Halt appliance.
-    syntax: halt
-
-    ts# halt
-
-  reboot	Reboot appliance.
-    syntax: reboot
-
-    ts# reboot


[6/7] TS-1665 Remove traffic_shell

Posted by zw...@apache.org.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/ConfigCmd.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/ConfigCmd.cc b/cmd/traffic_shell/ConfigCmd.cc
deleted file mode 100644
index e171035..0000000
--- a/cmd/traffic_shell/ConfigCmd.cc
+++ /dev/null
@@ -1,4156 +0,0 @@
-/** @file
-
-  This file contains the CLI's "config" command implementation.
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- 
-  @section description createArgument("timezone",1,CLI_ARGV_OPTION_INT_VALUE,
-		  (char*)NULL, CMD_CONFIG_TIMEZONE, "Time Zone",
-                  (char*)NULL);
- */
-
-
-#include "libts.h"
-#include "I_Layout.h"
-#include "mgmtapi.h"
-#include "ShowCmd.h"
-#include "ConfigCmd.h"
-#include "createArgument.h"
-#include "CliMgmtUtils.h"
-#include "CliDisplay.h"
-// TODO: Remove all those system defines
-//       and protecect them via #ifdef HAVE_FOO_H
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <termios.h>
-#include <stdarg.h>
-#include <sys/ioctl.h>
-#include <time.h>
-#include <sys/time.h>
-#include <string.h>
-#include <unistd.h>
-#include <limits.h>
-#include <sys/wait.h>
-#include <errno.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-
-bool enable_restricted_commands = false;
-
-int
-u_getch(void)
-{
-  static signed int returned = (-1), fd;
-  static struct termios new_io_settings, old_io_settings;
-  fd = fileno(stdin);
-  tcgetattr(fd, &old_io_settings);
-  new_io_settings = old_io_settings;
-  new_io_settings.c_lflag &= ~(ICANON | ECHO);
-  tcsetattr(fd, TCSANOW, &new_io_settings);
-  returned = getchar();
-  tcsetattr(fd, TCSANOW, &old_io_settings);
-  return returned;
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_Enable
-//
-// This is the callback
-// function for the "enable" command.
-// TODO: This currently doesn't do anything, these commands are
-//       always available.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_Enable(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable, *infoPtr;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-  infoPtr = argtable;
-
-  /* Add "enable status" to check the status of enable/disable */
-  if (argc == 2) {
-    switch (infoPtr->parsed_args) {
-    case CMD_ENABLE_STATUS:
-      if (enable_restricted_commands == true) {
-        Cli_Printf("on\n");
-        return CMD_OK;
-      } else {
-        Cli_Printf("off\n");
-        return CMD_ERROR;
-      }
-    default:
-      Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-      return CMD_ERROR;
-    }
-  }
-
-  if (enable_restricted_commands == true) {
-    Cli_Printf("Already Enabled\n");
-    return CMD_OK;
-  }
-
-  // TODO: replace this assert with appropriate authentication
-  ink_release_assert(enable_restricted_commands);
-  return CMD_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_Enable
-//
-// Register "enable" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_Enable()
-{
-
-  createArgument("status", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_ENABLE_STATUS, "Check Enable Status", (char *) NULL);
-  return CLI_OK;
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_Disable
-//
-// This is the callback
-// function for the "disable" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_Disable(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (getuid() == 0) {
-    Cli_Printf("root user cannot \"disable\"\n");
-    return 0;
-  }
-
-  enable_restricted_commands = false;
-  return 0;
-}
-
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_Config
-//
-// This is the callback function for the "config" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_Config(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  char *cmdinfo, *temp;
-  int i = 0;
-
-  Cli_Debug("Cmd_Config\n");
-  Tcl_Eval(interp, "info commands config* ");
-
-  size_t cmdinfo_len = strlen(Tcl_GetStringResult(interp)) + 2;
-  cmdinfo = (char *)alloca(sizeof(char) * cmdinfo_len);
-  ink_strlcpy(cmdinfo, Tcl_GetStringResult(interp), cmdinfo_len);
-  size_t temp_len = strlen(cmdinfo) + 20;
-  temp = (char *)alloca(sizeof(char) * temp_len);
-  ink_strlcpy(temp, "lsort \"", temp_len);
-  ink_strlcat(temp, cmdinfo, temp_len);
-  ink_strlcat(temp, "\"", temp_len);
-
-  Tcl_Eval(interp, temp);
-  ink_strlcpy(cmdinfo, Tcl_GetStringResult(interp), cmdinfo_len);
-  i = i + strlen("config ");
-  while (cmdinfo[i] != 0) {
-    if (cmdinfo[i] == ' ') {
-      cmdinfo[i] = '\n';
-    }
-    i++;
-  }
-  cmdinfo[i] = '\n';
-  i++;
-  cmdinfo[i] = 0;
-  Cli_Printf("Following are the available config commands\n");
-  Cli_Printf(cmdinfo + strlen("config "));
-
-  return CLI_OK;
-
-}
-
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_Config
-//
-// Register "config" command arguments with the Tcl interpreter.
-//
-int
-CmdArgs_Config()
-{
-  Cli_Debug("CmdArgs_Config\n");
-
-  return CLI_OK;
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigGet
-//
-// This is the callback function for the "config:get" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigGet(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (cliCheckIfEnabled("config:get") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-
-  Cli_Debug("Cmd_ConfigGet argc %d\n", argc);
-
-  if (argc == 2) {
-    return (ConfigGet(argv[1]));
-  }
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigSet
-//
-// This is the callback function for the "config:set" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigSet(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (cliCheckIfEnabled("config:set") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-
-  Cli_Debug("Cmd_ConfigSet argc %d\n", argc);
-
-  if (argc == 3) {
-    return (ConfigSet(argv[1], argv[2]));
-  }
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigName
-//
-// This is the callback function for the "config:name" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigName(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (cliCheckIfEnabled("config:name") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-
-  Cli_Debug("Cmd_ConfigName argc %d\n", argc);
-
-  return (ConfigName(argv[1]));
-
-  // coverity[unreachable]
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigStart
-//
-// This is the callback function for the "config:start" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigStart(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (cliCheckIfEnabled("config:start") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-
-  Cli_Debug("Cmd_ConfigStart argc %d\n", argc);
-
-  if (argc == 1) {
-    return (ConfigStart());
-  }
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigStop
-//
-// This is the callback function for the "config:stop" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigStop(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-  if (cliCheckIfEnabled("config:stop") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  Cli_Debug("Cmd_ConfigStop argc %d\n", argc);
-
-  if (argc == 1) {
-    return (ConfigStop());
-  }
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigRestart
-//
-// This is the callback function for the "config:restart" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigRestart(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-  if (cliCheckIfEnabled("config:restart") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-  Cli_Debug("Cmd_ConfigRestart argc %d\n", argc);
-
-  if (argc == 1) {
-    return (TSRestart(false));
-  } else if (argc == 2) {
-    if (argtable[0].parsed_args == CMD_CONFIG_RESTART_CLUSTER) {
-      return (TSRestart(true));
-    }
-  }
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigRestart
-//
-// Register "config:restart" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ConfigRestart()
-{
-  createArgument("cluster", 1, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_RESTART_CLUSTER, "Restart the entire cluster", (char *) NULL);
-
-  return 0;
-}
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigParents
-//
-// This is the callback function for the "config:parents" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigParents(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (cliCheckIfEnabled("config:parents") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-  Cli_Debug("Cmd_ConfigParents argc %d\n", argc);
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable, *infoPtr;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-  infoPtr = argtable;
-
-  if (argc == 1) {
-    Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-    return CMD_ERROR;
-  }
-
-  if (argtable->parsed_args != CLI_PARSED_ARGV_END) {
-    switch (infoPtr->parsed_args) {
-    case CMD_CONFIG_PARENTS_STATUS:
-      return (Cli_RecordOnOff_Action((argc == 3),
-                                     "proxy.config.http.parent_proxy_routing_enable", argtable->arg_string));
-
-    case CMD_CONFIG_PARENTS_CACHE:
-      return (Cli_RecordString_Action((argc == 3), "proxy.config.http.parent_proxies", argtable->arg_string));
-
-    case CMD_CONFIG_PARENTS_CONFIG_FILE:
-      return (Cli_ConfigFileURL_Action(TS_FNAME_PARENT_PROXY, "parent.config", argtable->arg_string));
-    }
-  }
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigParents
-//
-// Register "config:parents" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ConfigParents()
-{
-
-  createArgument("status", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_PARENTS_STATUS, "Parenting <on|off>", (char *) NULL);
-  createArgument("name", CLI_ARGV_NO_POS, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_PARENTS_CACHE, "Specify cache parent", (char *) NULL);
-  createArgument("rules", CLI_ARGV_NO_POS, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_PARENTS_CONFIG_FILE, "Specify config file", (char *) NULL);
-  return CLI_OK;
-}
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigRemap
-//
-// This is the callback function for the "config:remap" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigRemap(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (cliCheckIfEnabled("config:remap") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  Cli_Debug("Cmd_ConfigRemap argc %d\n", argc);
-
-  if (argc == 2) {
-    return (ConfigRemap(argv[1]));
-  }
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigPorts
-//
-// This is the callback function for the "config:ports" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigPorts(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (cliCheckIfEnabled("config:ports") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-
-  Cli_Debug("Cmd_ConfigPorts argc %d\n", argc);
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-
-  Cli_Debug("Cmd_ConfigPorts argc %d\n", argc);
-
-  if (argtable->parsed_args != CLI_PARSED_ARGV_END) {
-
-    if (argc == 2) {            // get
-      return (ConfigPortsGet(argtable[0].parsed_args));
-    } else {                    // set
-      switch (argtable->parsed_args) {
-      case CMD_CONFIG_PORTS_CONNECT:
-        return (ConfigPortsSet(argtable[0].parsed_args, argtable[0].data));
-        break;
-      case CMD_CONFIG_PORTS_HTTP_SERVER:
-      case CMD_CONFIG_PORTS_CLUSTER:
-      case CMD_CONFIG_PORTS_CLUSTER_RS:
-      case CMD_CONFIG_PORTS_CLUSTER_MC:
-      case CMD_CONFIG_PORTS_SOCKS_SERVER:
-      case CMD_CONFIG_PORTS_ICP:
-        return (ConfigPortsSet(argtable[0].parsed_args, &argtable[0].arg_int));
-      }
-    }
-  }
-  Cli_Error(ERR_COMMAND_SYNTAX,
-            "\n\nconfig:ports <http-server | http-other | webui | cluster-rs | cluster-mc | \n  ssl | \n socks-server | icp > \n <port | ports list>\n");
-  return CMD_ERROR;
-
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigPorts
-//
-// Register "config:ports" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ConfigPorts()
-{
-  createArgument("http-server", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_PORTS_HTTP_SERVER, "Set Ports for http-server", (char *) NULL);
-  createArgument("cluster", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_PORTS_CLUSTER, "Set Ports for cluster", (char *) NULL);
-  createArgument("cluster-rs", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_PORTS_CLUSTER_RS, "Set Ports for cluster-rs", (char *) NULL);
-  createArgument("cluster-mc", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_PORTS_CLUSTER_MC, "Set Ports for cluster-mc", (char *) NULL);
-  createArgument("connect", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_PORTS_CONNECT, "Set Ports for allowed CONNECT", (char *) NULL);
-  createArgument("socks-server", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_PORTS_SOCKS_SERVER, "Set Ports for socks-server", (char *) NULL);
-  return 0;
-}
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigSecurity
-//
-// This is the callback function for the "config:security" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigSecurity(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (cliCheckIfEnabled("config:security") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-  Cli_Debug("Cmd_ConfigSecurity argc %d\n", argc);
-
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-
-  if (argtable[0].parsed_args != CLI_PARSED_ARGV_END) {
-    switch (argtable[0].parsed_args) {
-    case CMD_CONFIG_SECURITY_IP:
-      return (Cli_ConfigFileURL_Action(TS_FNAME_IP_ALLOW, "ip_allow.config", argtable->arg_string));
-
-    case CMD_CONFIG_SECURITY_PASSWORD:
-      return (ConfigSecurityPasswd());
-    }
-  }
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigSecurity
-//
-// Register "config:security" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ConfigSecurity()
-{
-  createArgument("ip-allow", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_SECURITY_IP, "Clients allowed to connect to proxy <url>", (char *) NULL);
-  createArgument("password", 1, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_SECURITY_PASSWORD, "Change Admin Password", (char *) NULL);
-  return 0;
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigHttp
-//
-// This is the callback function for the "config:http" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigHttp(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  int setvar = 0;
-  if (cliCheckIfEnabled("config:http") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-
-  Cli_Debug("Cmd_ConfigHttp argc %d\n", argc);
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-
-  if (argc == 3) {
-    setvar = 1;
-  }
-
-  if (argc > 3) {
-    Cli_Error("Too many arguments\n");
-    Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-    return CMD_ERROR;
-  }
-
-  Cli_PrintArg(0, argtable);
-  Cli_PrintArg(1, argtable);
-
-  int action = (argc == 3) ? RECORD_SET : RECORD_GET;
-
-  if (argtable->parsed_args != CLI_PARSED_ARGV_END) {
-    switch (argtable->parsed_args) {
-    case CMD_CONFIG_HTTP_STATUS:
-      return (Cli_RecordOnOff_Action(action, "proxy.config.http.cache.http", argtable->arg_string));
-
-    case CMD_CONFIG_HTTP_KEEP_ALIVE_TIMEOUT_IN:
-      return (Cli_RecordInt_Action(action, "proxy.config.http.keep_alive_no_activity_timeout_in", argtable->arg_int));
-
-    case CMD_CONFIG_HTTP_KEEP_ALIVE_TIMEOUT_OUT:
-      return (Cli_RecordInt_Action(action, "proxy.config.http.keep_alive_no_activity_timeout_out", argtable->arg_int));
-
-    case CMD_CONFIG_HTTP_INACTIVE_TIMEOUT_IN:
-      return (Cli_RecordInt_Action(action, "proxy.config.http.transaction_no_activity_timeout_in", argtable->arg_int));
-
-    case CMD_CONFIG_HTTP_INACTIVE_TIMEOUT_OUT:
-      return (Cli_RecordInt_Action(action, "proxy.config.http.transaction_no_activity_timeout_out", argtable->arg_int));
-
-    case CMD_CONFIG_HTTP_ACTIVE_TIMEOUT_IN:
-      return (Cli_RecordInt_Action(action, "proxy.config.http.transaction_active_timeout_in", argtable->arg_int));
-
-    case CMD_CONFIG_HTTP_ACTIVE_TIMEOUT_OUT:
-      return (Cli_RecordInt_Action(action, "proxy.config.http.transaction_active_timeout_out", argtable->arg_int));
-
-    case CMD_CONFIG_HTTP_REMOVE_FROM:
-      return (Cli_RecordOnOff_Action(action, "proxy.config.http.anonymize_remove_from", argtable->arg_string));
-
-    case CMD_CONFIG_HTTP_REMOVE_REFERER:
-      return (Cli_RecordOnOff_Action(action, "proxy.config.http.anonymize_remove_referer", argtable->arg_string));
-
-    case CMD_CONFIG_HTTP_REMOVE_USER:
-      return (Cli_RecordOnOff_Action(action, "proxy.config.http.anonymize_remove_user_agent", argtable->arg_string));
-
-    case CMD_CONFIG_HTTP_REMOVE_COOKIE:
-      return (Cli_RecordOnOff_Action(action, "proxy.config.http.anonymize_remove_cookie", argtable->arg_string));
-
-    case CMD_CONFIG_HTTP_REMOVE_HEADER:
-      return (Cli_RecordString_Action(action, "proxy.config.http.anonymize_other_header_list", argtable->arg_string));
-
-    case CMD_CONFIG_HTTP_GLOBAL_USER_AGENT:
-      return (Cli_RecordString_Action(action, "proxy.config.http.global_user_agent_header", argtable->arg_string));
-
-    case CMD_CONFIG_HTTP_INSERT_IP:
-      return (Cli_RecordOnOff_Action(action, "proxy.config.http.anonymize_insert_client_ip", argtable->arg_string));
-
-    case CMD_CONFIG_HTTP_REMOVE_IP:
-      return (Cli_RecordOnOff_Action(action, "proxy.config.http.anonymize_remove_client_ip", argtable->arg_string));
-
-    case CMD_CONFIG_HTTP_PROXY:
-      return (ConfigHttpProxy(argtable[1].parsed_args, setvar));
-    }
-  }
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigHttp
-//
-// Register "config:http" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ConfigHttp()
-{
-  createArgument("status", CLI_ARGV_NO_POS, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_HTTP_STATUS, "HTTP proxying <on | off>", (char *) NULL);
-
-  createArgument("keep-alive-timeout-in", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_HTTP_KEEP_ALIVE_TIMEOUT_IN, "Keep alive timeout inbound <seconds>",
-                 (char *) NULL);
-  createArgument("keep-alive-timeout-out", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_HTTP_KEEP_ALIVE_TIMEOUT_OUT, "Keep alive timeout outbound <seconds>",
-                 (char *) NULL);
-  createArgument("inactive-timeout-in", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_HTTP_INACTIVE_TIMEOUT_IN, "Inactive timeout inbound <seconds>",
-                 (char *) NULL);
-  createArgument("inactive-timeout-out", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_HTTP_INACTIVE_TIMEOUT_OUT, "Inactive timeout outbound <seconds>",
-                 (char *) NULL);
-  createArgument("active-timeout-in", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_HTTP_ACTIVE_TIMEOUT_IN, "Active timeout inbound <seconds>", (char *) NULL);
-  createArgument("active-timeout-out", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_HTTP_ACTIVE_TIMEOUT_OUT, "Active timeout outbound <seconds>", (char *) NULL);
-
-  createArgument("remove-from", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_HTTP_REMOVE_FROM, "Remove \"From:\" header <on|off>", (char *) NULL);
-  createArgument("remove-referer", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_HTTP_REMOVE_REFERER, "Remove \"Referer:\" header <on|off>", (char *) NULL);
-  createArgument("remove-user", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_HTTP_REMOVE_USER, "Remove \"User:\" header <on|off>", (char *) NULL);
-  createArgument("remove-cookie", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_HTTP_REMOVE_COOKIE, "Remove \"Cookie:\" header <on|off>", (char *) NULL);
-  createArgument("remove-header", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_HTTP_REMOVE_HEADER, "String of headers to be removed <string>",
-                 (char *) NULL);
-
-  createArgument("global-user-agent", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_HTTP_GLOBAL_USER_AGENT, "User-Agent to send to Origin <string>",
-                 (char *) NULL);
-
-  createArgument("insert-ip", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_HTTP_INSERT_IP, "Insert client IP into header <on|off>", (char *) NULL);
-  createArgument("remove-ip", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_HTTP_REMOVE_IP, "Remove client IP from header <on|off>", (char *) NULL);
-  createArgument("proxy", 1, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_HTTP_PROXY, "Proxy Mode <fwd | rev | fwd-rev>", (char *) NULL);
-  createArgument("fwd", CMD_CONFIG_HTTP_PROXY, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_HTTP_FWD, "Specify proxy mode to be forward", (char *) NULL);
-  createArgument("rev", CMD_CONFIG_HTTP_PROXY, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_HTTP_REV, "Specify proxy mode to be reverse", (char *) NULL);
-  createArgument("fwd-rev", CMD_CONFIG_HTTP_PROXY, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_HTTP_FWD_REV, "Specify proxy mode to be both", (char *) NULL);
-  return 0;
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigIcp
-//
-// This is the callback function for the "config:icp" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigIcp(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (cliCheckIfEnabled("config:icp") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-  Cli_Debug("Cmd_ConfigIcp argc %d\n", argc);
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-
-  int action = (argc == 3) ? RECORD_SET : RECORD_GET;
-
-  if (argtable->parsed_args != CLI_PARSED_ARGV_END) {
-    switch (argtable->parsed_args) {
-    case CMD_CONFIG_ICP_MODE:
-      return (ConfigIcpMode(argtable[1].parsed_args, action));
-
-    case CMD_CONFIG_ICP_PORT:
-      return (Cli_RecordInt_Action(action, "proxy.config.icp.icp_port", argtable->arg_int));
-
-    case CMD_CONFIG_ICP_MCAST:
-      return (Cli_RecordOnOff_Action(action, "proxy.config.icp.multicast_enabled", argtable->arg_string));
-
-    case CMD_CONFIG_ICP_QTIMEOUT:
-      return (Cli_RecordInt_Action(action, "proxy.config.icp.query_timeout", argtable->arg_int));
-
-    case CMD_CONFIG_ICP_PEERS:
-      return (Cli_ConfigFileURL_Action(TS_FNAME_ICP_PEER, "icp.config", argtable->arg_string));
-    }
-  }
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigIcp
-//
-// Register "config:Icp" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ConfigIcp()
-{
-  createArgument("mode", 1, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_ICP_MODE, "Mode <disabled | receive | send-receive>", (char *) NULL);
-
-  createArgument("receive", CMD_CONFIG_ICP_MODE, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_ICP_MODE_RECEIVE, "Specify receive mode for icp", (char *) NULL);
-
-  createArgument("send-receive", CMD_CONFIG_ICP_MODE, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_ICP_MODE_SENDRECEIVE, "Specify send & receive mode for icp", (char *) NULL);
-
-  createArgument("disabled", CMD_CONFIG_ICP_MODE, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_ICP_MODE_DISABLED, "icp mode disabled", (char *) NULL);
-
-  createArgument("port", 1, CLI_ARGV_OPTION_INT_VALUE, (char *) NULL, CMD_CONFIG_ICP_PORT, "Port <int>", (char *) NULL);
-  createArgument("multicast", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_ICP_MCAST, "Multicast <on|off>", (char *) NULL);
-  createArgument("query-timeout", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_ICP_QTIMEOUT, "Query Timeout <seconds>", (char *) NULL);
-  createArgument("peers", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_ICP_PEERS, "URL for ICP Peers config file <url>", (char *) NULL);
-  return 0;
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigPortTunnles
-//
-// Register "config:PortTunnles" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ConfigPortTunnels()
-{
-
-  createArgument("server-other-ports", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_PORT_TUNNELS_SERVER_OTHER_PORTS, "Set the tunnel port number <int>",
-                 (char *) NULL);
-  return 0;
-}
-
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigScheduledUpdate
-//
-// This is the callback function for the "config:scheduled-update" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigScheduledUpdate(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (cliCheckIfEnabled("config:scheduled-update") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-  Cli_Debug("Cmd_ConfigScheduledUpdate argc %d\n", argc);
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-
-  int action = (argc == 3) ? RECORD_SET : RECORD_GET;
-
-  if (argtable->parsed_args != CLI_PARSED_ARGV_END) {
-    switch (argtable->parsed_args) {
-    case CMD_CONFIG_SCHEDULED_UPDATE_STATUS:
-      return (Cli_RecordOnOff_Action(action, "proxy.config.update.enabled", argtable->arg_string));
-
-    case CMD_CONFIG_SCHEDULED_UPDATE_RETRY_COUNT:
-      return (Cli_RecordInt_Action(action, "proxy.config.update.retry_count", argtable->arg_int));
-
-    case CMD_CONFIG_SCHEDULED_UPDATE_RETRY_INTERVAL:
-      return (Cli_RecordInt_Action(action, "proxy.config.update.retry_interval", argtable->arg_int));
-
-    case CMD_CONFIG_SCHEDULED_UPDATE_MAX_CONCURRENT:
-      return (Cli_RecordInt_Action(action, "proxy.config.update.concurrent_updates", argtable->arg_int));
-
-    case CMD_CONFIG_SCHEDULED_UPDATE_FORCE_IMMEDIATE:
-      return (Cli_RecordOnOff_Action(action, "proxy.config.update.force", argtable->arg_string));
-
-    case CMD_CONFIG_SCHEDULED_UPDATE_RULES:
-      return (Cli_ConfigFileURL_Action(TS_FNAME_UPDATE_URL, "update.config", argtable->arg_string));
-    }
-  }
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigScheduled-Update
-//
-// Register "config:Scheduled-Update" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ConfigScheduledUpdate()
-{
-  createArgument("status", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_SCHEDULED_UPDATE_STATUS, "Set scheduled-update status <on | off>",
-                 (char *) NULL);
-  createArgument("retry-count", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_SCHEDULED_UPDATE_RETRY_COUNT, "Set retry-count <int>", (char *) NULL);
-  createArgument("retry-interval", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_SCHEDULED_UPDATE_RETRY_INTERVAL, "Set retry-interval <sec>", (char *) NULL);
-  createArgument("max-concurrent", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_SCHEDULED_UPDATE_MAX_CONCURRENT, "Set maximum concurrent updates",
-                 (char *) NULL);
-  createArgument("force-immediate", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_SCHEDULED_UPDATE_FORCE_IMMEDIATE, "Set force-immediate <on | off>",
-                 (char *) NULL);
-  createArgument("rules", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_SCHEDULED_UPDATE_RULES, "Update update.config file from url <string>",
-                 (char *) NULL);
-
-  return 0;
-}
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigSocks
-//
-// This is the callback function for the "config:scheduled-update" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigSocks(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (cliCheckIfEnabled("config:socks") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-  Cli_Debug("Cmd_ConfigSocks argc %d\n", argc);
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-
-  int action = (argc == 3) ? RECORD_SET : RECORD_GET;
-
-  if (argtable->parsed_args != CLI_PARSED_ARGV_END) {
-    switch (argtable->parsed_args) {
-    case CMD_CONFIG_SOCKS_STATUS:
-      return (Cli_RecordOnOff_Action(action, "proxy.config.socks.socks_needed", argtable->arg_string));
-
-    case CMD_CONFIG_SOCKS_VERSION:
-      return (Cli_RecordInt_Action(action, "proxy.config.socks.socks_version", argtable->arg_int));
-
-    case CMD_CONFIG_SOCKS_DEFAULT_SERVERS:
-      return (Cli_RecordString_Action(action, "proxy.config.socks.default_servers", argtable->arg_string));
-
-    case CMD_CONFIG_SOCKS_ACCEPT:
-      return (Cli_RecordOnOff_Action(action, "proxy.config.socks.accept_enabled", argtable->arg_string));
-
-    case CMD_CONFIG_SOCKS_ACCEPT_PORT:
-      return (Cli_RecordInt_Action(action, "proxy.config.socks.accept_port", argtable->arg_int));
-    }
-  }
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigScheduled-Update
-//
-// Register "config:Scheduled-Update" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ConfigSocks()
-{
-  createArgument("status", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_SOCKS_STATUS, "Set socks status <on | off>", (char *) NULL);
-
-  createArgument("version", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_SOCKS_VERSION, "Set version <int>", (char *) NULL);
-
-  createArgument("default-servers", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_SOCKS_DEFAULT_SERVERS, "Set default-servers <string>", (char *) NULL);
-
-  createArgument("accept", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_SOCKS_ACCEPT, "Set accept <on | off>", (char *) NULL);
-
-  createArgument("accept-port", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_SOCKS_ACCEPT_PORT, "Set server accept-port <int>", (char *) NULL);
-
-  return 0;
-}
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigCache
-//
-// This is the callback function for the "config:cache" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigCache(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (cliCheckIfEnabled("config:cache") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-  Cli_Debug("Cmd_ConfigCache argc %d\n", argc);
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-
-  int action = 0;
-
-  if (argtable->parsed_args != CLI_PARSED_ARGV_END) {
-    switch (argtable->parsed_args) {
-    case CMD_CONFIG_CACHE_HTTP:
-      return (Cli_RecordOnOff_Action((argc == 3), "proxy.config.http.cache.http", argtable->arg_string));
-
-    case CMD_CONFIG_CACHE_CLUSTER_BYPASS:
-      return (Cli_RecordOnOff_Action((argc == 3),
-                                     "proxy.config.http.cache.cluster_cache_local", argtable->arg_string));
-    case CMD_CONFIG_CACHE_IGNORE_BYPASS:
-      return (Cli_RecordOnOff_Action((argc == 3),
-                                     "proxy.config.http.cache.ignore_client_no_cache", argtable->arg_string));
-
-    case CMD_CONFIG_CACHE_MAX_OBJECT_SIZE:
-      return (Cli_RecordInt_Action((argc == 3), "proxy.config.cache.max_doc_size", argtable->arg_int));
-
-    case CMD_CONFIG_CACHE_MAX_ALTERNATES:
-      return (Cli_RecordInt_Action((argc == 3), "proxy.config.cache.limits.http.max_alts", argtable->arg_int));
-
-    case CMD_CONFIG_CACHE_FILE:
-      return (Cli_ConfigFileURL_Action(TS_FNAME_CACHE_OBJ, "cache.config", argtable->arg_string));
-
-    case CMD_CONFIG_CACHE_FRESHNESS:
-      if (argtable[1].parsed_args != CLI_PARSED_ARGV_END) {
-        switch (argtable[1].parsed_args) {
-        case CMD_CONFIG_CACHE_FRESHNESS_VERIFY:
-          if (argc == 4) {
-            action = RECORD_SET;
-          }
-          return (ConfigCacheFreshnessVerify(argtable[2].parsed_args, action));
-
-        case CMD_CONFIG_CACHE_FRESHNESS_MINIMUM:
-          if (argc == 4) {
-            action = RECORD_SET;
-          }
-          return (ConfigCacheFreshnessMinimum(argtable[2].parsed_args, action));
-
-        case CMD_CONFIG_CACHE_FRESHNESS_NO_EXPIRE_LIMIT:
-          if (argtable[2].parsed_args != CLI_PARSED_ARGV_END) {
-            if ((argtable[2].parsed_args ==
-                 CMD_CONFIG_CACHE_FRESHNESS_NO_EXPIRE_LIMIT_GREATER_THAN) &&
-                (argtable[3].parsed_args == CMD_CONFIG_CACHE_FRESHNESS_NO_EXPIRE_LIMIT_LESS_THAN) && (argc == 7)) {
-              action = RECORD_SET;
-            } else {
-              Cli_Printf("\n config:cache freshness no-expire-limit greater-than <value> less-than<value>\n");
-              return CMD_ERROR;
-            }
-          }
-          Cli_Debug("greater than %d, less than %d \n", argtable[2].arg_int, argtable[3].arg_int);
-          return (ConfigCacheFreshnessNoExpireLimit(argtable[2].arg_int, argtable[3].arg_int, action));
-
-        }
-      }
-      Cli_Printf("\n config:cache freshness <verify | minimum | no-expire-limit> \n");
-      return CMD_ERROR;
-    case CMD_CONFIG_CACHE_DYNAMIC:
-      return (Cli_RecordOnOff_Action((argc == 3),
-                                     "proxy.config.http.cache.cache_urls_that_look_dynamic", argtable->arg_string));
-
-    case CMD_CONFIG_CACHE_ALTERNATES:
-      return (Cli_RecordOnOff_Action((argc == 3),
-                                     "proxy.config.http.cache.enable_default_vary_headers", argtable->arg_string));
-
-    case CMD_CONFIG_CACHE_VARY:
-      if (argtable[1].arg_string) {
-        action = RECORD_SET;
-      }
-      return (ConfigCacheVary(argtable[1].parsed_args, argtable[1].arg_string, action));
-
-    case CMD_CONFIG_CACHE_COOKIES:
-      if (argc == 3) {
-        action = RECORD_SET;
-      }
-      return (ConfigCacheCookies(argtable[1].parsed_args, action));
-    case CMD_CONFIG_CACHE_CLEAR:
-      return (ConfigCacheClear());
-    }
-  }
-
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigCache
-//
-// Register "config:cache" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ConfigCache()
-{
-  createArgument("http", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_CACHE_HTTP, "HTTP Protocol caching <on|off>", (char *) NULL);
-  createArgument("ignore-bypass", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_CACHE_IGNORE_BYPASS, "Ignore Bypass <on|off>", (char *) NULL);
-  createArgument("max-object-size", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_CACHE_MAX_OBJECT_SIZE, "Maximum object size <bytes>", (char *) NULL);
-  createArgument("max-alternates", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_CACHE_MAX_ALTERNATES, "Maximum alternates <int>", (char *) NULL);
-  createArgument("file", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_CACHE_FILE, "Load cache.config file from url <string>", (char *) NULL);
-  createArgument("freshness", 1, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_CACHE_FRESHNESS, "Freshness parameters <verify | minimum | no-expire-limit>",
-                 (char *) NULL);
-  createArgument("verify", CMD_CONFIG_CACHE_FRESHNESS, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_CACHE_FRESHNESS_VERIFY,
-                 "Freshness verify <when-expired | no-date | always | never> ", (char *) NULL);
-
-  createArgument("when-expired", CMD_CONFIG_CACHE_FRESHNESS_VERIFY, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_CACHE_FRESHNESS_VERIFY_WHEN_EXPIRED,
-                 "Set freshness verify to be when-expired", (char *) NULL);
-
-  createArgument("no-date", CMD_CONFIG_CACHE_FRESHNESS_VERIFY, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_CACHE_FRESHNESS_VERIFY_NO_DATE,
-                 "Set freshness verify to be no-date", (char *) NULL);
-
-  createArgument("always", CMD_CONFIG_CACHE_FRESHNESS_VERIFY, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_CACHE_FRESHNESS_VERIFY_ALWALYS,
-                 "Set freshness verify to be always", (char *) NULL);
-
-  createArgument("never", CMD_CONFIG_CACHE_FRESHNESS_VERIFY, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_CACHE_FRESHNESS_VERIFY_NEVER,
-                 "Set the freshness verify to be never", (char *) NULL);
-
-  createArgument("minimum", CMD_CONFIG_CACHE_FRESHNESS, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_CACHE_FRESHNESS_MINIMUM,
-                 "Set freshness minimum <explicit | last-modified | nothing>", (char *) NULL);
-
-  createArgument("explicit", CMD_CONFIG_CACHE_FRESHNESS_MINIMUM, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_CACHE_FRESHNESS_MINIMUM_EXPLICIT,
-                 "Set the Freshness Minimum to be explicit", (char *) NULL);
-
-  createArgument("last-modified", CMD_CONFIG_CACHE_FRESHNESS_MINIMUM, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_CACHE_FRESHNESS_MINIMUM_LAST_MODIFIED,
-                 "Set the Freshness Minimum to be last modified", (char *) NULL);
-
-  createArgument("nothing", CMD_CONFIG_CACHE_FRESHNESS_MINIMUM, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_CACHE_FRESHNESS_MINIMUM_NOTHING,
-                 "Specify the Freshness minimum to be nothing", (char *) NULL);
-
-  createArgument("no-expire-limit", CMD_CONFIG_CACHE_FRESHNESS, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_CACHE_FRESHNESS_NO_EXPIRE_LIMIT,
-                 "Set the Freshness no-expire-limit time", (char *) NULL);
-
-  createArgument("greater-than", CLI_ARGV_NO_POS, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_CACHE_FRESHNESS_NO_EXPIRE_LIMIT_GREATER_THAN,
-                 "Set the minimum Freshness no-expire-limit time", (char *) NULL);
-
-  createArgument("less-than", CLI_ARGV_NO_POS, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_CACHE_FRESHNESS_NO_EXPIRE_LIMIT_LESS_THAN,
-                 "Set the maximum Freshness no-expire-limit time", (char *) NULL);
-
-  createArgument("dynamic", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_CACHE_DYNAMIC, "Set Dynamic <on|off>", (char *) NULL);
-
-  createArgument("alternates", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_CACHE_ALTERNATES, "Set Alternates <on|off>", (char *) NULL);
-  createArgument("vary", 1, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_CACHE_VARY, "Set vary <text | images | other> <field>", (char *) NULL);
-  createArgument("text", CMD_CONFIG_CACHE_VARY, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_CACHE_VARY_TEXT, "Set vary text's value", (char *) NULL);
-  createArgument("images", CLI_ARGV_NO_POS, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_CACHE_VARY_COOKIES_IMAGES, "Set vary images' value", (char *) NULL);
-  createArgument("other", CMD_CONFIG_CACHE_VARY, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_CACHE_VARY_OTHER, "Set vary other's value", (char *) NULL);
-
-  createArgument("cookies", 1, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_CACHE_COOKIES, "Set cookies <none | all | images | non-text | non-text-ext>",
-                 (char *) NULL);
-  createArgument("none", CMD_CONFIG_CACHE_COOKIES, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_CACHE_COOKIES_NONE, "No cookies", (char *) NULL);
-  createArgument("all", CMD_CONFIG_CACHE_COOKIES, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_CACHE_COOKIES_ALL, "All cookies", (char *) NULL);
-  createArgument("non-text", CMD_CONFIG_CACHE_COOKIES, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_CACHE_COOKIES_NON_TEXT, "Non-text cookies", (char *) NULL);
-  createArgument("non-text-ext", CMD_CONFIG_CACHE_COOKIES, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_CACHE_COOKIES_NON_TEXT_EXT, "Non-text-ext cookies", (char *) NULL);
-  createArgument("clear", 1, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_CACHE_CLEAR, "Clear the cache and start Traffic Server", (char *) NULL);
-  return 0;
-}
-
-
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigHostdb
-//
-// This is the callback function for the "config:hostdb" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigHostdb(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (cliCheckIfEnabled("config:hostdb") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-  Cli_Debug("Cmd_ConfigHostdb argc %d\n", argc);
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-
-  int action = (argc == 3) ? RECORD_SET : RECORD_GET;
-
-  if (argtable->parsed_args != CLI_PARSED_ARGV_END) {
-    switch (argtable->parsed_args) {
-    case CMD_CONFIG_HOSTDB_LOOKUP_TIMEOUT:
-      return (Cli_RecordInt_Action(action, "proxy.config.hostdb.lookup_timeout", argtable->arg_int));
-
-    case CMD_CONFIG_HOSTDB_FOREGROUND_TIMEOUT:
-      return (Cli_RecordInt_Action(action, "proxy.config.hostdb.timeout", argtable->arg_int));
-
-    case CMD_CONFIG_HOSTDB_BACKGROUND_TIMEOUT:
-      return (Cli_RecordInt_Action(action, "proxy.config.hostdb.verify_after", argtable->arg_int));
-
-    case CMD_CONFIG_HOSTDB_INVALID_HOST_TIMEOUT:
-      return (Cli_RecordInt_Action(action, "proxy.config.hostdb.fail.timeout", argtable->arg_int));
-
-    case CMD_CONFIG_HOSTDB_RE_DNS_ON_RELOAD:
-      return (Cli_RecordOnOff_Action(action, "proxy.config.hostdb.re_dns_on_reload", argtable->arg_string));
-    case CMD_CONFIG_HOSTDB_CLEAR:
-      return (ConfigHostdbClear());
-    }
-  }
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigHostdb
-//
-// Register "config:Hostdb" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ConfigHostdb()
-{
-  createArgument("lookup-timeout", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_HOSTDB_LOOKUP_TIMEOUT, "Lookup Timeout <seconds>", (char *) NULL);
-  createArgument("foreground-timeout", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_HOSTDB_FOREGROUND_TIMEOUT, "Foreground Timeout <minutes>", (char *) NULL);
-  createArgument("background-timeout", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_HOSTDB_BACKGROUND_TIMEOUT, "Background Timeout <minutes>", (char *) NULL);
-  createArgument("invalid-host-timeout", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_HOSTDB_INVALID_HOST_TIMEOUT, "Invalid Host Timeout <minutes>",
-                 (char *) NULL);
-  createArgument("re-dns-on-reload", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_HOSTDB_RE_DNS_ON_RELOAD, "Re-DNS on Reload Timeout <on|off>", (char *) NULL);
-  createArgument("clear", 1, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_HOSTDB_CLEAR, "Clear the HostDB and start Traffic Server", (char *) NULL);
-  return 0;
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigDns
-//
-// This is the callback function for the "config:dns" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigDns(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (cliCheckIfEnabled("config:dns") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-  Cli_Debug("Cmd_ConfigDns argc %d\n", argc);
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-
-  int action = (argc == 3) ? RECORD_SET : RECORD_GET;
-
-  if (argtable->parsed_args != CLI_PARSED_ARGV_END) {
-    switch (argtable->parsed_args) {
-    case CMD_CONFIG_DNS_RESOLVE_TIMEOUT:
-      return (Cli_RecordInt_Action(action, "proxy.config.dns.lookup_timeout", argtable->arg_int));
-
-    case CMD_CONFIG_DNS_RETRIES:
-      return (Cli_RecordInt_Action(action, "proxy.config.dns.retries", argtable->arg_int));
-    }
-  }
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigDns
-//
-// Register "config:dns" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ConfigDns()
-{
-  createArgument("resolve-timeout", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_DNS_RESOLVE_TIMEOUT, "Resolve timeout <int>", (char *) NULL);
-  createArgument("retries", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_DNS_RETRIES, "Number of retries <int>", (char *) NULL);
-
-  return 0;
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigVirtualip
-//
-// This is the callback function for the "config:virtualip" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigVirtualip(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (cliCheckIfEnabled("config:virtualip") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-  Cli_Debug("Cmd_ConfigCache argc %d\n", argc);
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-
-  int setvar = 0;
-
-  if (argtable->parsed_args != CLI_PARSED_ARGV_END) {
-    switch (argtable->parsed_args) {
-    case CMD_CONFIG_VIRTUALIP_STATUS:
-      return (Cli_RecordOnOff_Action((argc == 3), "proxy.config.vmap.enabled", argtable->arg_string));
-
-    case CMD_CONFIG_VIRTUALIP_LIST:
-      return (ConfigVirtualIpList());
-
-    case CMD_CONFIG_VIRTUALIP_ADD:
-      if (argc == 8) {
-        setvar = 1;
-      }
-      Cli_PrintArg(0, argtable);
-      Cli_PrintArg(1, argtable);
-      Cli_PrintArg(2, argtable);
-      Cli_PrintArg(3, argtable);
-      if (ConfigVirtualipAdd(argtable[1].arg_string, argtable[2].arg_string, argtable[3].arg_int, setvar) == CLI_OK) {
-        return CMD_OK;
-      } else {
-        return CMD_ERROR;
-      }
-
-    case CMD_CONFIG_VIRTUALIP_DELETE:
-      if (argc == 3) {
-        setvar = 1;
-      }
-      if (ConfigVirtualipDelete(argtable[0].arg_int, setvar) == CLI_OK) {
-        return CMD_OK;
-      } else {
-        return CMD_ERROR;
-      }
-    }
-  }
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigVirtualip
-//
-// Register "config:virtualip" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ConfigVirtualip()
-{
-
-  createArgument("status", CLI_ARGV_NO_POS, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_VIRTUALIP_STATUS, "Virtual IP <on | off>", (char *) NULL);
-  createArgument("list", 1, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_VIRTUALIP_LIST, "List virtual IP addresses", (char *) NULL);
-  createArgument("add", 1, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_VIRTUALIP_ADD, "add ip <x.x.x.x> device <string> sub-intf <int>",
-                 (char *) NULL);
-  createArgument("ip", CMD_CONFIG_VIRTUALIP_ADD, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_VIRTUALIP_ADD_IP, "Virtual IP Address <x.x.x.x>", (char *) NULL);
-  createArgument("device", CMD_CONFIG_VIRTUALIP_ADD_IP, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_VIRTUALIP_ADD_DEVICE, "Virtual IP device <string>", (char *) NULL);
-  createArgument("sub-intf", CMD_CONFIG_VIRTUALIP_ADD_DEVICE, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_VIRTUALIP_ADD_SUBINTERFACE, "Virtual IP sub interface <integer>",
-                 (char *) NULL);
-  createArgument("delete", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_VIRTUALIP_DELETE, "Delete Virtual IP <integer>", (char *) NULL);
-  return CLI_OK;
-}
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigLogging
-//
-// This is the callback function for the "config:logging" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigLogging(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (cliCheckIfEnabled("config:logging") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-  Cli_Debug("Cmd_ConfigCache argc %d\n", argc);
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-
-  int setvar = 0;
-
-  if (argtable->parsed_args != CLI_PARSED_ARGV_END) {
-    switch (argtable->parsed_args) {
-    case CMD_CONFIG_LOGGING_EVENT:
-      if (argc == 3) {
-        setvar = 1;
-      }
-      return (ConfigLoggingEvent(argtable[1].parsed_args, setvar));
-    case CMD_CONFIG_LOGGING_MGMT_DIRECTORY:
-      return (Cli_RecordString_Action((argc == 3), "proxy.config.log.logfile_dir", argtable->arg_string));
-
-    case CMD_CONFIG_LOGGING_SPACE_LIMIT:
-      return (Cli_RecordInt_Action((argc == 3), "proxy.config.log.max_space_mb_for_logs", argtable->arg_int));
-
-    case CMD_CONFIG_LOGGING_SPACE_HEADROOM:
-      return (Cli_RecordInt_Action((argc == 3), "proxy.config.log.max_space_mb_headroom", argtable->arg_int));
-
-    case CMD_CONFIG_LOGGING_COLLATION_STATUS:
-      if (argc == 3) {
-        setvar = 1;
-      }
-      return (ConfigLoggingCollationStatus(argtable[1].parsed_args, setvar));
-    case CMD_CONFIG_LOGGING_COLLATION_HOST:
-      return (Cli_RecordString_Action((argc == 3), "proxy.config.log.collation_host", argtable->arg_string));
-
-    case CMD_CONFIG_LOGGING_COLLATION:
-      if (argc == 8) {
-        setvar = 1;
-      }
-      Cli_PrintArg(1, argtable);
-      Cli_PrintArg(2, argtable);
-      Cli_PrintArg(3, argtable);
-      Cli_PrintArg(4, argtable);
-      return (ConfigLoggingCollation(argtable[1].arg_string, argtable[3].parsed_args, argtable[4].arg_int, setvar));
-    case CMD_CONFIG_LOGGING_AND_CUSTOM_FORMAT:
-      if (argc == 10) {
-        setvar = 1;
-      }
-      Cli_PrintArg(1, argtable);
-      Cli_PrintArg(2, argtable);
-      Cli_PrintArg(3, argtable);
-      Cli_PrintArg(4, argtable);
-      Cli_PrintArg(5, argtable);
-      Cli_PrintArg(6, argtable);
-      return (ConfigLoggingFormatTypeFile(argtable[1].parsed_args,
-                                          argtable[2].parsed_args,
-                                          argtable[4].parsed_args,
-                                          argtable[5].arg_string, argtable[6].arg_string, setvar));
-    case CMD_CONFIG_LOGGING_SPLITTING:
-      if (argc == 4) {
-        setvar = 1;
-      }
-      Cli_PrintArg(1, argtable);
-      Cli_PrintArg(2, argtable);
-      return (ConfigLoggingSplitting(argtable[1].parsed_args, argtable[2].parsed_args, setvar));
-
-    case CMD_CONFIG_LOGGING_CUSTOM:
-      if (argc == 5) {
-        setvar = 1;
-      }
-      Cli_PrintArg(1, argtable);
-      Cli_PrintArg(2, argtable);
-      Cli_PrintArg(3, argtable);
-      return (ConfigLoggingCustomFormat(argtable[1].parsed_args, argtable[3].parsed_args, setvar));
-
-    case CMD_CONFIG_LOGGING_ROLLING:
-      if (argc == 9) {
-        setvar = 1;
-      }
-      Cli_PrintArg(1, argtable);
-      Cli_PrintArg(2, argtable);
-      Cli_PrintArg(3, argtable);
-      Cli_PrintArg(4, argtable);
-      Cli_PrintArg(5, argtable);
-      return (ConfigLoggingRollingOffsetIntervalAutodelete(argtable[1].parsed_args,
-                                                           argtable[2].arg_int,
-                                                           argtable[3].arg_int, argtable[5].parsed_args, setvar));
-
-    }
-  }
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigLogging
-//
-// Register "config:logging" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ConfigLogging()
-{
-
-  createArgument("on", CLI_ARGV_NO_POS, CLI_ARGV_REQUIRED,
-                 (char *) NULL, CMD_CONFIG_LOGGING_ON, "Enable logging", (char *) NULL);
-  createArgument("off", CLI_ARGV_NO_POS, CLI_ARGV_REQUIRED,
-                 (char *) NULL, CMD_CONFIG_LOGGING_OFF, "Disable logging", (char *) NULL);
-  createArgument("event", 1, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_LOGGING_EVENT, "Events <enabled | trans-only | error-only | disabled>",
-                 (char *) NULL);
-  createArgument("enabled", CMD_CONFIG_LOGGING_EVENT, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_LOGGING_EVENT_ENABLED, "Event logging enabled", (char *) NULL);
-  createArgument("trans-only", CMD_CONFIG_LOGGING_EVENT, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_LOGGING_EVENT_TRANS_ONLY, "Event logging for transactions only",
-                 (char *) NULL);
-  createArgument("error-only", CMD_CONFIG_LOGGING_EVENT, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_LOGGING_EVENT_ERROR_ONLY, "Event logging for errors only", (char *) NULL);
-  createArgument("disabled", CMD_CONFIG_LOGGING_EVENT, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_LOGGING_EVENT_DISABLED, "Event logging is disabled", (char *) NULL);
-  createArgument("mgmt-directory", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_LOGGING_MGMT_DIRECTORY, "Logging MGMT directory <string>", (char *) NULL);
-  createArgument("space-limit", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_LOGGING_SPACE_LIMIT, "Space limit for logs <mb>", (char *) NULL);
-  createArgument("space-headroom", 1, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_LOGGING_SPACE_HEADROOM, "Space for headroom <mb>", (char *) NULL);
-  createArgument("collation-status", 1, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_LOGGING_COLLATION_STATUS,
-                 "Collation status <inactive | host | send-standard |\n" "                   send-custom | send-all>",
-                 (char *) NULL);
-  createArgument("inactive", CMD_CONFIG_LOGGING_COLLATION_STATUS, CLI_ARGV_CONSTANT, (char *) NULL,
-                 CMD_CONFIG_LOGGING_COLLATION_STATUS_INACTIVE, "No collation", (char *) NULL);
-  createArgument("host", CMD_CONFIG_LOGGING_COLLATION_STATUS, CLI_ARGV_CONSTANT, (char *) NULL,
-                 CMD_CONFIG_LOGGING_COLLATION_STATUS_HOST, "Be a collation host (receiver)", (char *) NULL);
-  createArgument("send-standard", CMD_CONFIG_LOGGING_COLLATION_STATUS, CLI_ARGV_OPTION_NAME_VALUE, (char *) NULL,
-                 CMD_CONFIG_LOGGING_COLLATION_STATUS_SEND_STANDARD, "Send standard logs", (char *) NULL);
-  createArgument("send-custom", CMD_CONFIG_LOGGING_COLLATION_STATUS, CLI_ARGV_OPTION_NAME_VALUE, (char *) NULL,
-                 CMD_CONFIG_LOGGING_COLLATION_STATUS_SEND_CUSTOM, "Send custom logs", (char *) NULL);
-  createArgument("send-all", CMD_CONFIG_LOGGING_COLLATION_STATUS, CLI_ARGV_OPTION_NAME_VALUE, (char *) NULL,
-                 CMD_CONFIG_LOGGING_COLLATION_STATUS_SEND_ALL, "Send all logs", (char *) NULL);
-  createArgument("collation-host", 1, CLI_ARGV_OPTION_NAME_VALUE, (char *) NULL, CMD_CONFIG_LOGGING_COLLATION_HOST,
-                 "Specify the collation host <string>", (char *) NULL);
-
-  createArgument("collation", 1, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_LOGGING_COLLATION, "Collation parameters secret <secret> tagged <on | off>\n"
-                 "                   orphan-limit <orphan>", (char *) NULL);
-
-  createArgument("secret", CMD_CONFIG_LOGGING_COLLATION, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_LOGGING_COLLATION_SECRET, "Collation secret is <string>", (char *) NULL);
-
-  createArgument("tagged", CLI_ARGV_NO_POS, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_LOGGING_COLLATION_TAGGED, "Collation tagged is <on | off>", (char *) NULL);
-
-  createArgument("orphan-limit", CLI_ARGV_NO_POS, CLI_ARGV_INT,
-                 (char *) NULL, CMD_CONFIG_LOGGING_COLLATION_ORPHAN_LIMIT,
-                 "Collation orphan limit size <mb>", (char *) NULL);
-
-  createArgument("format", CLI_ARGV_NO_POS, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_LOGGING_AND_CUSTOM_FORMAT,
-                 "Logging format <squid | netscape-common | netscape-ext |\n"
-                 "                   netscape-ext2>", (char *) NULL);
-
-  createArgument("squid", CMD_CONFIG_LOGGING_AND_CUSTOM_FORMAT, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_LOGGING_FORMAT_SQUID, "Squid <on | off>", (char *) NULL);
-  createArgument("netscape-common", CMD_CONFIG_LOGGING_AND_CUSTOM_FORMAT, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_LOGGING_FORMAT_NETSCAPE_COMMON, "Netscape Common <on | off>", (char *) NULL);
-  createArgument("netscape-ext", CMD_CONFIG_LOGGING_AND_CUSTOM_FORMAT, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_LOGGING_FORMAT_NETSCAPE_EXT, "Netscape Extended <on | off>", (char *) NULL);
-  createArgument("netscape-ext2", CMD_CONFIG_LOGGING_AND_CUSTOM_FORMAT, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_LOGGING_FORMAT_NETSCAPE_EXT2,
-                 "Netscape Extended 2 <on | off>", (char *) NULL);
-
-  createArgument("type", CLI_ARGV_NO_POS, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_LOGGING_TYPE, "Logging type <ascii | binary>", (char *) NULL);
-  createArgument("ascii", CMD_CONFIG_LOGGING_TYPE, CLI_ARGV_REQUIRED,
-                 (char *) NULL, CMD_CONFIG_LOGGING_TYPE_ASCII, "ASCII log files", (char *) NULL);
-  createArgument("binary", CMD_CONFIG_LOGGING_TYPE, CLI_ARGV_REQUIRED,
-                 (char *) NULL, CMD_CONFIG_LOGGING_TYPE_BINARY, "Binary log files", (char *) NULL);
-
-  createArgument("file", CLI_ARGV_NO_POS, CLI_ARGV_STRING,
-                 (char *) NULL, CMD_CONFIG_LOGGING_FILE, "Log file name <string>", (char *) NULL);
-
-  createArgument("header", CLI_ARGV_NO_POS, CLI_ARGV_STRING,
-                 (char *) NULL, CMD_CONFIG_LOGGING_HEADER, "Log file header <string>", (char *) NULL);
-
-  createArgument("splitting", 1, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_LOGGING_SPLITTING,
-                 "Splitting of logs for protocols <icp | http>", (char *) NULL);
-  createArgument("icp", CMD_CONFIG_LOGGING_SPLITTING, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_LOGGING_SPLITTING_ICP, "Split ICP <on | off>", (char *) NULL);
-  createArgument("http", CMD_CONFIG_LOGGING_SPLITTING, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_LOGGING_SPLITTING_HTTP, "Split of HTTP <on | off>", (char *) NULL);
-
-  createArgument("custom", 1, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_LOGGING_CUSTOM,
-                 "Custom Logging <on | off>", (char *) NULL);
-
-  createArgument("rolling", 1, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_LOGGING_ROLLING,
-                 "Log file rolling <on | off> offset <hour>\n"
-                 "                   interval <num-hours> auto-delete <on | off>", (char *) NULL);
-
-  createArgument("offset", CLI_ARGV_NO_POS, CLI_ARGV_INT,
-                 (char *) NULL, CMD_CONFIG_LOGGING_OFFSET, "Rolling offset <hour> (24hour format)", (char *) NULL);
-
-  createArgument("interval", CLI_ARGV_NO_POS, CLI_ARGV_INT,
-                 (char *) NULL, CMD_CONFIG_LOGGING_INTERVAL, "Rolling interval <seconds>", (char *) NULL);
-  createArgument("auto-delete", CLI_ARGV_NO_POS, CLI_ARGV_CONST_OPTION,
-                 (char *) NULL, CMD_CONFIG_LOGGING_AUTO_DELETE, "Auto delete <on | off>", (char *) NULL);
-  return 0;
-
-
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigSsl
-//
-// This is the callback function for the "config:ssl" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigSsl(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (cliCheckIfEnabled("config:ssl") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-  Cli_Debug("Cmd_ConfigSsl argc %d\n", argc);
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-
-  int action = (argc == 3) ? RECORD_SET : RECORD_GET;
-
-  if (argtable->parsed_args != CLI_PARSED_ARGV_END) {
-    switch (argtable->parsed_args) {
-    case CMD_CONFIG_SSL_STATUS:
-      return (Cli_RecordOnOff_Action(action, "proxy.config.ssl.enabled", argtable->arg_string));
-
-    case CMD_CONFIG_SSL_PORT:
-      return (Cli_RecordInt_Action(action, "proxy.config.ssl.server_port", argtable->arg_int));
-    }
-  }
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigSsl
-//
-// Register "config:ssl" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ConfigSsl()
-{
-  createArgument("status", CLI_ARGV_NO_POS, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_SSL_STATUS, "SSL <on | off>", (char *) NULL);
-
-  createArgument("ports", CLI_ARGV_NO_POS, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_SSL_PORT, "SSL port <int>", (char *) NULL);
-  return 0;
-}
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_ConfigAlarm
-//
-// This is the callback function for the "config:alarm" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigAlarm(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (cliCheckIfEnabled("config:alarm") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-  Cli_Debug("Cmd_ConfigAlarm argc %d\n", argc);
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-
-  if (argtable->parsed_args != CLI_PARSED_ARGV_END) {
-    switch (argtable->parsed_args) {
-    case CMD_CONFIG_ALARM_RESOLVE_NAME:
-      if (argc < 3) {
-        return (ShowAlarms());
-      }
-      return (ConfigAlarmResolveName(argtable->arg_string));
-    case CMD_CONFIG_ALARM_RESOLVE_NUMBER:
-      if (argc < 3) {
-        return (ShowAlarms());
-      }
-      return (ConfigAlarmResolveNumber(argtable->arg_int));
-    case CMD_CONFIG_ALARM_RESOLVE_ALL:
-      return (ConfigAlarmResolveAll());
-    case CMD_CONFIG_ALARM_NOTIFY:
-      Cli_Debug("Cmd_ConfigAlarm \"%s\"\n", argtable->arg_string);
-      return (ConfigAlarmNotify(argtable->arg_string));
-    }
-  }
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ConfigAlarm
-//
-// Register "config:alarm" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ConfigAlarm()
-{
-  createArgument("resolve-name", CLI_ARGV_NO_POS, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_ALARM_RESOLVE_NAME, "Resolve by name <string>", (char *) NULL);
-
-  createArgument("resolve-number", CLI_ARGV_NO_POS, CLI_ARGV_OPTION_INT_VALUE,
-                 (char *) NULL, CMD_CONFIG_ALARM_RESOLVE_NUMBER, "Resolve by number from list <int>", (char *) NULL);
-
-  createArgument("resolve-all", CLI_ARGV_NO_POS, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_CONFIG_ALARM_RESOLVE_ALL, "Resolve all alarms", (char *) NULL);
-
-  createArgument("notify", CLI_ARGV_NO_POS, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_ALARM_NOTIFY, "Alarm notification <on | off>", (char *) NULL);
-  return CLI_OK;
-}
-
-
-////////////////////////////////////////////////////////////////
-//
-// "config" sub-command implementations
-//
-////////////////////////////////////////////////////////////////
-
-
-// config start sub-command
-int
-ConfigStart()
-{
-  TSProxyStateT state = TSProxyStateGet();
-
-  switch (state) {
-  case TS_PROXY_ON:
-    // do nothing, proxy is already on
-    Cli_Error(ERR_PROXY_STATE_ALREADY, "on");
-    break;
-  case TS_PROXY_OFF:
-  case TS_PROXY_UNDEFINED:
-    if (TSProxyStateSet(TS_PROXY_ON, TS_CACHE_CLEAR_OFF)) {
-      Cli_Error(ERR_PROXY_STATE_SET, "on");
-      return CLI_ERROR;
-    }
-    break;
-  }
-  return CLI_OK;
-}
-
-// config stop sub-command
-int
-ConfigStop()
-{
-  TSProxyStateT state = TSProxyStateGet();
-
-  switch (state) {
-  case TS_PROXY_OFF:
-    // do nothing, proxy is already off
-    Cli_Error(ERR_PROXY_STATE_ALREADY, "off");
-    break;
-  case TS_PROXY_ON:
-  case TS_PROXY_UNDEFINED:
-    if (TSProxyStateSet(TS_PROXY_OFF, TS_CACHE_CLEAR_OFF)) {
-      Cli_Error(ERR_PROXY_STATE_SET, "off");
-      return CLI_ERROR;
-    }
-    break;
-  }
-  return CLI_OK;
-}
-
-// config get sub-command
-//   used to get the value of any config variable in records.config
-int
-ConfigGet(const char *rec_name)
-{
-  Cli_Debug("ConfigGet: rec_name %s\n", rec_name);
-
-  TSMgmtError status;
-  TSRecordEle rec_val;
-
-  status = Cli_RecordGet(rec_name, &rec_val);
-
-  if (status) {
-    return status;
-  }
-  // display the result
-
-  switch (rec_val.rec_type) {
-  case TS_REC_INT:            // TS64 aka "long long"
-    Cli_Printf("%s = %d\n", rec_name, (int) rec_val.int_val);
-    break;
-  case TS_REC_COUNTER:        // TS64 aka "long long"
-    Cli_Printf("%s = %d\n", rec_name, (int) rec_val.counter_val);
-    break;
-  case TS_REC_FLOAT:          // float
-    Cli_Printf("%s = %f\n", rec_name, rec_val.float_val);
-    break;
-  case TS_REC_STRING:         // char*
-    Cli_Printf("%s = \"%s\"\n", rec_name, rec_val.string_val);
-    break;
-  case TS_REC_UNDEFINED:      // what's this???
-    Cli_Printf("%s = UNDEFINED\n", rec_name);
-    break;
-  }
-
-  return CLI_OK;
-}
-
-// config set sub-command
-//   used to set the value of any variable in records.config
-
-int
-ConfigSet(const char *rec_name, const char *value)
-{
-  Cli_Debug("ConfigSet: rec_name %s value %s\n", rec_name, value);
-
-  TSMgmtError status;
-  TSActionNeedT action_need;
-
-  status = Cli_RecordSet(rec_name, value, &action_need);
-  if (status) {
-    return status;
-  }
-
-  return (Cli_ConfigEnactChanges(action_need));
-}
-
-// config name sub-command
-//   used to set or display the value of proxy.config.proxy_name
-
-int
-ConfigName(const char *proxy_name)
-{
-  TSMgmtError status = TS_ERR_OKAY;
-  TSString str_val = NULL;
-  TSActionNeedT action_need;
-
-  if (proxy_name) {             // set the name
-
-    Cli_Debug("ConfigName: set name proxy_name %s\n", proxy_name);
-
-    status = Cli_RecordSetString("proxy.config.proxy_name", (TSString) proxy_name, &action_need);
-
-    if (status) {
-      return status;
-    }
-
-    return (Cli_ConfigEnactChanges(action_need));
-
-  }
-
-  else {                        // display the name
-    Cli_Debug("ConfigName: get name\n");
-
-    status = Cli_RecordGetString("proxy.config.proxy_name", &str_val);
-    if (status) {
-      return status;
-    }
-
-    if (str_val) {
-      Cli_Printf("%s\n", str_val);
-    } else {
-      Cli_Printf("none\n");
-    }
-  }
-
-  return CLI_OK;
-
-}
-
-// config ports sub-command
-//   used to set the value of port(s)
-
-int
-ConfigPortsSet(int arg_ref, void *valuePtr)
-{
-
-  switch (arg_ref) {
-  case CMD_CONFIG_PORTS_CONNECT:
-    Cli_Debug("ConfigPortsSet: arg_ref %d value %s\n", arg_ref, (char *) valuePtr);
-    break;
-  default:
-    Cli_Debug("ConfigPortsSet: arg_ref %d value %d\n", arg_ref, *(TSInt *) valuePtr);
-  }
-
-  TSMgmtError status = TS_ERR_OKAY;
-  TSActionNeedT action_need = TS_ACTION_UNDEFINED;
-
-  Cli_Debug("ConfigPorts: set\n");
-  switch (arg_ref) {
-  case CMD_CONFIG_PORTS_HTTP_SERVER:
-    status = Cli_RecordSetInt("proxy.config.http.server_port", *(TSInt *) valuePtr, &action_need);
-    break;
-  case CMD_CONFIG_PORTS_CLUSTER:
-    status = Cli_RecordSetInt("proxy.config.cluster.cluster_port", *(TSInt *) valuePtr, &action_need);
-    break;
-  case CMD_CONFIG_PORTS_CLUSTER_RS:
-    status = Cli_RecordSetInt("proxy.config.cluster.rsport", *(TSInt *) valuePtr, &action_need);
-    break;
-  case CMD_CONFIG_PORTS_CLUSTER_MC:
-    status = Cli_RecordSetInt("proxy.config.cluster.mcport", *(TSInt *) valuePtr, &action_need);
-    break;
-  case CMD_CONFIG_PORTS_CONNECT:
-    status = Cli_RecordSetString("proxy.config.http.connect_ports", (TSString) valuePtr, &action_need);
-    break;
-  case CMD_CONFIG_PORTS_SOCKS_SERVER:
-    status = Cli_RecordSetInt("proxy.config.socks.socks_server_port", *(TSInt *) valuePtr, &action_need);
-    break;
-  case CMD_CONFIG_PORTS_ICP:
-    status = Cli_RecordSetInt("proxy.config.icp.icp_port", *(TSInt *) valuePtr, &action_need);
-    break;
-  }
-
-  if (status) {
-    return status;
-  }
-
-  return (Cli_ConfigEnactChanges(action_need));
-
-}
-
-// config ports sub-command
-//   used to display the value of port(s)
-
-int
-ConfigPortsGet(int arg_ref)
-{
-  TSMgmtError status = TS_ERR_OKAY;
-  TSInt int_val = -1;
-  TSString str_val = NULL;
-
-  Cli_Debug("ConfigPortsGet: get\n");
-
-  switch (arg_ref) {
-  case CMD_CONFIG_PORTS_HTTP_SERVER:
-    status = Cli_RecordGetInt("proxy.config.http.server_port", &int_val);
-    if (status) {
-      return status;
-    }
-    Cli_Printf("%d\n", int_val);
-    break;
-  case CMD_CONFIG_PORTS_CLUSTER:
-    status = Cli_RecordGetInt("proxy.config.cluster.cluster_port", &int_val);
-    if (status) {
-      return status;
-    }
-    Cli_Printf("%d\n", int_val);
-    break;
-  case CMD_CONFIG_PORTS_CLUSTER_RS:
-    status = Cli_RecordGetInt("proxy.config.cluster.rsport", &int_val);
-    if (status) {
-      return status;
-    }
-    Cli_Printf("%d\n", int_val);
-    break;
-  case CMD_CONFIG_PORTS_CLUSTER_MC:
-    status = Cli_RecordGetInt("proxy.config.cluster.mcport", &int_val);
-    if (status) {
-      return status;
-    }
-    Cli_Printf("%d\n", int_val);
-    break;
-  case CMD_CONFIG_PORTS_CONNECT:
-    status = Cli_RecordGetString("proxy.config.http.connect_ports", &str_val);
-    if (status) {
-      return status;
-    }
-    if (str_val) {
-      Cli_Printf("%s\n", str_val);
-    } else {
-      Cli_Printf("none\n");
-    }
-    break;
-  case CMD_CONFIG_PORTS_SOCKS_SERVER:
-    status = Cli_RecordGetInt("proxy.config.socks.socks_server_port", &int_val);
-    if (status) {
-      return status;
-    }
-    Cli_Printf("%d\n", int_val);
-    break;
-  case CMD_CONFIG_PORTS_ICP:
-    status = Cli_RecordGetInt("proxy.config.icp.icp_port", &int_val);
-    if (status) {
-      return status;
-    }
-    Cli_Printf("%d\n", int_val);
-    break;
-  default:
-    Cli_Error(ERR_COMMAND_SYNTAX,
-              "\n\nconfig:ports <http-server | http-other | webui | cluster-rs | cluster-mc | \n ssl | \n socks-server | icp > \n <port | ports list>\n");
-
-    return CLI_ERROR;
-  }
-  return CLI_OK;
-}
-
-int
-ConfigSecurityPasswd()
-{
-  Cli_Debug("ConfigSecurityPasswd\n");
-  Cli_Printf("This command is currently a no-op");
-  return CLI_OK;
-}
-
-// config remap sub-command
-int
-ConfigRemap(const char *url)
-{
-  Cli_Debug("ConfigRemap: url %s\n", url);
-
-  return (Cli_SetConfigFileFromUrl(TS_FNAME_REMAP, url));
-}
-
-
-int
-ConfigTimezoneList()
-{
-  FILE *fp, *tmp;
-  const char *zonetable = "/usr/share/zoneinfo/zone.tab";
-  char buffer[1024];
-  char old_zone[1024];
-  char *zone;
-
-  fp = fopen(zonetable, "r");
-  tmp = fopen("/tmp/zonetab.tmp", "w");
-  if (fp == NULL || tmp == NULL) {
-    printf("can not open the file\n");
-    return CLI_ERROR;
-  }
-  ATS_UNUSED_RETURN(fgets(buffer, 1024, fp));
-  while (!feof(fp)) {
-    if (buffer[0] != '#') {
-      strtok(buffer, " \t");
-      strtok(NULL, " \t");
-      zone = strtok(NULL, " \t");
-      if (zone[strlen(zone) - 1] == '\n') {
-        zone[strlen(zone) - 1] = '\0';
-      }
-      fprintf(tmp, "%s\n", zone);
-    }
-    ATS_UNUSED_RETURN(fgets(buffer, 1024, fp));
-  }
-  fclose(fp);
-  fclose(tmp);
-  remove("/tmp/zonetab");
-  if (system("/bin/sort /tmp/zonetab.tmp > /tmp/zonetab") == -1) {
-    printf("can not sort zonetab.tmp\n");
-    return CLI_ERROR;
-  }
-
-  fp = fopen("/tmp/zonetab", "r");
-  ATS_UNUSED_RETURN(fgets(buffer, 1024, fp));
-  int i = 0;
-  while (!feof(fp)) {
-    zone = buffer;
-    if (zone[strlen(zone) - 1] == '\n') {
-      zone[strlen(zone) - 1] = '\0';
-    }
-    if (strcmp(zone, old_zone) == 0) {
-      Cli_Printf("%d   %s\n", i, zone);
-    } else {
-      Cli_Printf("%d   %s\n", i, zone);
-    }
-    ATS_UNUSED_RETURN(fgets(buffer, 1024, fp));
-    i++;
-  }
-  fclose(fp);
-  remove("/tmp/zonetab.tmp");
-  remove("/tmp/zonetab");
-
-  return CLI_OK;
-
-}
-
-// config http proxy sub-command
-int
-ConfigHttpProxy(int arg_ref, int setvar)
-{
-  Cli_Debug("ConfigHttpProxy: proxy %d\n", arg_ref);
-
-  TSInt rmp_val = 0;
-  TSInt rev_val = 0;
-  TSActionNeedT action_need = TS_ACTION_UNDEFINED;
-  TSMgmtError status = TS_ERR_OKAY;
-
-  switch (setvar) {
-  case 0:                      //get
-
-    status = Cli_RecordGetInt("proxy.config.reverse_proxy.enabled", &rev_val);
-    if (status) {
-      return status;
-    }
-    status = Cli_RecordGetInt("proxy.config.url_remap.remap_required", &rmp_val);
-    if (status) {
-      return status;
-    }
-    if ((rev_val) && (rmp_val)) {
-      Cli_Printf("rev\n");
-    

<TRUNCATED>

[2/7] TS-1665 Remove traffic_shell

Posted by zw...@apache.org.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/cli_feature_spec.txt
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/cli_feature_spec.txt b/cmd/traffic_shell/cli_feature_spec.txt
deleted file mode 100644
index f6e7c9d..0000000
--- a/cmd/traffic_shell/cli_feature_spec.txt
+++ /dev/null
@@ -1,230 +0,0 @@
-traffic_shell  "a CLI for Traffic Server"
-
-==========
-Motivation
-==========
-
-The purpose of traffic_shell (command line interface, or CLI) is to
-improve the usability of Traffic Server in both OEM and direct sales
-environments. The CLI is a powerful, easy to use tool which can be
-used to configure and monitor individual Traffic Server machines.  Our
-goal is to make configuring Traffic Server as easy as configuring
-other network devices such as routers and switches. 
-
-The CLI accepts commands in a unix shell-like fashion.  Commands are
-organized in an easy to navigate hierarchy.  The CLI supports basic
-command completion, command history, and context sensitive help.  This
-format was designed to be familiar to network engineers everywhere,
-and also to be easier to document, maintain, and add features. 
-
-============
-Architecture
-============
-
-The CLI is a standalone executable which is part of a Traffic Server
-installation on the Linux platform. The CLI supports the following
-operation modes. Note that a "user" can be a person, a script, or some
-other mechanism for remote control of network devices via command line
-interface. 
-
-- Interactive mode:
-"traffic_shell"
-Similar to unix shell, the CLI can be the login shell for
-administrators.  The user types command at a prompt, and the CLI
-processes the command and displays the result.  While in interactive
-mode, the user can execute a file which contains a list of commands. 
-
--- Execute file mode:
-"traffic_shell -f filename" where file contains a list of CLI commands.
-CLI runs commands and sends results to stdout.
-
-The CLI interface is implemented in a combination of TCL and C++.
-From the traffic_shell prompt, users can access the scripting
-capabilities of TCL.   
-
-The shell and parsing functionality will utilize TCL. Commands
-themselves will be written in C++. The CLI uses the traffic_manager
-Management API to make Traffic Server configuration changes.
-
-The overall CLI architecture is as follows:
-
-- traffic_shell ---------------------------
-|                                         |
-| --------------------------------------- |
-| Shell and parser implemented in TCL/C++ |
-| --------------------------------------- |
-|                 ^                       |
-| ----------------|-------------------    |
-| CLI commands implemented in C++         |
-| ------------------------------------    |
-|         ^                               |
-| --------|----------                     |
-| Management API (.a)                     |
-| -------------------                     |
-|                                         |
--------------------------------------------
-
-=================
-Quick Start Guide
-=================
-
-There are two basic commands categories, "show" and "config".  Show
-commands are used to view configuration information and statistics.
-Config commands are used to configure Traffic Server.  To use the
-config commands, you must first enter "enable mode" by using the
-enable command, which asks for the admin password (same password as
-WebUI). 
-
-At any point you can access context sensitive help by specifying "-h"
-or "-help" after a command name.  The following is a list of commands
-and options:
-
--------------
-Show Commands
--------------
-
-show                         Show command
-show:status                  Proxy status
-show:version                 Version information
-show:security                Security information
-show:http                    HTTP protocol configuration
-show:icp [peer]              ICP protocol configuration
-show:proxy                   Proxy configuration
-show:cache [rules|storage]   Cache configuration
-show:virtual-ip              Virtual-ip configuration
-show:hostdb                  Host database configuration
-show:dns-resolver            DNS resolver configuration
-show:logging                 Logging configuration
-show:ssl                     SSL configuration
-show:parent                  Parent configuration
-show:remap                   Remap configuration
-show:socks                   SOCKS configuration
-show:port-tunnels            Port tunnels configuration
-show:scheduled-update        Scheduled update configuration
-show:proxy-stats             Proxy statistics
-show:http-trans-stats        HTTP transaction statistics
-show:http-stats              HTTP statistics
-show:icp-stats               ICP statistics
-show:cache-stats             Cache statistics
-show:hostdb-stats            Host database statistics
-show:dns-stats               DNS statistics
-show:logging-stats           Logging statistics
-show:alarms                  Show active alarms
-
----------------
-Config commands
----------------
-
-config:get <variable>          Display a variable value
-config:set <variable> <value>  Set variable to specified value
-config:name <string>           Set proxy name <string>
-config:start                   Start proxy software
-config:stop                    Stop proxy software
-
-config:ssl <on | off>
-config:ssl ports <int>      
-
-config:parent <on | off>    
-config:parent name <parent>
-config:parent rules <url>    
-
-config:remap <url>              Update remap configuration file <url>
-    
-config:clock date <mm/dd/yyyy>          
-config:clock time <hh:mm:ss>
-config:clock timezone <number from list>       
-    
-config:security <ip-allow | mgmt-allow | admin> <url-config-file>
-config:security password                 
-
-config:http <on | off>
-config:http <keep-alive-timeout-in | keep-alive-timeout-out> <seconds>
-config:http <inactive-timeout-in | inactive-timeout-out> <seconds>
-config:http <active-timeout-in | active-timeout-out> <seconds>
-config:http <remove-from | remove-referer> <on | off>
-config:http <remove-user | remove-cookie> <on | off>
-config:http <remove-header> <string>
-config:http <insert-ip | remove-ip> <on | off>
-config:http proxy <fwd | rev | fwd-rev>      
-
-config:icp mode <disabled | receive | send-receive>
-config:icp port <int>
-config:icp multicast <on | off>
-config:icp query-timeout <seconds>
-config:icp peers <url-config-file>           
- 
-config:port-tunnels server-other-ports <port>
-
-config:scheduled-update mode <on | off>
-config:scheduled-update retry count <int> interval <int>
-config:scheduled-update max-concurrent <int>
-config:scheduled-update force-immediate <on | off>
-config:scheduled-update rules <url-config-file>  
-    
-config:socks <on | off>
-config:socks server-ip <x.x.x.x>
-config:socks port <int>
-config:socks timeout <seconds>      
-    
-    
-config:cache <on | off>
-config:cache <http> <on | off>
-config:cache ignore-bypass <on | off>
-config:cache <max-object-size | max-alternates> <int>
-config:cache file <url-config-file>
-config:cache freshness verify <when-expired | no-date | always | never>
-config:cache freshness minimum <explicit | last-modified | nothing>
-config:cache freshness no-expire-limit greater-than <sec> less-than <sec>
-config:cache <dynamic | alternates> <on | off>
-config:cache vary <text | images | other> <string>
-config:cache vary cookies <none | all | non-text>        
-    
-    
-config:hostdb <lookup-timeout | foreground-timeout> <seconds>
-config:hostdb <background-timeout | invalid-host-timeout> <seconds>
-config:hostdb <re-dns-on-reload> <on | off>,
-Configure Host Database
-    
-config:logging event <enabled | trans-only | error-only | disabled>
-config:logging mgmt-directory <string>
-config:logging <space-limit | space-headroom> <megabytes>
-config:logging collation-status <inactive | host | send-standard |
-                                 send-custom | send-all>
-config:logging collation-host <string>
-config:logging collation secret <string> tagged <on | off> orphan-limit <int>
-config:logging format <squid | netscape-common | netscape-ext | netscape-ext2>
-               type <ascii | binary> file <string> header <string>
-config:logging splitting <icp | http> <on | off>
-config:logging custom <on | off> format <traditional | xml>
-config:logging rolling <on | off> offset <hour> interval <hours>
-               auto-delete <on | off>,
-	
-config:dns resolve-timeout <seconds>
-config:dns retries <int>,
-
-config:virtual-ip <on | off>
-config:virtual-ip add <x.x.x.x> device <string> sub-intf <int>
-config:virtual-ip delete <virtual ip number>,
-
-config:network ip-address <x.x.x.x>      (Linux only)
-config:network hostname <string>         (Linux only)
-config:network netmask <x.x.x.x>         (Linux only)
-config:network domainname <string>       (Linux only)
-config:network dns-ip <x.x.x.x>          (Linux only)
-config:network defaultrouter <x.x.x.x>   (Linux only)
-
-config:alarms resolve-name <string>
-config:alarms resolve-number <int>
-config:alarms resolve-all
-config:alarms notify <on | off>,
-
-----------------
-Utility commands
-----------------
-    
-enable              Enable Restricted Commands
-
-disable             Disable Restricted Commands
- 
-debug <on|off>      Turn debugging print statements on/off
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/commandOptions.h
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/commandOptions.h b/cmd/traffic_shell/commandOptions.h
deleted file mode 100644
index 1f8f9c6..0000000
--- a/cmd/traffic_shell/commandOptions.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/** @file
-
-  A brief file description
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-/* commandOptions.h
- * these are valid options for createArgument
- *
- *
- */
-
-#ifndef COMMAND_OPTIONS
-#define COMMAND_OPTIONS
-
-
-#define CLI_ARGV_CONSTANT_OPTIONAL                    0x401
-#define CLI_ARGV_INT_OPTIONAL                         0x402
-#define CLI_ARGV_STRING_OPTIONAL                      0x404
-#define CLI_ARGV_FLOAT_OPTIONAL                       0x408
-#define CLI_ARGV_FUNC_OPTIONAL                        0x410
-#define CLI_ARGV_HELP_OPTIONAL                        0x420
-#define CLI_ARGV_CONST_OPTION_OPTIONAL                0x440
-#define CLI_ARGV_CONSTANT_REQUIRED                    0x801
-#define CLI_ARGV_INT_REQUIRED                         0x802
-#define CLI_ARGV_STRING_REQUIRED                      0x804
-#define CLI_ARGV_FLOAT_REQUIRED                       0x808
-
-
-#endif /*COMMAND_OPTIONS */

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/createArgument.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/createArgument.cc b/cmd/traffic_shell/createArgument.cc
deleted file mode 100644
index e2f4e1b..0000000
--- a/cmd/traffic_shell/createArgument.cc
+++ /dev/null
@@ -1,387 +0,0 @@
-/** @file
-
-  This file provides basic create Argument defintion, for any new arguments.
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-
-#include <stdlib.h>
-#include <tcl.h>
-#include <string.h>
-
-#include "createArgument.h"
-#include "definitions.h"
-#include "commandOptions.h"
-#include "hashtable.h"
-#include "ink_string.h"
-
-#define totalArguments 30       /* This is arbitary value */
-#define NEG_BOUND -10
-#define POS_BOUND 10
-
-static cli_ArgvInfo *ArgvTable;
-static cli_ArgvInfo *org_ArgvTable;
-extern Tcl_Interp *interp;
-
-cli_ArgvInfo *cliGetArgvInfo();
-cli_ArgvInfo *cliGetOrgArgvInfo();
-int getCommandOption(int commandoption, int *arg_type, int *arg_option);
-char **findRequired(cli_ArgvInfo * argtable);
-extern void setReqdArgs(char **required_args);
-
-int
-createArgument(const char *argument, int position, int commandoption,
-               char *range, int argumentRef, const char *helpString, char *defValue)
-{
-  int arg_type = 0;
-  int arg_option = 0;
-  char **reqd_args;
-  cli_ArgvInfo *aCliArgvTable = cliGetArgvInfo();
-
-  size_t key_len = sizeof(char) * (strlen(argument) + 1);
-  aCliArgvTable->key = (char *) ckalloc(key_len);
-  ink_strlcpy(aCliArgvTable->key, argument, key_len);
-
-  aCliArgvTable->position = position;
-
-  getCommandOption(commandoption, &arg_type, &arg_option);
-  aCliArgvTable->type = arg_type;
-  if (arg_option != 0) {
-    aCliArgvTable->option = arg_option;
-  }
-
-
-  aCliArgvTable->arg_ref = argumentRef;
-
-  if (range != NULL) {
-    aCliArgvTable->range_set = true;
-    if (aCliArgvTable->type == CLI_ARGV_INT || aCliArgvTable->type == CLI_ARGV_OPTION_INT_VALUE) {
-      getIntRange(range, &(aCliArgvTable->l_range.int_r1), &(aCliArgvTable->u_range.int_r2));
-    }
-    if (aCliArgvTable->type == CLI_ARGV_FLOAT || aCliArgvTable->type == CLI_ARGV_OPTION_FLOAT_VALUE) {
-      getFloatRange(range, &(aCliArgvTable->l_range.float_r1), &(aCliArgvTable->u_range.float_r2));
-    }
-
-  }
-
-  if (defValue != NULL) {
-    size_t def_len = sizeof(char) * (strlen(defValue) + 1);
-    aCliArgvTable->def = (char *) ckalloc(def_len);
-    ink_strlcpy(aCliArgvTable->def, defValue, def_len);
-  }
-
-
-  if (helpString != NULL) {
-    size_t help_len = sizeof(char) * (strlen(helpString) + 1);
-    aCliArgvTable->help = (char *) ckalloc(help_len);
-    ink_strlcpy(aCliArgvTable->help, helpString, help_len);
-  }
-
-  reqd_args = findRequired(cliGetOrgArgvInfo());
-  setReqdArgs(reqd_args);
-  return TCL_OK;
-}
-
-
-cli_ArgvInfo *
-cliGetArgvInfo()
-{
-  cli_ArgvInfo *temp_ArgvTable = ArgvTable;
-  ArgvTable++;
-  return temp_ArgvTable;
-}
-
-int
-cliSetArgvInfo(cli_ArgvInfo * argtable)
-{
-  ArgvTable = argtable;
-  org_ArgvTable = argtable;
-  return TCL_OK;
-}
-
-cli_ArgvInfo *
-cliGetOrgArgvInfo()
-{
-  return org_ArgvTable;
-}
-
-
-char **
-findRequired(cli_ArgvInfo * argtable)
-{
-  char **args;
-  cli_ArgvInfo *infoPtr;
-  int count_required = 0, i = 0;
-  for (infoPtr = argtable; (infoPtr->key != NULL); infoPtr++) {
-    if (infoPtr->option == CLI_ARGV_REQUIRED) {
-      count_required++;
-    }
-  }
-  if (count_required == 0)
-    return (char **) NULL;
-
-  args = (char **) ckalloc(sizeof(char *) * (count_required + 1));
-  for (infoPtr = argtable; (infoPtr->key != NULL); infoPtr++) {
-    if (infoPtr->option == CLI_ARGV_REQUIRED) {
-
-      args[i] = ats_strdup(infoPtr->key);
-      i++;
-    }
-  }
-  args[i] = NULL;
-  return args;
-}
-
-
-int
-getCommandOption(int commandoption, int *arg_type, int *arg_option)
-{
-  switch (commandoption) {
-  case CLI_ARGV_CONSTANT:
-    *arg_type = CLI_ARGV_CONSTANT;
-    *arg_option = 0;
-    break;
-  case CLI_ARGV_CONST_OPTION:
-    *arg_type = CLI_ARGV_CONST_OPTION;
-    *arg_option = 0;
-    break;
-  case CLI_ARGV_INT:
-    *arg_type = CLI_ARGV_INT;
-    *arg_option = 0;
-    break;
-  case CLI_ARGV_STRING:
-    *arg_type = CLI_ARGV_STRING;
-    *arg_option = 0;
-    break;
-  case CLI_ARGV_FLOAT:
-    *arg_type = CLI_ARGV_FLOAT;
-    *arg_option = 0;
-    break;
-  case CLI_ARGV_OPTION_NAME_VALUE:
-    *arg_type = CLI_ARGV_OPTION_NAME_VALUE;
-    *arg_option = 0;
-    break;
-  case CLI_ARGV_OPTION_FLOAT_VALUE:
-    *arg_type = CLI_ARGV_OPTION_FLOAT_VALUE;
-    *arg_option = 0;
-    break;
-  case CLI_ARGV_OPTION_INT_VALUE:
-    *arg_type = CLI_ARGV_OPTION_INT_VALUE;
-    *arg_option = 0;
-    break;
-  case CLI_ARGV_CONSTANT_OPTIONAL:
-    *arg_type = CLI_ARGV_CONSTANT;
-    *arg_option = CLI_ARGV_OPTIONAL;
-    break;
-  case CLI_ARGV_INT_OPTIONAL:
-    *arg_type = CLI_ARGV_INT;
-    *arg_option = CLI_ARGV_OPTIONAL;
-    break;
-  case CLI_ARGV_STRING_OPTIONAL:
-    *arg_type = CLI_ARGV_STRING;
-    *arg_option = CLI_ARGV_OPTIONAL;
-    break;
-  case CLI_ARGV_FLOAT_OPTIONAL:
-    *arg_type = CLI_ARGV_FLOAT;
-    *arg_option = CLI_ARGV_OPTIONAL;
-    break;
-  case CLI_ARGV_FUNC_OPTIONAL:
-    *arg_type = CLI_ARGV_FUNC;
-    *arg_option = CLI_ARGV_OPTIONAL;
-    break;
-  case CLI_ARGV_HELP_OPTIONAL:
-    *arg_type = CLI_ARGV_HELP;
-    *arg_option = CLI_ARGV_OPTIONAL;
-    break;
-  case CLI_ARGV_CONST_OPTION_OPTIONAL:
-    *arg_type = CLI_ARGV_CONST_OPTION;
-    *arg_option = CLI_ARGV_OPTIONAL;
-    break;
-  case CLI_ARGV_CONSTANT_REQUIRED:
-    *arg_type = CLI_ARGV_CONSTANT;
-    *arg_option = CLI_ARGV_REQUIRED;
-    break;
-  case CLI_ARGV_INT_REQUIRED:
-    *arg_type = CLI_ARGV_INT;
-    *arg_option = CLI_ARGV_REQUIRED;
-    break;
-  case CLI_ARGV_STRING_REQUIRED:
-    *arg_type = CLI_ARGV_STRING;
-    *arg_option = CLI_ARGV_REQUIRED;
-    break;
-  case CLI_ARGV_FLOAT_REQUIRED:
-    *arg_type = CLI_ARGV_FLOAT;
-    *arg_option = CLI_ARGV_REQUIRED;
-    break;
-  default:
-    *arg_type = 0;
-    *arg_option = 0;
-    break;
-  }
-  return TCL_OK;
-}
-
-int
-getIntRange(char *range, int *r1, int *r2)
-{
-  char *range_str;
-  char *str;
-  int bound, i = 0, len;
-  char *buf;
-  char *endPtr;
-
-  buf = (char *) ckalloc(sizeof(char) * 256);
-  range_str = ats_strdup(range);
-  len = strlen(range_str);
-  range_str[len] = 0;
-  str = range_str;
-  while (*str != 0) {
-    if (*str == '-') {
-      bound = NEG_BOUND;
-      str++;
-    }
-
-    else if (*str == '+') {
-      bound = POS_BOUND;
-      str++;
-    } else {
-      Tcl_AppendResult(interp, "range not specified correctly", (char *) NULL);
-      ckfree(buf);
-      ckfree(range_str);
-      return TCL_ERROR;
-    }
-    if (*str == 'r') {
-      str++;
-      i = 0;
-      for (; (*str != '+'); str++) {
-        if (*str == 0)
-          break;
-        buf[i] = *str;
-        i++;
-      }
-      buf[i] = 0;
-      if (bound == NEG_BOUND) {
-        *r1 = strtol(buf, &endPtr, 0);
-        if ((endPtr == buf) || (*endPtr != 0)) {
-          Tcl_AppendResult(interp, "negative range is not correct\n", (char *) NULL);
-          ckfree(buf);
-          ckfree(range_str);
-          return TCL_ERROR;
-
-        }
-      } else if (bound == POS_BOUND) {
-        *r2 = strtol(buf, &endPtr, 0);
-        if ((endPtr == buf) || (*endPtr != 0)) {
-          Tcl_AppendResult(interp, "positive range is not correct\n", (char *) NULL);
-          ckfree(buf);
-          ckfree(range_str);
-          return TCL_ERROR;
-
-        }
-      }
-
-    } else {
-      Tcl_AppendResult(interp, "range not specified correctly\n");
-      ckfree(buf);
-      ckfree(range_str);
-      return TCL_ERROR;
-    }
-
-
-  }
-  ckfree(buf);
-  ckfree(range_str);
-  return TCL_OK;
-}
-
-
-int
-getFloatRange(char *range, float *r1, float *r2)
-{
-  char *range_str;
-  char *str;
-  int bound, i = 0, len;
-  char *buf;
-  char *endPtr;
-
-  buf = (char *) ckalloc(sizeof(char) * 256);
-  range_str = ats_strdup(range);
-  len = strlen(range_str);
-  range_str[len] = 0;
-  str = range_str;
-  while (*str != 0) {
-    if (*str == '-') {
-      bound = NEG_BOUND;
-      str++;
-    }
-
-    else if (*str == '+') {
-      bound = POS_BOUND;
-      str++;
-    } else {
-      Tcl_AppendResult(interp, "range not specified correctly", (char *) NULL);
-      ckfree(buf);
-      ckfree(range_str);
-      return TCL_ERROR;
-    }
-    if (*str == 'r') {
-      str++;
-      i = 0;
-      for (; (*str != '+'); str++) {
-        if (*str == 0)
-          break;
-        buf[i] = *str;
-        i++;
-      }
-      buf[i] = 0;
-      if (bound == NEG_BOUND) {
-        // Solaris is messed up, in that strtod() does not honor C99/SUSv3 mode.
-        *r1 = strtold(buf, &endPtr);
-        if ((endPtr == buf) || (*endPtr != 0)) {
-          Tcl_AppendResult(interp, "negative range is not correct", (char *) NULL);
-          ckfree(buf);
-          ckfree(range_str);
-          return TCL_ERROR;
-
-        }
-      } else if (bound == POS_BOUND) {
-        *r2 = strtold(buf, &endPtr);
-        if ((endPtr == buf) || (*endPtr != 0)) {
-          Tcl_AppendResult(interp, "positive range is not correct", (char *) NULL);
-          ckfree(buf);
-          ckfree(range_str);
-          return TCL_ERROR;
-
-        }
-      }
-
-    } else {
-      Tcl_AppendResult(interp, "range not specified correctly");
-      ckfree(buf);
-      ckfree(range_str);
-      return TCL_ERROR;
-    }
-
-
-  }
-  ckfree(buf);
-  ckfree(range_str);
-  return TCL_OK;
-}

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/createArgument.h
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/createArgument.h b/cmd/traffic_shell/createArgument.h
deleted file mode 100644
index 4681c3a..0000000
--- a/cmd/traffic_shell/createArgument.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/** @file
-
-  A brief file description
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-/*
- *   createArgument.h --
- *
- *
- *    This file provides basic create Argument declartion,
- *    for any new arguments.
- *
- *
- *
- *
- *    Dated  : 12/11/2000.
- */
-
-#ifndef CREATE_ARGUMENT
-#define CREATE_ARGUMENT
-
-#include <commandOptions.h>
-
-typedef union arg_value
-{                               /* Value of the argument can be
-                                   integr or float or string */
-  char *arg_string;
-  int arg_int;
-  float arg_float;
-} arg_value;
-
-typedef union lower_range
-{
-  int int_r1;
-  float float_r1;
-} lower_range;
-
-typedef union upper_range
-{
-  int int_r2;
-  float float_r2;
-} upper_range;
-
-typedef struct cli_ArgvInfo
-{
-  char *key;                    /*  The key string that flags
-                                   the option  in the argv array */
-  int position;                 /* indicates position of the
-                                   argument in command */
-  int type;                     /* Indicates argument type;  */
-  int arg_ref;                  /* User creates an integer to
-                                   refer to this argument */
-  lower_range l_range;          /* lower_range */
-  upper_range u_range;          /* upper_range */
-  bool range_set;                /* flag which indicates if range is set by user */
-  int option;                   /* flag which indicates if argument is optional or required */
-  char *help;                   /* Documentation message describing this  option. */
-  char *def;                    /* default value */
-
-} cli_ArgvInfo;
-
-
-typedef struct cli_parsedArgInfo
-{
-  int parsed_args;
-  char *data;
-  int arg_int;
-  float arg_float;
-  char *arg_string;
-  char *arg_usage;
-} cli_parsedArgInfo;
-
-
-typedef struct cli_cmdCallbackInfo
-{
-  const char *command_usage;
-  cli_parsedArgInfo *parsedArgTable;
-  void *userdata;
-} cli_cmdCallbackInfo;
-
-
-typedef struct cli_CommandInfo
-{
-  const char *command_name;           /* command name    */
-  cli_ArgvInfo *argtable;       /* pointer to argv table */
-  char **reqd_args;             /* holds reference no for
-                                   required arguments */
-  cli_parsedArgInfo *parsedArgTable;    /* holds parsed arguments */
-  char *helpString;
-
-} cli_CommandInfo;
-
-extern int createArgument(const char *argument, int position, int commandoption,
-                          char *range, int argumentRef, const char *helpString, char *defValue);
-
-
-
-extern int getIntRange(char *range, int *r1, int *r2);
-extern int getFloatRange(char *range, float *r1, float *r2);
-
-#endif /*CREATE_ARGUMENT */

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/createCommand.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/createCommand.cc b/cmd/traffic_shell/createCommand.cc
deleted file mode 100644
index d1dc5e4..0000000
--- a/cmd/traffic_shell/createCommand.cc
+++ /dev/null
@@ -1,166 +0,0 @@
-/** @file
-
-  A brief file description
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-/*
- *   createCommand.c --
- *
- *
- *    This file provides basic create command definition,
- *    for any new commands.
- *
- *    It overrides any existing commands with the new command
- *    without any warning
- *
- *
- *    Dated  : 12/11/2000.
- */
-
-#include <tcl.h>
-#include <stdlib.h>
-#include "definitions.h"
-#include "createArgument.h"
-#include "hashtable.h"
-
-static char **reqd_args;
-char **getReqdArgs();
-
-extern Tcl_Interp *interp;
-/* This is the only interp for the whole application */
-
-extern cli_ArgvInfo *cliGetArgvInfo();
-extern int cliSetArgvInfo(cli_ArgvInfo * argtable);
-
-
-
-int
-createCommand(const char *cmdName, Tcl_CmdProc cmdFuncPtr,
-              createArgumentFuncPtr argvFuncPtr, cmdTerritory cmdScope, const char *usage, const char *helpString)
-{
-  /* No code to support threads for Tcl */
-
-  /* If required add thread Specific code
-     here
-     Hint: Use Tcl_GetThreadData
-
-   */
-  int isSafe, i;
-  cli_ArgvInfo *argtable;
-  char **required_args;
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-
-  if ((cmdName == NULL) || (cmdFuncPtr == NULL) || (helpString == NULL)) {
-    printf("Error: New command with NULL string or object procs or with no help string provided\n");
-    return TCL_ERROR;
-  }
-
-
-  /* Used for creating internal commands */
-  isSafe = Tcl_IsSafe(interp);
-
-  argtable = (cli_ArgvInfo *) ckalloc(sizeof(cli_ArgvInfo) * 100);
-  for (i = 0; i < 100; i++) {
-    argtable[i].key = (char *) NULL;
-    argtable[i].type = CLI_ARGV_END;
-    argtable[i].range_set = false;
-    argtable[i].option = CLI_ARGV_OPTIONAL;
-    argtable[i].def = (char *) NULL;
-    argtable[i].help = (char *) NULL;
-
-  }
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) ckalloc(sizeof(cli_cmdCallbackInfo));
-
-  cmdCallbackInfo->command_usage = usage;
-
-  cmdCallbackInfo->parsedArgTable = (cli_parsedArgInfo *) ckalloc(sizeof(cli_parsedArgInfo) * 100);
-  for (i = 0; i < 100; i++) {
-    cmdCallbackInfo->parsedArgTable[i].parsed_args = CLI_PARSED_ARGV_END;
-    cmdCallbackInfo->parsedArgTable[i].data = (char *) NULL;
-    cmdCallbackInfo->parsedArgTable[i].arg_string = (char *) NULL;
-    cmdCallbackInfo->parsedArgTable[i].arg_int = CLI_DEFAULT_INT_OR_FLOAT_VALUE;
-    cmdCallbackInfo->parsedArgTable[i].arg_float = CLI_DEFAULT_INT_OR_FLOAT_VALUE;
-    cmdCallbackInfo->parsedArgTable[i].arg_usage = (char *) NULL;
-
-  }
-
-  cmdCallbackInfo->userdata = (void *) NULL;
-
-  /* Create a new command with cmdName */
-  Tcl_CreateCommand(interp, cmdName, cmdFuncPtr, (ClientData) cmdCallbackInfo,
-                    (void (*)_ANSI_ARGS_((ClientData))) NULL);
-
-  cliSetArgvInfo(argtable);
-  if (isSafe) {
-    if (cmdScope == CLI_COMMAND_INTERNAL) {
-      Tcl_HideCommand(interp, cmdName, cmdName);
-    }
-  }
-
-
-  if (argvFuncPtr != NULL) {
-    (*argvFuncPtr) ();
-    /* Now call create Arguments so that we can fill the necessary
-       data structure and call parseArgv to parse the arguments.
-     */
-  }
-
-  required_args = getReqdArgs();
-  cliAddCommandtoHashtable(cmdName, argtable, required_args, cmdCallbackInfo->parsedArgTable, helpString);
-
-
-  return TCL_OK;
-
-}
-
-void
-setReqdArgs(char **required_args)
-{
-  reqd_args = required_args;
-}
-
-char **
-getReqdArgs()
-{
-  return reqd_args;
-}
-
-int
-cmd_ok()
-{
-  /* if it called many times, the interperter will store only
-     the latest.
-   */
-  Tcl_AppendElement(interp, "+OK");
-  return TCL_OK;
-}
-
-
-int
-cmd_error()
-{
-  /* If it called many times, the interpreter will store only
-     the latest
-   */
-  Tcl_AppendElement(interp, "-ERROR");
-  return TCL_ERROR;
-}

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/createCommand.h
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/createCommand.h b/cmd/traffic_shell/createCommand.h
deleted file mode 100644
index b6a5147..0000000
--- a/cmd/traffic_shell/createCommand.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/** @file
-
-  A brief file description
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-/*
- *   createCommand.h --
- *
- *
- *    This file provides basic create command declartion,
- *    for any new commands.
- *
- *    It overrides any existing commands with the new command
- *
- *
- *
- *    Dated  : 12/11/2000.
- */
-
-#ifndef CREATE_COMMAND
-#define CREATE_COMMAND
-
-#include "definitions.h"
-
-
-
-/* First Argument  cmdName: New command name for CLI
-   Second Argument cmdFuncPtr : A 'C' function to be invoked
-                                for the new Command
-   Third Argument argvFuncPtr : Function to attach arguments
-                                Pass NULL for no arguments.
-   Fourth Argument cmdScope   : Scope of the command.
-                                Pass NULL, if the new command
-                                needs to be visible for
-                                the customer.
-*/
-
-extern int createCommand(const char *cmdName, Tcl_CmdProc * cmdFuncPtr,
-                         createArgumentFuncPtr argvFuncPtr, cmdTerritory cmdScope, const char *usage, const char *helpstring);
-
-#endif /* CREATE_COMMAND */

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/definitions.h
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/definitions.h b/cmd/traffic_shell/definitions.h
deleted file mode 100644
index 327baad..0000000
--- a/cmd/traffic_shell/definitions.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/** @file
-
-  A brief file description
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-/*
- * Legal values for the type field of a createArgv:
- *
- */
-#include <tcl.h>
-
-#ifndef DEFINITIONS
-#define DEFINITIONS
-
-#define CLI_OK    TCL_OK
-
-#define CLI_ERROR TCL_ERROR
-#define CMD_OK cmd_ok()
-#define CMD_ERROR cmd_error()
-
-#define CLI_ARGV_CONSTANT                   0x1
-#define CLI_ARGV_INT                        0x2
-#define CLI_ARGV_STRING                     0x4
-#define CLI_ARGV_FLOAT                      0x8
-#define CLI_ARGV_FUNC                       0x10
-#define CLI_ARGV_HELP                       0x20
-#define CLI_ARGV_CONST_OPTION               0x40
-#define CLI_ARGV_OPTION_FLOAT_VALUE         0x80
-#define CLI_ARGV_OPTION_INT_VALUE           0x90
-#define CLI_ARGV_OPTION_NAME_VALUE          0x100
-#define CLI_ARGV_END                        0x200
-#define CLI_PARSED_ARGV_END                 0x1000
-#define CLI_PARSED_ARGV_DATA                0x1001
-#define CLI_PARENT_ARGV                     1
-#define CLI_ARGV_NO_POS                     -1
-
-#define CLI_ARGV_OPTIONAL                   0x400
-#define CLI_ARGV_REQUIRED                   0x800
-
-#define CLI_DEFAULT_INT_OR_FLOAT_VALUE               -32768
-
-typedef enum
-{
-  CLI_COMMAND_INTERNAL = 0x300,
-  CLI_COMMAND_EXTERNAL = 0x700
-} cmdTerritory;
-
-typedef int (commandFunctionptr) (ClientData clientData, Tcl_Interp * interp, int argc, char *argv[]);
-typedef int (createArgumentFuncPtr) ();
-
-int cmd_ok(void);
-int cmd_error(void);
-
-extern int AlarmCallbackPrint;
-
-int processArgForCommand(Tcl_Interp * interp, int argc, const char *argv[]);
-int processHelpCommand(int argc, const char *argv[]);
-
-#endif /*DEFINITIONS */

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/hashtable.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/hashtable.cc b/cmd/traffic_shell/hashtable.cc
deleted file mode 100644
index 183ebf0..0000000
--- a/cmd/traffic_shell/hashtable.cc
+++ /dev/null
@@ -1,219 +0,0 @@
-/** @file
-
-  Stuff related to hashtable
-
-  @section license License
-
-  Copyright (c) 1997-1998 Sun Microsystems, Inc.
-
-  TK 8.3 license:
-
-  This software is copyrighted by the Regents of the University of
-  California, Sun Microsystems, Inc., and other parties.  The following
-  terms apply to all files associated with the software unless explicitly
-  disclaimed in individual files.
-
-  The authors hereby grant permission to use, copy, modify, distribute,
-  and license this software and its documentation for any purpose, provided
-  that existing copyright notices are retained in all copies and that this
-  notice is included verbatim in any distributions. No written agreement,
-  license, or royalty fee is required for any of the authorized uses.
-  Modifications to this software may be copyrighted by their authors
-  and need not follow the licensing terms described here, provided that
-  the new terms are clearly indicated on the first page of each file where
-  they apply.
-
-  IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
-  FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
-  ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
-  DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
-  POSSIBILITY OF SUCH DAMAGE.
-
-  THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
-  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
-  FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE
-  IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
-  NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
-  MODIFICATIONS.
-
-  GOVERNMENT USE: If you are acquiring this software on behalf of the
-  U.S. government, the Government shall have only "Restricted Rights"
-  in the software and related documentation as defined in the Federal
-  Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2).  If you
-  are acquiring the software on behalf of the Department of Defense, the
-  software shall be classified as "Commercial Computer Software" and the
-  Government shall have only "Restricted Rights" as defined in Clause
-  252.227-7013 (c) (1) of DFARs.  Notwithstanding the foregoing, the
-  authors grant the U.S. Government and others acting in its behalf
-  permission to use and distribute the software in accordance with the
-  terms specified in this license.
-
-  @section details Details
-
-  Parts of this code is based on code from TK, tkConfig.c. The license
-  on this code allows us to use as long as we keep the license with
-  the source.  Note that only parts of this code is from tkConfig.c,
-  since it's been modified to work with our internals.
-
- */
-
-#include <tcl.h>
-#include <stdlib.h>
-#include <string.h>
-#include "definitions.h"
-#include "createArgument.h"
-#include "ink_string.h"
-#include "ink_defs.h"
-
-
-extern Tcl_Interp *interp;
-Tcl_HashTable CommandHashtable;
-
-#define OPTION_HASH_KEY "cliOptionTable"
-static void DestroyOptionHashTable _ANSI_ARGS_((ClientData clientData, Tcl_Interp * interp));
-
-int
-cliCreateCommandHashtable()
-{
-  Tcl_HashTable *hashTablePtr;
-
-  /*
-   * We use an AssocData value in the interpreter to keep a hash
-   * table of all the option tables we've created for this application.
-   * This is used for two purposes.  First, it allows us to share the
-   * tables (e.g. in several chains) and second, we use the deletion
-   * callback for the AssocData to delete all the option tables when
-   * the interpreter is deleted.  The code below finds the hash table
-   * or creates a new one if it doesn't already exist.
-   */
-  hashTablePtr = (Tcl_HashTable *) Tcl_GetAssocData(interp, OPTION_HASH_KEY, NULL);
-  if (hashTablePtr == NULL) {
-    hashTablePtr = (Tcl_HashTable *) ckalloc(sizeof(Tcl_HashTable));
-    Tcl_InitHashTable(hashTablePtr, TCL_STRING_KEYS);
-    Tcl_SetAssocData(interp, OPTION_HASH_KEY, DestroyOptionHashTable, (ClientData) hashTablePtr);
-  }
-
-  return TCL_OK;
-}
-
-
-int
-cliAddCommandtoHashtable(const char *name, cli_ArgvInfo * argtable,
-                         char **reqd_args, cli_parsedArgInfo * parsedArgTable, const char *helpString)
-{
-  Tcl_HashEntry *entryPtr;
-  int newCmd;
-  cli_CommandInfo *commandinfo;
-  Tcl_HashTable *hashTablePtr;
-
-  hashTablePtr = (Tcl_HashTable *) Tcl_GetAssocData(interp, OPTION_HASH_KEY, NULL);
-  if (hashTablePtr == NULL) {
-    Tcl_AppendResult(interp, "can not add command to hash table", (char *) NULL);
-    return TCL_ERROR;
-  }
-
-
-  commandinfo = (cli_CommandInfo *) ckalloc(sizeof(cli_CommandInfo));
-  commandinfo->command_name = name;
-  commandinfo->argtable = argtable;
-  commandinfo->reqd_args = reqd_args;
-  commandinfo->parsedArgTable = parsedArgTable;
-  if (helpString != NULL) {
-    int helpString_size = sizeof(char) * (strlen(helpString) + 1);
-    commandinfo->helpString = (char *) ckalloc(helpString_size);
-    ink_strlcpy(commandinfo->helpString, helpString, helpString_size);
-  }
-
-  /*
-   * See if a table has already been created for this template.  If
-   * so, just reuse the existing table.
-   */
-
-  entryPtr = Tcl_CreateHashEntry(hashTablePtr, name, &newCmd);
-  if (entryPtr == NULL) {
-    Tcl_AppendResult(interp, "can not add command to hash table", (char *) NULL);
-    return TCL_ERROR;
-  }
-  Tcl_SetHashValue(entryPtr, commandinfo);
-  return TCL_OK;
-}
-
-
-cli_CommandInfo *
-cliGetCommandArgsfromHashtable(char *name)
-{
-  Tcl_HashEntry *entryPtr;
-  cli_CommandInfo *commandinfo;
-  Tcl_HashTable *hashTablePtr;
-
-  hashTablePtr = (Tcl_HashTable *) Tcl_GetAssocData(interp, OPTION_HASH_KEY, NULL);
-  if (hashTablePtr == NULL) {
-    Tcl_AppendResult(interp, "can not add command to hash table", (char *) NULL);
-    return NULL;
-  }
-
-  entryPtr = Tcl_FindHashEntry(hashTablePtr, name);
-  if (entryPtr == NULL) {
-    Tcl_AppendResult(interp, "no command named \"", name, "\"", (char *) NULL);
-    return NULL;
-  }
-
-  commandinfo = (cli_CommandInfo *) Tcl_GetHashValue(entryPtr);
-  if (commandinfo == (cli_CommandInfo *) NULL) {
-    Tcl_AppendResult(interp, "no command named \"", name, "\"", (char *) NULL);
-    return NULL;
-  }
-
-  return (commandinfo);
-
-}
-
-
-static void
-DestroyOptionHashTable(ClientData clientData, Tcl_Interp * /* interp ATS_UNUSED */)
-    /* The hash table we are destroying */
-    /* The interpreter we are destroying */
-{
-  Tcl_HashTable *hashTablePtr = (Tcl_HashTable *) clientData;
-  Tcl_HashSearch search;
-  Tcl_HashEntry *hashEntryPtr;
-  cli_CommandInfo *commandinfo;
-  cli_ArgvInfo *infoPtr;
-
-  for (hashEntryPtr = Tcl_FirstHashEntry(hashTablePtr, &search);
-       hashEntryPtr != NULL; hashEntryPtr = Tcl_NextHashEntry(&search)) {
-
-    commandinfo = (cli_CommandInfo *) Tcl_GetHashValue(hashEntryPtr);
-    if (commandinfo) {
-      if (commandinfo->reqd_args) {
-        ckfree((char *) commandinfo->reqd_args);
-      }
-
-      if (commandinfo->argtable) {
-        for (infoPtr = commandinfo->argtable; infoPtr->key != NULL; infoPtr++) {
-          if (infoPtr->key) {
-            ckfree((char *) infoPtr->key);
-          }
-          if (infoPtr->help) {
-            ckfree((char *) infoPtr->help);
-          }
-          if (infoPtr->def) {
-            ckfree((char *) infoPtr->def);
-          }
-        }
-        ckfree((char *) commandinfo->argtable);
-      }
-
-      if (commandinfo->command_name) {
-        ckfree((char *) commandinfo->command_name);
-      }
-      if (commandinfo->helpString) {
-        ckfree((char *) commandinfo->helpString);
-      }
-      ckfree((char *) commandinfo);
-    }
-    hashEntryPtr = Tcl_NextHashEntry(&search);
-  }
-  Tcl_DeleteHashTable(hashTablePtr);
-  ckfree((char *) hashTablePtr);
-}

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/hashtable.h
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/hashtable.h b/cmd/traffic_shell/hashtable.h
deleted file mode 100644
index 96f9f7b..0000000
--- a/cmd/traffic_shell/hashtable.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/** @file
-
-  A brief file description
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-/* hashtable.h
- * has function declarations for the stuff realted to hashtable
- *
- */
-
-#ifndef CREATE_HASH
-#define CREATE_HASH
-
-#include "createArgument.h"
-
-extern int cliCreateCommandHashtable();
-
-extern int cliAddCommandtoHashtable(const char *name, cli_ArgvInfo * argtable, char **reqd_args,
-                                    cli_parsedArgInfo * parsedArgTable, const char *helpString);
-
-extern cli_CommandInfo *cliGetCommandArgsfromHashtable(char *name);
-
-extern int cliParseArgument(int argc, const char **argv, cli_CommandInfo * commandinfo);
-
-extern int getIntRange(char *range, int *r1, int *r2);
-extern int floatIntRange(char *range, float *r1, float *r2);
-#endif /* CREATE_HASH */

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/processArgument.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/processArgument.cc b/cmd/traffic_shell/processArgument.cc
deleted file mode 100644
index 24f0810..0000000
--- a/cmd/traffic_shell/processArgument.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/** @file
-
-  A brief file description
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-#include <tcl.h>
-#include "hashtable.h"
-#include "definitions.h"
-#include "ink_error.h"
-#include "ink_defs.h"
-#include <string.h>
-
-// processArgForCommand
-int
-processArgForCommand(Tcl_Interp * /* interp ATS_UNUSED */, int argc, const char *argv[])
-{
-  cli_CommandInfo *commandinfo = cliGetCommandArgsfromHashtable((char *) argv[0]);
-
-  if (commandinfo == NULL)
-    return TCL_ERROR;
-
-  return (cliParseArgument(argc, argv, commandinfo));
-}
-
-
-//processHelpCmd
-int
-processHelpCommand(int argc, const char *argv[])
-{
-  if (argc == 2) {
-    int length = strlen(argv[1]);
-    if ((length >= 2) && ((strncmp(argv[1], "-help", length) == 0) || (strncmp(argv[1], "-h", length) == 0))) {
-      return TCL_OK;
-    }
-  } else
-    return TCL_ERROR;
-
-  return TCL_ERROR;
-}

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/traffic_shell.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/traffic_shell.cc b/cmd/traffic_shell/traffic_shell.cc
deleted file mode 100644
index b876158..0000000
--- a/cmd/traffic_shell/traffic_shell.cc
+++ /dev/null
@@ -1,115 +0,0 @@
-/** @file
-
-  A brief file description
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-#include "ink_config.h"
-#include <stdlib.h>
-#include "tcl.h"
-#include <string.h>
-#include "ink_args.h"
-#include "ink_file.h"
-#include "ink_error.h"
-#include "I_Layout.h"
-#include "I_Version.h"
-#include "CliMgmtUtils.h"
-#include "mgmtapi.h"
-
-extern int Tcl_AppInit(Tcl_Interp * interp);
-extern void Tcl_ReadlineMain(void);
-extern int CliDisplayPrintf;
-void eventCallbackFn(char *name, char *msg, int pri, void *data);
-
-// default is that alarms appear in CLI as they occur
-int AlarmCallbackPrint = 1;
-
-// registers an event callback for all events in general
-void register_event_callback(void);
-
-AppVersionInfo appVersionInfo;
-int version_flag = 0;
-
-int
-main(int argc, char *argv[])
-{
-  TSMgmtError status;
-
-  // build the application information structure
-  appVersionInfo.setup(PACKAGE_NAME,"traffic_shell", PACKAGE_VERSION, __DATE__, __TIME__, BUILD_MACHINE, BUILD_PERSON, "");
-
-  // Before accessing file system initialize Layout engine
-  Layout::create();
-
-  // Argument description table used to describe how to parse command line args,
-  // see 'ink_args.h' for meanings of the various fields
-  ArgumentDescription argument_descriptions[] = {
-    {"version", 'V', "Print Version Id", "T", &version_flag, NULL, NULL}
-  };
-
-  // Process command line arguments and dump into variables
-  process_args(argument_descriptions, countof(argument_descriptions), argv);
-
-  // check for the version number request
-  if (version_flag) {
-    ink_fputln(stderr, appVersionInfo.FullVersionInfoStr);
-    exit(0);
-  }
-
-  Tcl_FindExecutable(argv[0]);
-
-  // traffic_shell binary should use printf to display information onscreen
-  CliDisplayPrintf = 1;
-
-  // initialize MgmtAPI using TS runtime directory
-  status = TSInit(Layout::get()->runtimedir, TS_MGMT_OPT_DEFAULTS);
-  if (status) {
-    printf("TSInit %d: Failed to initialize MgmtAPI in %s\n", status, Layout::get()->runtimedir);
-  } else {
-    printf("Successfully Initialized MgmtAPI in %s \n", Layout::get()->runtimedir);
-  }
-
-  register_event_callback();
-
-#if HAVE_LIBREADLINE
-  Tcl_SetMainLoop(Tcl_ReadlineMain);
-#endif
-
-  Tcl_Main(argc, argv, Tcl_AppInit);
-  exit(0);
-}
-
-void
-eventCallbackFn(char *name, char * /* msg ATS_UNUSED */, int /* pri ATS_UNUSED */, void * /* data ATS_UNUSED */)
-{
-  if (AlarmCallbackPrint == 1) {
-    printf("\n**********\n" "ALARM SIGNALLED: %s\n" "**********\n", name);
-  }
-
-  return;
-}
-
-// registers an event callback for all events in general
-void
-register_event_callback(void)
-{
-  // TODO: Check return code?
-  TSEventSignalCbRegister(NULL, eventCallbackFn, NULL);
-}

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 9c7ccdd..4142d0d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1852,7 +1852,6 @@ AC_CONFIG_FILES([
   cmd/Makefile
   cmd/traffic_cop/Makefile
   cmd/traffic_line/Makefile
-  cmd/traffic_shell/Makefile
   cmd/traffic_top/Makefile
   doc/Doxyfile
   doc/Makefile

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/Makefile.am
----------------------------------------------------------------------
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 4dd07da..966d601 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -19,36 +19,6 @@ trafficshelldir = $(pkgdocdir)/trafficshell
 .PHONY: help dirhtml singlehtml epub latex man changes linkcheck doxygen
 
 dist_trafficshell_DATA = \
-  man/config_alarms.1 \
-  man/config_cache.1 \
-  man/config_clock.1 \
-  man/config_dns.1 \
-  man/config_get.1 \
-  man/config_hard-restart.1 \
-  man/config_hostdb.1 \
-  man/config_http.1 \
-  man/config_icp.1 \
-  man/config_logging.1 \
-  man/config_name.1 \
-  man/config_network.1 \
-  man/config_parent.1 \
-  man/config_port-tunnels.1 \
-  man/config_remap.1 \
-  man/config_reset-stats.1 \
-  man/config_restart.1 \
-  man/config_root.1 \
-  man/config_scheduled-update.1 \
-  man/config_security.1 \
-  man/config_set.1 \
-  man/config_socks.1 \
-  man/config_ssl.1 \
-  man/config_start.1 \
-  man/config_stop.1 \
-  man/config_upgrade.1 \
-  man/config_virtual-ip.1 \
-  man/disable.1 \
-  man/enable.1 \
-  man/exit.1 \
   man/show_alarms.1 \
   man/show_cache.1 \
   man/show_cache-stats.1 \
@@ -80,7 +50,7 @@ dist_trafficshell_DATA = \
 
 if BUILD_MANPAGES
 
-man1_MANS = $(TS_MAN1_MANPAGES) man/traffic_shell.1
+man1_MANS = $(TS_MAN1_MANPAGES)
 man3_MANS = $(TS_MAN3_MANPAGES)
 man5_MANS = $(TS_MAN5_MANPAGES)
 man8_MANS = $(TS_MAN8_MANPAGES)

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_alarms.1
----------------------------------------------------------------------
diff --git a/doc/man/config_alarms.1 b/doc/man/config_alarms.1
deleted file mode 100644
index 283cf28..0000000
--- a/doc/man/config_alarms.1
+++ /dev/null
@@ -1,52 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:alarms"
-.SH NAME
-config:alarms \- Configure alarm notification.
-.SH SYNOPSIS
-config:alarms [options]
-.SH DESCRIPTION
-You use the config:alarms command to enable or disable alarm notification, and to 
-resolve active alarms.
-.SH OPTIONS
-The following options are supported for the config:alarms command:
-.SS "notify <on | off>"
-Enables (on) or disables (off) the alarm notification feature.  When off, alarm
-messages will not appear in traffic_shell.
-.SS "resolve-name <string>"
-Specifies the name of the alarm to resolve.
-.SS "resolve-number <integer>"
-Specifies the alarm to resolve from the show:alarms list.
-.SS "resolve-all"
-Specifies resolution of all active alarms.
-.SH EXAMPLES
-.SS "Example 1. Enabling Alarm notification"
-.PP
-.nf
-traffic_shell> config:alarms notify on
-traffic_shell> 
-.SS "Example 2. Resolving an alarm by name"
-.PP
-.nf
-traffic_shell> config:alarms resolve-name MGMT_ALARM_PROXY_PROCESS_DIED
-traffic_shell> 
-.SS "Example 3. Resolving an alarm by number"
-.PP
-.nf
-traffic_shell> config:alarms resolve-name 1                            
-traffic_shell> 
-.SH "SEE ALSO"
-show:alarms

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_cache.1
----------------------------------------------------------------------
diff --git a/doc/man/config_cache.1 b/doc/man/config_cache.1
deleted file mode 100644
index d7648d9..0000000
--- a/doc/man/config_cache.1
+++ /dev/null
@@ -1,140 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:cache"
-.SH NAME
-config:cache \- Enables caching for various protocols and configures general 
-caching parameters.
-.SH SYNOPSIS
-config:cache [options]
-.SH DESCRIPTION
-Use the config:cache command to enable caching for HTTP based 
-protocols. Also use this command to configure general caching parameters, 
-including storage, freshness, bypass, and alternates. When you execute the 
-config:cache command, you must use one of the options described below.
-.SH OPTIONS
-The following options are supported for the config:cache command:
-.SS "http <on | off>"
-Enables (on) or disables (off) the caching of HTTP requests. (The default value 
-is on.)
-.SS "ignore-bypass <on | off>"
-Enables (on) or disables (off) the ignore-bypass option. When enabled (on), the proxy ignores client requests to bypass the cache. (The default value is off.)
-.SS "max-object-size <bytes>"
-Specifies the maximum byte size of documents in the cache. A maximum byte size of zero means that there is no maximum. (The default value is zero.)
-.SS "max-alternates <num>"
-Specifies the maximum number of HTTP alternates that the proxy can cache. (The 
-default value is three.)
-.SS "file [url]"
-Specifies the location (URL) from which the proxy should retrieve and install 
-your cache.config file.
-.SS "freshness verify <when-expired | no-date | always | never>"
-Specifies when to revalidate content. Type when-expired to use cache directives 
-or heuristic. Type no-date to consider the object stale if the object contains 
-no Expires or cache-control headers. (The default value is when-expired.)
-.SS "freshness minimum <explicit | last-modified | nothing>"
-Specifies the type of headers required for the request to be cacheable.  Type 
-nothing  if you want no required headers to make the document cacheable. Type 
-last-modified if you want at least the last-modified header to be required. Type 
-explicit if you want the Expires or Cache-Control headers required (these 
-explicitly indicate lifetime duration). (The default value is nothing.)
-.SS "freshness no-expire-limit greater-than <seconds> less-than <seconds>"
-Specifies the minimum amount of time in seconds that a document in the cache can be considered fresh. (The default value is 3600.)
-Specifies the maximum amount of time in seconds that a document in the cache can be considered fresh. (The default value is 86400.)
-.SS "dynamic <on | off>"
-Enables (on) or disables (off) the caching of URLs that look dynamic. (The 
-default value is off.)
-.SS "alternates <on | off>"
-Enables (on) or disables (off) the caching of alternate versions of HTTP objects 
-that do not contain the Vary header. (The default value is off.)
-.SS "vary <text | images | other> <field>"
-Specifies the headers on which the proxy should vary for text, images, and 
-anything other than text and images.  (The default value is NULL.)
-.SS "cookies <none | all | images | non-text>"
-Specifies how cookies are cached. Type none to cache no responses to cookies. 
-Type all to cache for any content type. Type images to cache only for image 
-types. Type non-text to cache for all but text content-types. (The default value 
-is non-text.)
-.SH EXAMPLES
-.SS "Example 1. Enabling the caching of HTTP requests"
-.PP
-.nf
-traffic_shell> config:cache http on
-traffic_shell> 
-.SS "Example 2. Enabling the proxy to ignore client requests to"
-.SS "            bypass the cache"
-.PP
-.nf
-traffic_shell> config:cache ignore-bypass on
-traffic_shell> 
-.SS "Example 3. Specifying no maximum size of documents in the"
-.SS "           cache"
-.PP
-.nf
-traffic_shell> config:cache max-object-size 0
-traffic_shell> 
-.SS "Example 4. Specifying zero as the maximum number of HTTP" 
-.SS "           alternates that the proxy can cache"
-.PP
-.nf
-traffic_shell> config:cache max-alternates 0
-traffic_shell> 
-.SS "Example 5. Specifying the location (URL) from which the proxy" 
-.SS "           should retrieve and install your cache.config file"
-.PP
-.nf
-traffic_shell> config:cache file http://somedomain.com/path/cache.config
-traffic_shell> 
-.SS "Example 6. Revalidating content by using cache directives" 
-.SS "           or heuristic"
-.PP
-.nf
-traffic_shell> config:cache freshness verify when-expired
-traffic_shell> 
-.SS "Example 7. Requiring the Expires or Cache-Control headers "
-.SS "           for cacheability"
-.PP
-.nf
-traffic_shell> config:cache freshness minimum explicit
-traffic_shell> 
-.SS "Example 8. Specifying a minimum and a maximum amount of time"
-.SS "           seconds for a document in the cache to be "
-.SS "           considered fresh"
-.PP
-.nf
-traffic_shell> config:cache freshness no-expire-limit greater-than 900 less-than 7200
-traffic_shell> 
-.SS "Example 9. Enabling the caching of URLs that look dynamic"
-.PP
-.nf
-traffic_shell> config:cache dynamic on
-traffic_shell> 
-.SS "Example 10. Enabling the caching of alternate versions of HTTP 
-.SS "            objects that do not contain the Vary header"
-.PP
-.nf
-traffic_shell> config:cache alternates on
-traffic_shell> 
-.SS "Example 11. Specifying the Cookie header for the proxy to vary on for text"
-.PP
-.nf
-traffic_shell> config:cache vary text Cookie
-traffic_shell> 
-.SS "Example 12. Specifying not to cache responses from cookies"
-.PP
-.nf
-traffic_shell> config:cache cookies none
-traffic_shell> 
-.SH "SEE ALSO"
-show:cache, show:cache-stats

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_clock.1
----------------------------------------------------------------------
diff --git a/doc/man/config_clock.1 b/doc/man/config_clock.1
deleted file mode 100644
index 947abe3..0000000
--- a/doc/man/config_clock.1
+++ /dev/null
@@ -1,64 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:clock"
-.SH NAME
-config:clock \- Configure system clock settings.
-.SH SYNOPSIS
-config:clock [options]
-.SH DESCRIPTION
-You use the config:clock command specify system date, time, and timezone settings.
-A full restart of proxy software occurs when these changes take place.  This command
-requires root privileges, see config:root command.
-.SH OPTIONS
-The following options are supported for the config:clock command:
-.SS "date <mm/dd/yyyy>"
-Specifies the month, day, and year.
-.SS "time <hh:mm:ss>"
-Specifies the hour, minute, and seconds values in the local time zone.  The hour value
-is in 24-hour format.
-.SS "timezone <number from list | list>"
-List the available timezones, or specify the timezone from the numbered list.
-.SH EXAMPLES
-.SS "Example 1. Specifying system date"
-.PP
-.nf
-traffic_shell> config:clock date 
-DATE: 10/14/2001
-traffic_shell> config:clock date 10/15/2001
-(Stopping Proxy Software)
-Changing Date
-(Starting Proxy Software)
-DATE: 10/15/2001
-traffic_shell>
-.SS "Example 2. Listing available timezones"
-.PP
-.nf
-traffic_shell> config:clock timezone list
-0   Africa/Abidjan
-1   Africa/Accra
-2   Africa/Addis_Ababa
-...
-362   Pacific/Wake
-363   Pacific/Wallis
-364   Pacific/Yap
-traffic_shell>
-.SS "Example 3. Specifying the local timezone"
-.PP
-.nf
-traffic_shell> config:clock timezone 109
-traffic_shell>
-.SH "SEE ALSO"
-config:root

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_dns.1
----------------------------------------------------------------------
diff --git a/doc/man/config_dns.1 b/doc/man/config_dns.1
deleted file mode 100644
index 5e00aca..0000000
--- a/doc/man/config_dns.1
+++ /dev/null
@@ -1,46 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:dns"
-.SH NAME
-config:dns \- Configures DNS lookups.
-.SH SYNOPSIS
-config:dns [options]
-.SH DESCRIPTION
-Use the config:dns command to configure DNS proxying and DNS lookups. When you execute the 
-config:dns command, you must use one of the options described below.
-.SH OPTIONS
-The following options are supported for the config:dns command:
-.SS "proxy <on | off>"
-Enables (on) or disables (off) the DNS proxying feature.
-.SS "proxy-port <integer>"
-Specifies the port number used by the DNS proxy.
-.SS "resolve-timeout <seconds>"
-Specifies the DNS lookup timeout in seconds. (The default value is 20.)
-.SS "retries <number>"
-Specifies the number of DNS retries. (The default value is 5.)
-.SH EXAMPLES
-.SS "Example 1. Specifying 10 seconds as the DNS lookup timeout"
-.PP
-.nf
-traffic_shell> config:dns resolve-timeout 10
-traffic_shell> 
-.SS "Example 2. Specifying a value of three for DNS retries"
-.PP
-.nf
-traffic_shell> config:dns retries 3
-traffic_shell> 
-.SH "SEE ALSO"
-show:dns-resolver, show:dns-stats

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_get.1
----------------------------------------------------------------------
diff --git a/doc/man/config_get.1 b/doc/man/config_get.1
deleted file mode 100644
index bdb3802..0000000
--- a/doc/man/config_get.1
+++ /dev/null
@@ -1,37 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:get"
-.SH NAME
-config:get \- Displays a variable from the records.config file.
-.SH SYNOPSIS
-config:get [variable]
-.SH DESCRIPTION
-The config:get command enables you to display a variable and its value from the 
-records.config file. 
-.SH OPERANDS
-The following operand is supported:
-.SS "<variable>"
-You must type the name of the variable that you want to see.
-.SH EXAMPLES
-.SS "When you execute the config:get command, you see results "
-.SS "in the following format:"
-.PP
-.nf
-traffic_shell> config:get proxy.config.http.server_port
-proxy.config.http.server_port = 8080
-traffic_shell> 
-.SH "SEE ALSO"
-config:set

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_hard-restart.1
----------------------------------------------------------------------
diff --git a/doc/man/config_hard-restart.1 b/doc/man/config_hard-restart.1
deleted file mode 100644
index 9f63e44..0000000
--- a/doc/man/config_hard-restart.1
+++ /dev/null
@@ -1,31 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:hard-restart"
-.SH NAME
-config:hard-restart \- Restarts the mangement, monitoring, and proxy software.
-.SH SYNOPSIS
-config:hard-restart
-.SH DESCRIPTION
-The config:hard-restart command restarts your management, monitoring, and proxy software. 
-The config:hard-restart command takes no options. 
-.SH EXAMPLES
-When you execute the config:hard-restart command, you see results in the following format.
-.PP
-.nf
-traffic_shell> config:hard-restart
-traffic_shell>
-.SH "SEE ALSO"
-config:start, config:stop, config:restart

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_hostdb.1
----------------------------------------------------------------------
diff --git a/doc/man/config_hostdb.1 b/doc/man/config_hostdb.1
deleted file mode 100644
index 8660cd5..0000000
--- a/doc/man/config_hostdb.1
+++ /dev/null
@@ -1,72 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:hostdb"
-.SH NAME
-config:hostdb \- Configures the host database.
-.SH SYNOPSIS
-config:hostdb [options]
-.SH DESCRIPTION
-Use the config:hostdb command to configure the host database. You configure such 
-parameters as foreground, background, and lookup timeouts. When you execute the 
-config:hostdb command, you must use one of the options described below.
-.SH OPTIONS
-The following options are supported for the config:hostdb command:
-.SS "lookup-timeout <seconds>"
-Specifies the maximum number of seconds the proxy can wait for a lookup response 
-from the Domain Name Server. (The default value is 120.)
-.SS "foreground-timeout <seconds>"
-Specifies the foreground timeout in seconds. (The default value is 1440.)
-.SS "background-timeout <seconds>"
-Specifies the background timeout in minutes. (The default value is 720.)
-.SS "invalid-host-timeout <seconds>"
-Specifies the invalid host timeout in minutes. (The default value is zero.)
-.SS "re-dns-on-reload <on | off>"
-Enables (on) or disables (off) DNS lookup upon reload.  (The default value is 
-off.)
-.SS "clear"
-Clear the Host DB.
-.SH EXAMPLES
-.SS "Example 1. Specifying 30 seconds as the maximum that"
-.SS "           the proxy waits for a DNS lookup response"
-.PP
-.nf
-traffic_shell> config:hostdb lookup-timeout 30
-traffic_shell> 
-.SS "Example 2. Specifying 12 seconds as the foreground "
-.SS "           timeout"
-.PP
-.nf
-traffic_shell> config:hostdb foreground-timeout 12
-traffic_shell> 
-.SS "Example 3. Specifying 24 seconds as the background"
-.SS "           timeout"
-.PP
-.nf
-traffic_shell> config:hostdb background-timeout 24
-traffic_shell> 
-.SS "Example 4. Specifying 30 minutes as the invalid host"
-.SS "           timeout"
-.PP
-.nf
-traffic_shell> config:hostdb invalid-host-timeout 30
-traffic_shell> 
-.SS "Example 5. Enabling DNS on reload"
-.PP
-.nf
-traffic_shell> config:hostdb re-dns-on-reload on
-traffic_shell> 
-.SH "SEE ALSO"
-show:hostdb, show:hostdb-stats

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_http.1
----------------------------------------------------------------------
diff --git a/doc/man/config_http.1 b/doc/man/config_http.1
deleted file mode 100644
index 91dfcfb..0000000
--- a/doc/man/config_http.1
+++ /dev/null
@@ -1,78 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:http"
-.SH NAME
-config:http \- Configures HTTP caching.
-.SH SYNOPSIS
-config:http [options]
-.SH DESCRIPTION
-The config:http command enables you to configure HTTP caching through a variety of options. 
-You must use one of the options described below.
-.SH OPTIONS
-The following options are supported for the config:http command:
-.SS "status <on | off>"
-Enables (on) or disables (off) the proxy from serving HTTP requests.
-.SS "keep-alive-timeout-in <seconds>"
-Specifies the keep-alive timeout for inbound connections.
-.SS "keep-alive-timeout-out <seconds>"
-Specifies the keep-alive timeout for outbound connections.
-.SS "inactive-timeout-in <seconds>"
-Specifies the inactivity timeout for inbound connections.
-.SS "inactive-timeout-out <seconds>"
-Specifies the inactivity timeout for outbound connections.
-.SS "active-timeout-in <seconds>"
-Specifies the active timeout for inbound connections.
-.SS "active-timeout-out <seconds>"
-Specifies the active timeout for outbound connections.
-.SS "remove-from <on | off>"
-Enables (on) or disables (off) the removal of the From header from HTTP requests.
-.SS "remove-referer <on | off>"
-Enables (on) or disables (off) the removal of the Referer header from HTTP requests.
-.SS "remove-user <on | off>"
-Enables (on) or disables (off) the removal of the User header from HTTP requests.
-.SS "remove-cookie <on | off>"
-Enables (on) or disables (off) the removal of the Cookie header from HTTP requests.
-.SS "remove-header <string>"
-Specifies the name of a header to remove from HTTP requests.
-.SS "insert-ip <on | off>"
-Enables (on) or disables (off) the insertion of the client IP address into HTTP requests.
-.SS "remove-ip <on | off>"
-Enables (on) or disables (off) the removal of the client IP address from HTTP requests.
-.SS "proxy <fwd | rev | fwd-rev>"
-Specifies HTTP proxying in forward, reverse, or forward and reverse simultaneously.
-.SH EXAMPLES
-.SS "Example 1. Enabling the proxy to serve HTTP requests"
-.PP
-.nf
-traffic_shell> config:http on
-traffic_shell> 
-.SS "Example 2. Specifying the keep-alive tiemout for inbound requests"
-.PP
-.nf
-traffic_shell> config:http keep-alive-timeout-in 10
-traffic_shell> 
-.SS "Example 3. Specifying removal of the From header from HTTP requests"
-.PP
-.nf
-traffic_shell> config:http remove-from on
-traffic_shell> 
-.SS "Example 4. Specifying forward proxy mode for HTTP"
-.PP
-.nf
-traffic_shell> config:http fwd
-traffic_shell> 
-.SH "SEE ALSO"
-show:http, show:http-stats, show:http-trans-stats

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/doc/man/config_icp.1
----------------------------------------------------------------------
diff --git a/doc/man/config_icp.1 b/doc/man/config_icp.1
deleted file mode 100644
index 0149918..0000000
--- a/doc/man/config_icp.1
+++ /dev/null
@@ -1,72 +0,0 @@
-.\"  Licensed to the Apache Software Foundation (ASF) under one .\"
-.\"  or more contributor license agreements.  See the NOTICE file .\"
-.\"  distributed with this work for additional information .\"
-.\"  regarding copyright ownership.  The ASF licenses this file .\"
-.\"  to you under the Apache License, Version 2.0 (the .\"
-.\"  "License"); you may not use this file except in compliance .\"
-.\"  with the License.  You may obtain a copy of the License at .\"
-.\" .\"
-.\"      http://www.apache.org/licenses/LICENSE-2.0 .\"
-.\" .\"
-.\"  Unless required by applicable law or agreed to in writing, software .\"
-.\"  distributed under the License is distributed on an "AS IS" BASIS, .\"
-.\"  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. .\"
-.\"  See the License for the specific language governing permissions and .\"
-.\"  limitations under the License. .\"
-.TH "config:icp"
-.SH NAME
-config:icp \- Configures ICP caching.
-.SH SYNOPSIS
-config:icp [options]
-.SH DESCRIPTION
-The config:icp command enables you to configure ICP caching through a variety of 
-options. Use the config:icp command with options to configure mode, port 
-numbers, timeouts, and to enable ICP multicast. You must use one of the options 
-described below.
-.SH OPTIONS
-The following options are supported for the config:icp command:
-.SS "mode <receive | send-receive | disabled>"
-Sets the ICP mode for hierarchical caching. Type receive if you want to allow 
-the proxy to only receive ICP queries. Type send-receive if you want the proxy 
-to both send and receive ICP queries. Type disabled if you want to disable the 
-proxy from sending and receiving ICP queries. (The default value is disabled.)
-.SS "port <portnum>"
-Specifies the UDP port that you want to use for ICP messages. (The default is 
-3130.)
-.SS "multicast <on | off>"
-Enables (on) or disables (off) ICP multicast. (The default value is off.)
-.SS "query-timeout <seconds>"
-Specifies the timeout duration in seconds used for ICP queries. (The default value is 2.)
-.SS "query-timeout <seconds>"
-Retrieves (and updates) your icp.config file from a URL that you specify.
-.SH EXAMPLES
-.SS "Example 1. Enabling the proxy to receive ICP queries"
-.PP
-.nf
-traffic_shell> config:icp mode receive
-traffic_shell> 
-.SS "Example 2. Specifying UDP port number 3130 for ICP messages"
-.PP
-.nf
-traffic_shell> config:icp port 3130
-traffic_shell> 
-.SS "Example 3. Enabling ICP multicast"
-.PP
-.nf
-traffic_shell> config:icp multicast on
-traffic_shell> 
-.SS "Example 4. Specifying an ICP query timeout duration of two"
-.SS "           seconds"
-.PP
-.nf
-traffic_shell> config:icp query-timeout 2
-traffic_shell> 
-.SS "Example 5. Specifying a URL from which the proxy should"
-.SS "           retrieve and install or update your icp.config"
-.SS "           file"
-.PP
-.nf
-traffic_shell> config:icp peers http://somedomain.com/path/icp.config
-traffic_shell> 
-.SH "SEE ALSO"
-show:icp, show:icp-stats


[4/7] TS-1665 Remove traffic_shell

Posted by zw...@apache.org.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/ShowCmd.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/ShowCmd.cc b/cmd/traffic_shell/ShowCmd.cc
deleted file mode 100644
index 55b891f..0000000
--- a/cmd/traffic_shell/ShowCmd.cc
+++ /dev/null
@@ -1,2322 +0,0 @@
-/** @file
-
-  This file contains the "show" command implementation.
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include "ShowCmd.h"
-#include "ConfigCmd.h"
-#include "createArgument.h"
-#include "CliMgmtUtils.h"
-#include "CliDisplay.h"
-#include "ink_defs.h"
-#include "ink_string.h"
-
-////////////////////////////////////////////////////////////////
-// Cmd_Show
-//
-// This is the callback function for the "show" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_Show(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  char *cmdinfo, *temp;
-  int i = 0;
-  Cli_Debug("Cmd_Show\n");
-  Tcl_Eval(interp, "info commands show* ");
-
-  int cmdinfo_size = sizeof(char) * (strlen(Tcl_GetStringResult(interp)) + 2);
-  cmdinfo = (char *)alloca(cmdinfo_size);
-  ink_strlcpy(cmdinfo, Tcl_GetStringResult(interp), cmdinfo_size);
-  int temp_size = sizeof(char) * (strlen(cmdinfo) + 20);
-  temp = (char *)alloca(temp_size);
-  ink_strlcpy(temp, "lsort \"", temp_size);
-  ink_strlcat(temp, cmdinfo, temp_size);
-  ink_strlcat(temp, "\"", temp_size);
-  Tcl_Eval(interp, temp);
-  ink_strlcpy(cmdinfo, Tcl_GetStringResult(interp), cmdinfo_size);
-  i = i + strlen("show ");
-  while (cmdinfo[i] != 0) {
-    if (cmdinfo[i] == ' ') {
-      cmdinfo[i] = '\n';
-    }
-    i++;
-  }
-  cmdinfo[i] = '\n';
-  i++;
-  cmdinfo[i] = 0;
-  Cli_Printf("Following are the available show commands\n");
-  Cli_Printf(cmdinfo + strlen("show "));
-
-  return 0;
-
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowStatus
-//
-// This is the callback function for the "show:status" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowStatus(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowStatus\n");
-
-  return (ShowStatus());
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowVersion
-//
-// This is the callback function for the "show:version" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowVersion(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowVersion\n");
-
-  return (ShowVersion());
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowPorts
-//
-// This is the callback function for the "show:ports" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowPorts(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowPorts\n");
-
-  return (ShowPorts());
-}
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowCluster
-//
-// This is the callback function for the "show:security" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowCluster(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowCluster\n");
-
-  return (ShowCluster());
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowSecurity
-//
-// This is the callback function for the "show:security" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowSecurity(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowSecurity\n");
-
-  return (ShowSecurity());
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowHttp
-//
-// This is the callback function for the "show:http" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowHttp(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowHttp\n");
-
-  return (ShowHttp());
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowIcp
-//
-// This is the callback function for the "show:icp" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowIcp(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowIcp argc %d\n", argc);
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-
-  if (argtable[0].parsed_args != CLI_PARSED_ARGV_END) {
-    if (argtable[0].parsed_args == CMD_SHOW_ICP_PEER) {
-      return (ShowIcpPeer());
-    }
-    Cli_Error(ERR_INVALID_COMMAND);
-    return CMD_ERROR;
-  }
-  return (ShowIcp());
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ShowIcp
-//
-// Register "show:icp" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ShowIcp()
-{
-  createArgument("peers", 1, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_SHOW_ICP_PEER, "ICP Peer Configuration", (char *) NULL);
-
-  return 0;
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowProxy
-//
-// This is the callback function for the "show:proxy" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowProxy(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowProxy\n");
-
-  return (ShowProxy());
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowCache
-//
-// This is the callback function for the "show:cache" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowCache(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowCache\n");
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-
-  if (argtable[0].parsed_args != CLI_PARSED_ARGV_END) {
-    if (argtable[0].parsed_args == CMD_SHOW_CACHE_RULES) {
-      return (ShowCacheRules());
-    } else if (argtable[0].parsed_args == CMD_SHOW_CACHE_STORAGE) {
-      return (ShowCacheStorage());
-    }
-
-    Cli_Error(ERR_INVALID_COMMAND);
-    return CMD_ERROR;
-  }
-  return (ShowCache());
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ShowCache
-//
-// Register "show:cache" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ShowCache()
-{
-  createArgument("rules", 1, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_SHOW_CACHE_RULES, "Rules from cache.config", (char *) NULL);
-  createArgument("storage", 1, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_SHOW_CACHE_STORAGE, "Rules from storage.config", (char *) NULL);
-
-  return 0;
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowVirtualIp
-//
-// This is the callback function for the "show:virtual-ip" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowVirtualIp(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowVirtualIp\n");
-
-  return (ShowVirtualIp());
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowHostDb
-//
-// This is the callback function for the "show:hostdb" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowHostDb(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowHostDb\n");
-
-  return (ShowHostDb());
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowDnsResolver
-//
-// This is the callback function for the "show:dns-resolver" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowDnsResolver(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowDnsResolver\n");
-
-  return (ShowDnsResolver());
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowLogging
-//
-// This is the callback function for the "show:logging" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowLogging(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowLogging\n");
-
-  return (ShowLogging());
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowSsl
-//
-// This is the callback function for the "show:ssl" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowSsl(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowSsl\n");
-
-  return (ShowSsl());
-}
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowParents
-//
-// This is the callback function for the "show:parents" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowParents(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowParents\n");
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-
-  if (argtable[0].parsed_args != CLI_PARSED_ARGV_END) {
-    if (argtable[0].parsed_args == CMD_SHOW_PARENT_RULES) {
-      return (ShowParentRules());
-    }
-
-    Cli_Error(ERR_INVALID_COMMAND);
-    return CMD_ERROR;
-  }
-
-  return (ShowParents());
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ShowParents
-//
-// Register "show:parents" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ShowParents()
-{
-  createArgument("rules", 1, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_SHOW_PARENT_RULES, "Display parent.config rules file", (char *) NULL);
-  return 0;
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowRemap
-//
-// This is the callback function for the "show:remap" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowRemap(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowRemap\n");
-
-  return (ShowRemap());
-}
-
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowSocks
-//
-// This is the callback function for the "show:socks" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowSocks(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowSocks\n");
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-
-  if (argtable[0].parsed_args != CLI_PARSED_ARGV_END) {
-    if (argtable[0].parsed_args == CMD_SHOW_SOCKS_RULES) {
-      return (ShowSocksRules());
-    }
-
-    Cli_Error(ERR_INVALID_COMMAND);
-    return CMD_ERROR;
-  }
-
-  return (ShowSocks());
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ShowSocks
-//
-// Register "show:socks" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ShowSocks()
-{
-  createArgument("rules", 1, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_SHOW_SOCKS_RULES, "Display socks.config rules file", (char *) NULL);
-  return 0;
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowScheduledUpdate
-//
-// This is the callback function for the "show:scheduled-update" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowScheduledUpdate(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowScheduledUpdate\n");
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-
-  if (argtable[0].parsed_args != CLI_PARSED_ARGV_END) {
-    if (argtable[0].parsed_args == CMD_SHOW_UPDATE_RULES) {
-      return (ShowScheduledUpdateRules());
-    }
-
-    Cli_Error(ERR_INVALID_COMMAND);
-    return CMD_ERROR;
-  }
-
-  return (ShowScheduledUpdate());
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_ShowScheduledUpdate
-//
-// Register "show:scheduled-update" arguments with the Tcl interpreter.
-//
-int
-CmdArgs_ShowScheduledUpdate()
-{
-  createArgument("rules", 1, CLI_ARGV_CONSTANT,
-                 (char *) NULL, CMD_SHOW_UPDATE_RULES, "Display update.config rules file", (char *) NULL);
-  return 0;
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowProxyStats
-//
-// This is the callback function for the "show:proxy-stats" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowProxyStats(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowProxyStats\n");
-
-  return (ShowProxyStats());
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowHttpTransStats
-//
-// This is the callback function for the "show:http-trans-stats" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowHttpTransStats(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowHttpTransStats\n");
-
-  return (ShowHttpTransStats());
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowHttpStats
-//
-// This is the callback function for the "show:http-stats" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowHttpStats(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowHttpStats\n");
-
-  return (ShowHttpStats());
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowIcpStats
-//
-// This is the callback function for the "show:icp-stats" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowIcpStats(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowIcpStats\n");
-
-  return (ShowIcpStats());
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowCacheStats
-//
-// This is the callback function for the "show:cache-stats" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowCacheStats(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowCacheStats\n");
-
-  return (ShowCacheStats());
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowHostDbStats
-//
-// This is the callback function for the "show:hostdb-stats" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowHostDbStats(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowHostDbStats\n");
-
-  return (ShowHostDbStats());
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowDnsStats
-//
-// This is the callback function for the "show:dns-stats" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowDnsStats(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowDnsStats\n");
-
-  return (ShowDnsStats());
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowLoggingStats
-//
-// This is the callback function for the "show:logging-stats" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowLoggingStats(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowLoggingStats\n");
-
-  return (ShowLoggingStats());
-}
-
-////////////////////////////////////////////////////////////////
-// Cmd_ShowAlarms
-//
-// This is the callback function for the "show:alarms" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowAlarms(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowAlarms\n");
-
-  return (ShowAlarms());
-}
-
-////////////////////////////////////////////////////////////////
-// CmdArgs_None
-//
-// Register a command with no arguments with the Tcl interpreter.
-//
-int
-CmdArgs_None()
-{
-  return 0;
-}
-
-////////////////////////////////////////////////////////////////
-//
-// "show" sub-command implementations
-//
-////////////////////////////////////////////////////////////////
-
-
-// show status sub-command
-int
-ShowStatus()
-{
-  TSProxyStateT state = TSProxyStateGet();
-  Cli_Printf("\n");
-  switch (state) {
-  case TS_PROXY_ON:
-    Cli_Printf("Proxy -- on\n");
-    break;
-  case TS_PROXY_OFF:
-    Cli_Printf("Proxy -- off\n");
-    break;
-  case TS_PROXY_UNDEFINED:
-    Cli_Printf("Proxy status undefined\n");
-    break;
-  }
-  Cli_Printf("\n");
-
-  return CLI_OK;
-}
-
-// show version sub-command
-int
-ShowVersion()
-{
-  TSMgmtError status = TS_ERR_OKAY;
-  TSString ts_version = NULL;
-  TSString tm_version = NULL;
-
-  status = Cli_RecordGetString("proxy.process.version.server.short", &ts_version);
-  status = Cli_RecordGetString("proxy.node.version.manager.short", &tm_version);
-
-  Cli_Printf("\n");
-  Cli_Printf("traffic_server version --- %s\n" "traffic_manager version -- %s\n", ts_version, tm_version);
-  Cli_Printf("\n");
-
-  return status;
-}
-
-// show ports sub-command
-int
-ShowPorts()
-{
-  TSString http_ports = NULL;
-  TSInt cluster = -1;
-  TSInt cluster_rs = -1;
-  TSInt cluster_mc = -1;
-  TSInt socks_server = -1;
-  TSInt icp = -1;
-  TSString connect = NULL;
-
-  // retrieve values
-
-  Cli_RecordGetString("proxy.config.http.server_ports", &http_ports);
-  Cli_RecordGetInt("proxy.config.cluster.cluster_port", &cluster);
-  Cli_RecordGetInt("proxy.config.cluster.rsport", &cluster_rs);
-  Cli_RecordGetInt("proxy.config.cluster.mcport", &cluster_mc);
-  Cli_RecordGetString("proxy.config.http.connect_ports", &connect);
-  Cli_RecordGetInt("proxy.config.socks.socks_server_port", &socks_server);
-  Cli_RecordGetInt("proxy.config.icp.icp_port", &icp);
-
-  // display results
-  Cli_Printf("\n");
-  Cli_Printf("HTTP Ports ------------- %s\n", (http_ports != NULL) ? http_ports : "none");
-  Cli_Printf("Cluster Port ----------- %d\n", cluster);
-  Cli_Printf("Cluster RS Port -------- %d\n", cluster_rs);
-  Cli_Printf("Cluster MC Port -------- %d\n", cluster_mc);
-  Cli_Printf("Allowed CONNECT Ports -- %s\n", (connect != NULL) ? connect : "none");
-  Cli_Printf("SOCKS Server Port ------ %d\n", socks_server);
-  Cli_Printf("ICP Port --------------- %d\n", icp);
-  Cli_Printf("\n");
-
-  return CLI_OK;
-}
-
-// show cluster sub-command
-int
-ShowCluster()
-{
-  TSInt cluster = -1;
-  TSInt cluster_rs = -1;
-  TSInt cluster_mc = -1;
-
-  Cli_RecordGetInt("proxy.config.cluster.cluster_port", &cluster);
-  Cli_RecordGetInt("proxy.config.cluster.rsport", &cluster_rs);
-  Cli_RecordGetInt("proxy.config.cluster.mcport", &cluster_mc);
-
-  Cli_Printf("\n");
-  Cli_Printf("Cluster Port ----------- %d\n", cluster);
-  Cli_Printf("Cluster RS Port -------- %d\n", cluster_rs);
-  Cli_Printf("Cluster MC Port -------- %d\n", cluster_mc);
-  Cli_Printf("\n");
-
-  return CLI_OK;
-}
-
-// show security sub-command
-int
-ShowSecurity()
-{
-  Cli_Printf("\n");
-  Cli_Printf("Traffic Server Access\n" "-------------------\n");
-  TSMgmtError status = Cli_DisplayRules(TS_FNAME_IP_ALLOW);
-
-  return status;
-}
-
-// show http sub-command
-int
-ShowHttp()
-{
-  // declare and initialize variables
-
-  TSInt http_enabled = -1;
-  TSInt keepalive_timeout_in = -1;
-  TSInt keepalive_timeout_out = -1;
-  TSInt inactivity_timeout_in = -1;
-  TSInt inactivity_timeout_out = -1;
-  TSInt activity_timeout_in = -1;
-  TSInt activity_timeout_out = -1;
-  TSInt max_alts = -1;
-  TSInt remove_from = -1;
-  TSInt remove_referer = -1;
-  TSInt remove_user_agent = -1;
-  TSInt remove_cookie = -1;
-  TSString other_header_list = NULL;
-  TSInt insert_client_ip = -1;
-  TSInt remove_client_ip = -1;
-  TSInt http_server = -1;
-  TSString http_other = NULL;
-  TSString global_user_agent = NULL;
-
-  // retrieve values
-
-  Cli_RecordGetInt("proxy.config.http.cache.http", &http_enabled);
-  Cli_RecordGetInt("proxy.config.http.keep_alive_no_activity_timeout_in", &keepalive_timeout_in);
-  Cli_RecordGetInt("proxy.config.http.keep_alive_no_activity_timeout_out", &keepalive_timeout_out);
-  Cli_RecordGetInt("proxy.config.http.transaction_no_activity_timeout_in", &inactivity_timeout_in);
-  Cli_RecordGetInt("proxy.config.http.transaction_no_activity_timeout_out", &inactivity_timeout_out);
-  Cli_RecordGetInt("proxy.config.http.transaction_active_timeout_in", &activity_timeout_in);
-  Cli_RecordGetInt("proxy.config.http.transaction_active_timeout_out", &activity_timeout_out);
-  Cli_RecordGetInt("proxy.config.cache.limits.http.max_alts", &max_alts);
-  Cli_RecordGetInt("proxy.config.http.anonymize_remove_from", &remove_from);
-  Cli_RecordGetInt("proxy.config.http.anonymize_remove_referer", &remove_referer);
-  Cli_RecordGetInt("proxy.config.http.anonymize_remove_user_agent", &remove_user_agent);
-  Cli_RecordGetInt("proxy.config.http.anonymize_remove_cookie", &remove_cookie);
-  Cli_RecordGetString("proxy.config.http.anonymize_other_header_list", &other_header_list);
-  Cli_RecordGetInt("proxy.config.http.anonymize_insert_client_ip", &insert_client_ip);
-  Cli_RecordGetInt("proxy.config.http.anonymize_remove_client_ip", &remove_client_ip);
-  Cli_RecordGetInt("proxy.config.http.server_port", &http_server);
-
-  Cli_RecordGetString("proxy.config.http.global_user_agent_header", &global_user_agent);
-
-  // display results
-  Cli_Printf("\n");
-  Cli_Printf("HTTP Caching ------------------ %s\n", (http_enabled == 1) ? "on" : "off");
-  Cli_Printf("HTTP Server Port -------------- %d\n", http_server);
-  Cli_Printf("HTTP Other Ports -------------- %s\n", (http_other != NULL) ? http_other : "none");
-  Cli_Printf("Keep-Alive Timeout Inbound ---- %d s\n", keepalive_timeout_in);
-  Cli_Printf("Keep-Alive Timeout Outbound --- %d s\n", keepalive_timeout_out);
-  Cli_Printf("Inactivity Timeout Inbound ---- %d s\n", inactivity_timeout_in);
-  Cli_Printf("Inactivity Timeout Outbound --- %d s\n", inactivity_timeout_out);
-  Cli_Printf("Activity Timeout Inbound ------ %d s\n", activity_timeout_in);
-  Cli_Printf("Activity Timeout Outbound ----- %d s\n", activity_timeout_out);
-  Cli_Printf("Maximum Number of Alternates -- %d\n", max_alts);
-
-  if (remove_from == 1 || remove_referer == 1 || remove_user_agent == 1 || remove_cookie == 1) {
-    Cli_Printf("Remove the following common headers -- \n");
-    if (remove_from == 1) {
-      Cli_Printf("From\n");
-    }
-    if (remove_referer == 1) {
-      Cli_Printf("Referer\n");
-    }
-    if (remove_user_agent == 1) {
-      Cli_Printf("User-Agent\n");
-    }
-    if (remove_cookie == 1) {
-      Cli_Printf("Cookie\n");
-    }
-  }
-  if (other_header_list != NULL && strlen(other_header_list)) {
-    Cli_Printf("Remove additional headers ----- " "%s\n", other_header_list);
-  }
-  if (insert_client_ip == 1) {
-    Cli_Printf("Insert Client IP Address into Header\n");
-  }
-  if (remove_client_ip == 1) {
-    Cli_Printf("Remove Client IP Address from Header\n");
-  }
-  if (global_user_agent) {
-    Cli_Printf("Set User-Agent header to %s\n", global_user_agent);
-  }
-
-  Cli_Printf("\n");
-
-  return CLI_OK;
-}
-
-// show icp sub-command
-int
-ShowIcp()
-{
-  // declare and initialize variables
-
-  TSInt icp_enabled = 0;
-  TSInt icp_port = -1;
-  TSInt multicast_enabled = 0;
-  TSInt query_timeout = 2;
-
-  // retrieve value
-
-  Cli_RecordGetInt("proxy.config.icp.enabled", &icp_enabled);
-  Cli_RecordGetInt("proxy.config.icp.icp_port", &icp_port);
-  Cli_RecordGetInt("proxy.config.icp.multicast_enabled", &multicast_enabled);
-  Cli_RecordGetInt("proxy.config.icp.query_timeout", &query_timeout);
-
-  // display results
-  Cli_Printf("\n");
-
-  Cli_PrintEnable("ICP Mode Enabled ------- ", icp_enabled);
-  Cli_Printf("ICP Port --------------- %d\n", icp_port);
-  Cli_PrintEnable("ICP Multicast Enabled -- ", multicast_enabled);
-  Cli_Printf("ICP Query Timeout ------ %d s\n", query_timeout);
-  Cli_Printf("\n");
-
-  return CLI_OK;
-}
-
-// show icp peer sub-command
-int
-ShowIcpPeer()
-{
-  // display rules from icp.config
-  Cli_Printf("\n");
-  Cli_Printf("icp.config Rules\n" "-------------------\n");
-  TSMgmtError status = Cli_DisplayRules(TS_FNAME_ICP_PEER);
-  Cli_Printf("\n");
-
-  return status;
-}
-
-// show proxy sub-command
-int
-ShowProxy()
-{
-
-  TSString proxy_name = NULL;
-
-  Cli_RecordGetString("proxy.config.proxy_name", &proxy_name);
-  Cli_Printf("\n");
-  Cli_Printf("Name -- %s\n", proxy_name);
-  Cli_Printf("\n");
-
-  return CLI_OK;
-}
-
-// show cache sub-command
-int
-ShowCache()
-{
-  // declare and initialize variables
-
-  TSInt cache_http = -1;
-  TSInt cache_bypass = -1;
-  TSInt max_doc_size = -1;
-  TSInt when_to_reval = -1;
-  TSInt reqd_headers = -1;
-  TSInt min_life = -1;
-  TSInt max_life = -1;
-  TSInt dynamic_urls = -1;
-  TSInt alternates = -1;
-  const char *vary_def_text = "NONE";
-  const char *vary_def_image = "NONE";
-  const char *vary_def_other = "NONE";
-  TSInt cookies = -1;
-
-  // retrieve values
-
-  Cli_RecordGetInt("proxy.config.http.cache.http", &cache_http);
-  Cli_RecordGetInt("proxy.config.cache.max_doc_size", &max_doc_size);
-  Cli_RecordGetInt("proxy.config.http.cache.when_to_revalidate", &when_to_reval);
-  Cli_RecordGetInt("proxy.config.http.cache.required_headers", &reqd_headers);
-  Cli_RecordGetInt("proxy.config.http.cache.heuristic_min_lifetime", &min_life);
-  Cli_RecordGetInt("proxy.config.http.cache.heuristic_max_lifetime", &max_life);
-  Cli_RecordGetInt("proxy.config.http.cache.cache_urls_that_look_dynamic", &dynamic_urls);
-  Cli_RecordGetInt("proxy.config.http.cache.enable_default_vary_headers", &alternates);
-  Cli_RecordGetString("proxy.config.http.cache.vary_default_text", (char**)&vary_def_text);
-  Cli_RecordGetString("proxy.config.http.cache.vary_default_images", (char**)&vary_def_image);
-  Cli_RecordGetString("proxy.config.http.cache.vary_default_other", (char**)&vary_def_other);
-
-  Cli_RecordGetInt("proxy.config.http.cache.cache_responses_to_cookies", &cookies);
-
-
-  // display results
-  Cli_Printf("\n");
-
-  Cli_PrintEnable("HTTP Caching --------------------------- ", cache_http);
-
-  Cli_PrintEnable("Ignore User Requests To Bypass Cache --- ", cache_bypass);
-
-  if (max_doc_size == 0)
-    Cli_Printf("Maximum HTTP Object Size ----------- NONE\n");
-  else
-    Cli_Printf("Maximum HTTP Object Size ----------- %d\n", max_doc_size);
-
-  Cli_Printf("Freshness\n");
-  Cli_Printf("  Verify Freshness By Checking --------- ");
-
-  switch (when_to_reval) {
-  case 0:
-    Cli_Printf("When The Object Has Expired\n");
-    break;
-  case 1:
-    Cli_Printf("When The Object Has No Expiry Date\n");
-    break;
-  case 2:
-    Cli_Printf("Always\n");
-    break;
-  case 3:
-    Cli_Printf("Never\n");
-    break;
-  default:
-    Cli_Printf("unknown\n");
-    break;
-  }
-
-  Cli_Printf("  Minimum Information to be Cacheable -- ");
-
-  switch (reqd_headers) {
-  case 0:
-    Cli_Printf("Nothing\n");
-    break;
-  case 1:
-    Cli_Printf("A Last Modified Time\n");
-    break;
-  case 2:
-    Cli_Printf("An Explicit Lifetime\n");
-    break;
-  default:
-    Cli_Printf("unknown\n");
-    break;
-  }
-
-  Cli_Printf("  If Object has no Expiration Date: \n" "    Leave it in Cache for at least ----- %d s\n", min_life);
-  Cli_Printf("    but no more than ------------------- %d s\n", max_life);
-
-  Cli_Printf("Variable Content\n");
-
-  Cli_PrintEnable("  Cache Responses to URLs that contain\n    \"?\",\";\",\"cgi\" or end in \".asp\" ----- ",
-                  dynamic_urls);
-
-  Cli_PrintEnable("  Alternates Enabled ------------------- ", alternates);
-
-  Cli_Printf("  Vary on HTTP Header Fields: \n");
-  Cli_Printf("    Text ------------------------------- %s\n", vary_def_text);
-  Cli_Printf("    Images ----------------------------- %s\n", vary_def_image);
-  Cli_Printf("    Other ------------------------------ %s\n", vary_def_other);
-
-  Cli_Printf("  Cache responses to requests containing cookies for:\n");
-
-  switch (cookies) {
-  case 0:
-    Cli_Printf("    No Content-types\n");
-    break;
-  case 1:
-    Cli_Printf("    All Content-types\n");
-    break;
-  case 2:
-    Cli_Printf("    Only Image-content Types\n");
-    break;
-  case 3:
-    Cli_Printf("    Content Types which are not Text\n");
-    break;
-  case 4:
-    Cli_Printf("    Content Types which are not Text with some exceptions\n");
-    break;
-  }
-  Cli_Printf("\n");
-
-  return CLI_OK;
-}
-
-// show cache rules sub-command
-int
-ShowCacheRules()
-{
-  // display rules from cache.config
-  Cli_Printf("\n");
-
-  Cli_Printf("cache.config rules\n" "-------------------\n");
-  TSMgmtError status = Cli_DisplayRules(TS_FNAME_CACHE_OBJ);
-
-  Cli_Printf("\n");
-
-  return status;
-}
-
-// show cache storage sub-command
-int
-ShowCacheStorage()
-{
-  // display rules from storage.config
-  Cli_Printf("storage.config rules\n");
-
-  TSMgmtError status = Cli_DisplayRules(TS_FNAME_STORAGE);
-
-  return status;
-}
-
-
-// show virtual-ip sub-command
-int
-ShowVirtualIp()
-{
-  TSCfgContext VipCtx;
-  int EleCount, i;
-  TSVirtIpAddrEle *VipElePtr;
-
-  VipCtx = TSCfgContextCreate(TS_FNAME_VADDRS);
-  if (TSCfgContextGet(VipCtx) != TS_ERR_OKAY)
-    Cli_Printf("ERROR READING FILE\n");
-  EleCount = TSCfgContextGetCount(VipCtx);
-  Cli_Printf("\n");
-  Cli_Printf("%d Elements in Record\n", EleCount);
-  Cli_Printf("\n");
-  for (i = 0; i < EleCount; i++) {
-    VipElePtr = (TSVirtIpAddrEle *) TSCfgContextGetEleAt(VipCtx, i);
-    Cli_Printf("%d %s %s %d\n", i, VipElePtr->ip_addr, VipElePtr->intr, VipElePtr->sub_intr);
-  }
-  Cli_Printf("\n");
-  return CLI_OK;
-}
-
-// show hostdb sub-command
-int
-ShowHostDb()
-{
-
-  // declare and initialize variables
-
-  TSInt lookup_timeout = -1;
-  TSInt timeout = -1;
-  TSInt verify_after = -1;
-  TSInt fail_timeout = -1;
-  TSInt re_dns_on_reload = 0;
-  TSInt dns_lookup_timeout = -1;
-  TSInt dns_retries = -1;
-
-  // retrieve value
-
-  Cli_RecordGetInt("proxy.config.hostdb.lookup_timeout", &lookup_timeout);
-  Cli_RecordGetInt("proxy.config.hostdb.timeout", &timeout);
-  Cli_RecordGetInt("proxy.config.hostdb.verify_after", &verify_after);
-  Cli_RecordGetInt("proxy.config.hostdb.fail.timeout", &fail_timeout);
-  Cli_RecordGetInt("proxy.config.hostdb.re_dns_on_reload", &re_dns_on_reload);
-  Cli_RecordGetInt("proxy.config.dns.lookup_timeout", &dns_lookup_timeout);
-  Cli_RecordGetInt("proxy.config.dns.retries", &dns_retries);
-
-  // display results
-  Cli_Printf("\n");
-
-  Cli_Printf("Lookup Timeout ----------- %d s\n", lookup_timeout);
-  Cli_Printf("Foreground Timeout ------- %d s\n", timeout);
-  Cli_Printf("Background Timeout ------- %d s\n", verify_after);
-  Cli_Printf("Invalid Host Timeout ----- %d s\n", fail_timeout);
-  if (Cli_PrintEnable("Re-DNS on Reload --------- ", re_dns_on_reload) == CLI_ERROR) {
-    return CLI_ERROR;
-  }
-  Cli_Printf("Resolve Attempt Timeout -- %d s\n", dns_lookup_timeout);
-  Cli_Printf("Number of retries -------- %d \n", dns_retries);
-  Cli_Printf("\n");
-
-  return CLI_OK;
-}
-
-// show dns-resolver sub-command
-int
-ShowDnsResolver()
-{
-  // declare and initialize variables
-
-  TSInt dns_search_default_domains = 0;
-  TSInt http_enable_url_expandomatic = 0;
-
-  // retrieve value
-
-  Cli_RecordGetInt("proxy.config.dns.search_default_domains", &dns_search_default_domains);
-  Cli_RecordGetInt("proxy.config.http.enable_url_expandomatic", &http_enable_url_expandomatic);
-
-  // display results
-  Cli_Printf("\n");
-
-  if (Cli_PrintEnable("Local Domain Expansion -- ", dns_search_default_domains) == CLI_ERROR) {
-    return CLI_ERROR;
-  }
-  if (Cli_PrintEnable(".com Domain Expansion --- ", http_enable_url_expandomatic) == CLI_ERROR) {
-    return CLI_ERROR;
-  }
-  Cli_Printf("\n");
-
-  return CLI_OK;
-}
-
-// show logging sub-command
-int
-ShowLogging()
-{
-  // declare and initialize variables
-
-  TSInt logging_enabled = 0;
-  TSInt log_space = -1;
-  TSInt headroom_space = -1;
-  TSInt collation_mode = 0;
-  const char *collation_host = "None";
-  TSInt collation_port = -1;
-  TSString collation_secret = NULL;
-  TSInt host_tag = 0;
-  TSInt preproc_threads = 0;
-  TSInt orphan_space = -1;
-
-  TSInt squid_log = 0;
-  TSInt is_ascii = 1;
-  TSString file_name = NULL;
-  TSString file_header = NULL;
-
-  TSInt common_log = 0;
-  TSInt common_is_ascii = 0;
-  TSString common_file_name = NULL;
-  TSString common_file_header = NULL;
-
-  TSInt extended_log = 0;
-  TSInt extended_is_ascii = 0;
-  TSString extended_file_name = NULL;
-  TSString extended_file_header = NULL;
-
-  TSInt extended2_log = 0;
-  TSInt extended2_is_ascii = 0;
-  TSString extended2_file_name = NULL;
-  TSString extended2_file_header = NULL;
-
-  TSInt icp_log = 0;
-  TSInt http_host_log = 0;
-  TSInt custom_log = 0;
-  TSInt xml_log = 0;
-  TSInt rolling = 0;
-  TSInt roll_offset_hr = -1;
-  TSInt roll_interval = -1;
-  TSInt auto_delete = 0;
-  // retrieve value
-
-  Cli_RecordGetInt("proxy.config.log.logging_enabled", &logging_enabled);
-  Cli_RecordGetInt("proxy.config.log.max_space_mb_for_logs", &log_space);
-  Cli_RecordGetInt("proxy.config.log.max_space_mb_headroom", &headroom_space);
-  Cli_RecordGetInt("proxy.local.log.collation_mode", &collation_mode);
-  Cli_RecordGetString("proxy.config.log.collation_host", (char**)&collation_host);
-  Cli_RecordGetInt("proxy.config.log.collation_port", &collation_port);
-  Cli_RecordGetString("proxy.config.log.collation_secret", &collation_secret);
-  Cli_RecordGetInt("proxy.config.log.collation_host_tagged", &host_tag);
-  Cli_RecordGetInt("proxy.config.log.max_space_mb_for_orphan_logs", &orphan_space);
-  Cli_RecordGetInt("proxy.config.log.collation_preproc_threads", &preproc_threads);
-
-  Cli_RecordGetInt("proxy.config.log.squid_log_enabled", &squid_log);
-  Cli_RecordGetInt("proxy.config.log.squid_log_is_ascii", &is_ascii);
-  Cli_RecordGetString("proxy.config.log.squid_log_name", &file_name);
-  Cli_RecordGetString("proxy.config.log.squid_log_header", &file_header);
-
-  Cli_RecordGetInt("proxy.config.log.common_log_enabled", &common_log);
-  Cli_RecordGetInt("proxy.config.log.common_log_is_ascii", &common_is_ascii);
-  Cli_RecordGetString("proxy.config.log.common_log_name", &common_file_name);
-  Cli_RecordGetString("proxy.config.log.common_log_header", &common_file_header);
-
-  Cli_RecordGetInt("proxy.config.log.extended_log_enabled", &extended_log);
-  Cli_RecordGetInt("proxy.config.log.extended_log_is_ascii", &extended_is_ascii);
-  Cli_RecordGetString("proxy.config.log.extended_log_name", &extended_file_name);
-  Cli_RecordGetString("proxy.config.log.extended_log_header", &extended_file_header);
-
-  Cli_RecordGetInt("proxy.config.log.extended2_log_enabled", &extended2_log);
-  Cli_RecordGetInt("proxy.config.log.extended2_log_is_ascii", &extended2_is_ascii);
-  Cli_RecordGetString("proxy.config.log.extended2_log_name", &extended2_file_name);
-  Cli_RecordGetString("proxy.config.log.extended2_log_header", &extended2_file_header);
-
-  Cli_RecordGetInt("proxy.config.log.separate_icp_logs", &icp_log);
-  Cli_RecordGetInt("proxy.config.log.separate_host_logs", &http_host_log);
-  Cli_RecordGetInt("proxy.config.log.separate_host_logs", &custom_log);
-
-  Cli_RecordGetInt("proxy.config.log.rolling_enabled", &rolling);
-  Cli_RecordGetInt("proxy.config.log.rolling_offset_hr", &roll_offset_hr);
-  Cli_RecordGetInt("proxy.config.log.rolling_interval_sec", &roll_interval);
-  Cli_RecordGetInt("proxy.config.log.auto_delete_rolled_files", &auto_delete);
-
-  // display results
-  Cli_Printf("\n");
-
-  Cli_Printf("Logging Mode ----------------------------- ");
-  switch (logging_enabled) {
-  case 0:
-    Cli_Printf("no logging\n");
-    break;
-  case 1:
-    Cli_Printf("errors only\n");
-    break;
-  case 2:
-    Cli_Printf("transactions only\n");
-    break;
-  case 3:
-    Cli_Printf("errors and transactions\n");
-    break;
-  default:
-    Cli_Printf("invalid mode\n");
-    break;
-  }
-
-  Cli_Printf("\nManagement\n");
-  Cli_Printf("  Log Space Limit ------------------------ %d MB\n", log_space);
-  Cli_Printf("  Log Space Headroom --------------------- %d MB\n", headroom_space);
-
-  Cli_PrintEnable("\nLog Collation ---------------------------- ", collation_mode);
-  Cli_Printf("  Host ----------------------------------- %s\n", collation_host);
-  Cli_Printf("  Port ----------------------------------- %d\n", collation_port);
-  Cli_Printf("  Secret --------------------------------- %s\n", collation_secret);
-  Cli_PrintEnable("  Host Tagged ---------------------------- ", host_tag);
-  Cli_PrintEnable("  Preproc Threads ------------------------ ", preproc_threads);
-  Cli_Printf("  Space Limit for Orphan Files ----------- %d MB\n", orphan_space);
-
-  Cli_PrintEnable("\nSquid Format ----------------------------- ", squid_log);
-  if (is_ascii == 1)
-    Cli_Printf("  File Type ------------------------------ %s\n", "ASCII");
-  else if (is_ascii == 0)
-    Cli_Printf("  File Type ------------------------------ %s\n", "BINARY");
-  else
-    Cli_Debug(ERR_INVALID_PARAMETER);
-  Cli_Printf("  File Name ------------------------------ %s\n", file_name);
-  Cli_Printf("  File Header ---------------------------- %s\n", file_header);
-
-  Cli_PrintEnable("\nNetscape Common -------------------------- ", common_log);
-  if (common_is_ascii == 1)
-    Cli_Printf("  File Type ------------------------------ %s\n", "ASCII");
-  else if (common_is_ascii == 0)
-    Cli_Printf("  File Type ------------------------------ %s\n", "BINARY");
-  else
-    Cli_Debug(ERR_INVALID_PARAMETER);
-  Cli_Printf("  File Name ------------------------------ %s\n", common_file_name);
-  Cli_Printf("  File Header ---------------------------- %s\n", common_file_header);
-
-  Cli_PrintEnable("\nNetscape Extended ------------------------ ", extended_log);
-  if (extended_is_ascii == 1)
-    Cli_Printf("  File Type ------------------------------ %s\n", "ASCII");
-  else if (extended_is_ascii == 0)
-    Cli_Printf("  File Type ------------------------------ %s\n", "BINARY");
-  else
-    Cli_Debug(ERR_INVALID_PARAMETER);
-  Cli_Printf("  File Name ------------------------------ %s\n", extended_file_name);
-  Cli_Printf("  File Header ---------------------------- %s\n", extended_file_header);
-
-  Cli_PrintEnable("\nNetscape Extended2 ----------------------- ", extended2_log);
-  if (extended2_is_ascii == 1)
-    Cli_Printf("  File Type ------------------------------ %s\n", "ASCII");
-  else if (extended2_is_ascii == 0)
-    Cli_Printf("  File Type ------------------------------ %s\n", "BINARY");
-  else
-    Cli_Debug(ERR_INVALID_PARAMETER);
-  Cli_Printf("  File Name   ---------------------------- %s\n", extended2_file_name);
-  Cli_Printf("  File Header ---------------------------- %s\n", extended2_file_header);
-
-  Cli_Printf("\nSplitting\n");
-  Cli_PrintEnable("  ICP Log Splitting ---------------------- ", icp_log);
-  Cli_PrintEnable("  HTTP Host Log Splitting ---------------- ", http_host_log);
-  Cli_PrintEnable("\nCustom Logs ------------------------------ ", custom_log);
-  if (xml_log == 0)
-    Cli_Printf("Custom Log Definition Format ------------- %s\n", "Traditional");
-  Cli_PrintEnable("\nRolling ---------------------------------- ", rolling);
-  Cli_Printf("  Roll Offset Hour ----------------------- %d\n", roll_offset_hr);
-  Cli_Printf("  Roll Interval -------------------------- %d s\n", roll_interval);
-  Cli_PrintEnable("  Auto-delete rolled files (low space) --- ", auto_delete);
-  Cli_Printf("\n");
-
-  return CLI_OK;
-}
-
-// show ssl sub-command
-int
-ShowSsl()
-{
-  // declare and initialize variables
-
-  TSString connect_ports = NULL;
-
-  // retrieve value
-
-  Cli_RecordGetString("proxy.config.http.connect_ports", &connect_ports);
-
-  // display results
-  Cli_Printf("\n");
-  Cli_Printf("Restrict CONNECT connections to Ports -- %s\n", connect_ports);
-  Cli_Printf("\n");
-
-  return CLI_OK;
-}
-
-
-// show parents sub-command
-int
-ShowParents()
-{
-  TSMgmtError status = TS_ERR_OKAY;
-  TSInt parent_enabled = -1;
-  TSString parent_cache = NULL;
-
-  Cli_RecordGetInt("proxy.config.http.parent_proxy_routing_enable", &parent_enabled);
-  Cli_RecordGetString("proxy.config.http.parent_proxies", &parent_cache);
-  Cli_Printf("\n");
-  Cli_Printf("Parent Caching -- %s\n", (parent_enabled == 1) ? "on" : "off");
-  Cli_Printf("Parent Cache ---- %s\n", parent_cache);
-  Cli_Printf("\n");
-
-  return status;
-}
-
-// show:parent rules sub-command
-int
-ShowParentRules()
-{
-  // display rules from parent.config
-  Cli_Printf("\n");
-
-  Cli_Printf("parent.config rules\n" "-------------------\n");
-  TSMgmtError status = Cli_DisplayRules(TS_FNAME_PARENT_PROXY);
-  Cli_Printf("\n");
-
-  return status;
-}
-
-// show remap sub-command
-int
-ShowRemap()
-{
-  // display rules from remap.config
-  Cli_Printf("\n");
-
-  Cli_Printf("remap.config rules\n" "-------------------\n");
-  TSMgmtError status = Cli_DisplayRules(TS_FNAME_REMAP);
-  Cli_Printf("\n");
-
-  return status;
-}
-
-// show socks sub-command
-int
-ShowSocks()
-{
-  // declare and initialize variables
-
-  TSInt socks_enabled = 0;
-  TSInt version = -1;
-  TSString default_servers = NULL;
-  TSInt accept_enabled = -1;
-  TSInt accept_port = -1;
-
-  // retrieve values
-  Cli_RecordGetInt("proxy.config.socks.socks_needed", &socks_enabled);
-  Cli_RecordGetInt("proxy.config.socks.socks_version", &version);
-  Cli_RecordGetString("proxy.config.socks.default_servers", &default_servers);
-  Cli_RecordGetInt("proxy.config.socks.accept_enabled", &accept_enabled);
-  Cli_RecordGetInt("proxy.config.socks.accept_port", &accept_port);
-
-  // display results
-  Cli_Printf("\n");
-  Cli_PrintEnable("SOCKS -------------------- ", socks_enabled);
-  Cli_Printf("SOCKS Version ------------ %d\n", version);
-  Cli_Printf("SOCKS Default Servers ---- %s\n", default_servers);
-  Cli_PrintEnable("SOCKS Accept Enabled ----- ", accept_enabled);
-  Cli_Printf("SOCKS Accept Port -------- %d\n", accept_port);
-  Cli_Printf("\n");
-
-  return CLI_OK;
-}
-
-// show:socks rules sub-command
-int
-ShowSocksRules()
-{
-  // display rules from socks.config
-  Cli_Printf("\n");
-
-  Cli_Printf("socks.config rules\n" "-------------------\n");
-  TSMgmtError status = Cli_DisplayRules(TS_FNAME_SOCKS);
-  Cli_Printf("\n");
-
-  return status;
-}
-
-// show scheduled-update sub-command
-int
-ShowScheduledUpdate()
-{
-  // variable declaration
-  TSInt enabled = 0;
-  TSInt force = 0;
-  TSInt retry_count = -1;
-  TSInt retry_interval = -1;
-  TSInt concurrent_updates = 0;
-
-  // get value
-  Cli_RecordGetInt("proxy.config.update.enabled", &enabled);
-  Cli_RecordGetInt("proxy.config.update.retry_count", &retry_count);
-  Cli_RecordGetInt("proxy.config.update.retry_interval", &retry_interval);
-  Cli_RecordGetInt("proxy.config.update.concurrent_updates", &concurrent_updates);
-  Cli_RecordGetInt("proxy.config.update.force", &force);
-  //display values
-
-  // display rules from socks.config
-  Cli_Printf("\n");
-
-  if (Cli_PrintEnable("Scheduled Update ------------- ", enabled) == CLI_ERROR) {
-    return CLI_ERROR;
-  }
-
-  Cli_Printf("Update Error Retry Count ----- %d\n", retry_count);
-  Cli_Printf("Update Error Retry Interval -- %d s\n", retry_interval);
-  Cli_Printf("Maximum Concurrent Updates --- %d\n", concurrent_updates);
-
-  if (Cli_PrintEnable("Force Immediate Update ------- ", force) == CLI_ERROR) {
-    return CLI_ERROR;
-  }
-  Cli_Printf("\n");
-
-  return CLI_OK;
-}
-
-// show:scheduled-update rules sub-command
-int
-ShowScheduledUpdateRules()
-{
-  Cli_Printf("\n");
-
-  Cli_Printf("update.config rules\n" "-------------------\n");
-  TSMgmtError status = Cli_DisplayRules(TS_FNAME_UPDATE_URL);
-  Cli_Printf("\n");
-
-  return status;
-}
-
-////////////////////////////////////////////////////////////////
-// statistics sub-commands
-//
-
-// show proxy-stats sub-command
-int
-ShowProxyStats()
-{
-
-  TSFloat cache_hit_ratio = -1.0;
-  TSFloat cache_hit_mem_ratio = -1.0;
-  TSFloat bandwidth_hit_ratio = -1.0;
-  TSFloat percent_free = -1.0;
-  TSInt current_server_connection = -1;
-  TSInt current_client_connection = -1;
-  TSInt current_cache_connection = -1;
-  TSFloat client_throughput_out = -1.0;
-  TSFloat xacts_per_second = -1.0;
-
-
-  //get value
-  Cli_RecordGetFloat("proxy.node.cache_hit_ratio", &cache_hit_ratio);
-  Cli_RecordGetFloat("proxy.node.cache_hit_mem_ratio", &cache_hit_mem_ratio);
-  Cli_RecordGetFloat("proxy.node.bandwidth_hit_ratio", &bandwidth_hit_ratio);
-  Cli_RecordGetFloat("proxy.node.cache.percent_free", &percent_free);
-  Cli_RecordGetInt("proxy.node.current_server_connections", &current_server_connection);
-  Cli_RecordGetInt("proxy.node.current_client_connections", &current_client_connection);
-  Cli_RecordGetInt("proxy.node.current_cache_connections", &current_cache_connection);
-  Cli_RecordGetFloat("proxy.node.client_throughput_out", &client_throughput_out);
-  Cli_RecordGetFloat("proxy.node.user_agent_xacts_per_second", &xacts_per_second);
-
-
-  //display values
-  Cli_Printf("\n");
-
-  Cli_Printf("Document Hit Rate -------- %f %%\t *\n", 100 * cache_hit_ratio);
-  Cli_Printf("Ram cache Hit Rate ------- %f %%\t *\n", 100 * cache_hit_mem_ratio);
-  Cli_Printf("Bandwidth Saving --------- %f %%\t *\n", 100 * bandwidth_hit_ratio);
-  Cli_Printf("Cache Percent Free ------- %f %%\n", 100 * percent_free);
-  Cli_Printf("Open Server Connections -- %d\n", current_server_connection);
-  Cli_Printf("Open Client Connections -- %d\n", current_client_connection);
-  Cli_Printf("Open Cache Connections --- %d\n", current_cache_connection);
-  Cli_Printf("Client Throughput -------- %f MBit/Sec\n", client_throughput_out);
-  Cli_Printf("Transaction Per Second --- %f\n", xacts_per_second);
-  Cli_Printf("\n* Value represents 10 second average.\n");
-  Cli_Printf("\n");
-
-  return CLI_OK;
-}
-
-// show http-trans-stats sub-command
-int
-ShowHttpTransStats()
-{
-  //varialbles
-  TSFloat frac_avg_10s_hit_fresh = -1.0;
-  TSInt msec_avg_10s_hit_fresh = -1;
-  TSFloat frac_avg_10s_hit_revalidated = -1.0;
-  TSInt msec_avg_10s_hit_revalidated = -1;
-  TSFloat frac_avg_10s_miss_cold = -1.0;
-  TSInt msec_avg_10s_miss_cold = -1;
-  TSFloat frac_avg_10s_miss_not_cachable = -1.0;
-  TSInt msec_avg_10s_miss_not_cachable = -1;
-  TSFloat frac_avg_10s_miss_changed = -1.0;
-  TSInt msec_avg_10s_miss_changed = -1;
-  TSFloat frac_avg_10s_miss_client_no_cache = -1.0;
-  TSInt msec_avg_10s_miss_client_no_cache = -1;
-  TSFloat frac_avg_10s_errors_connect_failed = -1.0;
-  TSInt msec_avg_10s_errors_connect_failed = -1;
-  TSFloat frac_avg_10s_errors_other = -1.0;
-  TSInt msec_avg_10s_errors_other = -1;
-  TSFloat frac_avg_10s_errors_aborts = -1.0;
-  TSInt msec_avg_10s_errors_aborts = -1;
-  TSFloat frac_avg_10s_errors_possible_aborts = -1.0;
-  TSInt msec_avg_10s_errors_possible_aborts = -1;
-  TSFloat frac_avg_10s_errors_early_hangups = -1.0;
-  TSInt msec_avg_10s_errors_early_hangups = -1;
-  TSFloat frac_avg_10s_errors_empty_hangups = -1.0;
-  TSInt msec_avg_10s_errors_empty_hangups = -1;
-  TSFloat frac_avg_10s_errors_pre_accept_hangups = -1.0;
-  TSInt msec_avg_10s_errors_pre_accept_hangups = -1;
-  TSFloat frac_avg_10s_other_unclassified = -1.0;
-  TSInt msec_avg_10s_other_unclassified = -1;
-
-  //get values
-  Cli_RecordGetFloat("proxy.node.http.transaction_frac_avg_10s.hit_fresh", &frac_avg_10s_hit_fresh);
-  Cli_RecordGetFloat("proxy.node.http.transaction_frac_avg_10s.hit_revalidated", &frac_avg_10s_hit_revalidated);
-  Cli_RecordGetFloat("proxy.node.http.transaction_frac_avg_10s.miss_cold", &frac_avg_10s_miss_cold);
-  Cli_RecordGetFloat("proxy.node.http.transaction_frac_avg_10s.miss_not_cacheable", &frac_avg_10s_miss_not_cachable);
-  Cli_RecordGetFloat("proxy.node.http.transaction_frac_avg_10s.miss_changed", &frac_avg_10s_miss_changed);
-
-  Cli_RecordGetFloat("proxy.node.http.transaction_frac_avg_10s.miss_client_no_cache",
-                     &frac_avg_10s_miss_client_no_cache);
-  Cli_RecordGetFloat("proxy.node.http.transaction_frac_avg_10s.errors.connect_failed",
-                     &frac_avg_10s_errors_connect_failed);
-  Cli_RecordGetFloat("proxy.node.http.transaction_frac_avg_10s.errors.other", &frac_avg_10s_errors_other);
-  Cli_RecordGetFloat("proxy.node.http.transaction_frac_avg_10s.errors.aborts", &frac_avg_10s_errors_aborts);
-  Cli_RecordGetFloat("proxy.node.http.transaction_frac_avg_10s.errors.possible_aborts",
-                     &frac_avg_10s_errors_possible_aborts);
-  Cli_RecordGetFloat("proxy.node.http.transaction_frac_avg_10s.errors.early_hangups",
-                     &frac_avg_10s_errors_early_hangups);
-  Cli_RecordGetFloat("proxy.node.http.transaction_frac_avg_10s.errors.empty_hangups",
-                     &frac_avg_10s_errors_empty_hangups);
-  Cli_RecordGetFloat("proxy.node.http.transaction_frac_avg_10s.errors.pre_accept_hangups",
-                     &frac_avg_10s_errors_pre_accept_hangups);
-  Cli_RecordGetFloat("proxy.node.http.transaction_frac_avg_10s.other.unclassified", &frac_avg_10s_other_unclassified);
-
-  Cli_RecordGetInt("proxy.node.http.transaction_msec_avg_10s.hit_fresh", &msec_avg_10s_hit_fresh);
-  Cli_RecordGetInt("proxy.node.http.transaction_msec_avg_10s.hit_revalidated", &msec_avg_10s_hit_revalidated);
-  Cli_RecordGetInt("proxy.node.http.transaction_msec_avg_10s.miss_cold", &msec_avg_10s_miss_cold);
-  Cli_RecordGetInt("proxy.node.http.transaction_msec_avg_10s.miss_not_cacheable", &msec_avg_10s_miss_not_cachable);
-  Cli_RecordGetInt("proxy.node.http.transaction_msec_avg_10s.miss_changed", &msec_avg_10s_miss_changed);
-
-  Cli_RecordGetInt("proxy.node.http.transaction_msec_avg_10s.miss_client_no_cache", &msec_avg_10s_miss_client_no_cache);
-  Cli_RecordGetInt("proxy.node.http.transaction_msec_avg_10s.errors.connect_failed",
-                   &msec_avg_10s_errors_connect_failed);
-  Cli_RecordGetInt("proxy.node.http.transaction_msec_avg_10s.errors.other", &msec_avg_10s_errors_other);
-  Cli_RecordGetInt("proxy.node.http.transaction_msec_avg_10s.errors.aborts", &msec_avg_10s_errors_aborts);
-  Cli_RecordGetInt("proxy.node.http.transaction_msec_avg_10s.errors.possible_aborts",
-                   &msec_avg_10s_errors_possible_aborts);
-  Cli_RecordGetInt("proxy.node.http.transaction_msec_avg_10s.errors.early_hangups", &msec_avg_10s_errors_early_hangups);
-  Cli_RecordGetInt("proxy.node.http.transaction_msec_avg_10s.errors.empty_hangups", &msec_avg_10s_errors_empty_hangups);
-  Cli_RecordGetInt("proxy.node.http.transaction_msec_avg_10s.errors.pre_accept_hangups",
-                   &msec_avg_10s_errors_pre_accept_hangups);
-  Cli_RecordGetInt("proxy.node.http.transaction_msec_avg_10s.other.unclassified", &msec_avg_10s_other_unclassified);
-
-  //display
-  Cli_Printf("\n");
-  Cli_Printf("HTTP Transaction Frequency and Speeds\n");
-  Cli_Printf("Transaction Type              Frequency   Speed(ms)\n");
-  Cli_Printf("--Hits--\n");
-  Cli_Printf("Fresh ----------------------- %f %%  %d\n", 100 * frac_avg_10s_hit_fresh, msec_avg_10s_hit_fresh);
-  Cli_Printf("Stale Revalidated ----------- %f %%  %d\n", 100 * frac_avg_10s_hit_revalidated,
-             msec_avg_10s_hit_revalidated);
-  Cli_Printf("--Misses--\n");
-  Cli_Printf("Now Cached ------------------ %f %%  %d\n", 100 * frac_avg_10s_miss_cold, msec_avg_10s_miss_cold);
-  Cli_Printf("Server No Cache ------------- %f %%  %d\n", 100 * frac_avg_10s_miss_not_cachable,
-             msec_avg_10s_miss_not_cachable);
-  Cli_Printf("Stale Reloaded -------------- %f %%  %d\n", 100 * frac_avg_10s_miss_changed, msec_avg_10s_miss_changed);
-  Cli_Printf("Client No Cache ------------- %f %%  %d\n", 100 * frac_avg_10s_miss_client_no_cache,
-             msec_avg_10s_miss_client_no_cache);
-  Cli_Printf("--Errors--\n");
-  Cli_Printf("Connection Failures --------- %f %%  %d\n", 100 * frac_avg_10s_errors_connect_failed,
-             msec_avg_10s_errors_connect_failed);
-  Cli_Printf("Other Errors ---------------- %f %%  %d\n", 100 * frac_avg_10s_errors_other, msec_avg_10s_errors_other);
-  Cli_Printf("--Aborted Transactions--\n");
-  Cli_Printf("Client Aborts --------------- %f %%  %d\n", 100 * frac_avg_10s_errors_aborts, msec_avg_10s_errors_aborts);
-  Cli_Printf("Questionable Client Aborts -- %f %%  %d\n", 100 * frac_avg_10s_errors_possible_aborts,
-             msec_avg_10s_errors_possible_aborts);
-  Cli_Printf("Partial Request Hangups ----- %f %%  %d\n", 100 * frac_avg_10s_errors_early_hangups,
-             msec_avg_10s_errors_early_hangups);
-  Cli_Printf("Pre-Request Hangups --------- %f %%  %d\n", 100 * frac_avg_10s_errors_empty_hangups,
-             msec_avg_10s_errors_empty_hangups);
-  Cli_Printf("Pre-Connect Hangups --------- %f %%  %d\n", 100 * frac_avg_10s_errors_pre_accept_hangups,
-             msec_avg_10s_errors_pre_accept_hangups);
-  Cli_Printf("--Other Transactions--\n");
-  Cli_Printf("Unclassified ---------------- %f %%  %d\n", 100 * frac_avg_10s_other_unclassified,
-             msec_avg_10s_other_unclassified);
-  Cli_Printf("\n");
-
-  return CLI_OK;
-}
-
-// show http-stats sub-command
-int
-ShowHttpStats()
-{
-  //variable declaration
-  TSInt user_agent_response_document_total_size = -1;
-  TSInt user_agent_response_header_total_size = -1;
-  TSInt current_client_connections = -1;
-  TSInt current_client_transactions = -1;
-  TSInt origin_server_response_document_total_size = -1;
-  TSInt origin_server_response_header_total_size = -1;
-  TSInt current_server_connections = -1;
-  TSInt current_server_transactions = -1;
-  //get value
-  Cli_RecordGetInt("proxy.process.http.user_agent_response_document_total_size",
-                   &user_agent_response_document_total_size);
-  Cli_RecordGetInt("proxy.process.http.user_agent_response_header_total_size", &user_agent_response_header_total_size);
-  Cli_RecordGetInt("proxy.process.http.current_client_connections", &current_client_connections);
-  Cli_RecordGetInt("proxy.process.http.current_client_transactions", &current_client_transactions);
-  Cli_RecordGetInt("proxy.process.http.origin_server_response_document_total_size",
-                   &origin_server_response_document_total_size);
-  Cli_RecordGetInt("proxy.process.http.origin_server_response_header_total_size",
-                   &origin_server_response_header_total_size);
-  Cli_RecordGetInt("proxy.process.http.current_server_connections", &current_server_connections);
-  Cli_RecordGetInt("proxy.process.http.current_server_transactions", &current_server_transactions);
-
-  //display value
-  Cli_Printf("\n");
-  Cli_Printf("--Client--\n");
-  Cli_Printf("Total Document Bytes ----- %d MB\n", user_agent_response_document_total_size / (1024 * 1024));
-  Cli_Printf("Total Header Bytes ------- %d MB\n", user_agent_response_header_total_size / (1024 * 1024));
-  Cli_Printf("Total Connections -------- %d\n", current_client_connections);
-  Cli_Printf("Transactins In Progress -- %d\n", current_client_transactions);
-  Cli_Printf("--Server--\n");
-  Cli_Printf("Total Document Bytes ----- %d MB\n", origin_server_response_document_total_size / (1024 * 1024));
-  Cli_Printf("Total Header Bytes ------- %d MB\n", origin_server_response_header_total_size / (1024 * 1024));
-  Cli_Printf("Total Connections -------- %d\n", current_server_connections);
-  Cli_Printf("Transactins In Progress -- %d\n", current_server_transactions);
-  Cli_Printf("\n");
-
-  return CLI_OK;
-}
-
-// show proxy-stats sub-command
-int
-ShowIcpStats()
-{
-  //variable declaration
-
-  TSInt icp_query_requests = -1;
-  TSInt total_udp_send_queries = -1;
-  TSInt icp_query_hits = -1;
-  TSInt icp_query_misses = -1;
-  TSInt icp_remote_responses = -1;
-  TSFloat total_icp_response_time = -1.0;
-  TSFloat total_icp_request_time = -1.0;
-  TSInt icp_remote_query_requests = -1;
-  TSInt cache_lookup_success = -1;
-  TSInt cache_lookup_fail = -1;
-  TSInt query_response_write = -1;
-
-  //get values
-  Cli_RecordGetInt("proxy.process.icp.icp_query_requests", &icp_query_requests);
-  Cli_RecordGetInt("proxy.process.icp.total_udp_send_queries", &total_udp_send_queries);
-  Cli_RecordGetInt("proxy.process.icp.icp_query_hits", &icp_query_hits);
-  Cli_RecordGetInt("proxy.process.icp.icp_query_misses", &icp_query_misses);
-  Cli_RecordGetInt("proxy.process.icp.icp_remote_responses", &icp_remote_responses);
-  Cli_RecordGetFloat("proxy.process.icp.total_icp_response_time", &total_icp_response_time);
-  Cli_RecordGetFloat("proxy.process.icp.total_icp_request_time", &total_icp_request_time);
-  Cli_RecordGetInt("proxy.process.icp.icp_remote_query_requests", &icp_remote_query_requests);
-  Cli_RecordGetInt("proxy.process.icp.cache_lookup_success", &cache_lookup_success);
-  Cli_RecordGetInt("proxy.process.icp.cache_lookup_fail", &cache_lookup_fail);
-  Cli_RecordGetInt("proxy.process.icp.query_response_write", &query_response_write);
-
-  //display values
-  Cli_Printf("\n");
-  Cli_Printf("--Queries Originating From This Node--\n");
-  Cli_Printf("Query Requests ----------------------------- %d\n", icp_query_requests);
-  Cli_Printf("Query Messages Sent ------------------------ %d\n", total_udp_send_queries);
-  Cli_Printf("Peer Hit Messages Received ----------------- %d\n", icp_query_hits);
-  Cli_Printf("Peer Miss Messages Received ---------------- %d\n", icp_query_misses);
-  Cli_Printf("Total Responses Received ------------------- %d\n", icp_remote_responses);
-  Cli_Printf("Average ICP Message Response Time ---------- %f ms\n", total_icp_response_time);
-  Cli_Printf("Average ICP Request Time ------------------- %f ms\n", total_icp_request_time);
-  Cli_Printf("\n");
-  Cli_Printf("--Queries Originating from ICP Peers--\n");
-  Cli_Printf("Query Messages Received -------------------- %d\n", icp_remote_query_requests);
-  Cli_Printf("Remote Query Hits -------------------------- %d\n", cache_lookup_success);
-  Cli_Printf("Remote Query Misses ------------------------ %d\n", cache_lookup_fail);
-  Cli_Printf("Successful Response Message Sent to Peers -- %d\n", query_response_write);
-  Cli_Printf("\n");
-
-  return CLI_OK;
-}
-
-// show proxy-stats sub-command
-int
-ShowCacheStats()
-{
-  //variable delaration
-  TSInt bytes_used = -1;
-  TSInt bytes_total = -1;
-  TSInt ram_cache_total_bytes = -1;
-  TSInt ram_cache_bytes_used = -1;
-  TSInt ram_cache_hits = -1;
-  TSInt ram_cache_misses = -1;
-  TSInt lookup_active = -1;
-  TSInt lookup_success = -1;
-  TSInt lookup_failure = -1;
-  TSInt read_active = -1;
-  TSInt read_success = -1;
-  TSInt read_failure = -1;
-  TSInt write_active = -1;
-  TSInt write_success = -1;
-  TSInt write_failure = -1;
-  TSInt update_active = -1;
-  TSInt update_success = -1;
-  TSInt update_failure = -1;
-  TSInt remove_active = -1;
-  TSInt remove_success = -1;
-  TSInt remove_failure = -1;
-
-  //get values
-
-  Cli_RecordGetInt("proxy.process.cache.bytes_used", &bytes_used);
-  Cli_RecordGetInt("proxy.process.cache.bytes_total", &bytes_total);
-  Cli_RecordGetInt("proxy.process.cache.ram_cache.total_bytes", &ram_cache_total_bytes);
-  Cli_RecordGetInt("proxy.process.cache.ram_cache.bytes_used", &ram_cache_bytes_used);
-  Cli_RecordGetInt("proxy.process.cache.ram_cache.hits", &ram_cache_hits);
-  Cli_RecordGetInt("proxy.process.cache.ram_cache.misses", &ram_cache_misses);
-  Cli_RecordGetInt("proxy.process.cache.lookup.active", &lookup_active);
-  Cli_RecordGetInt("proxy.process.cache.lookup.success", &lookup_success);
-  Cli_RecordGetInt("proxy.process.cache.lookup.failure", &lookup_failure);
-  Cli_RecordGetInt("proxy.process.cache.read.active", &read_active);
-  Cli_RecordGetInt("proxy.process.cache.read.success", &read_success);
-  Cli_RecordGetInt("proxy.process.cache.read.failure", &read_failure);
-  Cli_RecordGetInt("proxy.process.cache.write.active", &write_active);
-  Cli_RecordGetInt("proxy.process.cache.write.success", &write_success);
-  Cli_RecordGetInt("proxy.process.cache.write.failure", &write_failure);
-  Cli_RecordGetInt("proxy.process.cache.update.active", &update_active);
-  Cli_RecordGetInt("proxy.process.cache.update.success", &update_success);
-  Cli_RecordGetInt("proxy.process.cache.update.failure", &update_failure);
-  Cli_RecordGetInt("proxy.process.cache.remove.active", &remove_active);
-  Cli_RecordGetInt("proxy.process.cache.remove.success", &remove_success);
-  Cli_RecordGetInt("proxy.process.cache.remove.failure", &remove_failure);
-
-  //display values
-  Cli_Printf("\n");
-  Cli_Printf("Bytes Used --- %d GB\n", bytes_used / (1024 * 1024 * 1024));
-  Cli_Printf("Cache Size --- %d GB\n", bytes_total / (1024 * 1024 * 1024));
-  Cli_Printf("--RAM Cache--\n");
-  Cli_Printf("Total Bytes -- %" PRId64 "\n", ram_cache_total_bytes);
-  Cli_Printf("Bytes Used --- %" PRId64 "\n", ram_cache_bytes_used);
-  Cli_Printf("Hits --------- %d\n", ram_cache_hits);
-  Cli_Printf("Misses ------- %d\n", ram_cache_misses);
-  Cli_Printf("--Lookups--\n");
-  Cli_Printf("In Progress -- %d\n", lookup_active);
-  Cli_Printf("Hits --------- %d\n", lookup_success);
-  Cli_Printf("Misses ------- %d\n", lookup_failure);
-  Cli_Printf("--Reads--\n");
-  Cli_Printf("In Progress -- %d\n", read_active);
-  Cli_Printf("Hits --------- %d\n", read_success);
-  Cli_Printf("Misses ------- %d\n", read_failure);
-  Cli_Printf("--Writes--\n");
-  Cli_Printf("In Progress -- %d\n", write_active);
-  Cli_Printf("Hits --------- %d\n", write_success);
-  Cli_Printf("Misses ------- %d\n", write_failure);
-  Cli_Printf("--Updates--\n");
-  Cli_Printf("In Progress -- %d\n", update_active);
-  Cli_Printf("Hits --------- %d\n", update_success);
-  Cli_Printf("Misses ------- %d\n", update_failure);
-  Cli_Printf("--Removes--\n");
-  Cli_Printf("In Progress -- %d\n", remove_active);
-  Cli_Printf("Hits --------- %d\n", remove_success);
-  Cli_Printf("Misses ------- %d\n", remove_failure);
-  Cli_Printf("\n");
-
-  return CLI_OK;
-}
-
-// show proxy-stats sub-command
-int
-ShowHostDbStats()
-{
-  //variables
-  TSFloat hit_ratio = -1.0;
-  TSFloat lookups_per_second = -1.0;
-
-  //get values
-  Cli_RecordGetFloat("proxy.node.hostdb.hit_ratio", &hit_ratio);
-  Cli_RecordGetFloat("proxy.node.dns.lookups_per_second", &lookups_per_second);
-
-  //display values
-  Cli_Printf("\n");
-  Cli_Printf("Host Database hit Rate -- %f %% *\n", 100 * hit_ratio);
-  Cli_Printf("DNS Lookups Per Second -- %f\n", lookups_per_second);
-  Cli_Printf("\n* Value reprensents 10 second average.\n");
-  Cli_Printf("\n");
-
-  return CLI_OK;
-}
-
-// show proxy-stats sub-command
-int
-ShowDnsStats()
-{
-  TSFloat lookups_per_second = -1.0;
-
-  Cli_RecordGetFloat("proxy.node.dns.lookups_per_second", &lookups_per_second);
-  Cli_Printf("\n");
-  Cli_Printf("DNS Lookups Per Second -- %f\n", lookups_per_second);
-  Cli_Printf("\n");
-
-  return CLI_OK;
-}
-
-// show proxy-stats sub-command
-int
-ShowLoggingStats()
-{
-  TSCounter log_file_open = -1;
-  TSInt log_files_space_used = -1;
-  TSCounter event_log_access = -1;
-  TSCounter event_log_access_skip = -1;
-  TSCounter event_log_error = -1;
-
-  Cli_RecordGetCounter("proxy.process.log.log_files_open", &log_file_open);
-  Cli_RecordGetInt("proxy.process.log.log_files_space_used", &log_files_space_used);
-  Cli_RecordGetCounter("proxy.process.log.event_log_access", &event_log_access);
-  Cli_RecordGetCounter("proxy.process.log.event_log_access_skip", &event_log_access_skip);
-  Cli_RecordGetCounter("proxy.process.log.event_log_error", &event_log_error);
-
-  Cli_Printf("\n");
-  Cli_Printf("Current Open Log Files ----------- %d\n", log_file_open);
-  Cli_Printf("Space Used For Log Files --------- %d\n", log_files_space_used);
-  Cli_Printf("Number of Access Events Logged --- %d\n", event_log_access);
-  Cli_Printf("Number of Access Events Skipped -- %d\n", event_log_access_skip);
-  Cli_Printf("Number of Error Events Logged ---- %d\n", event_log_error);
-  Cli_Printf("\n");
-
-  return CLI_OK;
-}
-
-// show:alarms sub-command
-int
-ShowAlarms()
-{
-  TSList events;
-  int count, i;
-  char *name;
-
-  events = TSListCreate();
-  TSMgmtError status = TSActiveEventGetMlt(events);
-  if (status != TS_ERR_OKAY) {
-    if (events) {
-      TSListDestroy(events);
-    }
-    Cli_Error(ERR_ALARM_LIST);
-    return CLI_ERROR;
-  }
-
-  count = TSListLen(events);
-  if (count > 0) {
-    Cli_Printf("\nActive Alarms\n");
-    for (i = 0; i < count; i++) {
-      name = (char *) TSListDequeue(events);
-      Cli_Printf("  %d. %s\n", i + 1, name);
-    }
-    Cli_Printf("\n");
-  } else {
-    Cli_Printf("\nNo active alarms.\n\n");
-  }
-
-  TSListDestroy(events);
-
-  return CLI_OK;
-}

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/2369a1a4/cmd/traffic_shell/ShowCmd.h
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/ShowCmd.h b/cmd/traffic_shell/ShowCmd.h
deleted file mode 100644
index ab9a8c6..0000000
--- a/cmd/traffic_shell/ShowCmd.h
+++ /dev/null
@@ -1,247 +0,0 @@
-/** @file
-
-  A brief file description
-
-  @section license License
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
- */
-
-/****************************************************************
- * Filename: ShowCmd.h
- * Purpose: This file contains the CLI's "show" command definitions.
- *
- *
- ****************************************************************/
-
-#include <tcl.h>
-#include "createArgument.h"
-#include "definitions.h"
-
-#ifndef __SHOW_CMD_H__
-#define __SHOW_CMD_H__
-
-// enumerated type which captures all "show" commands
-typedef enum
-{
-  CMD_SHOW_STATUS = 1,
-  CMD_SHOW_VERSION,
-  CMD_SHOW_PORTS,
-  CMD_SHOW_CLUSTER,
-  CMD_SHOW_SECURITY,
-  CMD_SHOW_HTTP,
-  CMD_SHOW_ICP,
-  CMD_SHOW_ICP_PEER,
-  CMD_SHOW_PROXY,
-  CMD_SHOW_CACHE,
-  CMD_SHOW_CACHE_RULES,
-  CMD_SHOW_CACHE_STORAGE,
-  CMD_SHOW_VIRTUAL_IP,
-  CMD_SHOW_HOSTDB,
-  CMD_SHOW_DNS_RESOLVER,
-  CMD_SHOW_LOGGING,
-  CMD_SHOW_SSL,
-  CMD_SHOW_FILTER,
-  CMD_SHOW_PARENTS,
-  CMD_SHOW_PARENT_RULES,
-  CMD_SHOW_REMAP,
-  CMD_SHOW_SOCKS,
-  CMD_SHOW_SOCKS_RULES,
-  CMD_SHOW_PORT_TUNNELS,
-  CMD_SHOW_SCHEDULED_UPDATE,
-  CMD_SHOW_UPDATE_RULES,
-  CMD_SHOW_PROXY_STATS,
-  CMD_SHOW_HTTP_TRANS_STATS,
-  CMD_SHOW_HTTP_STATS,
-  CMD_SHOW_ICP_STATS,
-  CMD_SHOW_CACHE_STATS,
-  CMD_SHOW_HOSTDB_STATS,
-  CMD_SHOW_DNS_STATS,
-  CMD_SHOW_LOGGING_STATS
-} cliShowCommand;
-
-////////////////////////////////////////////////////////////////
-// ShowCmd
-//
-// This is the callback function for the "show" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int ShowCmd(ClientData clientData, Tcl_Interp * interp, int argc, char *argv[]);
-
-////////////////////////////////////////////////////////////////
-// ShowCmdArgs
-//
-// Register "show" command arguments with the Tcl interpreter.
-//
-int ShowCmdArgs();
-
-int Cmd_Show(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowStatus(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowVersion(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowPorts(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowCluster(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowSecurity(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowHttp(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowIcp(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int CmdArgs_ShowIcp();
-int Cmd_ShowProxy(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowCache(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int CmdArgs_ShowCache();
-int Cmd_ShowVirtualIp(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowHostDb(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowDnsResolver(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowLogging(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowSsl(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowParents(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int CmdArgs_ShowParents();
-int Cmd_ShowRemap(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowSocks(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int CmdArgs_ShowSocks();
-int Cmd_ShowScheduledUpdate(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int CmdArgs_ShowScheduledUpdate();
-int Cmd_ShowProxyStats(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowHttpTransStats(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowHttpStats(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowIcpStats(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowCacheStats(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowHostDbStats(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowDnsStats(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowLoggingStats(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowAlarms(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowRadius(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowNtlm(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int Cmd_ShowNtlmStats(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-int CmdArgs_None();
-
-int getnameserver(char *nameserver, int len);
-int getrouter(char *router, int len);
-
-////////////////////////////////////////////////////////////////
-//
-// "show" sub-command implementations
-//
-////////////////////////////////////////////////////////////////
-
-// show status sub-command
-int ShowStatus();
-
-// show version sub-command
-int ShowVersion();
-
-// show ports sub-command
-int ShowPorts();
-
-// show cluster sub-command
-int ShowCluster();
-
-// show security sub-command
-int ShowSecurity();
-
-// show http sub-command
-int ShowHttp();
-
-// show icp sub-command
-int ShowIcp();
-
-// show icp peer sub-command
-int ShowIcpPeer();
-
-// show proxy sub-command
-int ShowProxy();
-
-// show cache sub-command
-int ShowCache();
-
-// show cache rules sub-command
-int ShowCacheRules();
-
-// show cache storage sub-command
-int ShowCacheStorage();
-
-// show virtual-ip sub-command
-int ShowVirtualIp();
-
-// show hostdb sub-command
-int ShowHostDb();
-
-// show dns-resolver sub-command
-int ShowDnsResolver();
-
-// show logging sub-command
-int ShowLogging();
-
-// show ssl sub-command
-int ShowSsl();
-
-// show parents sub-command
-int ShowParents();
-
-// show:parent rules sub-command
-int ShowParentRules();
-
-// show remap sub-command
-int ShowRemap();
-
-// show socks sub-command
-int ShowSocks();
-
-// show:socks rules sub-command
-int ShowSocksRules();
-
-// show scheduled-update sub-command
-int ShowScheduledUpdate();
-
-// show:scheduled-update rules sub-command
-int ShowScheduledUpdateRules();
-
-////////////////////////////////////////////////////////////////
-// statistics sub-commands
-//
-
-// show proxy-stats sub-command
-int ShowProxyStats();
-
-// show proxy-stats sub-command
-int ShowHttpTransStats();
-
-// show proxy-stats sub-command
-int ShowHttpStats();
-
-// show proxy-stats sub-command
-int ShowIcpStats();
-
-// show proxy-stats sub-command
-int ShowCacheStats();
-
-// show proxy-stats sub-command
-int ShowHostDbStats();
-
-// show proxy-stats sub-command
-int ShowDnsStats();
-
-// show proxy-stats sub-command
-int ShowLoggingStats();
-
-// show:alarms sub-command
-int ShowAlarms();
-
-#endif // __SHOW_CMD_H__