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

[1/3] TS-2823: Change names of TSEvent and TSError in mgmt API

Repository: trafficserver
Updated Branches:
  refs/heads/master 0c97776a2 -> cb6e6f6a8


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/include/mgmtapi.h
----------------------------------------------------------------------
diff --git a/mgmt/api/include/mgmtapi.h b/mgmt/api/include/mgmtapi.h
index 2bdd01f..5471eb5 100644
--- a/mgmt/api/include/mgmtapi.h
+++ b/mgmt/api/include/mgmtapi.h
@@ -1,6 +1,10 @@
 /** @file
 
-  A brief file description
+  Definitions for internal management API.
+
+  Purpose: This file contains all API wrapper functions in one class. In
+  order to eliminate the interdependencies of other library calls, new
+  types and structs will be defined and used in the wrapper function calls.
 
   @section license License
 
@@ -21,15 +25,6 @@
   limitations under the License.
  */
 
-/*****************************************************************************
- * Filename: mgmtapi.h
- * Purpose: This file contains all API wrapper functions in one class. In
- * order to eliminate the interdependencies of other library calls, new
- * types and structs will be defined and used in the wrapper function calls.
- *
- *
- ***************************************************************************/
-
 #ifndef __TS_MGMT_API_H__
 #define __TS_MGMT_API_H__
 
@@ -101,7 +96,7 @@ extern "C"
     TS_ERR_PARAMS,             /* Invalid parameters for a fn */
 
     TS_ERR_FAIL
-  } TSError;
+  } TSMgmtError;
 
 /***************************************************************************
  * Constants
@@ -473,16 +468,11 @@ extern "C"
 
   typedef struct
   {
-    /*TSEventTypeT type; *//* Predefined or Conditional event */
     int id;
     char *name;                 /* pre-set, immutable for PREDEFINED events */
     char *description;          /* predefined events have default */
-    /*char *condition; *//* pre-set, immutable for PREDEFINED events */
     TSEventPriorityT priority; /* WARNING, ERROR, FATAL */
-    /*bool local; */
-    /*unsigned long inet_address; *//* for remote peer events */
-    /*bool seen; *//* for remote peer events */
-  } TSEvent;
+  } TSMgmtEvent;
 
 /* Will not be used until new Cougar Event Processor */
   typedef struct
@@ -558,7 +548,7 @@ extern "C"
   typedef struct
   {
     TSRuleTypeT type;
-    TSError error;
+    TSMgmtError error;
   } TSCfgEle;
 
 /* cache.config */
@@ -802,7 +792,7 @@ extern "C"
 /*--- TSList operations --------------------------------------------------*/
   tsapi TSList TSListCreate();
   tsapi void TSListDestroy(TSList l);        /* list must be empty */
-  tsapi TSError TSListEnqueue(TSList l, void *data);
+  tsapi TSMgmtError TSListEnqueue(TSList l, void *data);
   tsapi void *TSListDequeue(TSList l);
   tsapi bool TSListIsEmpty(TSList l);
   tsapi int TSListLen(TSList l);     /* returns -1 if list is invalid */
@@ -811,7 +801,7 @@ extern "C"
 /*--- TSIpAddrList operations --------------------------------------------*/
   tsapi TSIpAddrList TSIpAddrListCreate();
   tsapi void TSIpAddrListDestroy(TSIpAddrList ip_addrl);
-  tsapi TSError TSIpAddrListEnqueue(TSIpAddrList ip_addrl, TSIpAddrEle * ip_addr);
+  tsapi TSMgmtError TSIpAddrListEnqueue(TSIpAddrList ip_addrl, TSIpAddrEle * ip_addr);
   tsapi TSIpAddrEle *TSIpAddrListDequeue(TSIpAddrList ip_addrl);
   tsapi int TSIpAddrListLen(TSIpAddrList ip_addrl);
   tsapi bool TSIpAddrListIsEmpty(TSIpAddrList ip_addrl);
@@ -821,7 +811,7 @@ extern "C"
 /*--- TSPortList operations ----------------------------------------------*/
   tsapi TSPortList TSPortListCreate();
   tsapi void TSPortListDestroy(TSPortList portl);
-  tsapi TSError TSPortListEnqueue(TSPortList portl, TSPortEle * port);
+  tsapi TSMgmtError TSPortListEnqueue(TSPortList portl, TSPortEle * port);
   tsapi TSPortEle *TSPortListDequeue(TSPortList portl);
   tsapi bool TSPortListIsEmpty(TSPortList portl);
   tsapi int TSPortListLen(TSPortList portl);
@@ -830,7 +820,7 @@ extern "C"
 /*--- TSStringList operations --------------------------------------------*/
   tsapi TSStringList TSStringListCreate();
   tsapi void TSStringListDestroy(TSStringList strl);
-  tsapi TSError TSStringListEnqueue(TSStringList strl, char *str);
+  tsapi TSMgmtError TSStringListEnqueue(TSStringList strl, char *str);
   tsapi char *TSStringListDequeue(TSStringList strl);
   tsapi bool TSStringListIsEmpty(TSStringList strl);
   tsapi int TSStringListLen(TSStringList strl);
@@ -839,7 +829,7 @@ extern "C"
 /*--- TSIntList operations --------------------------------------------*/
   tsapi TSIntList TSIntListCreate();
   tsapi void TSIntListDestroy(TSIntList intl);
-  tsapi TSError TSIntListEnqueue(TSIntList intl, int *str);
+  tsapi TSMgmtError TSIntListEnqueue(TSIntList intl, int *str);
   tsapi int *TSIntListDequeue(TSIntList intl);
   tsapi bool TSIntListIsEmpty(TSIntList intl);
   tsapi int TSIntListLen(TSIntList intl);
@@ -848,7 +838,7 @@ extern "C"
 /*--- TSDomainList operations --------------------------------------------*/
   tsapi TSDomainList TSDomainListCreate();
   tsapi void TSDomainListDestroy(TSDomainList domainl);
-  tsapi TSError TSDomainListEnqueue(TSDomainList domainl, TSDomain * domain);
+  tsapi TSMgmtError TSDomainListEnqueue(TSDomainList domainl, TSDomain * domain);
   tsapi TSDomain *TSDomainListDequeue(TSDomainList domainl);
   tsapi bool TSDomainListIsEmpty(TSDomainList domainl);
   tsapi int TSDomainListLen(TSDomainList domainl);
@@ -874,8 +864,8 @@ extern "C"
  * specify the TSRuleTypeT when he/she creates the Ele.
  */
 
-  tsapi TSEvent *TSEventCreate();
-  tsapi void TSEventDestroy(TSEvent * event);
+  tsapi TSMgmtEvent *TSEventCreate();
+  tsapi void TSEventDestroy(TSMgmtEvent * event);
   tsapi TSRecordEle *TSRecordEleCreate();
   tsapi void TSRecordEleDestroy(TSRecordEle * ele);
   tsapi TSIpAddrEle *TSIpAddrEleCreate();
@@ -945,13 +935,13 @@ extern "C"
  *       even if not successful connection (eg. client program is started
  *       before TM) then can still make API calls and will try connecting then
  */
-  tsapi TSError TSInit(const char *socket_path, TSInitOptionT options);
+  tsapi TSMgmtError TSInit(const char *socket_path, TSInitOptionT options);
 
 /* TSTerminate: does clean up for API clients
  * Input: <none>
  * Output: <none>
  */
-  tsapi TSError TSTerminate();
+  tsapi TSMgmtError TSTerminate();
 
 /*--- plugin initialization -----------------------------------------------*/
 /* TSPluginInit: called by traffic_manager to initialize the plugin
@@ -973,10 +963,10 @@ extern "C"
 
 /*--- network operations --------------------------------------------------*/
 /* UNIMPLEMENTED: used for remote clients on a different machine */
-  tsapi TSError TSConnect(TSIpAddr ip_addr, int port);
-  tsapi TSError TSDisconnectCbRegister(TSDisconnectFunc * func, void *data);
-  tsapi TSError TSDisconnectRetrySet(int retries, int retry_sleep_msec);
-  tsapi TSError TSDisconnect();
+  tsapi TSMgmtError TSConnect(TSIpAddr ip_addr, int port);
+  tsapi TSMgmtError TSDisconnectCbRegister(TSDisconnectFunc * func, void *data);
+  tsapi TSMgmtError TSDisconnectRetrySet(int retries, int retry_sleep_msec);
+  tsapi TSMgmtError TSDisconnect();
 
 
 /*--- control operations --------------------------------------------------*/
@@ -991,39 +981,39 @@ extern "C"
  *         clear - specifies if want to start TS with clear_cache or
  *                 clear_cache_hostdb option, or just run TS with no options;
  *                  only applies when turning proxy on
- * Output: TSError
+ * Output: TSMgmtError
  */
-  tsapi TSError TSProxyStateSet(TSProxyStateT proxy_state, TSCacheClearT clear);
+  tsapi TSMgmtError TSProxyStateSet(TSProxyStateT proxy_state, TSCacheClearT clear);
 
 /* TSReconfigure: tell traffic_server to re-read its configuration files
  * Input:  <none>
- * Output: TSError
+ * Output: TSMgmtError
  */
-  tsapi TSError TSReconfigure();
+  tsapi TSMgmtError TSReconfigure();
 
 /* TSRestart: restarts Traffic Manager and Traffic Server
  * Input:  cluster - local or cluster-wide
- * Output: TSError
+ * Output: TSMgmtError
  */
-  tsapi TSError TSRestart(bool cluster);
+  tsapi TSMgmtError TSRestart(bool cluster);
 
 /* TSActionDo: based on TSActionNeedT, will take appropriate action
  * Input: action - action that needs to be taken
- * Output: TSError
+ * Output: TSMgmtError
  */
-  tsapi TSError TSActionDo(TSActionNeedT action);
+  tsapi TSMgmtError TSActionDo(TSActionNeedT action);
 
 /* TSBounce: restart the traffic_server process(es).
  * Input: cluster - local or cluster-wide
- * Output TSError
+ * Output TSMgmtError
  */
-  tsapi TSError TSBounce(bool cluster);
+  tsapi TSMgmtError TSBounce(bool cluster);
 
 /* TSStorageDeviceOp: Request an operation on a storage device.
  * @arg dev Target device, specified by path to device.
  * @return Success.
  */
-  tsapi TSError TSStorageDeviceCmdOffline(char const* dev);
+  tsapi TSMgmtError TSStorageDeviceCmdOffline(char const* dev);
 
 /*--- diags output operations ---------------------------------------------*/
 /* TSDiags: enables users to manipulate run-time diagnostics, and print
@@ -1035,26 +1025,26 @@ extern "C"
   tsapi void TSDiags(TSDiagsT mode, const char *fmt, ...);
 
 /* TSGetErrorMessage: convert error id to error message
- * Input:  error id (defined in TSError)
+ * Input:  error id (defined in TSMgmtError)
  * Output: corresponding error message (allocated memory)
  */
-  char *TSGetErrorMessage(TSError error_id);
+  char *TSGetErrorMessage(TSMgmtError error_id);
 
 /*--- password operations -------------------------------------------------*/
 /* TSEncryptPassword: encrypts a password
  * Input: passwd - a password string to encrypt (can be NULL)
  * Output: e_passwd - an encrypted passwd (ats_malloc's memory)
  */
-  tsapi TSError TSEncryptPassword(char *passwd, char **e_passwd);
+  tsapi TSMgmtError TSEncryptPassword(char *passwd, char **e_passwd);
 
 /*--- direct file operations ----------------------------------------------*/
 /* TSConfigFileRead: reads a config file into a buffer
  * Input:  file - the config file to read
  *         text - a buffer is allocated on the text char* pointer
  *         size - the size of the buffer is returned
- * Output: TSError
+ * Output: TSMgmtError
  */
-  tsapi TSError TSConfigFileRead(TSFileNameT file, char **text, int *size, int *version);
+  tsapi TSMgmtError TSConfigFileRead(TSFileNameT file, char **text, int *size, int *version);
 
 /* TSConfigFileWrite: writes a config file into a buffer
  * Input:  file - the config file to write
@@ -1063,9 +1053,9 @@ extern "C"
  *         version - the current version level; new file will have the
  *                  version number above this one  (if version < 0, then
  *                  just uses the next version number in the sequence)
- * Output: TSError
+ * Output: TSMgmtError
  */
-  tsapi TSError TSConfigFileWrite(TSFileNameT file, char *text, int size, int version);
+  tsapi TSMgmtError TSConfigFileWrite(TSFileNameT file, char *text, int size, int version);
 
 /* TSReadFromUrl: reads a remotely located config file into a buffer
  * Input:  url        - remote location of the file
@@ -1073,8 +1063,8 @@ extern "C"
  *         headerSize - the size of the header buffer is returned
  *         body       - a buffer is allocated on the body char* pointer
  *         bodySize   - the size of the body buffer is returned
- * Output: TSError   - TS_ERR_OKAY if succeed, TS_ERR_FAIL otherwise
- * Obsolete:  tsapi TSError TSReadFromUrl (char *url, char **text, int *size);
+ * Output: TSMgmtError   - TS_ERR_OKAY if succeed, TS_ERR_FAIL otherwise
+ * Obsolete:  tsapi TSMgmtError TSReadFromUrl (char *url, char **text, int *size);
  * NOTE: The URL can be expressed in the following forms:
  *       - http://www.example.com:80/products/network/index.html
  *       - http://www.example.com/products/network/index.html
@@ -1084,7 +1074,7 @@ extern "C"
  *       - www.example.com
  * NOTE: header and headerSize can be NULL
  */
-  tsapi TSError TSReadFromUrl(char *url, char **header, int *headerSize, char **body, int *bodySize);
+  tsapi TSMgmtError TSReadFromUrl(char *url, char **header, int *headerSize, char **body, int *bodySize);
 
 /* TSReadFromUrl: reads a remotely located config file into a buffer
  * Input:  url        - remote location of the file
@@ -1093,7 +1083,7 @@ extern "C"
  *         body       - a buffer is allocated on the body char* pointer
  *         bodySize   - the size of the body buffer is returned
  *         timeout    - the max. connection timeout value before aborting.
- * Output: TSError   - TS_ERR_OKAY if succeed, TS_ERR_FAIL otherwise
+ * Output: TSMgmtError   - TS_ERR_OKAY if succeed, TS_ERR_FAIL otherwise
  * NOTE: The URL can be expressed in the following forms:
  *       - http://www.example.com:80/products/network/index.html
  *       - http://www.example.com/products/network/index.html
@@ -1103,32 +1093,32 @@ extern "C"
  *       - www.example.com
  * NOTE: header and headerSize can be NULL
  */
-  tsapi TSError TSReadFromUrlEx(const char *url, char **header, int *headerSize, char **body, int *bodySize, int timeout);
+  tsapi TSMgmtError TSReadFromUrlEx(const char *url, char **header, int *headerSize, char **body, int *bodySize, int timeout);
 
 /*--- snapshot operations -------------------------------------------------*/
 /* TSSnapshotTake: takes snapshot of configuration at that instant in time
  * Input:  snapshot_name - name to call new snapshot
- * Output: TSError
+ * Output: TSMgmtError
  */
-  tsapi TSError TSSnapshotTake(char *snapshot_name);
+  tsapi TSMgmtError TSSnapshotTake(char *snapshot_name);
 
 /* TSSnapshotRestore: restores configuration to when the snapshot was taken
  * Input:  snapshot_name - name of snapshot to restore
- * Output: TSError
+ * Output: TSMgmtError
  */
-  tsapi TSError TSSnapshotRestore(char *snapshot_name);
+  tsapi TSMgmtError TSSnapshotRestore(char *snapshot_name);
 
 /* TSSnapshotRemove: removes the snapshot
  * Input:  snapshot_name - name of snapshot to remove
- * Output: TSError
+ * Output: TSMgmtError
  */
-  tsapi TSError TSSnapshotRemove(char *snapshot_name);
+  tsapi TSMgmtError TSSnapshotRemove(char *snapshot_name);
 
 /* TSSnapshotsGet: restores configuration to when the snapshot was taken
  * Input:  snapshots - the list which will store all snapshot names currently taken
- * Output: TSError
+ * Output: TSMgmtError
  */
-  tsapi TSError TSSnapshotGetMlt(TSStringList snapshots);
+  tsapi TSMgmtError TSSnapshotGetMlt(TSStringList snapshots);
 
 
 /*--- statistics operations -----------------------------------------------*/
@@ -1136,63 +1126,63 @@ extern "C"
  * Input: cluster - Reset the stats clusterwide or not
  * Outpue: TSErrr
  */
-  tsapi TSError TSStatsReset(bool cluster, const char *name = NULL);
+  tsapi TSMgmtError TSStatsReset(bool cluster, const char *name = NULL);
 
 
 /*--- variable operations -------------------------------------------------*/
 /* TSRecordGet: gets a record
  * Input:  rec_name - the name of the record (proxy.config.record_name)
  *         rec_val  - allocated TSRecordEle structure, value stored inside
- * Output: TSError (if the rec_name does not exist, returns TS_ERR_FAIL)
+ * Output: TSMgmtError (if the rec_name does not exist, returns TS_ERR_FAIL)
  */
-  tsapi TSError TSRecordGet(char *rec_name, TSRecordEle * rec_val);
+  tsapi TSMgmtError TSRecordGet(char *rec_name, TSRecordEle * rec_val);
 
 /* TSRecordGet*: gets a record w/ a known type
  * Input:  rec_name - the name of the record (proxy.config.record_name)
  *         *_val    - allocated TSRecordEle structure, value stored inside
- * Output: TSError
+ * Output: TSMgmtError
  * Note: For TSRecordGetString, the function will allocate memory for the
  *       *string_val, so the caller must free (*string_val);
  */
-  tsapi TSError TSRecordGetInt(const char *rec_name, TSInt * int_val);
-  tsapi TSError TSRecordGetCounter(const char *rec_name, TSCounter * counter_val);
-  tsapi TSError TSRecordGetFloat(const char *rec_name, TSFloat * float_val);
-  tsapi TSError TSRecordGetString(const char *rec_name, TSString * string_val);
+  tsapi TSMgmtError TSRecordGetInt(const char *rec_name, TSInt * int_val);
+  tsapi TSMgmtError TSRecordGetCounter(const char *rec_name, TSCounter * counter_val);
+  tsapi TSMgmtError TSRecordGetFloat(const char *rec_name, TSFloat * float_val);
+  tsapi TSMgmtError TSRecordGetString(const char *rec_name, TSString * string_val);
 
 /* TSRecordGetMlt: gets a set of records
  * Input:  rec_list - list of record names the user wants to retrieve;
  *                    resulting gets will be stored in the same list;
  *                    if one get fails, transaction will be aborted
- * Output: TSError
+ * Output: TSMgmtError
  */
-  tsapi TSError TSRecordGetMlt(TSStringList rec_names, TSList rec_vals);
+  tsapi TSMgmtError TSRecordGetMlt(TSStringList rec_names, TSList rec_vals);
 
 /* TSRecordGetMatchMlt: gets a set of records
  * Input:  rec_regex - regular expression to match against record names
- * Output: TSError, TSList of TSRecordEle
+ * Output: TSMgmtError, TSList of TSRecordEle
  */
-  tsapi TSError TSRecordGetMatchMlt(const char *rec_regex, TSList list);
+  tsapi TSMgmtError TSRecordGetMatchMlt(const char *rec_regex, TSList list);
 
 /* TSRecordSet*: sets a record w/ a known type
  * Input:  rec_name     - the name of the record (proxy.config.record_name)
  *         *_val        - the value to set the record to
  *         *action_need - indicates which operation required by user for changes to take effect
- * Output: TSError
+ * Output: TSMgmtError
  */
 
-  tsapi TSError TSRecordSet(const char *rec_name, const char *val, TSActionNeedT * action_need);
-  tsapi TSError TSRecordSetInt(const char *rec_name, TSInt int_val, TSActionNeedT * action_need);
-  tsapi TSError TSRecordSetCounter(const char *rec_name, TSCounter counter_val, TSActionNeedT * action_need);
-  tsapi TSError TSRecordSetFloat(const char *rec_name, TSFloat float_val, TSActionNeedT * action_need);
-  tsapi TSError TSRecordSetString(const char *rec_name, const char *string_val, TSActionNeedT * action_need);
+  tsapi TSMgmtError TSRecordSet(const char *rec_name, const char *val, TSActionNeedT * action_need);
+  tsapi TSMgmtError TSRecordSetInt(const char *rec_name, TSInt int_val, TSActionNeedT * action_need);
+  tsapi TSMgmtError TSRecordSetCounter(const char *rec_name, TSCounter counter_val, TSActionNeedT * action_need);
+  tsapi TSMgmtError TSRecordSetFloat(const char *rec_name, TSFloat float_val, TSActionNeedT * action_need);
+  tsapi TSMgmtError TSRecordSetString(const char *rec_name, const char *string_val, TSActionNeedT * action_need);
 
 /* TSRecordSetMlt: sets a set of records
  * Input:  rec_list     - list of record names the user wants to set;
  *                        if one set fails, transaction will be aborted
  *         *action_need - indicates which operation required by user for changes to take effect
- * Output: TSError
+ * Output: TSMgmtError
  */
-  tsapi TSError TSRecordSetMlt(TSList rec_list, TSActionNeedT * action_need);
+  tsapi TSMgmtError TSRecordSetMlt(TSList rec_list, TSActionNeedT * action_need);
 
 /*--- events --------------------------------------------------------------*/
 /* Only a set of statically defined events exist. An event is either
@@ -1206,33 +1196,33 @@ extern "C"
  * Input:  event_name - "MGMT_ALARM_ADD_ALARM"
  *         ...        - variable argument list of parameters that go
  *                       go into event description when it is signalled
- * Output: TSError
+ * Output: TSMgmtError
  */
-/*tsapi TSError               TSEventSignal (char *event_name, ...); */
+/*tsapi TSMgmtError               TSEventSignal (char *event_name, ...); */
 
 
 /* TSEventResolve: enables the user to resolve an event
  * Input:  event_name - event to resolve
- * Output: TSError
+ * Output: TSMgmtError
  */
-  tsapi TSError TSEventResolve(char *event_name);
+  tsapi TSMgmtError TSEventResolve(char *event_name);
 
 /* TSActiveEventGetMlt: query for a list of all the currently active events
  * Input:  active_events - an empty TSList; if function call is successful,
  *                         active_events will contain names of the currently
  *                         active events
- * Output: TSError
+ * Output: TSMgmtError
  */
-  tsapi TSError TSActiveEventGetMlt(TSList active_events);
+  tsapi TSMgmtError TSActiveEventGetMlt(TSList active_events);
 
 /* TSEventIsActive: check if the specified event is active
  * Input:  event_name - name of event to check if active; must be one of
  *                      the predefined names
  *         is_current - when function completes, if true, then the event is
  *                      active
- * Output: TSError
+ * Output: TSMgmtError
  */
-  tsapi TSError TSEventIsActive(char *event_name, bool * is_current);
+  tsapi TSMgmtError TSEventIsActive(char *event_name, bool * is_current);
 
 /* TSEventSignalCbRegister: register a callback for a specific event or
  *                           for any event
@@ -1240,18 +1230,18 @@ extern "C"
  *                      if NULL, the callback is registered for all events
  *         func       - callback function
  *         data       - data to pass to callback
- * Output: TSError
+ * Output: TSMgmtError
  */
-  tsapi TSError TSEventSignalCbRegister(char *event_name, TSEventSignalFunc func, void *data);
+  tsapi TSMgmtError TSEventSignalCbRegister(char *event_name, TSEventSignalFunc func, void *data);
 
 /* TSEventSignalCbUnregister: unregister a callback for a specific event
  *                             or for any event
  * Input: event_name - the name of event to unregister callback for;
  *                     if NULL, the callback is unregistered for all events
  *         func       - callback function
- * Output: TSError
+ * Output: TSMgmtError
  */
-  tsapi TSError TSEventSignalCbUnregister(char *event_name, TSEventSignalFunc func);
+  tsapi TSMgmtError TSEventSignalCbUnregister(char *event_name, TSEventSignalFunc func);
 
 
 /*--- abstracted file operations ------------------------------------------*/
@@ -1267,28 +1257,28 @@ extern "C"
 
 /* TSCfgContextDestroy: deallocates all memory for the TSCfgContext
  * Input:  ctx - the TSCfgContext to destroy
- * Output: TSError
+ * Output: TSMgmtError
  */
-  tsapi TSError TSCfgContextDestroy(TSCfgContext ctx);
+  tsapi TSMgmtError TSCfgContextDestroy(TSCfgContext ctx);
 
 /* TSCfgContextCommit: write new file copy based on ele's listed in ctx
  * Input:  ctx - where all the file's eles are stored
  *         *action_need - indicates which operation required by user for changes to take effect
- * Output: TSError
+ * Output: TSMgmtError
  * Note: If you do not call TSCfgContextGet before calling TSCfgContextCommit, then
  * you could possibly overwrite all the old rules in the config file!!
  */
-  tsapi TSError TSCfgContextCommit(TSCfgContext ctx, TSActionNeedT * action_need, TSIntList errRules);
+  tsapi TSMgmtError TSCfgContextCommit(TSCfgContext ctx, TSActionNeedT * action_need, TSIntList errRules);
 
 
 /* TSCfgContextGet: retrieves all the Ele's for the file specified in the ctx and
  *                puts them into ctx; note that the ele's in the TSCfgContext don't
  *                all have to be of the same ele type
  * Input: ctx - where all the most currfile's eles are stored
- * Output: TSError
+ * Output: TSMgmtError
  *
  */
-  tsapi TSError TSCfgContextGet(TSCfgContext ctx);
+  tsapi TSMgmtError TSCfgContextGet(TSCfgContext ctx);
 
 
 /*--- TSCfgContext Operations --------------------------------------------*/
@@ -1330,53 +1320,53 @@ extern "C"
  *                         does nothing if Ele is at first position in the TSCfgContext
  * Input:  ctx   - the TSCfgContext
  *         index - the position of the Ele that needs to be shifted up
- * Output: TSError
+ * Output: TSMgmtError
  */
-  TSError TSCfgContextMoveEleUp(TSCfgContext ctx, int index);
+  TSMgmtError TSCfgContextMoveEleUp(TSCfgContext ctx, int index);
 
 /* TSCfgContextMoveEleDown: shifts the Ele at the specified index one position down;
  *                           does nothing if Ele is last in the TSCfgContext
  * Input:  ctx   - the TSCfgContext
  *         index - the position of the Ele that needs to be shifted down
- * Output: TSError
+ * Output: TSMgmtError
  */
-  TSError TSCfgContextMoveEleDown(TSCfgContext ctx, int index);
+  TSMgmtError TSCfgContextMoveEleDown(TSCfgContext ctx, int index);
 
 /* TSCfgContextAppendEle: appends the ele to the end of the TSCfgContext
  * Input:  ctx   - the TSCfgContext
  *         ele - the Ele (typecasted as an TSCfgEle) to append to ctx
- * Output: TSError
+ * Output: TSMgmtError
  * Note: When appending the ele to the TSCfgContext, this function does NOT
  *       make a copy of the ele passed in; it uses the same memory! So you probably
  *       do not want to append the ele and then free the memory for the ele
  *       without first removing the ele from the TSCfgContext
  */
-  TSError TSCfgContextAppendEle(TSCfgContext ctx, TSCfgEle * ele);
+  TSMgmtError TSCfgContextAppendEle(TSCfgContext ctx, TSCfgEle * ele);
 
 /* TSCfgContextInsertEleAt: inserts the ele at the specified index
  * Input:  ctx   - the TSCfgContext
  *         ele   - the Ele (typecasted as an TSCfgEle) to insert into ctx
  *         index - the position in ctx to insert the Ele
- * Output: TSError
+ * Output: TSMgmtError
  * Note: When inserting the ele into the TSCfgContext, this function does NOT
  *       make a copy of the ele passed in; it uses the same memory! So you probably
  *       do not want to insert the ele and then free the memory for the ele
  *       without first removing the ele from the TSCfgContext
  */
-  TSError TSCfgContextInsertEleAt(TSCfgContext ctx, TSCfgEle * ele, int index);
+  TSMgmtError TSCfgContextInsertEleAt(TSCfgContext ctx, TSCfgEle * ele, int index);
 
 /* TSCfgContextRemoveEleAt: removes the Ele at the specified index from the TSCfgContext
  * Input:  ctx   - the TSCfgContext
  *         index - the position of the Ele in the ctx to remove
- * Output: TSError
+ * Output: TSMgmtError
  */
-  TSError TSCfgContextRemoveEleAt(TSCfgContext ctx, int index);
+  TSMgmtError TSCfgContextRemoveEleAt(TSCfgContext ctx, int index);
 
   /* TSCfgContextRemoveAll: removes all Eles from the TSCfgContext
    * Input:  ctx   - the TSCfgContext
-   * Output: TSError
+   * Output: TSMgmtError
    */
-  TSError TSCfgContextRemoveAll(TSCfgContext ctx);
+  TSMgmtError TSCfgContextRemoveAll(TSCfgContext ctx);
 
 /*--- TS Cache Inspector Operations --------------------------------------------*/
 
@@ -1385,14 +1375,14 @@ extern "C"
  *   lookups cache information of the url and saves the
  *   cache info to the info buffer
  */
-  tsapi TSError TSLookupFromCacheUrl(TSString url, TSString * info);
+  tsapi TSMgmtError TSLookupFromCacheUrl(TSString url, TSString * info);
 
 /* TSLookupFromCacheUrlRegex
  *   Function takes a string in a regex form and returns
  *   a list of urls that match the regex
  ********************************************************/
 
-  tsapi TSError TSLookupFromCacheUrlRegex(TSString url_regex, TSString * list);
+  tsapi TSMgmtError TSLookupFromCacheUrlRegex(TSString url_regex, TSString * list);
 
 /* TSDeleteFromCacheUrl
  *   Function takes an url and an 'info' buffer as input,
@@ -1400,21 +1390,21 @@ extern "C"
  *   returns the status of deletion
  ********************************************************/
 
-  tsapi TSError TSDeleteFromCacheUrl(TSString url, TSString * info);
+  tsapi TSMgmtError TSDeleteFromCacheUrl(TSString url, TSString * info);
 
 /* TSDeleteFromCacheUrlRegex
  *   Function takes a string in a regex form and returns
  *   a list of urls deleted from cache
  ********************************************************/
 
-  tsapi TSError TSDeleteFromCacheUrlRegex(TSString url_regex, TSString * list);
+  tsapi TSMgmtError TSDeleteFromCacheUrlRegex(TSString url_regex, TSString * list);
 
 /* TSInvalidateFromCacheUrlRegex
  *   Function takes a string in a regex form and returns
  *   a list of urls invalidated from cache
  ********************************************************/
 
-  tsapi TSError TSInvalidateFromCacheUrlRegex(TSString url_regex, TSString * list);
+  tsapi TSMgmtError TSInvalidateFromCacheUrlRegex(TSString url_regex, TSString * list);
 
 #ifdef __cplusplus
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/stats/StatType.cc
----------------------------------------------------------------------
diff --git a/mgmt/stats/StatType.cc b/mgmt/stats/StatType.cc
index 1f92abe..1dbda77 100644
--- a/mgmt/stats/StatType.cc
+++ b/mgmt/stats/StatType.cc
@@ -34,6 +34,7 @@
 #include "StatType.h"
 #include "MgmtUtils.h"
 #include "ink_hrtime.h"
+#include "WebOverview.h"
 
 bool StatError = false;         // global error flag
 bool StatDebug = false;         // global debug flag

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/web2/WebHttp.cc
----------------------------------------------------------------------
diff --git a/mgmt/web2/WebHttp.cc b/mgmt/web2/WebHttp.cc
index 9df0da5..2161f9f 100644
--- a/mgmt/web2/WebHttp.cc
+++ b/mgmt/web2/WebHttp.cc
@@ -42,8 +42,6 @@
 #include "WebOverview.h"
 
 #include "mgmtapi.h"
-//#include "I_AccCrypto.h"
-#include "LocalManager.h"
 #include "WebMgmtUtils.h"
 #include "MgmtUtils.h"
 #include "CfgContextUtils.h"

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/web2/WebHttpSession.cc
----------------------------------------------------------------------
diff --git a/mgmt/web2/WebHttpSession.cc b/mgmt/web2/WebHttpSession.cc
index c92fbbb..ed45f81 100644
--- a/mgmt/web2/WebHttpSession.cc
+++ b/mgmt/web2/WebHttpSession.cc
@@ -38,7 +38,7 @@
 #include "WebGlobals.h"
 #include "WebHttpSession.h"
 
-#include "LocalManager.h"
+//#include "LocalManager.h"
 
 #define SESSION_EXPIRES 600     // 10 minutes
 #define CURRENT_SESSION_EXPIRES 100     // 10 minutes

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/web2/WebIntrMain.cc
----------------------------------------------------------------------
diff --git a/mgmt/web2/WebIntrMain.cc b/mgmt/web2/WebIntrMain.cc
index b432e6c..42c9e7c 100644
--- a/mgmt/web2/WebIntrMain.cc
+++ b/mgmt/web2/WebIntrMain.cc
@@ -32,6 +32,7 @@
 #include "libts.h"
 #include "I_Layout.h"
 #include "LocalManager.h"
+#include "Alarms.h"
 #include "WebHttp.h"
 #include "WebGlobals.h"
 #include "MgmtUtils.h"


[3/3] git commit: TS-2823: Change names of TSEvent and TSError in mgmt API

Posted by am...@apache.org.
TS-2823: Change names of TSEvent and TSError in mgmt API


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

Branch: refs/heads/master
Commit: cb6e6f6a893cd06c62a92bc1bb41e6526dac207d
Parents: 0c97776
Author: Alan M. Carroll <am...@network-geographics.com>
Authored: Tue May 20 13:23:58 2014 -0700
Committer: Alan M. Carroll <am...@network-geographics.com>
Committed: Tue May 20 14:52:41 2014 -0700

----------------------------------------------------------------------
 CHANGES                                    |   3 +
 cmd/traffic_line/traffic_line.cc           |  12 +-
 cmd/traffic_shell/CliMgmtUtils.cc          |  64 +++----
 cmd/traffic_shell/CliMgmtUtils.h           |  24 +--
 cmd/traffic_shell/ConfigCmd.cc             |  54 +++---
 cmd/traffic_shell/ConfigUpgradeCmd.h       |   6 +-
 cmd/traffic_shell/ConfigUpgradeReadCmd.cc  |   2 +-
 cmd/traffic_shell/ConfigUpgradeWriteCmd.cc |   4 +-
 cmd/traffic_shell/ShowCmd.cc               |  22 +--
 cmd/traffic_shell/traffic_shell.cc         |   2 +-
 lib/records/I_RecHttp.h                    |   1 +
 lib/records/RecMessage.cc                  |   1 +
 mgmt/FileManager.h                         |   1 +
 mgmt/Main.h                                |   3 +-
 mgmt/api/APITestCliRemote.cc               |  54 +++---
 mgmt/api/CfgContextImpl.cc                 |   8 +-
 mgmt/api/CfgContextImpl.h                  |   8 +-
 mgmt/api/CfgContextManager.cc              |  28 +--
 mgmt/api/CfgContextManager.h               |  18 +-
 mgmt/api/CfgContextUtils.cc                |   6 +-
 mgmt/api/CfgContextUtils.h                 |   6 +-
 mgmt/api/CoreAPI.cc                        |  54 +++---
 mgmt/api/CoreAPI.h                         |  54 +++---
 mgmt/api/CoreAPIRemote.cc                  | 130 +++++++-------
 mgmt/api/CoreAPIShared.cc                  |  10 +-
 mgmt/api/CoreAPIShared.h                   |   6 +-
 mgmt/api/EventCallback.cc                  |   4 +-
 mgmt/api/EventCallback.h                   |   4 +-
 mgmt/api/EventControlMain.cc               |  22 +--
 mgmt/api/EventControlMain.h                |   6 +-
 mgmt/api/EventRegistration.cc              |  12 +-
 mgmt/api/INKMgmtAPI.cc                     | 174 +++++++++---------
 mgmt/api/NetworkUtilsLocal.cc              |  80 ++++-----
 mgmt/api/NetworkUtilsLocal.h               |  36 ++--
 mgmt/api/NetworkUtilsRemote.cc             | 136 +++++++-------
 mgmt/api/NetworkUtilsRemote.h              |  50 +++---
 mgmt/api/TSControlMain.cc                  |  74 ++++----
 mgmt/api/TSControlMain.h                   |  34 ++--
 mgmt/api/include/mgmtapi.h                 | 226 +++++++++++-------------
 mgmt/stats/StatType.cc                     |   1 +
 mgmt/web2/WebHttp.cc                       |   2 -
 mgmt/web2/WebHttpSession.cc                |   2 +-
 mgmt/web2/WebIntrMain.cc                   |   1 +
 43 files changed, 720 insertions(+), 725 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 81a0cdb..ab1e615 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.0.0
 
+  *) [TS-2823] Change the Mgmt API names TSEvent and TSError to avoid name
+     collisions with the plugin API.
+
   *) [TS-2029] Eliminate CacheHttpHdr argument from Cache::generate_key().
 
   *) [TS-2821] Added configuration for max concurrent streams for SPDY.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/cmd/traffic_line/traffic_line.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_line/traffic_line.cc b/cmd/traffic_line/traffic_line.cc
index 738eb13..6ace337 100644
--- a/cmd/traffic_line/traffic_line.cc
+++ b/cmd/traffic_line/traffic_line.cc
@@ -53,7 +53,7 @@ static int ShowStatus;
 static char ClearAlarms[1024];
 static int VersionFlag;
 
-static TSError
+static TSMgmtError
 handleArgInvocation()
 {
   if (ReRead == 1) {
@@ -75,7 +75,7 @@ handleArgInvocation()
   } else if (ClearNode == 1) {
     return TSStatsReset(false);
   } else if (*ZeroNode != '\0' || *ZeroCluster != '\0') {
-    TSError err;
+    TSMgmtError err;
     TSRecordEle *rec_ele = TSRecordEleCreate();
     char *name = *ZeroNode ? ZeroNode : ZeroCluster;
 
@@ -178,7 +178,7 @@ handleArgInvocation()
       fprintf(stderr, "%s: Invalid Argument Combination: Can not read and set values at the same time\n", programName);
       return TS_ERR_FAIL;
     } else {
-      TSError err;
+      TSMgmtError err;
       TSRecordEle *rec_ele = TSRecordEleCreate();
 
       if ((err = TSRecordGet(ReadVar, rec_ele)) != TS_ERR_OKAY) {
@@ -211,7 +211,7 @@ handleArgInvocation()
       fprintf(stderr, "%s: Invalid Argument Combination: Can not read and set values at the same time\n", programName);
       return TS_ERR_FAIL;
     } else {
-      TSError err;
+      TSMgmtError err;
       TSList list = TSListCreate();
 
       if ((err = TSRecordGetMatchMlt(MatchVar, list)) != TS_ERR_OKAY) {
@@ -251,7 +251,7 @@ handleArgInvocation()
       fprintf(stderr, "%s: Set requires a -v argument\n", programName);
       return TS_ERR_FAIL;
     } else {
-      TSError err;
+      TSMgmtError err;
       TSActionNeedT action;
 
       if ((err = TSRecordSet(SetVar, VarValue, &action)) != TS_ERR_OKAY) {
@@ -290,7 +290,7 @@ int
 main(int /* argc ATS_UNUSED */, char **argv)
 {
   AppVersionInfo appVersionInfo;
-  TSError status;
+  TSMgmtError status;
 
   programName = argv[0];
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/cmd/traffic_shell/CliMgmtUtils.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/CliMgmtUtils.cc b/cmd/traffic_shell/CliMgmtUtils.cc
index 7d41349..1701b7e 100644
--- a/cmd/traffic_shell/CliMgmtUtils.cc
+++ b/cmd/traffic_shell/CliMgmtUtils.cc
@@ -32,13 +32,13 @@
 #include "ConfigCmd.h"
 
 
-void Cli_DisplayMgmtAPI_Error(TSError status);
+void Cli_DisplayMgmtAPI_Error(TSMgmtError status);
 
 // Get a records.config variable by name
-TSError
+TSMgmtError
 Cli_RecordGet(const char *rec_name, TSRecordEle * rec_val)
 {
-  TSError status;
+  TSMgmtError status;
   if ((status = TSRecordGet((char *) rec_name, rec_val))) {
     Cli_Debug(ERR_RECORD_GET, rec_name);
     Cli_DisplayMgmtAPI_Error(status);
@@ -47,10 +47,10 @@ Cli_RecordGet(const char *rec_name, TSRecordEle * rec_val)
 }
 
 // Get an integer type records.config variable
-TSError
+TSMgmtError
 Cli_RecordGetInt(const char *rec_name, TSInt * int_val)
 {
-  TSError status;
+  TSMgmtError status;
   if ((status = TSRecordGetInt(rec_name, int_val))) {
     Cli_Debug(ERR_RECORD_GET_INT, rec_name);
     Cli_DisplayMgmtAPI_Error(status);
@@ -59,10 +59,10 @@ Cli_RecordGetInt(const char *rec_name, TSInt * int_val)
 }
 
 // Get an counter type records.config variable
-TSError
+TSMgmtError
 Cli_RecordGetCounter(const char *rec_name, TSCounter * ctr_val)
 {
-  TSError status;
+  TSMgmtError status;
   if ((status = TSRecordGetCounter(rec_name, ctr_val))) {
     Cli_Debug(ERR_RECORD_GET_COUNTER, rec_name);
     Cli_DisplayMgmtAPI_Error(status);
@@ -71,10 +71,10 @@ Cli_RecordGetCounter(const char *rec_name, TSCounter * ctr_val)
 }
 
 // Get a float type records.config variable
-TSError
+TSMgmtError
 Cli_RecordGetFloat(const char *rec_name, TSFloat * float_val)
 {
-  TSError status;
+  TSMgmtError status;
   if ((status = TSRecordGetFloat(rec_name, float_val))) {
     Cli_Debug(ERR_RECORD_GET_FLOAT, rec_name);
     Cli_DisplayMgmtAPI_Error(status);
@@ -83,10 +83,10 @@ Cli_RecordGetFloat(const char *rec_name, TSFloat * float_val)
 }
 
 // Get a string type records.config variable
-TSError
+TSMgmtError
 Cli_RecordGetString(const char *rec_name, char **string_val)
 {
-  TSError status;
+  TSMgmtError status;
   if ((status = TSRecordGetString(rec_name, string_val))) {
     Cli_Debug(ERR_RECORD_GET_STRING, rec_name);
     Cli_DisplayMgmtAPI_Error(status);
@@ -95,10 +95,10 @@ Cli_RecordGetString(const char *rec_name, char **string_val)
 }
 
 // Use a string to set a records.config variable
-TSError
+TSMgmtError
 Cli_RecordSet(const char *rec_name, const char *rec_value, TSActionNeedT * action_need)
 {
-  TSError status;
+  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);
@@ -107,10 +107,10 @@ Cli_RecordSet(const char *rec_name, const char *rec_value, TSActionNeedT * actio
 }
 
 // Set an integer type records.config variable
-TSError
+TSMgmtError
 Cli_RecordSetInt(const char *rec_name, TSInt int_val, TSActionNeedT * action_need)
 {
-  TSError status;
+  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);
@@ -119,10 +119,10 @@ Cli_RecordSetInt(const char *rec_name, TSInt int_val, TSActionNeedT * action_nee
 }
 
 // Set a float type records.config variable
-TSError
+TSMgmtError
 Cli_RecordSetFloat(const char *rec_name, TSFloat float_val, TSActionNeedT * action_need)
 {
-  TSError status;
+  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);
@@ -132,10 +132,10 @@ Cli_RecordSetFloat(const char *rec_name, TSFloat float_val, TSActionNeedT * acti
 
 
 // Set a string type records.config variable
-TSError
+TSMgmtError
 Cli_RecordSetString(const char *rec_name, TSString str_val, TSActionNeedT * action_need)
 {
-  TSError status;
+  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);
@@ -144,7 +144,7 @@ Cli_RecordSetString(const char *rec_name, TSString str_val, TSActionNeedT * acti
 }
 
 void
-Cli_DisplayMgmtAPI_Error(TSError status)
+Cli_DisplayMgmtAPI_Error(TSMgmtError status)
 {
   switch (status) {
   case TS_ERR_OKAY:           // do nothing
@@ -197,10 +197,10 @@ Cli_DisplayMgmtAPI_Error(TSError status)
 }
 
 // Retrieve and display contents of a rules file
-TSError
+TSMgmtError
 Cli_DisplayRules(TSFileNameT fname)
 {
-  TSError status;
+  TSMgmtError status;
   char *text;
   int size = 0, version = 0;
 
@@ -222,13 +222,13 @@ Cli_DisplayRules(TSFileNameT fname)
 }
 
 // Retrieve and use config file from remote URL
-TSError
+TSMgmtError
 Cli_SetConfigFileFromUrl(TSFileNameT file, const char *url)
 {
   char *buf;
   int size = 0;
   int version = -1;
-  TSError status;
+  TSMgmtError status;
 
   Cli_Debug("Cli_SetConfigFileFromUrl: file %d url %s\n", file, url);
 
@@ -262,10 +262,10 @@ Cli_SetConfigFileFromUrl(TSFileNameT file, const char *url)
 
 // enable recent configuration changes by performing the action specified
 // by the action_need value
-TSError
+TSMgmtError
 Cli_ConfigEnactChanges(TSActionNeedT action_need)
 {
-  TSError status;
+  TSMgmtError status;
 
   Cli_Debug("Cli_ConfigEnactChanges: action_need %d\n", action_need);
 
@@ -336,7 +336,7 @@ int
 Cli_RecordOnOff_Action(int action, const char *record, const char *on_off)
 {
   TSActionNeedT action_need;
-  TSError status;
+  TSMgmtError status;
   TSInt int_val;
 
   switch (action) {
@@ -388,7 +388,7 @@ Cli_RecordInt_Action(int action, const char *record, int value)
   case RECORD_SET:
     {
       TSActionNeedT action_need = TS_ACTION_UNDEFINED;
-      TSError status = Cli_RecordSetInt(record, value, &action_need);
+      TSMgmtError status = Cli_RecordSetInt(record, value, &action_need);
 
       if (status) {
         return status;
@@ -398,7 +398,7 @@ Cli_RecordInt_Action(int action, const char *record, int value)
   case RECORD_GET:
     {
       TSInt value_in = -1;
-      TSError status = Cli_RecordGetInt(record, &value_in);
+      TSMgmtError status = Cli_RecordGetInt(record, &value_in);
 
       if (status) {
         return status;
@@ -426,7 +426,7 @@ Cli_RecordInt_Action(int action, const char *record, int value)
 int
 Cli_RecordHostname_Action(int action, char *record, char *hostname)
 {
-  TSError status;
+  TSMgmtError status;
   TSActionNeedT action_need = TS_ACTION_UNDEFINED;
   TSString str_val = NULL;
 
@@ -472,7 +472,7 @@ Cli_RecordHostname_Action(int action, char *record, char *hostname)
 int
 Cli_RecordString_Action(int action, const char *record, char *string_val)
 {
-  TSError status;
+  TSMgmtError status;
   TSActionNeedT action_need = TS_ACTION_UNDEFINED;
   TSString str_val = NULL;
 
@@ -513,7 +513,7 @@ Cli_RecordString_Action(int action, const char *record, char *string_val)
 int
 Cli_ConfigFileURL_Action(TSFileNameT file, const char *filename, const char *url)
 {
-  TSError status;
+  TSMgmtError status;
   // Retrieve  file from url
 
   if (url == NULL) {

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/cmd/traffic_shell/CliMgmtUtils.h
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/CliMgmtUtils.h b/cmd/traffic_shell/CliMgmtUtils.h
index 17357c4..1234e77 100644
--- a/cmd/traffic_shell/CliMgmtUtils.h
+++ b/cmd/traffic_shell/CliMgmtUtils.h
@@ -27,41 +27,41 @@
 #define RECORD_SET 1
 
 // Get a records.config variable by name
-TSError Cli_RecordGet(const char *rec_name, TSRecordEle * rec_val);
+TSMgmtError Cli_RecordGet(const char *rec_name, TSRecordEle * rec_val);
 
 // Get an integer type records.config variable
-TSError Cli_RecordGetInt(const char *rec_name, TSInt * int_val);
+TSMgmtError Cli_RecordGetInt(const char *rec_name, TSInt * int_val);
 
 // Get an counter type records.config variable
-TSError Cli_RecordGetCounter(const char *rec_name, TSCounter * ctr_val);
+TSMgmtError Cli_RecordGetCounter(const char *rec_name, TSCounter * ctr_val);
 
 // Get a float type records.config variable
-TSError Cli_RecordGetFloat(const char *rec_name, TSFloat * float_val);
+TSMgmtError Cli_RecordGetFloat(const char *rec_name, TSFloat * float_val);
 
 // Get a string type records.config variable
-TSError Cli_RecordGetString(const char *rec_name, char **string_val);
+TSMgmtError Cli_RecordGetString(const char *rec_name, char **string_val);
 
 // Use a string to set a records.config variable
-TSError Cli_RecordSet(const char *rec_name, const char *rec_value, TSActionNeedT * action_need);
+TSMgmtError Cli_RecordSet(const char *rec_name, const char *rec_value, TSActionNeedT * action_need);
 
 // Set an integer type records.config variable
-TSError Cli_RecordSetInt(const char *rec_name, TSInt int_val, TSActionNeedT * action_need);
+TSMgmtError Cli_RecordSetInt(const char *rec_name, TSInt int_val, TSActionNeedT * action_need);
 
 //Set a float type records.config variable
-TSError Cli_RecordSetFloat(const char *rec_name, TSFloat float_val, TSActionNeedT * action_need);
+TSMgmtError Cli_RecordSetFloat(const char *rec_name, TSFloat float_val, TSActionNeedT * action_need);
 
 // Set a string type records.config variable
-TSError Cli_RecordSetString(const char *rec_name, TSString str_val, TSActionNeedT * action_need);
+TSMgmtError Cli_RecordSetString(const char *rec_name, TSString str_val, TSActionNeedT * action_need);
 
 // Retrieve and display contents of a rules file
-TSError Cli_DisplayRules(TSFileNameT fname);
+TSMgmtError Cli_DisplayRules(TSFileNameT fname);
 
 // Retrieve and use config file from remote URL
-TSError Cli_SetConfigFileFromUrl(TSFileNameT file, const char *url);
+TSMgmtError Cli_SetConfigFileFromUrl(TSFileNameT file, const char *url);
 
 // enable recent configuration changes by performing the action specified
 // by the action_need value
-TSError Cli_ConfigEnactChanges(TSActionNeedT action_need);
+TSMgmtError Cli_ConfigEnactChanges(TSActionNeedT action_need);
 
 // evaluate "stringval" and return 1 if "on", otherwise 0
 int Cli_EvalOnOffString(char *stringval);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/cmd/traffic_shell/ConfigCmd.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/ConfigCmd.cc b/cmd/traffic_shell/ConfigCmd.cc
index 65f6400..e171035 100644
--- a/cmd/traffic_shell/ConfigCmd.cc
+++ b/cmd/traffic_shell/ConfigCmd.cc
@@ -2157,7 +2157,7 @@ ConfigGet(const char *rec_name)
 {
   Cli_Debug("ConfigGet: rec_name %s\n", rec_name);
 
-  TSError status;
+  TSMgmtError status;
   TSRecordEle rec_val;
 
   status = Cli_RecordGet(rec_name, &rec_val);
@@ -2196,7 +2196,7 @@ ConfigSet(const char *rec_name, const char *value)
 {
   Cli_Debug("ConfigSet: rec_name %s value %s\n", rec_name, value);
 
-  TSError status;
+  TSMgmtError status;
   TSActionNeedT action_need;
 
   status = Cli_RecordSet(rec_name, value, &action_need);
@@ -2213,7 +2213,7 @@ ConfigSet(const char *rec_name, const char *value)
 int
 ConfigName(const char *proxy_name)
 {
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
   TSString str_val = NULL;
   TSActionNeedT action_need;
 
@@ -2265,7 +2265,7 @@ ConfigPortsSet(int arg_ref, void *valuePtr)
     Cli_Debug("ConfigPortsSet: arg_ref %d value %d\n", arg_ref, *(TSInt *) valuePtr);
   }
 
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
   TSActionNeedT action_need = TS_ACTION_UNDEFINED;
 
   Cli_Debug("ConfigPorts: set\n");
@@ -2307,7 +2307,7 @@ ConfigPortsSet(int arg_ref, void *valuePtr)
 int
 ConfigPortsGet(int arg_ref)
 {
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
   TSInt int_val = -1;
   TSString str_val = NULL;
 
@@ -2463,7 +2463,7 @@ ConfigHttpProxy(int arg_ref, int setvar)
   TSInt rmp_val = 0;
   TSInt rev_val = 0;
   TSActionNeedT action_need = TS_ACTION_UNDEFINED;
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
 
   switch (setvar) {
   case 0:                      //get
@@ -2551,7 +2551,7 @@ ConfigIcpMode(int arg_ref, int setvar)
     }
 
     TSActionNeedT action_need = TS_ACTION_UNDEFINED;
-    TSError status = Cli_RecordSetInt("proxy.config.icp.enabled",
+    TSMgmtError status = Cli_RecordSetInt("proxy.config.icp.enabled",
                                        mode_num, &action_need);
     if (status) {
       return status;
@@ -2561,7 +2561,7 @@ ConfigIcpMode(int arg_ref, int setvar)
 
   } else {
     TSInt value_in = -1;
-    TSError status = Cli_RecordGetInt("proxy.config.icp.enabled", &value_in);
+    TSMgmtError status = Cli_RecordGetInt("proxy.config.icp.enabled", &value_in);
 
     if (status) {
       return status;
@@ -2596,7 +2596,7 @@ ConfigCacheFreshnessVerify(int arg_ref, int setvar)
 
   TSInt int_val = 0;
   TSActionNeedT action_need = TS_ACTION_UNDEFINED;
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
 
   switch (setvar) {
   case 0:                      //get
@@ -2660,7 +2660,7 @@ ConfigCacheFreshnessMinimum(int arg_ref, int setvar)
 
   TSInt int_val = 0;
   TSActionNeedT action_need = TS_ACTION_UNDEFINED;
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
 
   switch (setvar) {
   case 0:                      //get
@@ -2719,7 +2719,7 @@ ConfigCacheFreshnessNoExpireLimit(TSInt min, TSInt max, int setvar)
   TSInt min_val = 0;
   TSInt max_val = 0;
   TSActionNeedT action_need = TS_ACTION_UNDEFINED;
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
 
   switch (setvar) {
   case 0:                      //get
@@ -2760,7 +2760,7 @@ ConfigCacheVary(int arg_ref, char *field, int setvar)
   Cli_Debug(" field: %s\n", field);
   TSString str_val = NULL;
   TSActionNeedT action_need = TS_ACTION_UNDEFINED;
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
 
   switch (setvar) {
   case 0:                      //get
@@ -2829,7 +2829,7 @@ ConfigCacheCookies(int arg_ref, int setvar)
 
   TSInt int_val = 0;
   TSActionNeedT action_need = TS_ACTION_UNDEFINED;
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
 
   switch (setvar) {
   case 0:                      //get
@@ -2900,7 +2900,7 @@ ConfigCacheClear()
   Cli_Debug("ConfigCacheClear");
 
   TSProxyStateT state;
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
 
   state = TSProxyStateGet();
   switch (state) {
@@ -2933,7 +2933,7 @@ ConfigHostdbClear()
   Cli_Debug("ConfigHostDBClear\n");
 
   TSProxyStateT state = TS_PROXY_UNDEFINED;
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
 
   state = TSProxyStateGet();
   Cli_Debug("Proxy State %d\n", state);
@@ -2998,7 +2998,7 @@ ConfigVirtualipAdd(char *ip, char *device, int subinterface, int setvar)
   Cli_Debug("ConfigVirtualipAdd: %s %s %d set? %d\n", ip, device, subinterface, setvar);
 
   TSActionNeedT action_need = TS_ACTION_UNDEFINED;
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
   TSCfgContext VipCtx;
   int size;
   TSVirtIpAddrEle *VipElePtr;
@@ -3052,7 +3052,7 @@ ConfigVirtualipDelete(int ip_no, int setvar)
   Cli_Debug("ConfigVirtualipDelete: %d set? %d\n", ip_no, setvar);
 
   TSActionNeedT action_need = TS_ACTION_UNDEFINED;
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
   TSCfgContext VipCtx;
   int EleCount;
 
@@ -3242,7 +3242,7 @@ ConfigLoggingEvent(int arg_ref, int setvar)
 
   TSInt int_val = 0;
   TSActionNeedT action_need = TS_ACTION_UNDEFINED;
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
 
   switch (setvar) {
   case 0:                      //get
@@ -3310,7 +3310,7 @@ ConfigLoggingCollationStatus(int arg_ref, int setvar)
 
   TSInt int_val = 0;
   TSActionNeedT action_need = TS_ACTION_UNDEFINED;
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
 
   switch (setvar) {
   case 0:                      //get
@@ -3385,7 +3385,7 @@ ConfigLoggingCollation(TSString secret, int arg_ref, TSInt orphan, int setvar)
   TSString str_val = NULL;
   TSInt int_val = 0;
   TSActionNeedT action_need = TS_ACTION_UNDEFINED;
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
 
   switch (setvar) {
   case 0:                      //get
@@ -3464,7 +3464,7 @@ ConfigLoggingFormatTypeFile(int arg_ref_format, int arg_ref,
   TSString str_val = NULL;
   TSInt int_val = 0;
   TSActionNeedT action_need = TS_ACTION_UNDEFINED;
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
 
   switch (setvar) {
   case 0:                      //get
@@ -3812,7 +3812,7 @@ ConfigLoggingSplitting(int arg_ref_protocol, int arg_ref_on_off, int setvar)
 
   TSInt int_val;
   TSActionNeedT action_need = TS_ACTION_UNDEFINED;
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
 
   switch (setvar) {
   case 0:                      //get
@@ -3888,7 +3888,7 @@ ConfigLoggingCustomFormat(int arg_ref_on_off, int arg_ref_format, int setvar)
 
   TSInt int_val = 0;
   TSActionNeedT action_need = TS_ACTION_UNDEFINED;
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
 
   switch (setvar) {
   case 0:                      //get
@@ -3942,7 +3942,7 @@ ConfigLoggingRollingOffsetIntervalAutodelete(int arg_ref_rolling,
 
   TSInt int_val = 0;
   TSActionNeedT action_need = TS_ACTION_UNDEFINED;
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
 
   switch (setvar) {
   case 0:                      //get
@@ -4030,7 +4030,7 @@ int
 ConfigAlarmResolveName(char *name)
 {
   bool active;
-  TSError status;
+  TSMgmtError status;
 
   // determine if the event is active
   status = TSEventIsActive(name, &active);
@@ -4060,7 +4060,7 @@ int
 ConfigAlarmResolveNumber(int number)
 {
   TSList events;
-  TSError status;
+  TSMgmtError status;
   int count, i;
   char *name = 0;
 
@@ -4094,7 +4094,7 @@ int
 ConfigAlarmResolveAll()
 {
   TSList events;
-  TSError status;
+  TSMgmtError status;
   int count, i;
   char *name;
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/cmd/traffic_shell/ConfigUpgradeCmd.h
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/ConfigUpgradeCmd.h b/cmd/traffic_shell/ConfigUpgradeCmd.h
index d75472d..a01af43 100644
--- a/cmd/traffic_shell/ConfigUpgradeCmd.h
+++ b/cmd/traffic_shell/ConfigUpgradeCmd.h
@@ -104,9 +104,9 @@ public:
   // PrintOut the Element of this Entry
   void PrintEle();
 
-  TSError Cli_NewIFCFile();
+  TSMgmtError Cli_NewIFCFile();
 
-  static TSError ConfigWriteCheckIFCEnv();
+  static TSMgmtError ConfigWriteCheckIFCEnv();
 
   int ConfigWriteIFCHead(char *ts_version, char *build_date, char *platform, int nodes);
 
@@ -182,7 +182,7 @@ public:
     CIFCReadEntry();
    ~CIFCReadEntry();
 
-  static TSError ConfigReadCheckIFCEnv();
+  static TSMgmtError ConfigReadCheckIFCEnv();
 
   int ConfigReadIFCHead();
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/cmd/traffic_shell/ConfigUpgradeReadCmd.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/ConfigUpgradeReadCmd.cc b/cmd/traffic_shell/ConfigUpgradeReadCmd.cc
index e5d922f..bd849b0 100644
--- a/cmd/traffic_shell/ConfigUpgradeReadCmd.cc
+++ b/cmd/traffic_shell/ConfigUpgradeReadCmd.cc
@@ -51,7 +51,7 @@ CIFCReadEntry::~CIFCReadEntry()
 }
 
 // check IFCVERSION IFCPATH and IFCFILENAME setup
-TSError
+TSMgmtError
 CIFCReadEntry::ConfigReadCheckIFCEnv()
 {
   char *pathPtr;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/cmd/traffic_shell/ConfigUpgradeWriteCmd.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/ConfigUpgradeWriteCmd.cc b/cmd/traffic_shell/ConfigUpgradeWriteCmd.cc
index 153ba50..ad527fe 100644
--- a/cmd/traffic_shell/ConfigUpgradeWriteCmd.cc
+++ b/cmd/traffic_shell/ConfigUpgradeWriteCmd.cc
@@ -54,7 +54,7 @@ CIFCWriteEntry::~CIFCWriteEntry()
 }
 
 // check IFCVERSION IFCPATH and IFCFILENAME setup
-TSError
+TSMgmtError
 CIFCWriteEntry::ConfigWriteCheckIFCEnv()
 {
   char *pathPtr;
@@ -73,7 +73,7 @@ CIFCWriteEntry::ConfigWriteCheckIFCEnv()
   return TS_ERR_OKAY;
 }
 
-TSError
+TSMgmtError
 CIFCWriteEntry::Cli_NewIFCFile()
 {
   FILE *Fptr;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/cmd/traffic_shell/ShowCmd.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/ShowCmd.cc b/cmd/traffic_shell/ShowCmd.cc
index 9dc5bdf..55b891f 100644
--- a/cmd/traffic_shell/ShowCmd.cc
+++ b/cmd/traffic_shell/ShowCmd.cc
@@ -1062,7 +1062,7 @@ ShowStatus()
 int
 ShowVersion()
 {
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
   TSString ts_version = NULL;
   TSString tm_version = NULL;
 
@@ -1139,7 +1139,7 @@ ShowSecurity()
 {
   Cli_Printf("\n");
   Cli_Printf("Traffic Server Access\n" "-------------------\n");
-  TSError status = Cli_DisplayRules(TS_FNAME_IP_ALLOW);
+  TSMgmtError status = Cli_DisplayRules(TS_FNAME_IP_ALLOW);
 
   return status;
 }
@@ -1273,7 +1273,7 @@ ShowIcpPeer()
   // display rules from icp.config
   Cli_Printf("\n");
   Cli_Printf("icp.config Rules\n" "-------------------\n");
-  TSError status = Cli_DisplayRules(TS_FNAME_ICP_PEER);
+  TSMgmtError status = Cli_DisplayRules(TS_FNAME_ICP_PEER);
   Cli_Printf("\n");
 
   return status;
@@ -1428,7 +1428,7 @@ ShowCacheRules()
   Cli_Printf("\n");
 
   Cli_Printf("cache.config rules\n" "-------------------\n");
-  TSError status = Cli_DisplayRules(TS_FNAME_CACHE_OBJ);
+  TSMgmtError status = Cli_DisplayRules(TS_FNAME_CACHE_OBJ);
 
   Cli_Printf("\n");
 
@@ -1442,7 +1442,7 @@ ShowCacheStorage()
   // display rules from storage.config
   Cli_Printf("storage.config rules\n");
 
-  TSError status = Cli_DisplayRules(TS_FNAME_STORAGE);
+  TSMgmtError status = Cli_DisplayRules(TS_FNAME_STORAGE);
 
   return status;
 }
@@ -1742,7 +1742,7 @@ ShowSsl()
 int
 ShowParents()
 {
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
   TSInt parent_enabled = -1;
   TSString parent_cache = NULL;
 
@@ -1764,7 +1764,7 @@ ShowParentRules()
   Cli_Printf("\n");
 
   Cli_Printf("parent.config rules\n" "-------------------\n");
-  TSError status = Cli_DisplayRules(TS_FNAME_PARENT_PROXY);
+  TSMgmtError status = Cli_DisplayRules(TS_FNAME_PARENT_PROXY);
   Cli_Printf("\n");
 
   return status;
@@ -1778,7 +1778,7 @@ ShowRemap()
   Cli_Printf("\n");
 
   Cli_Printf("remap.config rules\n" "-------------------\n");
-  TSError status = Cli_DisplayRules(TS_FNAME_REMAP);
+  TSMgmtError status = Cli_DisplayRules(TS_FNAME_REMAP);
   Cli_Printf("\n");
 
   return status;
@@ -1823,7 +1823,7 @@ ShowSocksRules()
   Cli_Printf("\n");
 
   Cli_Printf("socks.config rules\n" "-------------------\n");
-  TSError status = Cli_DisplayRules(TS_FNAME_SOCKS);
+  TSMgmtError status = Cli_DisplayRules(TS_FNAME_SOCKS);
   Cli_Printf("\n");
 
   return status;
@@ -1874,7 +1874,7 @@ ShowScheduledUpdateRules()
   Cli_Printf("\n");
 
   Cli_Printf("update.config rules\n" "-------------------\n");
-  TSError status = Cli_DisplayRules(TS_FNAME_UPDATE_URL);
+  TSMgmtError status = Cli_DisplayRules(TS_FNAME_UPDATE_URL);
   Cli_Printf("\n");
 
   return status;
@@ -2295,7 +2295,7 @@ ShowAlarms()
   char *name;
 
   events = TSListCreate();
-  TSError status = TSActiveEventGetMlt(events);
+  TSMgmtError status = TSActiveEventGetMlt(events);
   if (status != TS_ERR_OKAY) {
     if (events) {
       TSListDestroy(events);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/cmd/traffic_shell/traffic_shell.cc
----------------------------------------------------------------------
diff --git a/cmd/traffic_shell/traffic_shell.cc b/cmd/traffic_shell/traffic_shell.cc
index 29978c7..b876158 100644
--- a/cmd/traffic_shell/traffic_shell.cc
+++ b/cmd/traffic_shell/traffic_shell.cc
@@ -50,7 +50,7 @@ int version_flag = 0;
 int
 main(int argc, char *argv[])
 {
-  TSError status;
+  TSMgmtError status;
 
   // build the application information structure
   appVersionInfo.setup(PACKAGE_NAME,"traffic_shell", PACKAGE_VERSION, __DATE__, __TIME__, BUILD_MACHINE, BUILD_PERSON, "");

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/lib/records/I_RecHttp.h
----------------------------------------------------------------------
diff --git a/lib/records/I_RecHttp.h b/lib/records/I_RecHttp.h
index 241d870..760d476 100644
--- a/lib/records/I_RecHttp.h
+++ b/lib/records/I_RecHttp.h
@@ -26,6 +26,7 @@
 
 #include <ts/ink_inet.h>
 #include <ts/ink_resolver.h>
+#include <ts/apidefs.h>
 #include <ts/Vec.h>
 
 /// Load default inbound IP addresses from the configuration file.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/lib/records/RecMessage.cc
----------------------------------------------------------------------
diff --git a/lib/records/RecMessage.cc b/lib/records/RecMessage.cc
index fd25d4d..d4e1b8c 100644
--- a/lib/records/RecMessage.cc
+++ b/lib/records/RecMessage.cc
@@ -23,6 +23,7 @@
 
 #include "libts.h"
 
+#include "P_RecCore.h"
 #include "P_RecFile.h"
 #include "P_RecMessage.h"
 #include "P_RecUtils.h"

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/FileManager.h
----------------------------------------------------------------------
diff --git a/mgmt/FileManager.h b/mgmt/FileManager.h
index 1824d5a..ae35343 100644
--- a/mgmt/FileManager.h
+++ b/mgmt/FileManager.h
@@ -35,6 +35,7 @@
 
 #include "ink_hash_table.h"
 #include "List.h"
+#include "Rollback.h"
 #include "WebGlobals.h"
 #include "MultiFile.h"
 #include "WebHttpMessage.h"

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/Main.h
----------------------------------------------------------------------
diff --git a/mgmt/Main.h b/mgmt/Main.h
index b401257..ec37226 100644
--- a/mgmt/Main.h
+++ b/mgmt/Main.h
@@ -25,7 +25,6 @@
 #define _MAIN_H_
 
 #include "FileManager.h"
-#include "WebOverview.h"
 #include "I_Version.h"
 
 // TODO: consolidate location of these defaults
@@ -40,7 +39,7 @@ void runAsUser(char *userName);
 void printUsage(void);
 
 extern FileManager *configFiles;
-extern overviewPage *overviewGenerator;
+//extern overviewPage *overviewGenerator;
 extern AppVersionInfo appVersionInfo;
 
 // Global strings

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/APITestCliRemote.cc
----------------------------------------------------------------------
diff --git a/mgmt/api/APITestCliRemote.cc b/mgmt/api/APITestCliRemote.cc
index 0b1318e..81fe2b5 100644
--- a/mgmt/api/APITestCliRemote.cc
+++ b/mgmt/api/APITestCliRemote.cc
@@ -126,10 +126,10 @@
 /* ------------------------------------------------------------------------
  * print_err
  * ------------------------------------------------------------------------
- * used to print the error description associated with the TSError err
+ * used to print the error description associated with the TSMgmtError err
  */
 void
-print_err(const char *module, TSError err)
+print_err(const char *module, TSMgmtError err)
 {
   char *err_msg;
 
@@ -878,7 +878,7 @@ print_proxy_state()
 void
 start_TS(char *tsArgs)
 {
-  TSError ret;
+  TSMgmtError ret;
   TSCacheClearT clear = TS_CACHE_CLEAR_OFF;
 
   char *args = strtok(tsArgs, ":");
@@ -902,7 +902,7 @@ start_TS(char *tsArgs)
 void
 stop_TS()
 {
-  TSError ret;
+  TSMgmtError ret;
 
   printf("STOPPING PROXY\n");
   if ((ret = TSProxyStateSet(TS_PROXY_OFF, TS_CACHE_CLEAR_OFF)) != TS_ERR_OKAY)
@@ -914,7 +914,7 @@ stop_TS()
 void
 restart()
 {
-  TSError ret;
+  TSMgmtError ret;
 
   printf("RESTART - Cluster wide\n");
   if ((ret = TSRestart(true)) != TS_ERR_OKAY)
@@ -927,7 +927,7 @@ restart()
 void
 reconfigure()
 {
-  TSError ret;
+  TSMgmtError ret;
 
   printf("RECONFIGURE\n");
   if ((ret = TSReconfigure()) != TS_ERR_OKAY)
@@ -962,7 +962,7 @@ test_action_need(void)
 void
 bounce()
 {
-  TSError ret;
+  TSMgmtError ret;
 
   printf("BOUNCER - Cluster wide\n");
   if ((ret = TSBounce(true)) != TS_ERR_OKAY)
@@ -986,7 +986,7 @@ test_error_records()
 {
   TSInt port1, new_port = 8080;
   TSActionNeedT action;
-  TSError ret;
+  TSMgmtError ret;
   TSFloat flt1;
   TSCounter ctr1;
 
@@ -1035,7 +1035,7 @@ test_records()
   TSInt port1, port2, new_port = 52432;
   TSFloat flt1, flt2, new_flt = 1.444;
   TSCounter ctr1, ctr2, new_ctr = 6666;
-  TSError err;
+  TSMgmtError err;
 
   /********************* START TEST SECTION *****************/
   printf("\n\n");
@@ -1182,7 +1182,7 @@ void
 test_rec_get(char *rec_name)
 {
   TSRecordEle *rec_ele;
-  TSError ret;
+  TSMgmtError ret;
   char *name;
 
   name = ats_strdup(rec_name);
@@ -1233,7 +1233,7 @@ test_record_get_mlt(void)
   TSList rec_list;
   int i, num;
   char *v1, *v2, *v3, *v6, *v7, *v8;
-  TSError ret;
+  TSMgmtError ret;
 
   name_list = TSStringListCreate();
   rec_list = TSListCreate();
@@ -1320,7 +1320,7 @@ test_record_set_mlt(void)
   TSList list;
   TSRecordEle *ele1, *ele2, *ele3, *ele4, *ele5;
   TSActionNeedT action = TS_ACTION_UNDEFINED;
-  TSError err;
+  TSMgmtError err;
 
   list = TSListCreate();
 
@@ -1382,7 +1382,7 @@ test_read_url(bool valid)
   int headerSize;
   char *body = NULL;
   int bodySize;
-  TSError err;
+  TSMgmtError err;
 
   if (!valid) {
     // first try
@@ -1582,7 +1582,7 @@ test_cfg_context_move(char *args)
   TSCfgContext ctx;
   TSFileNameT file;
   int i;
-  TSError err;
+  TSMgmtError err;
 
   char *filename = strtok(args, ":");
   filename = strtok(NULL, ":");
@@ -1666,7 +1666,7 @@ test_cfg_context_ops()
   // Not used here.
   //TSCfgIterState iter_state;
   //TSCfgEle *cfg_ele;
-  TSError err;
+  TSMgmtError err;
   TSCfgContext ctx;
   TSVirtIpAddrEle *ele;
   int rm_index = 0, i;
@@ -1919,7 +1919,7 @@ void
 print_active_events()
 {
   TSList events;
-  TSError ret;
+  TSMgmtError ret;
   int count, i;
   char *name;
 
@@ -1954,7 +1954,7 @@ bool
 check_active(char *event_name)
 {
   bool active;
-  TSError ret;
+  TSMgmtError ret;
 
   ret = TSEventIsActive(event_name, &active);
   print_err("TSEventIsActive", ret);
@@ -1981,7 +1981,7 @@ check_active(char *event_name)
 void
 try_resolve(char *event_name)
 {
-  TSError ret;
+  TSMgmtError ret;
   char *name;
 
   name = TSstrdup(event_name);
@@ -2018,7 +2018,7 @@ eventCallbackFn(char *name, char *msg, int /* pri ATS_UNUSED */, void * /* data
 void
 register_event_callback(void)
 {
-  TSError err;
+  TSMgmtError err;
 
   printf("\n[register_event_callback] \n");
   err = TSEventSignalCbRegister(NULL, eventCallbackFn, NULL);
@@ -2035,7 +2035,7 @@ register_event_callback(void)
 void
 unregister_event_callback(void)
 {
-  TSError err;
+  TSMgmtError err;
 
   printf("\n[unregister_event_callback]\n");
   err = TSEventSignalCbUnregister(NULL, eventCallbackFn);
@@ -2050,7 +2050,7 @@ void
 print_snapshots()
 {
   TSStringList list;
-  TSError err;
+  TSMgmtError err;
   char *name;
 
   list = TSStringListCreate();
@@ -2080,7 +2080,7 @@ add_snapshot(char *args)
   fprintf(stderr, "add snapshot: %s\n", snap_name);
   char *name = TSstrdup(snap_name);
 
-  TSError err = TSSnapshotTake(name);
+  TSMgmtError err = TSSnapshotTake(name);
   print_err("TSSnapshotTake", err);
 
   TSfree(name);
@@ -2094,7 +2094,7 @@ remove_snapshot(char *args)
   fprintf(stderr, "remove snapshot: %s\n", snap_name);
   char *name = TSstrdup(snap_name);
 
-  TSError err = TSSnapshotRemove(name);
+  TSMgmtError err = TSSnapshotRemove(name);
   print_err("TSSnapshotRemove", err);
 
   TSfree(name);
@@ -2108,7 +2108,7 @@ restore_snapshot(char *args)
   fprintf(stderr, "resotre snapshot: %s\n", snap_name);
   char *name = TSstrdup(snap_name);
 
-  TSError err = TSSnapshotRestore(name);
+  TSMgmtError err = TSSnapshotRestore(name);
   print_err("TSSnapshotRestore", err);
 
   TSfree(name);
@@ -2277,7 +2277,7 @@ print_stats()
 void
 reset_stats()
 {
-  TSError err = TSStatsReset(false);
+  TSMgmtError err = TSStatsReset(false);
   print_err("TSStatsReset", err);
   return;
 }
@@ -2300,7 +2300,7 @@ sync_test()
   else
     printf("[TSRecordSet] proxy.config.http.cache.fuzz.probability=-0.3333\n");
 
-  TSError ret;
+  TSMgmtError ret;
   if ((ret = TSProxyStateSet(TS_PROXY_OFF, TS_CACHE_CLEAR_OFF)) != TS_ERR_OKAY)
     printf("[TSProxyStateSet] turn off FAILED\n");
   print_err("stop_TS", ret);
@@ -2427,7 +2427,7 @@ runInteractive()
 int
 main(int /* argc ATS_UNUSED */, char ** /* argv ATS_UNUSED */)
 {
-  TSError ret;
+  TSMgmtError ret;
 
   if ((ret = TSInit(NULL, TS_MGMT_OPT_DEFAULTS)) == TS_ERR_OKAY) {
     runInteractive();

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/CfgContextImpl.cc
----------------------------------------------------------------------
diff --git a/mgmt/api/CfgContextImpl.cc b/mgmt/api/CfgContextImpl.cc
index bcc7586..61439da 100644
--- a/mgmt/api/CfgContextImpl.cc
+++ b/mgmt/api/CfgContextImpl.cc
@@ -2557,14 +2557,14 @@ CfgContext::~CfgContext()
   }
 }
 
-TSError CfgContext::addEle(CfgEleObj * ele)
+TSMgmtError CfgContext::addEle(CfgEleObj * ele)
 {
   ink_assert(ele != NULL);
   m_eles.enqueue(ele);          // enqueue CfgEleObj at end of Queue
   return TS_ERR_OKAY;
 }
 
-TSError CfgContext::removeEle(CfgEleObj * ele)
+TSMgmtError CfgContext::removeEle(CfgEleObj * ele)
 {
   ink_assert(ele != NULL);
   m_eles.remove(ele);
@@ -2574,7 +2574,7 @@ TSError CfgContext::removeEle(CfgEleObj * ele)
   return TS_ERR_OKAY;
 }
 
-TSError CfgContext::insertEle(CfgEleObj * ele, CfgEleObj * after_ele)
+TSMgmtError CfgContext::insertEle(CfgEleObj * ele, CfgEleObj * after_ele)
 {
   ink_assert(ele != NULL && after_ele != NULL);
   m_eles.insert(ele, after_ele);
@@ -2583,7 +2583,7 @@ TSError CfgContext::insertEle(CfgEleObj * ele, CfgEleObj * after_ele)
 }
 
 // insert Ele at front of the Queue
-TSError CfgContext::pushEle(CfgEleObj * ele)
+TSMgmtError CfgContext::pushEle(CfgEleObj * ele)
 {
   ink_assert(ele != NULL);
   m_eles.push(ele);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/CfgContextImpl.h
----------------------------------------------------------------------
diff --git a/mgmt/api/CfgContextImpl.h b/mgmt/api/CfgContextImpl.h
index 4680825..dd05314 100644
--- a/mgmt/api/CfgContextImpl.h
+++ b/mgmt/api/CfgContextImpl.h
@@ -544,10 +544,10 @@ public:
     return (here->link).next;
   }
 
-  TSError addEle(CfgEleObj * ele);     /* enqueue EleObj at end of Queue */
-  TSError removeEle(CfgEleObj * ele);
-  TSError insertEle(CfgEleObj * ele, CfgEleObj * after_ele);
-  TSError pushEle(CfgEleObj * ele);
+  TSMgmtError addEle(CfgEleObj * ele);     /* enqueue EleObj at end of Queue */
+  TSMgmtError removeEle(CfgEleObj * ele);
+  TSMgmtError insertEle(CfgEleObj * ele, CfgEleObj * after_ele);
+  TSMgmtError pushEle(CfgEleObj * ele);
 
 private:
   TSFileNameT m_file;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/CfgContextManager.cc
----------------------------------------------------------------------
diff --git a/mgmt/api/CfgContextManager.cc b/mgmt/api/CfgContextManager.cc
index 6a34980..2085a0e 100644
--- a/mgmt/api/CfgContextManager.cc
+++ b/mgmt/api/CfgContextManager.cc
@@ -64,7 +64,7 @@ CfgContextCreate(TSFileNameT file)
  * ---------------------------------------------------------------
  * frees all memory allocated for the CfgContext
  */
-TSError
+TSMgmtError
 CfgContextDestroy(CfgContext * ctx)
 {
   if (!ctx)
@@ -83,7 +83,7 @@ CfgContextDestroy(CfgContext * ctx)
  * errRules is an optional argument - if specified, then a
  * list of the indices of the invalid rules will be stored in it
  */
-TSError
+TSMgmtError
 CfgContextCommit(CfgContext * ctx, LLQ * errRules)
 {
   int ret;
@@ -92,7 +92,7 @@ CfgContextCommit(CfgContext * ctx, LLQ * errRules)
   CfgEleObj *ele;
   int ver, size = 0, index;
   int *iPtr;
-  TSError err = TS_ERR_OKAY;
+  TSMgmtError err = TS_ERR_OKAY;
   int max_file_size = MAX_FILE_SIZE;
   int len = 0;
 
@@ -150,10 +150,10 @@ CfgContextCommit(CfgContext * ctx, LLQ * errRules)
  * ctx should also store the version number of the file being read.
  * If invalid rule, it is skipped and not added to the CfgContext.
  */
-TSError
+TSMgmtError
 CfgContextGet(CfgContext * ctx)
 {
-  TSError ret;
+  TSMgmtError ret;
   int size, ver;
   char *old_text = NULL;
   RuleList *rule_list = NULL;
@@ -384,13 +384,13 @@ CfgContextGetNext(CfgContext * ctx, TSCfgIterState * state)
  * first), and insert the copy at the position of index-1.
  * THIS IS REALLY INEFFICIENT!!!
  */
-TSError
+TSMgmtError
 CfgContextMoveEleUp(CfgContext * ctx, int index)
 {
   CfgEleObj *curr_ele_obj;
   TSCfgEle *ele_copy = 0;      /* lv: just to make gcc happy */
   int count = 0;                // start counting from 0
-  TSError ret;
+  TSMgmtError ret;
 
   ink_assert(ctx && index >= 0);
   if (!ctx || index < 0)
@@ -436,13 +436,13 @@ CfgContextMoveEleUp(CfgContext * ctx, int index)
  * Make a copy of the ele stored in the EleObj before deleting it and
  * reinserts the new EleObj in the index+1 position.
  */
-TSError
+TSMgmtError
 CfgContextMoveEleDown(CfgContext * ctx, int index)
 {
   CfgEleObj *curr_ele_obj;
   TSCfgEle *ele_copy = 0;      /* lv: just to make gcc happy */
   int count = 0;                // start counting from 0
-  TSError ret;
+  TSMgmtError ret;
   int tot_ele;
 
   ink_assert(ctx);
@@ -492,7 +492,7 @@ CfgContextMoveEleDown(CfgContext * ctx, int index)
  * Appends the ele to the end of the CfgContext. First must
  * wrap the ele in an CfgEleObj class before can append to CfgContext
  */
-TSError
+TSMgmtError
 CfgContextAppendEle(CfgContext * ctx, TSCfgEle * ele)
 {
   CfgEleObj *ele_obj;
@@ -516,12 +516,12 @@ CfgContextAppendEle(CfgContext * ctx, TSCfgEle * ele)
  * comments before the first non-comment CfgEleObj, then insert the
  * new EleObj right after the last comment
  */
-TSError
+TSMgmtError
 CfgContextInsertEleAt(CfgContext * ctx, TSCfgEle * ele, int index)
 {
   CfgEleObj *ele_obj, *curr_ele_obj, *last_comment = NULL;
   int count = 0;
-  TSError err = TS_ERR_OKAY;
+  TSMgmtError err = TS_ERR_OKAY;
   bool has_comment = false;
 
   // need to convert the ele into appropriate Ele object type
@@ -568,7 +568,7 @@ CfgContextInsertEleAt(CfgContext * ctx, TSCfgEle * ele, int index)
  * non-comment ele's from 0, eg. if index = 3, that means remove the
  * fourth non-comment ELe in the CfgContext
  */
-TSError
+TSMgmtError
 CfgContextRemoveEleAt(CfgContext * ctx, int index)
 {
   CfgEleObj *curr_ele_obj;
@@ -600,7 +600,7 @@ CfgContextRemoveEleAt(CfgContext * ctx, int index)
  * Removes all the Ele rules from Cfg Context leaving all the
  * comments behind
  */
-TSError
+TSMgmtError
 CfgContextRemoveAll(CfgContext * ctx)
 {
   CfgEleObj *curr_ele_obj, *ele_obj_ptr;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/CfgContextManager.h
----------------------------------------------------------------------
diff --git a/mgmt/api/CfgContextManager.h b/mgmt/api/CfgContextManager.h
index c6964ce..a5b136e 100644
--- a/mgmt/api/CfgContextManager.h
+++ b/mgmt/api/CfgContextManager.h
@@ -48,9 +48,9 @@
  * of the rules in the queue
  */
 CfgContext *CfgContextCreate(TSFileNameT filetype);
-TSError CfgContextDestroy(CfgContext * ctx);
-TSError CfgContextCommit(CfgContext * ctx, LLQ * errRules = NULL);
-TSError CfgContextGet(CfgContext * ctx);
+TSMgmtError CfgContextDestroy(CfgContext * ctx);
+TSMgmtError CfgContextCommit(CfgContext * ctx, LLQ * errRules = NULL);
+TSMgmtError CfgContextGet(CfgContext * ctx);
 
 
 /***************************************************************************
@@ -66,12 +66,12 @@ CfgEleObj *CfgContextGetObjAt(CfgContext * ctx, int index);
 TSCfgEle *CfgContextGetFirst(CfgContext * ctx, TSCfgIterState * state);
 TSCfgEle *CfgContextGetNext(CfgContext * ctx, TSCfgIterState * state);
 
-TSError CfgContextMoveEleUp(CfgContext * ctx, int index);
-TSError CfgContextMoveEleDown(CfgContext * ctx, int index);
+TSMgmtError CfgContextMoveEleUp(CfgContext * ctx, int index);
+TSMgmtError CfgContextMoveEleDown(CfgContext * ctx, int index);
 
-TSError CfgContextAppendEle(CfgContext * ctx, TSCfgEle * ele);
-TSError CfgContextInsertEleAt(CfgContext * ctx, TSCfgEle * ele, int index);
-TSError CfgContextRemoveEleAt(CfgContext * ctx, int index);
-TSError CfgContextRemoveAll(CfgContext * ctx);
+TSMgmtError CfgContextAppendEle(CfgContext * ctx, TSCfgEle * ele);
+TSMgmtError CfgContextInsertEleAt(CfgContext * ctx, TSCfgEle * ele, int index);
+TSMgmtError CfgContextRemoveEleAt(CfgContext * ctx, int index);
+TSMgmtError CfgContextRemoveAll(CfgContext * ctx);
 
 #endif

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/CfgContextUtils.cc
----------------------------------------------------------------------
diff --git a/mgmt/api/CfgContextUtils.cc b/mgmt/api/CfgContextUtils.cc
index f94b10c..599d13f 100644
--- a/mgmt/api/CfgContextUtils.cc
+++ b/mgmt/api/CfgContextUtils.cc
@@ -976,7 +976,7 @@ pdest_sspec_to_string(TSPrimeDestT pd, char *pd_val, TSSspec * sspec)
  * <pd_type>#<pd_value>#<sspecs> --> TSPdSsFormat
  * NOTE that the entire data line, including the action type is being passed in
  */
-TSError
+TSMgmtError
 string_to_pdss_format(const char *str, TSPdSsFormat * pdss)
 {
   Tokenizer tokens(DELIMITER_STR);
@@ -1088,7 +1088,7 @@ hms_time_to_string(TSHmsTime time)
  * Returns TS_ERR_FAIL if invalid hms format, eg. if there are invalid
  * characters, eg. "10xh", "10h15m30s34", or repeated values, eg. "10h15h"
  */
-TSError
+TSMgmtError
 string_to_hms_time(const char *str, TSHmsTime * time)
 {
   int i, pos = 0;
@@ -1161,7 +1161,7 @@ Lerror:
  *  } time
  * Returns TS_ERR_FAIL if invalid time string.
  */
-TSError
+TSMgmtError
 string_to_time_struct(const char *str, TSSspec * sspec)
 {
   Tokenizer time_tokens(":-");

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/CfgContextUtils.h
----------------------------------------------------------------------
diff --git a/mgmt/api/CfgContextUtils.h b/mgmt/api/CfgContextUtils.h
index b6fc86d..390759f 100644
--- a/mgmt/api/CfgContextUtils.h
+++ b/mgmt/api/CfgContextUtils.h
@@ -86,14 +86,14 @@ char *domain_list_to_string(TSDomainList list, const char *delimiter);
 /* pd, pd_val, TSSspec ==> <pd_type>#<pd_value>#<sspecs> */
 char *pdest_sspec_to_string(TSPrimeDestT pd, char *prim_dest_val, TSSspec * sspec);
 /* <pd_type>#<pd_value>#<sspecs> ==> TSPdSsFormat */
-TSError string_to_pdss_format(const char *str, TSPdSsFormat * pdss);
+TSMgmtError string_to_pdss_format(const char *str, TSPdSsFormat * pdss);
 
 /* ?h?m?s <==> TSHmsTime */
 char *hms_time_to_string(TSHmsTime time);
-TSError string_to_hms_time(const char *str, TSHmsTime * time);
+TSMgmtError string_to_hms_time(const char *str, TSHmsTime * time);
 
 /* string ==> time struct */
-TSError string_to_time_struct(const char *str, TSSspec * sspec);
+TSMgmtError string_to_time_struct(const char *str, TSSspec * sspec);
 
 /* string ==> TSHdrT */
 TSHdrT string_to_header_type(const char *str);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/CoreAPI.cc
----------------------------------------------------------------------
diff --git a/mgmt/api/CoreAPI.cc b/mgmt/api/CoreAPI.cc
index 813a2fd..ff8ea63 100644
--- a/mgmt/api/CoreAPI.cc
+++ b/mgmt/api/CoreAPI.cc
@@ -58,7 +58,7 @@ CallbackTable *local_event_callbacks;
  * performs any necesary initializations for the local API client,
  * eg. set up global structures; called by the TSMgmtAPI::TSInit()
  */
-TSError
+TSMgmtError
 Init(const char * /* socket_path ATS_UNUSED */, TSInitOptionT options)
 {
   // socket_path should be null; only applies to remote clients
@@ -79,7 +79,7 @@ Init(const char * /* socket_path ATS_UNUSED */, TSInitOptionT options)
  * performs any necesary cleanup of global structures, etc,
  * for the local API client,
  */
-TSError
+TSMgmtError
 Terminate()
 {
   delete_callback_table(local_event_callbacks);
@@ -164,7 +164,7 @@ ProxyStateGet()
  * tsArgs  - (optional) a string with space delimited options that user
  *            wants to start traffic Server with
  */
-TSError
+TSMgmtError
 ProxyStateSet(TSProxyStateT state, TSCacheClearT clear)
 {
   int i = 0;
@@ -233,7 +233,7 @@ Lerror:
  *-------------------------------------------------------------------------
  * Rereads configuration files
  */
-TSError
+TSMgmtError
 Reconfigure()
 {
   configFiles->rereadConfig();  // TM rereads
@@ -248,7 +248,7 @@ Reconfigure()
  * Restarts Traffic Manager. Traffic Cop must be running in order to
  * restart Traffic Manager!!
  */
-TSError
+TSMgmtError
 Restart(bool cluster)
 {
   if (cluster) {                // Enqueue an event to restart the proxies across the cluster
@@ -266,7 +266,7 @@ Restart(bool cluster)
  *-------------------------------------------------------------------------
  * Bounces traffic_server process(es).
  */
-TSError
+TSMgmtError
 Bounce(bool cluster)
 {
   if (cluster) {
@@ -286,7 +286,7 @@ Bounce(bool cluster)
  * CoreAPI is linked (it must match the remote CoreAPI signature so compiling
  * this source or CoreAPIRemote.cc yields the same set of symbols).
  */
-TSError
+TSMgmtError
 StorageDeviceCmdOffline(char const* dev)
 {
   lmgmt->signalEvent(MGMT_EVENT_STORAGE_DEVICE_CMD_OFFLINE, dev);
@@ -301,7 +301,7 @@ StorageDeviceCmdOffline(char const* dev)
  * rec_ele has allocated memory already but with all empty fields.
  * The record info associated with rec_name will be returned in rec_ele.
  */
-TSError
+TSMgmtError
 MgmtRecordGet(const char *rec_name, TSRecordEle * rec_ele)
 {
   RecDataT rec_type;
@@ -374,7 +374,7 @@ MgmtRecordGet(const char *rec_name, TSRecordEle * rec_ele)
 // to buffer up all the matching records in memory. We stream the records
 // directory onto the management socket in handle_record_match(). This stub
 // is just here for link time dependencies.
-TSError
+TSMgmtError
 MgmtRecordGetMatching(const char * /* regex */, TSList /* rec_vals */)
 {
   return TS_ERR_FAIL;
@@ -426,7 +426,7 @@ determine_action_need(const char *rec_name)
  *  returns true if the variable was successfully set
  *   and false otherwise
  */
-TSError
+TSMgmtError
 MgmtRecordSet(const char *rec_name, const char *val, TSActionNeedT * action_need)
 {
   Debug("RecOp", "[MgmtRecordSet] Start\n");
@@ -452,7 +452,7 @@ MgmtRecordSet(const char *rec_name, const char *val, TSActionNeedT * action_need
  * Returns TS_ERR_FAIL if the type is not a valid integer.
  * Converts the integer value to a string and call MgmtRecordSet
  */
-TSError
+TSMgmtError
 MgmtRecordSetInt(const char *rec_name, MgmtInt int_val, TSActionNeedT * action_need)
 {
   if (!rec_name || !action_need)
@@ -473,7 +473,7 @@ MgmtRecordSetInt(const char *rec_name, MgmtInt int_val, TSActionNeedT * action_n
  *-------------------------------------------------------------------------
  * converts the counter_val to a string and uses MgmtRecordSet
  */
-TSError
+TSMgmtError
 MgmtRecordSetCounter(const char *rec_name, MgmtIntCounter counter_val, TSActionNeedT * action_need)
 {
   if (!rec_name || !action_need)
@@ -495,7 +495,7 @@ MgmtRecordSetCounter(const char *rec_name, MgmtIntCounter counter_val, TSActionN
  * converts the float value to string (to do record validity check)
  * and calls MgmtRecordSet
  */
-TSError
+TSMgmtError
 MgmtRecordSetFloat(const char *rec_name, MgmtFloat float_val, TSActionNeedT * action_need)
 {
   if (!rec_name || !action_need)
@@ -516,7 +516,7 @@ MgmtRecordSetFloat(const char *rec_name, MgmtFloat float_val, TSActionNeedT * ac
  *-------------------------------------------------------------------------
  * The string value is copied so it's okay to free the string later
  */
-TSError
+TSMgmtError
 MgmtRecordSetString(const char *rec_name, const char *string_val, TSActionNeedT * action_need)
 {
   return MgmtRecordSet(rec_name, string_val, action_need);
@@ -537,7 +537,7 @@ MgmtRecordSetString(const char *rec_name, const char *string_val, TSActionNeedT
  *          ver  - the version number of file being read
  * Note: CALLEE must DEALLOCATE text memory returned
  */
-TSError
+TSMgmtError
 ReadFile(TSFileNameT file, char **text, int *size, int *version)
 {
   const char *fname;
@@ -587,7 +587,7 @@ ReadFile(TSFileNameT file, char **text, int *size, int *version)
  *        version - the current version level; new file will have the
  *                  version number above this one
  */
-TSError
+TSMgmtError
 WriteFile(TSFileNameT file, char *text, int size, int version)
 {
   const char *fname;
@@ -646,7 +646,7 @@ WriteFile(TSFileNameT file, char *text, int size, int version)
  * be careful because this alarm description is used to keep track
  * of alarms in the current alarm processor
  */
-TSError
+TSMgmtError
 EventSignal(char * /* event_name ATS_UNUSED */, va_list /* ap ATS_UNUSED */)
 {
   //char *text;
@@ -666,7 +666,7 @@ EventSignal(char * /* event_name ATS_UNUSED */, va_list /* ap ATS_UNUSED */)
  * unresolved, just return TS_ERR_OKAY.
 
  */
-TSError
+TSMgmtError
 EventResolve(char *event_name)
 {
   alarm_t a;
@@ -687,7 +687,7 @@ EventResolve(char *event_name)
  * functions fail for a single event
  * note: returns list of local alarms at that instant of fn call (snapshot)
  */
-TSError
+TSMgmtError
 ActiveEventGetMlt(LLQ * active_events)
 {
   InkHashTable *event_ht;
@@ -728,7 +728,7 @@ ActiveEventGetMlt(LLQ * active_events)
  * Sets *is_current to true if the event named event_name is currently
  * unresolved; otherwise sets *is_current to false.
  */
-TSError
+TSMgmtError
 EventIsActive(char *event_name, bool * is_current)
 {
   alarm_t a;
@@ -759,7 +759,7 @@ EventIsActive(char *event_name, bool * is_current)
  * event callback functions for each type of event. The functions are also
  * stored in the the hashtable, not in the TM alarm processor model
  */
-TSError
+TSMgmtError
 EventSignalCbRegister(char *event_name, TSEventSignalFunc func, void *data)
 {
   return cb_table_register(local_event_callbacks, event_name, func, data, NULL);
@@ -771,7 +771,7 @@ EventSignalCbRegister(char *event_name, TSEventSignalFunc func, void *data)
  *-------------------------------------------------------------------------
  * Removes the callback function from the local side CallbackTable
  */
-TSError
+TSMgmtError
 EventSignalCbUnregister(char *event_name, TSEventSignalFunc func)
 {
   return cb_table_unregister(local_event_callbacks, event_name, func);
@@ -780,7 +780,7 @@ EventSignalCbUnregister(char *event_name, TSEventSignalFunc func)
 /***************************************************************************
  * Snapshots
  ***************************************************************************/
-TSError
+TSMgmtError
 SnapshotTake(char *snapshot_name)
 {
   char *snapDirFromRecordsConf;
@@ -806,7 +806,7 @@ SnapshotTake(char *snapshot_name)
     return TS_ERR_OKAY;
 }
 
-TSError
+TSMgmtError
 SnapshotRestore(char *snapshot_name)
 {
   char *snapDirFromRecordsConf;
@@ -833,7 +833,7 @@ SnapshotRestore(char *snapshot_name)
     return TS_ERR_OKAY;
 }
 
-TSError
+TSMgmtError
 SnapshotRemove(char *snapshot_name)
 {
   char *snapDirFromRecordsConf;
@@ -861,7 +861,7 @@ SnapshotRemove(char *snapshot_name)
 }
 
 /* based on FileManager.cc::displaySnapOption() */
-TSError
+TSMgmtError
 SnapshotGetMlt(LLQ * snapshots)
 {
   ExpandingArray snap_list(25, true);
@@ -892,7 +892,7 @@ SnapshotGetMlt(LLQ * snapshots)
  * but will return TS_ERR_FAIL. Only returns TS_ERR_OKAY if all
  * stats are set back to defaults successfully.
  */
-TSError
+TSMgmtError
 StatsReset(bool cluster, const char *name)
 {
   if (cluster)

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/CoreAPI.h
----------------------------------------------------------------------
diff --git a/mgmt/api/CoreAPI.h b/mgmt/api/CoreAPI.h
index a260416..5b55e24 100644
--- a/mgmt/api/CoreAPI.h
+++ b/mgmt/api/CoreAPI.h
@@ -40,8 +40,8 @@ extern "C"
 {
 #endif /* __cplusplus */
 
-TSError Init(const char *socket_path = NULL, TSInitOptionT options = TS_MGMT_OPT_DEFAULTS);
-TSError Terminate();
+TSMgmtError Init(const char *socket_path = NULL, TSInitOptionT options = TS_MGMT_OPT_DEFAULTS);
+TSMgmtError Terminate();
 
 void Diags(TSDiagsT mode, const char *fmt, va_list ap);
 
@@ -49,54 +49,54 @@ void Diags(TSDiagsT mode, const char *fmt, va_list ap);
  * Control Operations
  ***************************************************************************/
 TSProxyStateT ProxyStateGet();
-TSError ProxyStateSet(TSProxyStateT state, TSCacheClearT clear);
+TSMgmtError ProxyStateSet(TSProxyStateT state, TSCacheClearT clear);
 
-TSError Reconfigure();         // TS reread config files
-TSError Restart(bool cluster); //restart TM
-TSError Bounce(bool cluster);  //restart traffic_server
-TSError StorageDeviceCmdOffline(char const* dev); // Storage device operation.
+TSMgmtError Reconfigure();         // TS reread config files
+TSMgmtError Restart(bool cluster); //restart TM
+TSMgmtError Bounce(bool cluster);  //restart traffic_server
+TSMgmtError StorageDeviceCmdOffline(char const* dev); // Storage device operation.
 
 /***************************************************************************
  * Record Operations
  ***************************************************************************/
 /* For remote implementation of this interface, these functions will have
    to marshal/unmarshal and send request across the network */
-TSError MgmtRecordGet(const char *rec_name, TSRecordEle * rec_ele);
+TSMgmtError MgmtRecordGet(const char *rec_name, TSRecordEle * rec_ele);
 
-TSError MgmtRecordSet(const char *rec_name, const char *val, TSActionNeedT * action_need);
-TSError MgmtRecordSetInt(const char *rec_name, MgmtInt int_val, TSActionNeedT * action_need);
-TSError MgmtRecordSetCounter(const char *rec_name, MgmtIntCounter counter_val, TSActionNeedT *action_need);
-TSError MgmtRecordSetFloat(const char *rec_name, MgmtFloat float_val, TSActionNeedT * action_need);
-TSError MgmtRecordSetString(const char *rec_name, const char*string_val, TSActionNeedT * action_need);
-TSError MgmtRecordGetMatching(const char * regex, TSList rec_vals);
+TSMgmtError MgmtRecordSet(const char *rec_name, const char *val, TSActionNeedT * action_need);
+TSMgmtError MgmtRecordSetInt(const char *rec_name, MgmtInt int_val, TSActionNeedT * action_need);
+TSMgmtError MgmtRecordSetCounter(const char *rec_name, MgmtIntCounter counter_val, TSActionNeedT *action_need);
+TSMgmtError MgmtRecordSetFloat(const char *rec_name, MgmtFloat float_val, TSActionNeedT * action_need);
+TSMgmtError MgmtRecordSetString(const char *rec_name, const char*string_val, TSActionNeedT * action_need);
+TSMgmtError MgmtRecordGetMatching(const char * regex, TSList rec_vals);
 
 
 /***************************************************************************
  * File Operations
  ***************************************************************************/
-TSError ReadFile(TSFileNameT file, char **text, int *size, int *version);
-TSError WriteFile(TSFileNameT file, char *text, int size, int version);
+TSMgmtError ReadFile(TSFileNameT file, char **text, int *size, int *version);
+TSMgmtError WriteFile(TSFileNameT file, char *text, int size, int version);
 
 /***************************************************************************
  * Events
  ***************************************************************************/
 
-TSError EventSignal(char *event_name, va_list ap);
-TSError EventResolve(char *event_name);
-TSError ActiveEventGetMlt(LLQ * active_events);
-TSError EventIsActive(char *event_name, bool * is_current);
-TSError EventSignalCbRegister(char *event_name, TSEventSignalFunc func, void *data);
-TSError EventSignalCbUnregister(char *event_name, TSEventSignalFunc func);
+TSMgmtError EventSignal(char *event_name, va_list ap);
+TSMgmtError EventResolve(char *event_name);
+TSMgmtError ActiveEventGetMlt(LLQ * active_events);
+TSMgmtError EventIsActive(char *event_name, bool * is_current);
+TSMgmtError EventSignalCbRegister(char *event_name, TSEventSignalFunc func, void *data);
+TSMgmtError EventSignalCbUnregister(char *event_name, TSEventSignalFunc func);
 
 /***************************************************************************
  * Snapshots
  ***************************************************************************/
-TSError SnapshotTake(char *snapshot_name);
-TSError SnapshotRestore(char *snapshot_name);
-TSError SnapshotRemove(char *snapshot_name);
-TSError SnapshotGetMlt(LLQ * snapshots);
+TSMgmtError SnapshotTake(char *snapshot_name);
+TSMgmtError SnapshotRestore(char *snapshot_name);
+TSMgmtError SnapshotRemove(char *snapshot_name);
+TSMgmtError SnapshotGetMlt(LLQ * snapshots);
 
-TSError StatsReset(bool cluster, const char* name = NULL);
+TSMgmtError StatsReset(bool cluster, const char* name = NULL);
 
 #ifdef __cplusplus
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/CoreAPIRemote.cc
----------------------------------------------------------------------
diff --git a/mgmt/api/CoreAPIRemote.cc b/mgmt/api/CoreAPIRemote.cc
index a3ae85b..6d9b489 100644
--- a/mgmt/api/CoreAPIRemote.cc
+++ b/mgmt/api/CoreAPIRemote.cc
@@ -30,7 +30,7 @@
  * Note: For remote implementation of this interface, most functions will:
  *  1) marshal: create the message to send across network
  *  2) connect and send request
- *  3) unmarshal: parse the reply (checking for TSError)
+ *  3) unmarshal: parse the reply (checking for TSMgmtError)
  *
  * Created: lant
  *
@@ -56,10 +56,10 @@ extern int main_socket_fd;      // from NetworkUtils
 extern int event_socket_fd;
 
 // forward declarations
-TSError send_and_parse_basic(OpType op);
-TSError send_and_parse_list(OpType op, LLQ * list);
-TSError send_and_parse_name(OpType op, char *name);
-TSError mgmt_record_set(const char *rec_name, const char *rec_val, TSActionNeedT * action_need);
+TSMgmtError send_and_parse_basic(OpType op);
+TSMgmtError send_and_parse_list(OpType op, LLQ * list);
+TSMgmtError send_and_parse_name(OpType op, char *name);
+TSMgmtError mgmt_record_set(const char *rec_name, const char *rec_val, TSActionNeedT * action_need);
 
 // global variables
 // need to store the thread id associated with socket_test_thread
@@ -77,10 +77,10 @@ TSInitOptionT ts_init_options;
  * helper function used by operations which only require sending a simple
  * operation type and parsing a simple error return value
  */
-TSError
+TSMgmtError
 send_and_parse_basic(OpType op)
 {
-  TSError err;
+  TSMgmtError err;
 
   err = send_request(main_socket_fd, op);
   if (err != TS_ERR_OKAY)
@@ -99,10 +99,10 @@ send_and_parse_basic(OpType op)
  * (delimited with REMOTE_DELIM_STR) and storing the tokens in the list
  * parameter
  */
-TSError
+TSMgmtError
 send_and_parse_list(OpType op, LLQ * list)
 {
-  TSError ret;
+  TSMgmtError ret;
   char *list_str;
   const char *tok;
   Tokenizer tokens(REMOTE_DELIM_STR);
@@ -141,13 +141,13 @@ send_and_parse_list(OpType op, LLQ * list)
  *-------------------------------------------------------------------------
  * helper function used by operations which only require sending a simple
  * operation type with one string name argument and then parsing a simple
- * TSError reply
+ * TSMgmtError reply
  * NOTE: name can be a NULL parameter!
  */
-TSError
+TSMgmtError
 send_and_parse_name(OpType op, char *name)
 {
-  TSError ret;
+  TSMgmtError ret;
 
   // create and send request
   ret = send_request_name(main_socket_fd, op, name);
@@ -172,10 +172,10 @@ send_and_parse_name(OpType op, char *name)
  * Hence, on the local side, don't have to worry about typecasting a
  * void*. Just read out the string from socket and pass it MgmtRecordSet.
  */
-TSError
+TSMgmtError
 mgmt_record_set(const char *rec_name, const char *rec_val, TSActionNeedT * action_need)
 {
-  TSError err;
+  TSMgmtError err;
 
   if (!rec_name || !rec_val || !action_need)
     return TS_ERR_PARAMS;
@@ -185,7 +185,7 @@ mgmt_record_set(const char *rec_name, const char *rec_val, TSActionNeedT * actio
   if (err != TS_ERR_OKAY)
     return err;
 
-  // parse the reply to get TSError response and TSActionNeedT
+  // parse the reply to get TSMgmtError response and TSActionNeedT
   err = parse_record_set_reply(main_socket_fd, action_need);
 
   return err;
@@ -196,10 +196,10 @@ mgmt_record_set(const char *rec_name, const char *rec_val, TSActionNeedT * actio
 /***************************************************************************
  * SetUp Operations
  ***************************************************************************/
-TSError
+TSMgmtError
 Init(const char *socket_path, TSInitOptionT options)
 {
-  TSError err = TS_ERR_OKAY;
+  TSMgmtError err = TS_ERR_OKAY;
 
   ts_init_options = options;
 
@@ -255,10 +255,10 @@ END:
 }
 
 // does clean up for remote API client; destroy structures and disconnects
-TSError
+TSMgmtError
 Terminate()
 {
-  TSError err;
+  TSMgmtError err;
 
   if (remote_event_callbacks)
     delete_callback_table(remote_event_callbacks);
@@ -307,7 +307,7 @@ Diags(TSDiagsT mode, const char *fmt, va_list ap)
   // format the diag message now so it can be sent
   // vsnprintf does not compile on DEC
   vsnprintf(diag_msg, MAX_BUF_SIZE - 1, fmt, ap);
-  TSError ret = send_diags_msg(main_socket_fd, mode, diag_msg);
+  TSMgmtError ret = send_diags_msg(main_socket_fd, mode, diag_msg);
   if (ret != TS_ERR_OKAY) {
     //fprintf(stderr, "[Diags] error sending diags message\n");
   }
@@ -319,7 +319,7 @@ Diags(TSDiagsT mode, const char *fmt, va_list ap)
 TSProxyStateT
 ProxyStateGet()
 {
-  TSError ret;
+  TSMgmtError ret;
   TSProxyStateT state;
 
   ret = send_request(main_socket_fd, PROXY_STATE_GET);
@@ -333,10 +333,10 @@ ProxyStateGet()
   return state;
 }
 
-TSError
+TSMgmtError
 ProxyStateSet(TSProxyStateT state, TSCacheClearT clear)
 {
-  TSError ret;
+  TSMgmtError ret;
 
   ret = send_proxy_state_set_request(main_socket_fd, state, clear);
   if (ret != TS_ERR_OKAY)
@@ -347,7 +347,7 @@ ProxyStateSet(TSProxyStateT state, TSCacheClearT clear)
   return ret;
 }
 
-TSError
+TSMgmtError
 Reconfigure()
 {
   return send_and_parse_basic(RECONFIGURE);
@@ -362,10 +362,10 @@ Reconfigure()
  * only signals the event putting it in a msg queue;
  * so keep trying to reconnect until successful or for MAX_CONN_TRIES
  */
-TSError
+TSMgmtError
 Restart(bool cluster)
 {
-  TSError ret;
+  TSMgmtError ret;
 
   ret = send_request_bool(main_socket_fd, RESTART, cluster);
   if (ret != TS_ERR_OKAY)
@@ -386,10 +386,10 @@ Restart(bool cluster)
  *-------------------------------------------------------------------------
  * Restart the traffic_server process(es) only.
  */
-TSError
+TSMgmtError
 Bounce(bool cluster)
 {
-  TSError ret;
+  TSMgmtError ret;
 
   ret = send_request_bool(main_socket_fd, BOUNCE, cluster);
   if (ret != TS_ERR_OKAY)
@@ -404,10 +404,10 @@ Bounce(bool cluster)
  *-------------------------------------------------------------------------
  * Disable a storage device.
  */
-TSError
+TSMgmtError
 StorageDeviceCmdOffline(char const* dev)
 {
-  TSError ret;
+  TSMgmtError ret;
   ret = send_request_name(main_socket_fd, STORAGE_DEVICE_CMD_OFFLINE, dev);
   return TS_ERR_OKAY != ret ? ret : parse_reply(main_socket_fd);
 }
@@ -415,10 +415,10 @@ StorageDeviceCmdOffline(char const* dev)
 /***************************************************************************
  * Record Operations
  ***************************************************************************/
-static TSError
+static TSMgmtError
 mgmt_record_get_reply(TSRecordEle * rec_ele)
 {
-  TSError ret;
+  TSMgmtError ret;
   void *val;
   char *name;
 
@@ -461,10 +461,10 @@ mgmt_record_get_reply(TSRecordEle * rec_ele)
 
 // note that the record value is being sent as chunk of memory, regardless of
 // record type; it's not being converted to a string!!
-TSError
+TSMgmtError
 MgmtRecordGet(const char *rec_name, TSRecordEle * rec_ele)
 {
-  TSError ret;
+  TSMgmtError ret;
 
   if (!rec_name || !rec_ele) {
     return TS_ERR_PARAMS;
@@ -479,10 +479,10 @@ MgmtRecordGet(const char *rec_name, TSRecordEle * rec_ele)
   return mgmt_record_get_reply(rec_ele);
 }
 
-TSError
+TSMgmtError
 MgmtRecordGetMatching(const char * regex, TSList rec_vals)
 {
-  TSError       ret;
+  TSMgmtError       ret;
   TSRecordEle * rec_ele;
 
   ret = send_record_match_request(main_socket_fd, regex);
@@ -519,10 +519,10 @@ fail:
   return ret;
 }
 
-TSError
+TSMgmtError
 MgmtRecordSet(const char *rec_name, const char *val, TSActionNeedT * action_need)
 {
-  TSError ret;
+  TSMgmtError ret;
 
   if (!rec_name || !val || !action_need)
     return TS_ERR_PARAMS;
@@ -533,11 +533,11 @@ MgmtRecordSet(const char *rec_name, const char *val, TSActionNeedT * action_need
 
 // first convert the MgmtInt into a string
 // NOTE: use long long, not just long, MgmtInt = int64_t
-TSError
+TSMgmtError
 MgmtRecordSetInt(const char *rec_name, MgmtInt int_val, TSActionNeedT * action_need)
 {
   char str_val[MAX_RECORD_SIZE];
-  TSError ret;
+  TSMgmtError ret;
 
   if (!rec_name || !action_need)
     return TS_ERR_PARAMS;
@@ -550,11 +550,11 @@ MgmtRecordSetInt(const char *rec_name, MgmtInt int_val, TSActionNeedT * action_n
 }
 
 // first convert the MgmtIntCounter into a string
-TSError
+TSMgmtError
 MgmtRecordSetCounter(const char *rec_name, MgmtIntCounter counter_val, TSActionNeedT * action_need)
 {
   char str_val[MAX_RECORD_SIZE];
-  TSError ret;
+  TSMgmtError ret;
 
   if (!rec_name || !action_need)
     return TS_ERR_PARAMS;
@@ -567,11 +567,11 @@ MgmtRecordSetCounter(const char *rec_name, MgmtIntCounter counter_val, TSActionN
 }
 
 // first convert the MgmtFloat into string
-TSError
+TSMgmtError
 MgmtRecordSetFloat(const char *rec_name, MgmtFloat float_val, TSActionNeedT * action_need)
 {
   char str_val[MAX_RECORD_SIZE];
-  TSError ret;
+  TSMgmtError ret;
 
   bzero(str_val, MAX_RECORD_SIZE);
   if (snprintf(str_val, sizeof(str_val), "%f", float_val) < 0)
@@ -582,10 +582,10 @@ MgmtRecordSetFloat(const char *rec_name, MgmtFloat float_val, TSActionNeedT * ac
 }
 
 
-TSError
+TSMgmtError
 MgmtRecordSetString(const char *rec_name, const char *string_val, TSActionNeedT * action_need)
 {
-  TSError ret;
+  TSMgmtError ret;
 
   if (!rec_name || !action_need)
     return TS_ERR_PARAMS;
@@ -611,10 +611,10 @@ MgmtRecordSetString(const char *rec_name, const char *string_val, TSActionNeedT
  * Connects to the socket and sends request over. Parses the response from
  * Traffic Manager.
  */
-TSError
+TSMgmtError
 ReadFile(TSFileNameT file, char **text, int *size, int *version)
 {
-  TSError ret;
+  TSMgmtError ret;
 
   // marshal data into message request to be sent over socket
   // create connection and send request
@@ -642,10 +642,10 @@ ReadFile(TSFileNameT file, char **text, int *size, int *version)
  * Connects to the socket and sends request over. Parses the response from
  * Traffic Manager.
  */
-TSError
+TSMgmtError
 WriteFile(TSFileNameT file, char *text, int size, int version)
 {
-  TSError ret;
+  TSMgmtError ret;
 
   ret = send_file_write_request(main_socket_fd, file, version, size, text);
   if (ret != TS_ERR_OKAY)
@@ -665,7 +665,7 @@ WriteFile(TSFileNameT file, char *text, int size, int version)
  *-------------------------------------------------------------------------
  * LAN - need to implement
  */
-TSError
+TSMgmtError
 EventSignal(char */* event_name ATS_UNUSED */, va_list /* ap ATS_UNUSED */)
 {
   return TS_ERR_FAIL;
@@ -678,7 +678,7 @@ EventSignal(char */* event_name ATS_UNUSED */, va_list /* ap ATS_UNUSED */)
  * note:    when sending the message request, actually sends the event name,
  *          not the event id
  */
-TSError
+TSMgmtError
 EventResolve(char *event_name)
 {
   if (!event_name)
@@ -693,7 +693,7 @@ EventResolve(char *event_name)
  * purpose: Retrieves a list of active(unresolved) events
  * note:    list of event names returned in network msg which must be tokenized
  */
-TSError
+TSMgmtError
 ActiveEventGetMlt(LLQ * active_events)
 {
   if (!active_events)
@@ -707,10 +707,10 @@ ActiveEventGetMlt(LLQ * active_events)
  *-------------------------------------------------------------------------
  * determines if the event_name is active; sets result in is_current
  */
-TSError
+TSMgmtError
 EventIsActive(char *event_name, bool * is_current)
 {
-  TSError ret;
+  TSMgmtError ret;
 
   if (!event_name || !is_current)
     return TS_ERR_PARAMS;
@@ -737,11 +737,11 @@ EventIsActive(char *event_name, bool * is_current)
  * then sends a callback registration notification to TM so that TM will know
  * which events have remote callbacks registered on it.
  */
-TSError
+TSMgmtError
 EventSignalCbRegister(char *event_name, TSEventSignalFunc func, void *data)
 {
   bool first_time = 0;
-  TSError err;
+  TSMgmtError err;
 
   if (func == NULL)
     return TS_ERR_PARAMS;
@@ -776,10 +776,10 @@ EventSignalCbRegister(char *event_name, TSEventSignalFunc func, void *data)
  *                     unregisters all callback functions for the event_name
  *                     specified
  */
-TSError
+TSMgmtError
 EventSignalCbUnregister(char *event_name, TSEventSignalFunc func)
 {
-  TSError err;
+  TSMgmtError err;
 
   if (!remote_event_callbacks)
     return TS_ERR_FAIL;
@@ -801,7 +801,7 @@ EventSignalCbUnregister(char *event_name, TSEventSignalFunc func)
 /***************************************************************************
  * Snapshots
  ***************************************************************************/
-TSError
+TSMgmtError
 SnapshotTake(char *snapshot_name)
 {
   if (!snapshot_name)
@@ -810,7 +810,7 @@ SnapshotTake(char *snapshot_name)
   return send_and_parse_name(SNAPSHOT_TAKE, snapshot_name);
 }
 
-TSError
+TSMgmtError
 SnapshotRestore(char *snapshot_name)
 {
   if (!snapshot_name)
@@ -819,7 +819,7 @@ SnapshotRestore(char *snapshot_name)
   return send_and_parse_name(SNAPSHOT_RESTORE, snapshot_name);
 }
 
-TSError
+TSMgmtError
 SnapshotRemove(char *snapshot_name)
 {
   if (!snapshot_name)
@@ -828,16 +828,16 @@ SnapshotRemove(char *snapshot_name)
   return send_and_parse_name(SNAPSHOT_REMOVE, snapshot_name);
 }
 
-TSError
+TSMgmtError
 SnapshotGetMlt(LLQ * snapshots)
 {
   return send_and_parse_list(SNAPSHOT_GET_MLT, snapshots);
 }
 
-TSError
+TSMgmtError
 StatsReset(bool cluster, const char* name)
 {
-  TSError ret;
+  TSMgmtError ret;
 
   if (cluster) {
     ret = send_request_name(main_socket_fd, STATS_RESET_CLUSTER, name);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/CoreAPIShared.cc
----------------------------------------------------------------------
diff --git a/mgmt/api/CoreAPIShared.cc b/mgmt/api/CoreAPIShared.cc
index 647c713..f1c0033 100644
--- a/mgmt/api/CoreAPIShared.cc
+++ b/mgmt/api/CoreAPIShared.cc
@@ -39,12 +39,12 @@ static int poll_read(int fd, int timeout);
  *         hdr_size -- size of the header
  *         body     -- pointer to the head of the body
  *         bdy_size -- size of the body
- * OUTPUT: TSError -- error status
+ * OUTPUT: TSMgmtError -- error status
  */
-TSError
+TSMgmtError
 parseHTTPResponse(char *buffer, char **header, int *hdr_size, char **body, int *bdy_size)
 {
-  TSError err = TS_ERR_OKAY;
+  TSMgmtError err = TS_ERR_OKAY;
   char *buf;
 
   // locate HTTP divider
@@ -77,7 +77,7 @@ END:
  *         bufsize -- the size allocated for the buffer
  * OUTPUT: bool -- true if everything went well. false otherwise
  */
-TSError
+TSMgmtError
 readHTTPResponse(int sock, char *buffer, int bufsize, uint64_t timeout)
 {
   int64_t err, idx;
@@ -131,7 +131,7 @@ error:                         /* "Houston, we have a problem!" (Apollo 13) */
  * OUTPUT: bool -- true if everything went well. false otherwise (and sock is
  *                 closed)
  */
-TSError
+TSMgmtError
 sendHTTPRequest(int sock, char *req, uint64_t timeout)
 {
   char request[BUFSIZ];

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/CoreAPIShared.h
----------------------------------------------------------------------
diff --git a/mgmt/api/CoreAPIShared.h b/mgmt/api/CoreAPIShared.h
index 4bd8d4f..f36d5f9 100644
--- a/mgmt/api/CoreAPIShared.h
+++ b/mgmt/api/CoreAPIShared.h
@@ -72,9 +72,9 @@
 #define BUFSIZE      1024
 
 // used by TSReadFromUrl
-TSError parseHTTPResponse(char *buffer, char **header, int *hdr_size, char **body, int *bdy_size);
-TSError readHTTPResponse(int sock, char *buffer, int bufsize, uint64_t timeout);
-TSError sendHTTPRequest(int sock, char *request, uint64_t timeout);
+TSMgmtError parseHTTPResponse(char *buffer, char **header, int *hdr_size, char **body, int *bdy_size);
+TSMgmtError readHTTPResponse(int sock, char *buffer, int bufsize, uint64_t timeout);
+TSMgmtError sendHTTPRequest(int sock, char *request, uint64_t timeout);
 int connectDirect(const char *host, int port, uint64_t timeout);
 
 // used by NetworkUtilRemote.cc and NetworkUtilLocal.cc

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/EventCallback.cc
----------------------------------------------------------------------
diff --git a/mgmt/api/EventCallback.cc b/mgmt/api/EventCallback.cc
index b925e98..3cd6072 100644
--- a/mgmt/api/EventCallback.cc
+++ b/mgmt/api/EventCallback.cc
@@ -180,7 +180,7 @@ get_events_with_callbacks(CallbackTable * cb_table)
  * output: TS_ERR_xx
  * notes:
  **********************************************************************/
-TSError
+TSMgmtError
 cb_table_register(CallbackTable * cb_table, char *event_name, TSEventSignalFunc func, void *data, bool * first_cb)
 {
   bool first_time = 0;
@@ -249,7 +249,7 @@ cb_table_register(CallbackTable * cb_table, char *event_name, TSEventSignalFunc
  * output: TS_ERR_xx
  * notes:
  **********************************************************************/
-TSError
+TSMgmtError
 cb_table_unregister(CallbackTable * cb_table, char *event_name, TSEventSignalFunc func)
 {
   TSEventSignalFunc cb_fun;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/EventCallback.h
----------------------------------------------------------------------
diff --git a/mgmt/api/EventCallback.h b/mgmt/api/EventCallback.h
index 942a242..6c50f96 100644
--- a/mgmt/api/EventCallback.h
+++ b/mgmt/api/EventCallback.h
@@ -74,9 +74,9 @@ void delete_callback_table(CallbackTable * cb_table);
 // returns list of event_id that have at least one callback registered for it
 LLQ *get_events_with_callbacks(CallbackTable * cb_table);
 
-TSError cb_table_register(CallbackTable * cb_table, char *event_name, TSEventSignalFunc func, void *data,
+TSMgmtError cb_table_register(CallbackTable * cb_table, char *event_name, TSEventSignalFunc func, void *data,
                            bool * first_cb);
-TSError cb_table_unregister(CallbackTable * cb_table, char *event_name, TSEventSignalFunc func);
+TSMgmtError cb_table_unregister(CallbackTable * cb_table, char *event_name, TSEventSignalFunc func);
 
 #ifdef __cplusplus
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/EventControlMain.cc
----------------------------------------------------------------------
diff --git a/mgmt/api/EventControlMain.cc b/mgmt/api/EventControlMain.cc
index ffc9c8b..882cb4e 100644
--- a/mgmt/api/EventControlMain.cc
+++ b/mgmt/api/EventControlMain.cc
@@ -114,7 +114,7 @@ remove_event_client(EventClientT * client, InkHashTable * table)
  * output: TS_ERR_xx
  * note: None
  *********************************************************************/
-TSError
+TSMgmtError
 init_mgmt_events()
 {
   int ret;
@@ -166,8 +166,8 @@ delete_mgmt_events()
 /*********************************************************************
  * delete_event_queue
  *
- * purpose: frees queue where the elements are of type TSEvent* 's
- * input: LLQ * q - a queue with entries of TSEvent*'s
+ * purpose: frees queue where the elements are of type TSMgmtEvent* 's
+ * input: LLQ * q - a queue with entries of TSMgmtEvent*'s
  * output: None
  * note: None
  *********************************************************************/
@@ -178,10 +178,10 @@ delete_event_queue(LLQ * q)
     return;
 
   // now for every element, dequeue and free
-  TSEvent *ele;
+  TSMgmtEvent *ele;
 
   while (!queue_is_empty(q)) {
-    ele = (TSEvent *) dequeue(q);
+    ele = (TSMgmtEvent *) dequeue(q);
     ats_free(ele);
   }
 
@@ -202,9 +202,9 @@ delete_event_queue(LLQ * q)
 void
 apiEventCallback(alarm_t newAlarm, const char * /* ip ATS_UNUSED */, const char *desc)
 {
-  // create an TSEvent
+  // create an TSMgmtEvent
   // addEvent(new_alarm, ip, desc) // adds event to mgmt_events
-  TSEvent *newEvent;
+  TSMgmtEvent *newEvent;
 
   newEvent = TSEventCreate();
   newEvent->id = newAlarm;
@@ -381,7 +381,7 @@ event_callback_main(void *arg)
     // events_registered queue for each client connection to see if that client
     // has a callback registered for that event_id
 
-    TSEvent *event;
+    TSMgmtEvent *event;
 
     if (!mgmt_events || queue_is_empty(mgmt_events)) {  //no events to process
       //fprintf(stderr, "[event_callback_main] NO EVENTS TO PROCESS\n");
@@ -391,7 +391,7 @@ event_callback_main(void *arg)
     // iterate through each event in mgmt_events
     while (!queue_is_empty(mgmt_events)) {
       ink_mutex_acquire(&mgmt_events_lock);     //acquire lock
-      event = (TSEvent *) dequeue(mgmt_events);        // get what we want
+      event = (TSMgmtEvent *) dequeue(mgmt_events);        // get what we want
       ink_mutex_release(&mgmt_events_lock);     // release lock
 
       if (!event)
@@ -454,7 +454,7 @@ event_callback_main(void *arg)
  * output: TS_ERR_xx
  * note: the req should be the event name; does not send a reply to client
  *************************************************************************/
-TSError
+TSMgmtError
 handle_event_reg_callback(EventClientT * client, char *req)
 {
   // mark the specified alarm as "wanting to be notified" in the client's alarm_registered list
@@ -482,7 +482,7 @@ handle_event_reg_callback(EventClientT * client, char *req)
  * output: TS_ERR_xx
  * note: the req should be the event name; does not send reply to client
  *************************************************************************/
-TSError
+TSMgmtError
 handle_event_unreg_callback(EventClientT * client, char *req)
 {
   // mark the specified alarm as "wanting to be notified" in the client's alarm_registered list

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/EventControlMain.h
----------------------------------------------------------------------
diff --git a/mgmt/api/EventControlMain.h b/mgmt/api/EventControlMain.h
index c47d590..edd5aa7 100644
--- a/mgmt/api/EventControlMain.h
+++ b/mgmt/api/EventControlMain.h
@@ -49,15 +49,15 @@ EventClientT *new_event_client();
 void delete_event_client(EventClientT * client);
 void remove_event_client(EventClientT * client, InkHashTable * table);
 
-TSError init_mgmt_events();
+TSMgmtError init_mgmt_events();
 void delete_mgmt_events();
 void delete_event_queue(LLQ * q);
 
 void apiAlarmCallback(alarm_t newAlarm, char *ip, char *desc);
 void *event_callback_main(void *arg);
 
-TSError handle_event_reg_callback(EventClientT * client, char *req);
-TSError handle_event_unreg_callback(EventClientT * client, char *req);
+TSMgmtError handle_event_reg_callback(EventClientT * client, char *req);
+TSMgmtError handle_event_unreg_callback(EventClientT * client, char *req);
 
 
 #endif

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/EventRegistration.cc
----------------------------------------------------------------------
diff --git a/mgmt/api/EventRegistration.cc b/mgmt/api/EventRegistration.cc
index 2a3d7fb..7d97bcc 100644
--- a/mgmt/api/EventRegistration.cc
+++ b/mgmt/api/EventRegistration.cc
@@ -72,9 +72,9 @@ CallbackTable *remote_event_callbacks;
 void *
 event_poll_thread_main(void *arg)
 {
-  TSError err;
+  TSMgmtError err;
   int sock_fd;
-  TSEvent *event_notice = NULL;
+  TSMgmtEvent *event_notice = NULL;
 
   sock_fd = *((int *) arg);     // should be same as event_socket_fd
 
@@ -85,7 +85,7 @@ event_poll_thread_main(void *arg)
       break;
     }
 
-    // read the entire message, so create TSEvent for the callback
+    // read the entire message, so create TSMgmtEvent for the callback
     event_notice = TSEventCreate();
     err = parse_event_notification(sock_fd, event_notice);
     if (err == TS_ERR_NET_READ || err == TS_ERR_NET_EOF) {
@@ -109,18 +109,18 @@ event_poll_thread_main(void *arg)
  *
  * purpose: Given an event, determines and calls the registered cb functions
  *          in the CallbackTable for remote events
- * input: arg - should be an TSEvent with the event info sent from TM msg
+ * input: arg - should be an TSMgmtEvent with the event info sent from TM msg
  * output: returns when done calling all the callbacks
  * notes: None
  **********************************************************************/
 void *
 event_callback_thread(void *arg)
 {
-  TSEvent *event_notice;
+  TSMgmtEvent *event_notice;
   EventCallbackT *event_cb;
   int index;
 
-  event_notice = (TSEvent *) arg;
+  event_notice = (TSMgmtEvent *) arg;
   index = (int) event_notice->id;
   LLQ *func_q;                  // list of callback functions need to call
 


[2/3] TS-2823: Change names of TSEvent and TSError in mgmt API

Posted by am...@apache.org.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/INKMgmtAPI.cc
----------------------------------------------------------------------
diff --git a/mgmt/api/INKMgmtAPI.cc b/mgmt/api/INKMgmtAPI.cc
index bdd7e2d..be6308e 100644
--- a/mgmt/api/INKMgmtAPI.cc
+++ b/mgmt/api/INKMgmtAPI.cc
@@ -96,7 +96,7 @@ TSListDestroy(TSList l)
   return;
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSListEnqueue(TSList l, void *data)
 {
   int ret;
@@ -202,7 +202,7 @@ TSIpAddrListDestroy(TSIpAddrList ip_addrl)
   return;
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSIpAddrListEnqueue(TSIpAddrList ip_addrl, TSIpAddrEle * ip_addr)
 {
   int ret;
@@ -306,7 +306,7 @@ TSPortListDestroy(TSPortList portl)
   return;
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSPortListEnqueue(TSPortList portl, TSPortEle * port)
 {
   int ret;
@@ -407,7 +407,7 @@ TSDomainListDestroy(TSDomainList domainl)
   delete_queue((LLQ *) domainl);
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSDomainListEnqueue(TSDomainList domainl, TSDomain * domain)
 {
   int ret;
@@ -505,7 +505,7 @@ TSStringListDestroy(TSStringList strl)
   delete_queue((LLQ *) strl);
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSStringListEnqueue(TSStringList strl, char *str)
 {
   int ret;
@@ -598,7 +598,7 @@ TSIntListDestroy(TSIntList intl)
   return;
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSIntListEnqueue(TSIntList intl, int *elem)
 {
   int ret;
@@ -685,10 +685,10 @@ init_pdss_format(TSPdSsFormat * info)
 }
 
 /*--- allocate/deallocate operations --------------------------------------*/
-tsapi TSEvent *
+tsapi TSMgmtEvent *
 TSEventCreate(void)
 {
-  TSEvent *event = (TSEvent *)ats_malloc(sizeof(TSEvent));
+  TSMgmtEvent *event = (TSMgmtEvent *)ats_malloc(sizeof(TSMgmtEvent));
 
   event->id = -1;
   event->name = NULL;
@@ -699,7 +699,7 @@ TSEventCreate(void)
 }
 
 tsapi void
-TSEventDestroy(TSEvent * event)
+TSEventDestroy(TSMgmtEvent * event)
 {
   if (event) {
     ats_free(event->name);
@@ -1443,7 +1443,7 @@ TSVirtIpAddrEleDestroy(TSVirtIpAddrEle * ele)
  ***************************************************************************/
 
 /*--- statistics operations ----------------------------------------------- */
-tsapi TSError
+tsapi TSMgmtError
 TSStatsReset(bool cluster, const char *name)
 {
   return StatsReset(cluster, name);
@@ -1452,16 +1452,16 @@ TSStatsReset(bool cluster, const char *name)
 /*--- variable operations ------------------------------------------------- */
 /* Call the CfgFileIO variable operations */
 
-tsapi TSError
+tsapi TSMgmtError
 TSRecordGet(char *rec_name, TSRecordEle * rec_val)
 {
   return MgmtRecordGet(rec_name, rec_val);
 }
 
-TSError
+TSMgmtError
 TSRecordGetInt(const char *rec_name, TSInt * int_val)
 {
-  TSError ret = TS_ERR_OKAY;
+  TSMgmtError ret = TS_ERR_OKAY;
 
   TSRecordEle *ele = TSRecordEleCreate();
   ret = MgmtRecordGet(rec_name, ele);
@@ -1475,10 +1475,10 @@ END:
   return ret;
 }
 
-TSError
+TSMgmtError
 TSRecordGetCounter(const char *rec_name, TSCounter * counter_val)
 {
-  TSError ret;
+  TSMgmtError ret;
 
   TSRecordEle *ele = TSRecordEleCreate();
   ret = MgmtRecordGet(rec_name, ele);
@@ -1491,10 +1491,10 @@ END:
   return ret;
 }
 
-TSError
+TSMgmtError
 TSRecordGetFloat(const char *rec_name, TSFloat * float_val)
 {
-  TSError ret;
+  TSMgmtError ret;
 
   TSRecordEle *ele = TSRecordEleCreate();
   ret = MgmtRecordGet(rec_name, ele);
@@ -1507,10 +1507,10 @@ END:
   return ret;
 }
 
-TSError
+TSMgmtError
 TSRecordGetString(const char *rec_name, TSString *string_val)
 {
-  TSError ret;
+  TSMgmtError ret;
 
   TSRecordEle *ele = TSRecordEleCreate();
   ret = MgmtRecordGet(rec_name, ele);
@@ -1543,13 +1543,13 @@ END:
  * a file while retrieving all the requested records!
  */
 
-tsapi TSError
+tsapi TSMgmtError
 TSRecordGetMlt(TSStringList rec_names, TSList rec_vals)
 {
   TSRecordEle *ele;
   char *rec_name;
   int num_recs, i, j;
-  TSError ret;
+  TSMgmtError ret;
 
   if (!rec_names || !rec_vals)
     return TS_ERR_PARAMS;
@@ -1581,7 +1581,7 @@ TSRecordGetMlt(TSStringList rec_names, TSList rec_vals)
   return TS_ERR_OKAY;
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSRecordGetMatchMlt(const char * regex, TSList rec_vals)
 {
   if (!regex || !rec_vals) {
@@ -1591,32 +1591,32 @@ TSRecordGetMatchMlt(const char * regex, TSList rec_vals)
   return MgmtRecordGetMatching(regex, rec_vals);
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSRecordSet(const char *rec_name, const char *val, TSActionNeedT * action_need)
 {
   return MgmtRecordSet(rec_name, val, action_need);
 }
 
 
-tsapi TSError
+tsapi TSMgmtError
 TSRecordSetInt(const char *rec_name, TSInt int_val, TSActionNeedT * action_need)
 {
   return MgmtRecordSetInt(rec_name, int_val, action_need);
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSRecordSetCounter(const char *rec_name, TSCounter counter_val, TSActionNeedT * action_need)
 {
   return MgmtRecordSetCounter(rec_name, counter_val, action_need);
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSRecordSetFloat(const char *rec_name, TSFloat float_val, TSActionNeedT * action_need)
 {
   return MgmtRecordSetFloat(rec_name, float_val, action_need);
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSRecordSetString(const char *rec_name, const char *str_val, TSActionNeedT * action_need)
 {
   return MgmtRecordSetString(rec_name, str_val, action_need);
@@ -1639,12 +1639,12 @@ TSRecordSetString(const char *rec_name, const char *str_val, TSActionNeedT * act
  * records; action_need will be set to the most severe action needed of
  * all the "Set" calls
  */
-tsapi TSError
+tsapi TSMgmtError
 TSRecordSetMlt(TSList rec_list, TSActionNeedT * action_need)
 {
   int num_recs, ret, i;
   TSRecordEle *ele;
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
   TSActionNeedT top_action_req = TS_ACTION_UNDEFINED;
 
   if (!rec_list || !action_need)
@@ -1691,13 +1691,13 @@ TSRecordSetMlt(TSList rec_list, TSActionNeedT * action_need)
 }
 
 /*--- api initialization and shutdown -------------------------------------*/
-tsapi TSError
+tsapi TSMgmtError
 TSInit(const char *socket_path, TSInitOptionT options)
 {
   return Init(socket_path, options);
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSTerminate()
 {
   return Terminate();
@@ -1710,22 +1710,22 @@ TSPluginInit(int /* argc ATS_UNUSED */, const char */* argv ATS_UNUSED */[])
 }
 
 /*--- network operations --------------------------------------------------*/
-tsapi TSError
+tsapi TSMgmtError
 TSConnect(TSIpAddr /* ip_addr ATS_UNUSED */, int /* port ATS_UNUSED */)
 {
   return TS_ERR_OKAY;
 }
-tsapi TSError
+tsapi TSMgmtError
 TSDisconnectCbRegister(TSDisconnectFunc * /* func ATS_UNUSED */, void * /* data ATS_UNUSED */)
 {
   return TS_ERR_OKAY;
 }
-tsapi TSError
+tsapi TSMgmtError
 TSDisconnectRetrySet(int /* retries ATS_UNUSED */, int /* retry_sleep_msec ATS_UNUSED */)
 {
   return TS_ERR_OKAY;
 }
-tsapi TSError
+tsapi TSMgmtError
 TSDisconnect()
 {
   return TS_ERR_OKAY;
@@ -1748,9 +1748,9 @@ TSProxyStateGet()
  * Input:  proxy_state - set to on/off
  *         clear - start TS with cache clearing option,
  *                 when stopping TS should always be TS_CACHE_CLEAR_OFF
- * Output: TSError
+ * Output: TSMgmtError
  */
-tsapi TSError
+tsapi TSMgmtError
 TSProxyStateSet(TSProxyStateT proxy_state, TSCacheClearT clear)
 {
   return ProxyStateSet(proxy_state, clear);
@@ -1758,9 +1758,9 @@ TSProxyStateSet(TSProxyStateT proxy_state, TSCacheClearT clear)
 
 /* TSReconfigure: tell traffic_server to re-read its configuration files
  * Input:  <none>
- * Output: TSError
+ * Output: TSMgmtError
  */
-tsapi TSError
+tsapi TSMgmtError
 TSReconfigure()
 {
   return Reconfigure();
@@ -1768,9 +1768,9 @@ TSReconfigure()
 
 /* TSRestart: restarts Traffic Server
  * Input:  cluster - local or cluster-wide
- * Output: TSError
+ * Output: TSMgmtError
  */
-tsapi TSError
+tsapi TSMgmtError
 TSRestart(bool cluster)
 {
   return Restart(cluster);
@@ -1778,12 +1778,12 @@ TSRestart(bool cluster)
 
 /* TSActionDo: based on TSActionNeedT, will take appropriate action
  * Input: action - action that needs to be taken
- * Output: TSError
+ * Output: TSMgmtError
  */
-tsapi TSError
+tsapi TSMgmtError
 TSActionDo(TSActionNeedT action)
 {
-  TSError ret;
+  TSMgmtError ret;
 
   switch (action) {
   case TS_ACTION_RESTART:
@@ -1805,15 +1805,15 @@ TSActionDo(TSActionNeedT action)
 
 /* TSBouncer: restarts the traffic_server process(es)
  * Input:  cluster - local or cluster-wide
- * Output: TSError
+ * Output: TSMgmtError
  */
-tsapi TSError
+tsapi TSMgmtError
 TSBounce(bool cluster)
 {
   return Bounce(cluster);
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSStorageDeviceCmdOffline(char const* dev)
 {
   return StorageDeviceCmdOffline(dev);
@@ -1836,7 +1836,7 @@ TSDiags(TSDiagsT mode, const char *fmt, ...)
 
 /* NOTE: user must deallocate the memory for the string returned */
 char *
-TSGetErrorMessage(TSError err_id)
+TSGetErrorMessage(TSMgmtError err_id)
 {
   char msg[1024];               // need to define a MAX_ERR_MSG_SIZE???
   char *err_msg = NULL;
@@ -1893,7 +1893,7 @@ TSGetErrorMessage(TSError err_id)
 
 
 /*--- password operations -------------------------------------------------*/
-tsapi TSError
+tsapi TSMgmtError
 TSEncryptPassword(char *passwd, char **e_passwd)
 {
   INK_DIGEST_CTX md5_context;
@@ -1920,13 +1920,13 @@ TSEncryptPassword(char *passwd, char **e_passwd)
 }
 
 /*--- direct file operations ----------------------------------------------*/
-tsapi TSError
+tsapi TSMgmtError
 TSConfigFileRead(TSFileNameT file, char **text, int *size, int *version)
 {
   return ReadFile(file, text, size, version);
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSConfigFileWrite(TSFileNameT file, char *text, int size, int version)
 {
   return WriteFile(file, text, size, version);
@@ -1939,8 +1939,8 @@ TSConfigFileWrite(TSFileNameT file, char *text, int size, int version)
  *         headerSize - the size of the header buffer is returned
  *         body       - a buffer is allocated on the body char* pointer
  *         bodySize   - the size of the body buffer is returned
- * Output: TSError   - TS_ERR_OKAY if succeed, TS_ERR_FAIL otherwise
- * Obsolete:  tsapi TSError TSReadFromUrl (char *url, char **text, int *size);
+ * Output: TSMgmtError   - TS_ERR_OKAY if succeed, TS_ERR_FAIL otherwise
+ * Obsolete:  tsapi TSMgmtError TSReadFromUrl (char *url, char **text, int *size);
  * NOTE: The URL can be expressed in the following forms:
  *       - http://www.example.com:80/products/network/index.html
  *       - http://www.example.com/products/network/index.html
@@ -1950,7 +1950,7 @@ TSConfigFileWrite(TSFileNameT file, char *text, int size, int version)
  *       - www.example.com
  * NOTE: header and headerSize can be NULL
  */
-tsapi TSError
+tsapi TSMgmtError
 TSReadFromUrl(char *url, char **header, int *headerSize, char **body, int *bodySize)
 {
   //return ReadFromUrl(url, header, headerSize, body, bodySize);
@@ -1958,7 +1958,7 @@ TSReadFromUrl(char *url, char **header, int *headerSize, char **body, int *bodyS
 
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSReadFromUrlEx(const char *url, char **header, int *headerSize, char **body, int *bodySize, int timeout)
 {
   int hFD = -1;
@@ -1970,7 +1970,7 @@ TSReadFromUrlEx(const char *url, char **header, int *headerSize, char **body, in
   char request[BUFSIZE];
   char *hdr_temp;
   char *bdy_temp;
-  TSError status = TS_ERR_OKAY;
+  TSMgmtError status = TS_ERR_OKAY;
 
   // Sanity check
   if (!url)
@@ -2040,10 +2040,10 @@ END:
 
 /*--- cache inspector operations -------------------------------------------*/
 
-tsapi TSError
+tsapi TSMgmtError
 TSLookupFromCacheUrl(TSString url, TSString * info)
 {
-  TSError err = TS_ERR_OKAY;
+  TSMgmtError err = TS_ERR_OKAY;
   int fd;
   char request[BUFSIZE];
   char response[URL_BUFSIZE];
@@ -2078,10 +2078,10 @@ END:
   return err;
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSLookupFromCacheUrlRegex(TSString url_regex, TSString * list)
 {
-  TSError err = TS_ERR_OKAY;
+  TSMgmtError err = TS_ERR_OKAY;
   int fd = -1;
   char request[BUFSIZE];
   char response[URL_BUFSIZE];
@@ -2115,10 +2115,10 @@ END:
   return err;
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSDeleteFromCacheUrl(TSString url, TSString * info)
 {
-  TSError err = TS_ERR_OKAY;
+  TSMgmtError err = TS_ERR_OKAY;
   int fd = -1;
   char request[BUFSIZE];
   char response[URL_BUFSIZE];
@@ -2153,10 +2153,10 @@ END:
   return err;
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSDeleteFromCacheUrlRegex(TSString url_regex, TSString * list)
 {
-  TSError err = TS_ERR_OKAY;
+  TSMgmtError err = TS_ERR_OKAY;
   int fd = -1;
   char request[BUFSIZE];
   char response[URL_BUFSIZE];
@@ -2190,10 +2190,10 @@ END:
   return err;
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSInvalidateFromCacheUrlRegex(TSString url_regex, TSString * list)
 {
-  TSError err = TS_ERR_OKAY;
+  TSMgmtError err = TS_ERR_OKAY;
   int fd = -1;
   char request[BUFSIZE];
   char response[URL_BUFSIZE];
@@ -2228,36 +2228,36 @@ END:
 }
 
 /*--- snapshot operations -------------------------------------------------*/
-tsapi TSError
+tsapi TSMgmtError
 TSSnapshotTake(char *snapshot_name)
 {
   return SnapshotTake(snapshot_name);
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSSnapshotRestore(char *snapshot_name)
 {
   return SnapshotRestore(snapshot_name);
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSSnapshotRemove(char *snapshot_name)
 {
   return SnapshotRemove(snapshot_name);
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSSnapshotGetMlt(TSStringList snapshots)
 {
   return SnapshotGetMlt((LLQ *) snapshots);
 }
 
 /*--- events --------------------------------------------------------------*/
-tsapi TSError
+tsapi TSMgmtError
 TSEventSignal(char *event_name, ...)
 {
   va_list ap;
-  TSError ret;
+  TSMgmtError ret;
 
   va_start(ap, event_name);     // initialize the argument pointer ap
   ret = EventSignal(event_name, ap);
@@ -2265,31 +2265,31 @@ TSEventSignal(char *event_name, ...)
   return ret;
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSEventResolve(char *event_name)
 {
   return EventResolve(event_name);
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSActiveEventGetMlt(TSList active_events)
 {
   return ActiveEventGetMlt((LLQ *) active_events);
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSEventIsActive(char *event_name, bool * is_current)
 {
   return EventIsActive(event_name, is_current);
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSEventSignalCbRegister(char *event_name, TSEventSignalFunc func, void *data)
 {
   return EventSignalCbRegister(event_name, func, data);
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSEventSignalCbUnregister(char *event_name, TSEventSignalFunc func)
 {
   return EventSignalCbUnregister(event_name, func);
@@ -2309,19 +2309,19 @@ TSCfgContextCreate(TSFileNameT file)
 }
 
 /* calls the CfgContext class destructor */
-tsapi TSError
+tsapi TSMgmtError
 TSCfgContextDestroy(TSCfgContext ctx)
 {
   return (CfgContextDestroy((CfgContext *) ctx));
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSCfgContextCommit(TSCfgContext ctx, TSActionNeedT * /* action_need ATS_UNUSED */, TSIntList errRules)
 {
   return (CfgContextCommit((CfgContext *) ctx, (LLQ *) errRules));
 }
 
-tsapi TSError
+tsapi TSMgmtError
 TSCfgContextGet(TSCfgContext ctx)
 {
   return (CfgContextGet((CfgContext *) ctx));
@@ -2355,38 +2355,38 @@ TSCfgContextGetNext(TSCfgContext ctx, TSCfgIterState * state)
   return CfgContextGetNext((CfgContext *) ctx, state);
 }
 
-TSError
+TSMgmtError
 TSCfgContextMoveEleUp(TSCfgContext ctx, int index)
 {
   return CfgContextMoveEleUp((CfgContext *) ctx, index);
 }
 
-TSError
+TSMgmtError
 TSCfgContextMoveEleDown(TSCfgContext ctx, int index)
 {
   return CfgContextMoveEleDown((CfgContext *) ctx, index);
 }
 
 
-TSError
+TSMgmtError
 TSCfgContextAppendEle(TSCfgContext ctx, TSCfgEle * ele)
 {
   return CfgContextAppendEle((CfgContext *) ctx, ele);
 }
 
-TSError
+TSMgmtError
 TSCfgContextInsertEleAt(TSCfgContext ctx, TSCfgEle * ele, int index)
 {
   return CfgContextInsertEleAt((CfgContext *) ctx, ele, index);
 }
 
-TSError
+TSMgmtError
 TSCfgContextRemoveEleAt(TSCfgContext ctx, int index)
 {
   return CfgContextRemoveEleAt((CfgContext *) ctx, index);
 }
 
-TSError
+TSMgmtError
 TSCfgContextRemoveAll(TSCfgContext ctx)
 {
   return CfgContextRemoveAll((CfgContext *) ctx);
@@ -2442,7 +2442,7 @@ closeAllFds()
   }
 }
 
-tsapi TSError rm_start_proxy()
+tsapi TSMgmtError rm_start_proxy()
 {
 
 #if defined(linux)

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/NetworkUtilsLocal.cc
----------------------------------------------------------------------
diff --git a/mgmt/api/NetworkUtilsLocal.cc b/mgmt/api/NetworkUtilsLocal.cc
index 3f05d18..0f57932 100644
--- a/mgmt/api/NetworkUtilsLocal.cc
+++ b/mgmt/api/NetworkUtilsLocal.cc
@@ -47,7 +47,7 @@
  * flushes the socket by reading the entire message out of the socket
  * and then gets rid of the msg
  **************************************************************************/
-TSError
+TSMgmtError
 socket_flush(struct SocketInfo sock_info)
 {
   int ret, byte_read = 0;
@@ -91,7 +91,7 @@ socket_flush(struct SocketInfo sock_info)
  * output:  number of bytes read
  * note:    socket_read is implemented in WebUtils.cc
  *************************************************************************/
-TSError
+TSMgmtError
 socket_read_n(struct SocketInfo sock_info, char *buf, int bytes)
 {
   int ret, byte_read = 0;
@@ -133,7 +133,7 @@ socket_read_n(struct SocketInfo sock_info, char *buf, int bytes)
  * output:  TS_ERR_xx (depends on num bytes written)
  * note:    socket_read is implemented in WebUtils.cc
  *************************************************************************/
-TSError
+TSMgmtError
 socket_write_n(struct SocketInfo sock_info, const char *buf, int bytes)
 {
   int ret, byte_wrote = 0;
@@ -179,10 +179,10 @@ socket_write_n(struct SocketInfo sock_info, const char *buf, int bytes)
  * notes: Since preprocess_msg already removes the OpType and msg_len, this part o
  *        the message is not dealt with by the other parsing functions
  **********************************************************************/
-TSError
+TSMgmtError
 preprocess_msg(struct SocketInfo sock_info, OpType * op_t, char **req)
 {
-  TSError ret;
+  TSMgmtError ret;
   int req_len;
   int16_t op;
 
@@ -256,7 +256,7 @@ Lerror:
  * output: TS_ERR_xx
  * notes: request format = <TSFileNameT>
  **********************************************************************/
-TSError
+TSMgmtError
 parse_file_read_request(char *req, TSFileNameT * file)
 {
   int16_t file_t;
@@ -283,7 +283,7 @@ parse_file_read_request(char *req, TSFileNameT * file)
  * output: TS_ERR_xx
  * notes: request format = <TSFileNameT> <version> <size> <text>
  **********************************************************************/
-TSError
+TSMgmtError
 parse_file_write_request(char *req, TSFileNameT * file, int *ver, int *size, char **text)
 {
   int16_t file_t, f_ver;
@@ -323,7 +323,7 @@ parse_file_write_request(char *req, TSFileNameT * file, int *ver, int *size, cha
  * output: TS_ERR_xx
  * notes: format= <name_len> <val_len> <name> <val>
  **********************************************************************/
-TSError
+TSMgmtError
 parse_request_name_value(char *req, char **name_1, char **val_1)
 {
   int32_t name_len, val_len;
@@ -363,7 +363,7 @@ parse_request_name_value(char *req, char **name_1, char **val_1)
  * output: TS_ERR_xx
  * notes: request format = <TSDiagsT> <diag_msg_len> <diag_msg>
  **********************************************************************/
-TSError
+TSMgmtError
 parse_diags_request(char *req, TSDiagsT * mode, char **diag_msg)
 {
   int16_t diag_t;
@@ -397,7 +397,7 @@ parse_diags_request(char *req, TSDiagsT * mode, char **diag_msg)
  * output: TS_ERR_xx
  * notes: request format = <TSProxyStateT> <TSCacheClearT>
  **********************************************************************/
-TSError
+TSMgmtError
 parse_proxy_state_request(char *req, TSProxyStateT * state, TSCacheClearT * clear)
 {
   int16_t state_t, cache_t;
@@ -435,10 +435,10 @@ parse_proxy_state_request(char *req, TSProxyStateT * state, TSCacheClearT * clea
  * notes: this function does not need to go through the internal structure
  *        so no cleaning up is done.
  **********************************************************************/
-TSError
-send_reply(struct SocketInfo sock_info, TSError retval)
+TSMgmtError
+send_reply(struct SocketInfo sock_info, TSMgmtError retval)
 {
-  TSError ret;
+  TSMgmtError ret;
   char msg[SIZE_ERR_T];
   int16_t ret_val;
 
@@ -458,16 +458,16 @@ send_reply(struct SocketInfo sock_info, TSError retval)
  * purpose: sends the reply in response to a request to get list of string
  *          tokens (delimited by REMOTE_DELIM_STR)
  * input: sock_info -
- *        retval - TSError return type for the CoreAPI call
+ *        retval - TSMgmtError return type for the CoreAPI call
  *        list - string delimited list of string tokens
  * output: TS_ERR_*
  * notes:
- * format: <TSError> <string_list_len> <delimited_string_list>
+ * format: <TSMgmtError> <string_list_len> <delimited_string_list>
  **********************************************************************/
-TSError
-send_reply_list(struct SocketInfo sock_info, TSError retval, char *list)
+TSMgmtError
+send_reply_list(struct SocketInfo sock_info, TSMgmtError retval, char *list)
 {
-  TSError ret;
+  TSMgmtError ret;
   int msg_pos = 0, total_len;
   char *msg;
   int16_t ret_val;
@@ -513,13 +513,13 @@ send_reply_list(struct SocketInfo sock_info, TSError retval, char *list)
  * output: TS_ERR_*
  * notes: this function does not need to go through the internal structure
  *        so no cleaning up is done.
- *        format = <TSError> <rec_val_len> <name_size> <rec_type> <rec_val> <rec_name>
+ *        format = <TSMgmtError> <rec_val_len> <name_size> <rec_type> <rec_val> <rec_name>
  **********************************************************************/
-TSError
-send_record_get_reply(struct SocketInfo sock_info, TSError retval, void *val, int val_size,
+TSMgmtError
+send_record_get_reply(struct SocketInfo sock_info, TSMgmtError retval, void *val, int val_size,
     TSRecordT rec_type, const char *rec_name)
 {
-  TSError ret;
+  TSMgmtError ret;
   int msg_pos = 0, total_len;
   char *msg;
   int16_t record_t, ret_val;
@@ -576,10 +576,10 @@ send_record_get_reply(struct SocketInfo sock_info, TSError retval, void *val, in
  *        so no cleaning up is done.
  *        format =
  **********************************************************************/
-TSError
-send_record_set_reply(struct SocketInfo sock_info, TSError retval, TSActionNeedT action_need)
+TSMgmtError
+send_record_set_reply(struct SocketInfo sock_info, TSMgmtError retval, TSActionNeedT action_need)
 {
-  TSError ret;
+  TSMgmtError ret;
   int total_len;
   char *msg;
   int16_t action_t, ret_val;
@@ -613,12 +613,12 @@ send_record_set_reply(struct SocketInfo sock_info, TSError retval, TSActionNeedT
  * output: TS_ERR_*
  * notes: this function does not need to go through the internal structure
  *        so no cleaning up is done.
- *        reply format = <TSError> <file_ver> <file_size> <file_text>
+ *        reply format = <TSMgmtError> <file_ver> <file_size> <file_text>
  **********************************************************************/
-TSError
-send_file_read_reply(struct SocketInfo sock_info, TSError retval, int ver, int size, char *text)
+TSMgmtError
+send_file_read_reply(struct SocketInfo sock_info, TSMgmtError retval, int ver, int size, char *text)
 {
-  TSError ret;
+  TSMgmtError ret;
   int msg_pos = 0, msg_len;
   char *msg;
   int16_t ret_val, f_ver;
@@ -664,13 +664,13 @@ send_file_read_reply(struct SocketInfo sock_info, TSError retval, int ver, int s
  * input:
  *        int fd - socket fd to use.
  * output: TS_ERR_*
- * notes: this function DOES NOT HAVE IT"S OWN TSError TO SEND!!!!
+ * notes: this function DOES NOT HAVE IT"S OWN TSMgmtError TO SEND!!!!
  *        reply format = <TSProxyStateT>
  **********************************************************************/
-TSError
+TSMgmtError
 send_proxy_state_get_reply(struct SocketInfo sock_info, TSProxyStateT state)
 {
-  TSError ret;
+  TSMgmtError ret;
   char msg[SIZE_PROXY_T];
   int16_t state_t;
 
@@ -690,16 +690,16 @@ send_proxy_state_get_reply(struct SocketInfo sock_info, TSProxyStateT state)
  *
  * purpose: sends the reply in response to a request check if event is active
  * input: sock_info -
- *        retval - TSError return type for the EventIsActive core call
+ *        retval - TSMgmtError return type for the EventIsActive core call
  *        active - is the requested event active or not?
  * output: TS_ERR_*
  * notes:
- * format: <TSError> <bool>
+ * format: <TSMgmtError> <bool>
  **********************************************************************/
-TSError
-send_event_active_reply(struct SocketInfo sock_info, TSError retval, bool active)
+TSMgmtError
+send_event_active_reply(struct SocketInfo sock_info, TSMgmtError retval, bool active)
 {
-  TSError ret;
+  TSMgmtError ret;
   int total_len;
   char *msg;
   int16_t is_active, ret_val;
@@ -732,10 +732,10 @@ send_event_active_reply(struct SocketInfo sock_info, TSError retval, bool active
  * output: TS_ERR_xx
  * note: format: <OpType> <event_name_len> <event_name> <desc_len> <desc>
  **********************************************************************/
-TSError
-send_event_notification(struct SocketInfo sock_info, TSEvent * event)
+TSMgmtError
+send_event_notification(struct SocketInfo sock_info, TSMgmtEvent * event)
 {
-  TSError ret;
+  TSMgmtError ret;
   int total_len, name_len, desc_len;
   char *msg;
   int16_t op_t;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/NetworkUtilsLocal.h
----------------------------------------------------------------------
diff --git a/mgmt/api/NetworkUtilsLocal.h b/mgmt/api/NetworkUtilsLocal.h
index 805beef..b2d75f4 100644
--- a/mgmt/api/NetworkUtilsLocal.h
+++ b/mgmt/api/NetworkUtilsLocal.h
@@ -49,33 +49,33 @@
 /*****************************************************************************
  * general socket functions
  *****************************************************************************/
-TSError socket_flush(struct SocketInfo sock_info);
-TSError socket_read_n(struct SocketInfo sock_info, char *buf, int bytes);
-TSError socket_write_n(struct SocketInfo sock_info, const char *buf, int bytes);
+TSMgmtError socket_flush(struct SocketInfo sock_info);
+TSMgmtError socket_read_n(struct SocketInfo sock_info, char *buf, int bytes);
+TSMgmtError socket_write_n(struct SocketInfo sock_info, const char *buf, int bytes);
 
 /*****************************************************************************
  * Unmarshalling/marshalling
  *****************************************************************************/
-TSError preprocess_msg(struct SocketInfo sock_info, OpType * op_t, char **msg);
+TSMgmtError preprocess_msg(struct SocketInfo sock_info, OpType * op_t, char **msg);
 
-TSError parse_request_name_value(char *req, char **name, char **val);
-TSError parse_record_get_request(char *req, char **rec_name);
-TSError parse_file_read_request(char *req, TSFileNameT * file);
-TSError parse_file_write_request(char *req, TSFileNameT * file, int *ver, int *size, char **text);
-TSError parse_diags_request(char *req, TSDiagsT * mode, char **diag_msg);
-TSError parse_proxy_state_request(char *req, TSProxyStateT * state, TSCacheClearT * clear);
+TSMgmtError parse_request_name_value(char *req, char **name, char **val);
+TSMgmtError parse_record_get_request(char *req, char **rec_name);
+TSMgmtError parse_file_read_request(char *req, TSFileNameT * file);
+TSMgmtError parse_file_write_request(char *req, TSFileNameT * file, int *ver, int *size, char **text);
+TSMgmtError parse_diags_request(char *req, TSDiagsT * mode, char **diag_msg);
+TSMgmtError parse_proxy_state_request(char *req, TSProxyStateT * state, TSCacheClearT * clear);
 
-TSError send_reply(struct SocketInfo sock_info, TSError retval);
-TSError send_reply_list(struct SocketInfo sock_info, TSError retval, char *list);
+TSMgmtError send_reply(struct SocketInfo sock_info, TSMgmtError retval);
+TSMgmtError send_reply_list(struct SocketInfo sock_info, TSMgmtError retval, char *list);
 
-TSError send_record_get_reply(struct SocketInfo sock_info, TSError retval, void *val, int val_size,
+TSMgmtError send_record_get_reply(struct SocketInfo sock_info, TSMgmtError retval, void *val, int val_size,
                                TSRecordT rec_type, const char *rec_name);
-TSError send_record_set_reply(struct SocketInfo sock_info, TSError retval, TSActionNeedT action_need);
-TSError send_file_read_reply(struct SocketInfo sock_info, TSError retval, int ver, int size, char *text);
-TSError send_proxy_state_get_reply(struct SocketInfo sock_info, TSProxyStateT state);
+TSMgmtError send_record_set_reply(struct SocketInfo sock_info, TSMgmtError retval, TSActionNeedT action_need);
+TSMgmtError send_file_read_reply(struct SocketInfo sock_info, TSMgmtError retval, int ver, int size, char *text);
+TSMgmtError send_proxy_state_get_reply(struct SocketInfo sock_info, TSProxyStateT state);
 
-TSError send_event_active_reply(struct SocketInfo sock_info, TSError retval, bool active);
+TSMgmtError send_event_active_reply(struct SocketInfo sock_info, TSMgmtError retval, bool active);
 
-TSError send_event_notification(struct SocketInfo sock_info, TSEvent * event);
+TSMgmtError send_event_notification(struct SocketInfo sock_info, TSMgmtEvent * event);
 
 #endif

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/NetworkUtilsRemote.cc
----------------------------------------------------------------------
diff --git a/mgmt/api/NetworkUtilsRemote.cc b/mgmt/api/NetworkUtilsRemote.cc
index da4c9ab..d7c4ef1 100644
--- a/mgmt/api/NetworkUtilsRemote.cc
+++ b/mgmt/api/NetworkUtilsRemote.cc
@@ -138,7 +138,7 @@ socket_test(int fd)
  *        otherwise traffic server will assume mgmt stopped request and
  *        goes back to just sitting and listening for connection.
  ***************************************************************************/
-TSError
+TSMgmtError
 ts_connect()
 {
   struct sockaddr_un client_sock;
@@ -214,7 +214,7 @@ ERROR:
  * output: TS_ERR_FAIL, TS_ERR_OKAY
  * notes: doesn't do clean up - all cleanup should be done before here
  ***************************************************************************/
-TSError
+TSMgmtError
 disconnect()
 {
   int ret;
@@ -248,10 +248,10 @@ disconnect()
  * 2) relaunch event_poll_thread_main with new socket_fd
  * 3) re-notify TM of all the client's registered callbacks by send msg
  ***************************************************************************/
-TSError
+TSMgmtError
 reconnect()
 {
-  TSError err;
+  TSMgmtError err;
 
   err = disconnect();
   if (err != TS_ERR_OKAY)      // problem disconnecting
@@ -290,11 +290,11 @@ reconnect()
  *         TS_ERR_xx - the reason the reconnection failed
  * notes:
  ***************************************************************************/
-TSError
+TSMgmtError
 reconnect_loop(int num_attempts)
 {
   int numTries = 0;
-  TSError err = TS_ERR_FAIL;
+  TSMgmtError err = TS_ERR_FAIL;
 
   while (numTries < num_attempts) {
     numTries++;
@@ -334,10 +334,10 @@ reconnect_loop(int num_attempts)
  * which is not open; which will by default terminate the process;
  * client needs to "ignore" the SIGPIPE signal
  **************************************************************************/
-TSError
+TSMgmtError
 connect_and_send(const char *msg, int msg_len)
 {
-  TSError err;
+  TSMgmtError err;
   int total_wrote = 0, ret;
 
   // connects to TM and does all necessary event updates required
@@ -381,7 +381,7 @@ connect_and_send(const char *msg, int msg_len)
   return TS_ERR_OKAY;
 }
 
-static TSError
+static TSMgmtError
 socket_read_conn(int fd, uint8_t * buf, size_t needed)
 {
   size_t consumed = 0;
@@ -426,7 +426,7 @@ socket_read_conn(int fd, uint8_t * buf, size_t needed)
  * 1) if the write returns EPIPE error, then call connect_and_send()
  * 2) return the value returned from EPIPE
  *************************************************************************/
-static TSError
+static TSMgmtError
 socket_write_conn(int fd, const char *msg_buf, int bytes)
 {
   int ret, byte_wrote = 0;
@@ -522,13 +522,13 @@ socket_test_thread(void *)
  *         parameters
  * format: <OpType> <msg_len=0>
  **********************************************************************/
-TSError
+TSMgmtError
 send_request(int fd, OpType op)
 {
   int16_t op_t;
   int32_t msg_len;
   char msg_buf[SIZE_OP_T + SIZE_LEN];
-  TSError err;
+  TSMgmtError err;
 
   // fill in op type
   op_t = (int16_t) op;
@@ -552,14 +552,14 @@ send_request(int fd, OpType op)
  * output: TS_ERR_xx
  * note: format: <OpType> <str_len> <string>
  **********************************************************************/
-TSError
+TSMgmtError
 send_request_name(int fd, OpType op, const char *name)
 {
   char *msg_buf;
   int16_t op_t;
   int32_t msg_len;
   int total_len;
-  TSError err;
+  TSMgmtError err;
 
   if (name == NULL) {           //reg callback for all events when op==EVENT_REG_CALLBACK
     msg_len = 0;
@@ -597,14 +597,14 @@ send_request_name(int fd, OpType op, const char *name)
  * output: TS_ERR_xx
  * note: format: <OpType> <name-len> <val-len> <name> <val>
  **********************************************************************/
-TSError
+TSMgmtError
 send_request_name_value(int fd, OpType op, const char *name, const char *value)
 {
   char *msg_buf;
   int msg_pos = 0, total_len;
   int32_t msg_len, name_len, val_size;    // these are written to msg
   int16_t op_t;
-  TSError err;
+  TSMgmtError err;
 
   if (!name || !value)
     return TS_ERR_PARAMS;
@@ -654,7 +654,7 @@ send_request_name_value(int fd, OpType op, const char *name, const char *value)
  *        flag    - boolean flag
  * output: TS_ERR_xx
  **********************************************************************/
-TSError
+TSMgmtError
 send_request_bool(int fd, OpType op, bool flag)
 {
   char msg_buf[SIZE_OP_T + SIZE_LEN + SIZE_BOOL];
@@ -686,7 +686,7 @@ send_request_bool(int fd, OpType op, bool flag)
  * notes:   first must create the message and then send it across network
  *          msg format = <OpType> <msg_len> <TSFileNameT>
  **********************************************************************/
-TSError
+TSMgmtError
 send_file_read_request(int fd, TSFileNameT file)
 {
   char msg_buf[SIZE_OP_T + SIZE_LEN + SIZE_FILE_T];
@@ -723,14 +723,14 @@ send_file_read_request(int fd, TSFileNameT file)
  * output: TS_ERR_xx
  * notes: format - FILE_WRITE <msg_len> <file_type> <file_ver> <file_size> <text>
  **********************************************************************/
-TSError
+TSMgmtError
 send_file_write_request(int fd, TSFileNameT file, int ver, int size, char *text)
 {
   char *msg_buf;
   int msg_pos = 0, total_len;
   int32_t msg_len, f_size;        //marshalled values
   int16_t op, file_t, f_ver;
-  TSError err;
+  TSMgmtError err;
 
   if (!text)
     return TS_ERR_PARAMS;
@@ -772,14 +772,14 @@ send_file_write_request(int fd, TSFileNameT file, int ver, int size, char *text)
   return err;
 }
 
-static TSError
+static TSMgmtError
 send_record_get_x_request(OpType optype, int fd, const char *rec_name)
 {
   char *msg_buf;
   int msg_pos = 0, total_len;
   int16_t op = (int16_t)optype;
   int32_t msg_len;
-  TSError err;
+  TSMgmtError err;
 
   ink_assert(op == RECORD_GET || op == RECORD_MATCH_GET);
 
@@ -817,7 +817,7 @@ send_record_get_x_request(OpType optype, int fd, const char *rec_name)
  * output: TS_ERR_xx
  * format: RECORD_GET <msg_len> <rec_name>
  **********************************************************************/
-TSError
+TSMgmtError
 send_record_get_request(int fd, const char *rec_name)
 {
   return send_record_get_x_request(RECORD_GET, fd, rec_name);
@@ -832,7 +832,7 @@ send_record_get_request(int fd, const char *rec_name)
  * output: TS_ERR_xx
  * format: sequence of RECORD_GET <msg_len> <rec_name>
  **********************************************************************/
-TSError
+TSMgmtError
 send_record_match_request(int fd, const char *rec_regex)
 {
   return send_record_get_x_request(RECORD_MATCH_GET, fd, rec_regex);
@@ -847,10 +847,10 @@ send_record_match_request(int fd, const char *rec_regex)
  * output: TS_ERR_xx
  * note: format: PROXY_STATE_GET 0(=msg_len)
  **********************************************************************/
-TSError
+TSMgmtError
 send_proxy_state_get_request(int fd)
 {
-  TSError err;
+  TSMgmtError err;
 
   err = send_request(fd, PROXY_STATE_GET);
   return err;
@@ -865,7 +865,7 @@ send_proxy_state_get_request(int fd)
  * output: TS_ERR_xx
  * note: format: PROXY_STATE_SET  <msg_len> <TSProxyStateT> <TSCacheClearT>
  **********************************************************************/
-TSError
+TSMgmtError
 send_proxy_state_set_request(int fd, TSProxyStateT state, TSCacheClearT clear)
 {
   char msg_buf[SIZE_OP_T + SIZE_LEN + SIZE_PROXY_T + SIZE_TS_ARG_T];
@@ -909,11 +909,11 @@ send_proxy_state_set_request(int fd, TSProxyStateT state, TSCacheClearT clear)
  * 1) get list of all events with callbacks
  * 2) for each event, call send_request_name
  **********************************************************************/
-TSError
+TSMgmtError
 send_register_all_callbacks(int fd, CallbackTable * cb_table)
 {
   LLQ *events_with_cb;
-  TSError err, send_err = TS_ERR_FAIL;
+  TSMgmtError err, send_err = TS_ERR_FAIL;
   bool no_errors = true;        // set to false if one send is not okay
 
   events_with_cb = get_events_with_callbacks(cb_table);
@@ -963,14 +963,14 @@ send_register_all_callbacks(int fd, CallbackTable * cb_table)
  * unregister; but actually just reuse the function
  * send_request_name(EVENT_UNREG_CALLBACK) and call it for each event
  **********************************************************************/
-TSError
+TSMgmtError
 send_unregister_all_callbacks(int fd, CallbackTable * cb_table)
 {
   char *event_name;
   int event_id;
   LLQ *events_with_cb;          // list of events with at least one callback
   int reg_callback[NUM_EVENTS];
-  TSError err, send_err = TS_ERR_FAIL;
+  TSMgmtError err, send_err = TS_ERR_FAIL;
   bool no_errors = true;        // set to false if at least one send fails
 
   // init array so that all events don't have any callbacks
@@ -1022,14 +1022,14 @@ send_unregister_all_callbacks(int fd, CallbackTable * cb_table)
  * output: TS_ERR_xx
  * note: format: <OpType> <msg_len> <TSDiagsT> <diag_msg_len> <diag_msg>
  **********************************************************************/
-TSError
+TSMgmtError
 send_diags_msg(int fd, TSDiagsT mode, const char *diag_msg)
 {
   char *msg_buf;
   int16_t op_t, diag_t;
   int32_t msg_len, diag_msg_len;
   int total_len;
-  TSError err;
+  TSMgmtError err;
 
   if (!diag_msg)
     return TS_ERR_PARAMS;
@@ -1088,12 +1088,12 @@ send_diags_msg(int fd, TSDiagsT mode, const char *diag_msg)
  * input: fd
  * output: errors on error or fill up class with response &
  *         return TS_ERR_xx
- * notes: only returns an TSError
+ * notes: only returns an TSMgmtError
  **********************************************************************/
-TSError
+TSMgmtError
 parse_reply(int fd)
 {
-  TSError ret;
+  TSMgmtError ret;
   int16_t ret_val;
 
   // check to see if anything to read; wait for specified time = 1 sec
@@ -1106,7 +1106,7 @@ parse_reply(int fd)
     return ret;
   }
 
-  return (TSError) ret_val;
+  return (TSMgmtError) ret_val;
 }
 
 /**********************************************************************
@@ -1117,14 +1117,14 @@ parse_reply(int fd)
  *        list - will contain delimited string list of tokens
  * output: TS_ERR_xx
  * notes:
- * format: <TSError> <string_list_len> <delimited_string_list>
+ * format: <TSMgmtError> <string_list_len> <delimited_string_list>
  **********************************************************************/
-TSError
+TSMgmtError
 parse_reply_list(int fd, char **list)
 {
   int16_t ret_val;
   int32_t list_size;
-  TSError err_t;
+  TSMgmtError err_t;
 
   if (!list) {
     return TS_ERR_PARAMS;
@@ -1135,14 +1135,14 @@ parse_reply_list(int fd, char **list)
     return TS_ERR_NET_TIMEOUT;
   }
 
-  // get the return value (TSError type)
+  // get the return value (TSMgmtError type)
   err_t = socket_read_conn(fd, (uint8_t *)&ret_val, SIZE_ERR_T);
   if (err_t != TS_ERR_OKAY) {
     return err_t;
   }
 
   // if !TS_ERR_OKAY, stop reading rest of msg
-  err_t = (TSError) ret_val;
+  err_t = (TSMgmtError) ret_val;
   if (err_t != TS_ERR_OKAY) {
     return err_t;
   }
@@ -1178,14 +1178,14 @@ parse_reply_list(int fd, char **list)
  *        text -
  * output: errors on error or fill up class with response &
  *         return TS_ERR_xx
- * notes: reply format = <TSError> <file_version> <file_size> <text>
+ * notes: reply format = <TSMgmtError> <file_version> <file_size> <text>
  **********************************************************************/
-TSError
+TSMgmtError
 parse_file_read_reply(int fd, int *ver, int *size, char **text)
 {
   int32_t f_size;
   int16_t ret_val, f_ver;
-  TSError err_t;
+  TSMgmtError err_t;
 
   if (!ver || !size || !text)
     return TS_ERR_PARAMS;
@@ -1202,7 +1202,7 @@ parse_file_read_reply(int fd, int *ver, int *size, char **text)
   }
 
   // if !TS_ERR_OKAY, stop reading rest of msg
-  err_t = (TSError) ret_val;
+  err_t = (TSMgmtError) ret_val;
   if (err_t != TS_ERR_OKAY) {
     return err_t;
   }
@@ -1252,18 +1252,18 @@ parse_file_read_reply(int fd, int *ver, int *size, char **text)
  *        rec_value - the value of the record in string format
  * output: errors on error or fill up class with response &
  *         return SUCC
- * notes: reply format = <TSError> <val_size> <name_size> <rec_type> <record_value> <record_name>
+ * notes: reply format = <TSMgmtError> <val_size> <name_size> <rec_type> <record_value> <record_name>
  * Zero-length values and names are supported. If the size field is 0, the corresponding
  * value field is not transmitted.
  * It's the responsibility of the calling function to conver the rec_value
  * based on the rec_type!!
  **********************************************************************/
-TSError
+TSMgmtError
 parse_record_get_reply(int fd, TSRecordT * rec_type, void **rec_val, char **rec_name)
 {
   int16_t ret_val, rec_t;
   int32_t val_size, name_size;
-  TSError err_t;
+  TSMgmtError err_t;
 
   if (!rec_type || !rec_val) {
     return TS_ERR_PARAMS;
@@ -1277,14 +1277,14 @@ parse_record_get_reply(int fd, TSRecordT * rec_type, void **rec_val, char **rec_
     return TS_ERR_NET_TIMEOUT;
   }
 
-  // get the return value (TSError type)
+  // get the return value (TSMgmtError type)
   err_t = socket_read_conn(fd, (uint8_t *)&ret_val, SIZE_ERR_T);
   if (err_t != TS_ERR_OKAY) {
     goto fail;
   }
 
   // if !TS_ERR_OKAY, stop reading rest of msg
-  err_t = (TSError) ret_val;
+  err_t = (TSMgmtError) ret_val;
   if (err_t != TS_ERR_OKAY) {
     goto fail;
   }
@@ -1356,15 +1356,15 @@ fail:
  * input: fd
  *        action_need - will contain the type of action needed from the set
  * output: TS_ERR_xx
- * notes: reply format = <TSError> <val_size> <rec_type> <record_value>
+ * notes: reply format = <TSMgmtError> <val_size> <rec_type> <record_value>
  * It's the responsibility of the calling function to conver the rec_value
  * based on the rec_type!!
  **********************************************************************/
-TSError
+TSMgmtError
 parse_record_set_reply(int fd, TSActionNeedT * action_need)
 {
   int16_t ret_val, action_t;
-  TSError err_t;
+  TSMgmtError err_t;
 
   if (!action_need)
     return TS_ERR_PARAMS;
@@ -1374,14 +1374,14 @@ parse_record_set_reply(int fd, TSActionNeedT * action_need)
     return TS_ERR_NET_TIMEOUT;
   }
 
-  // get the return value (TSError type)
+  // get the return value (TSMgmtError type)
   err_t = socket_read_conn(fd, (uint8_t *)&ret_val, SIZE_ERR_T);
   if (err_t != TS_ERR_OKAY) {
     return err_t;
   }
 
   // if !TS_ERR_OKAY, stop reading rest of msg
-  err_t = (TSError) ret_val;
+  err_t = (TSMgmtError) ret_val;
   if (err_t != TS_ERR_OKAY) {
     return err_t;
   }
@@ -1404,13 +1404,13 @@ parse_record_set_reply(int fd, TSActionNeedT * action_need)
  * input: fd
  *        state - will contain the state of the proxy
  * output: TS_ERR_xx
- * notes: function is DIFFERENT becuase it has NO TSError at head of msg
+ * notes: function is DIFFERENT becuase it has NO TSMgmtError at head of msg
  * format: <TSProxyStateT>
  **********************************************************************/
-TSError
+TSMgmtError
 parse_proxy_state_get_reply(int fd, TSProxyStateT * state)
 {
-  TSError err_t;
+  TSMgmtError err_t;
   int16_t state_t;
 
   if (!state)
@@ -1441,13 +1441,13 @@ parse_proxy_state_get_reply(int fd, TSProxyStateT * state)
  *        is_active - set to true if event is active; false otherwise
  * output: TS_ERR_xx
  * notes:
- * format: reply format = <TSError> <bool>
+ * format: reply format = <TSMgmtError> <bool>
  **********************************************************************/
-TSError
+TSMgmtError
 parse_event_active_reply(int fd, bool * is_active)
 {
   int16_t ret_val, active;
-  TSError err_t;
+  TSMgmtError err_t;
 
   if (!is_active)
     return TS_ERR_PARAMS;
@@ -1457,14 +1457,14 @@ parse_event_active_reply(int fd, bool * is_active)
     return TS_ERR_NET_TIMEOUT;
   }
 
-  // get the return value (TSError type)
+  // get the return value (TSMgmtError type)
   err_t = socket_read_conn(fd, (uint8_t *)&ret_val, SIZE_ERR_T);
   if (err_t != TS_ERR_OKAY) {
     return err_t;
   }
 
   // if !TS_ERR_OKAY, stop reading rest of msg
-  err_t = (TSError) ret_val;
+  err_t = (TSMgmtError) ret_val;
   if (err_t != TS_ERR_OKAY) {
     return err_t;
   }
@@ -1483,21 +1483,21 @@ parse_event_active_reply(int fd, bool * is_active)
  * parse_event_notification
  *
  * purpose: parses the event notification message from TM when an event
- *          is signalled; stores the event info in the TSEvent
+ *          is signalled; stores the event info in the TSMgmtEvent
  * input: fd - socket to read
  *        event - where the event info from msg is stored
  * output:TS_ERR_OKAY, TS_ERR_NET_READ, TS_ERR_NET_EOF, TS_ERR_PARAMS
  * notes:
  * format: <OpType> <event_name_len> <event_name> <desc_len> <desc>
  **********************************************************************/
-TSError
-parse_event_notification(int fd, TSEvent * event)
+TSMgmtError
+parse_event_notification(int fd, TSMgmtEvent * event)
 {
   OpType msg_type;
   int16_t type_op;
   int32_t msg_len;
   char *event_name = NULL, *desc = NULL;
-  TSError err_t;
+  TSMgmtError err_t;
 
   if (!event)
     return TS_ERR_PARAMS;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/NetworkUtilsRemote.h
----------------------------------------------------------------------
diff --git a/mgmt/api/NetworkUtilsRemote.h b/mgmt/api/NetworkUtilsRemote.h
index f251dc0..9a2ac7d 100644
--- a/mgmt/api/NetworkUtilsRemote.h
+++ b/mgmt/api/NetworkUtilsRemote.h
@@ -59,48 +59,48 @@ int socket_test(int fd);
  * the client connection information stored in the variables in
  * NetworkUtilsRemote.cc
  */
-TSError ts_connect(); /* TODO: update documenation, Renamed due to conflict with connect() in <sys/socket.h> on some platforms*/
-TSError disconnect();
-TSError reconnect();
-TSError reconnect_loop(int num_attempts);
-TSError connect_and_send(const char *msg, int msg_len);
+TSMgmtError ts_connect(); /* TODO: update documenation, Renamed due to conflict with connect() in <sys/socket.h> on some platforms*/
+TSMgmtError disconnect();
+TSMgmtError reconnect();
+TSMgmtError reconnect_loop(int num_attempts);
+TSMgmtError connect_and_send(const char *msg, int msg_len);
 void *socket_test_thread(void *arg);
 
 /*****************************************************************************
  * Marshalling (create requests)
  *****************************************************************************/
-TSError send_request(int fd, OpType op);
-TSError send_request_name(int fd, OpType op, const char *name);
-TSError send_request_name_value(int fd, OpType op, const char *name, const char *value);
-TSError send_request_bool(int fd, OpType op, bool flag);
+TSMgmtError send_request(int fd, OpType op);
+TSMgmtError send_request_name(int fd, OpType op, const char *name);
+TSMgmtError send_request_name_value(int fd, OpType op, const char *name, const char *value);
+TSMgmtError send_request_bool(int fd, OpType op, bool flag);
 
-TSError send_file_read_request(int fd, TSFileNameT file);
-TSError send_file_write_request(int fd, TSFileNameT file, int ver, int size, char *text);
-TSError send_record_get_request(int fd, const char *rec_name);
-TSError send_record_match_request(int fd, const char *rec_regex);
+TSMgmtError send_file_read_request(int fd, TSFileNameT file);
+TSMgmtError send_file_write_request(int fd, TSFileNameT file, int ver, int size, char *text);
+TSMgmtError send_record_get_request(int fd, const char *rec_name);
+TSMgmtError send_record_match_request(int fd, const char *rec_regex);
 
-TSError send_proxy_state_set_request(int fd, TSProxyStateT state, TSCacheClearT clear);
+TSMgmtError send_proxy_state_set_request(int fd, TSProxyStateT state, TSCacheClearT clear);
 
-TSError send_register_all_callbacks(int fd, CallbackTable * cb_table);
-TSError send_unregister_all_callbacks(int fd, CallbackTable * cb_table);
+TSMgmtError send_register_all_callbacks(int fd, CallbackTable * cb_table);
+TSMgmtError send_unregister_all_callbacks(int fd, CallbackTable * cb_table);
 
-TSError send_diags_msg(int fd, TSDiagsT mode, const char *diag_msg);
+TSMgmtError send_diags_msg(int fd, TSDiagsT mode, const char *diag_msg);
 
 /*****************************************************************************
  * Un-marshalling (parse responses)
  *****************************************************************************/
-TSError parse_reply(int fd);
-TSError parse_reply_list(int fd, char **list);
+TSMgmtError parse_reply(int fd);
+TSMgmtError parse_reply_list(int fd, char **list);
 
-TSError parse_file_read_reply(int fd, int *version, int *size, char **text);
+TSMgmtError parse_file_read_reply(int fd, int *version, int *size, char **text);
 
-TSError parse_record_get_reply(int fd, TSRecordT * rec_type, void **rec_val, char **rec_name);
-TSError parse_record_set_reply(int fd, TSActionNeedT * action_need);
+TSMgmtError parse_record_get_reply(int fd, TSRecordT * rec_type, void **rec_val, char **rec_name);
+TSMgmtError parse_record_set_reply(int fd, TSActionNeedT * action_need);
 
-TSError parse_proxy_state_get_reply(int fd, TSProxyStateT * state);
+TSMgmtError parse_proxy_state_get_reply(int fd, TSProxyStateT * state);
 
-TSError parse_event_active_reply(int fd, bool * is_active);
-TSError parse_event_notification(int fd, TSEvent * event);
+TSMgmtError parse_event_active_reply(int fd, bool * is_active);
+TSMgmtError parse_event_notification(int fd, TSMgmtEvent * event);
 
 #ifdef __cplusplus
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/TSControlMain.cc
----------------------------------------------------------------------
diff --git a/mgmt/api/TSControlMain.cc b/mgmt/api/TSControlMain.cc
index 97a7613..3486436 100644
--- a/mgmt/api/TSControlMain.cc
+++ b/mgmt/api/TSControlMain.cc
@@ -345,8 +345,8 @@ ts_ctrl_main(void *arg)
  * with only the error return value in the msg!!! It's important that if
  * an error does occur, the "send_reply" function is used; otherwise the socket
  * will get written with too much extraneous stuff; the remote side will
- * only read the TSError type since that's all it expects to be in the message
- * (for an TSError != TS_ERR_OKAY).
+ * only read the TSMgmtError type since that's all it expects to be in the message
+ * (for an TSMgmtError != TS_ERR_OKAY).
  */
 
 /**************************************************************************
@@ -359,10 +359,10 @@ ts_ctrl_main(void *arg)
  * output: SUCC or ERR
  * note:
  *************************************************************************/
-TSError
+TSMgmtError
 handle_record_get(struct SocketInfo sock_info, char *req)
 {
-  TSError ret;
+  TSMgmtError ret;
   TSRecordEle *ele;
 
   // parse msg - don't really need since the request itself is the record name
@@ -408,7 +408,7 @@ handle_record_get(struct SocketInfo sock_info, char *req)
 }
 
 struct record_match_state {
-  TSError     err;
+  TSMgmtError     err;
   SocketInfo  sock;
   DFA         regex;
 };
@@ -447,10 +447,10 @@ send_record_match(RecT /* rec_type */, void *edata, int /* registered */, const
   }
 }
 
-TSError
+TSMgmtError
 handle_record_match(struct SocketInfo sock_info, char *req)
 {
-  TSError ret;
+  TSMgmtError ret;
   record_match_state match;
 
   // parse msg - don't really need since the request itself is the regex itself
@@ -485,11 +485,11 @@ handle_record_match(struct SocketInfo sock_info, char *req)
  * output: SUCC or ERR
  * note: request format = <record name>DELIMITER<record_value>
  *************************************************************************/
-TSError
+TSMgmtError
 handle_record_set(struct SocketInfo sock_info, char *req)
 {
   char *name, *val;
-  TSError ret;
+  TSMgmtError ret;
   TSActionNeedT action = TS_ACTION_UNDEFINED;
 
   if (!req) {
@@ -526,10 +526,10 @@ handle_record_set(struct SocketInfo sock_info, char *req)
  * output: SUCC or ERR
  * note: None
  *************************************************************************/
-TSError
+TSMgmtError
 handle_file_read(struct SocketInfo sock_info, char *req)
 {
-  TSError ret;
+  TSMgmtError ret;
   int size, version;
   TSFileNameT file;
   char *text;
@@ -568,10 +568,10 @@ handle_file_read(struct SocketInfo sock_info, char *req)
  * output: SUCC or ERR
  * note: None
  *************************************************************************/
-TSError
+TSMgmtError
 handle_file_write(struct SocketInfo sock_info, char *req)
 {
-  TSError ret;
+  TSMgmtError ret;
   int size, version;
   TSFileNameT file;
   char *text;
@@ -603,11 +603,11 @@ handle_file_write(struct SocketInfo sock_info, char *req)
  * output: TS_ERR_xx
  * note: None
  *************************************************************************/
-TSError
+TSMgmtError
 handle_proxy_state_get(struct SocketInfo sock_info)
 {
   TSProxyStateT state;
-  TSError ret;
+  TSMgmtError ret;
 
   // make coreAPI call on local side
   state = ProxyStateGet();
@@ -628,12 +628,12 @@ handle_proxy_state_get(struct SocketInfo sock_info)
  * output: TS_ERR_xx
  * note: None
  *************************************************************************/
-TSError
+TSMgmtError
 handle_proxy_state_set(struct SocketInfo sock_info, char *req)
 {
   TSProxyStateT state;
   TSCacheClearT clear;
-  TSError ret;
+  TSMgmtError ret;
 
   if (!req) {
     ret = TS_ERR_FAIL;
@@ -660,10 +660,10 @@ END:
  * output: TS_ERR_xx
  * note: None
  *************************************************************************/
-TSError
+TSMgmtError
 handle_reconfigure(struct SocketInfo sock_info)
 {
-  TSError ret;
+  TSMgmtError ret;
 
   // make local side coreAPI call
   ret = Reconfigure();
@@ -682,11 +682,11 @@ handle_reconfigure(struct SocketInfo sock_info)
  * output: TS_ERR_xx
  * note: None
  *************************************************************************/
-TSError
+TSMgmtError
 handle_restart(struct SocketInfo sock_info, char *req, bool bounce)
 {
   int16_t cluster;
-  TSError ret;
+  TSMgmtError ret;
 
   if (!req) {
     ret = send_reply(sock_info, TS_ERR_PARAMS);
@@ -713,10 +713,10 @@ handle_restart(struct SocketInfo sock_info, char *req, bool bounce)
  * output: TS_ERR_xx
  * note: None
  *************************************************************************/
-TSError
+TSMgmtError
 handle_storage_device_cmd_offline(struct SocketInfo sock_info, char *req)
 {
-  TSError ret = TS_ERR_OKAY;
+  TSMgmtError ret = TS_ERR_OKAY;
 
   if (!req) {
     ret = send_reply(sock_info, TS_ERR_PARAMS);
@@ -736,10 +736,10 @@ handle_storage_device_cmd_offline(struct SocketInfo sock_info, char *req)
  * output: TS_ERR_xx
  * note: the req should be the event name
  *************************************************************************/
-TSError
+TSMgmtError
 handle_event_resolve(struct SocketInfo sock_info, char *req)
 {
-  TSError ret;
+  TSMgmtError ret;
 
   // parse msg - don't really need since the request itself is the record name
   if (!req) {
@@ -761,10 +761,10 @@ handle_event_resolve(struct SocketInfo sock_info, char *req)
  * output: TS_ERR_xx
  * note: the req should be the event name
  *************************************************************************/
-TSError
+TSMgmtError
 handle_event_get_mlt(struct SocketInfo sock_info)
 {
-  TSError ret;
+  TSMgmtError ret;
   LLQ *event_list;
   char buf[MAX_BUF_SIZE];
   char *event_name;
@@ -805,10 +805,10 @@ handle_event_get_mlt(struct SocketInfo sock_info)
  * output: TS_ERR_xx
  * note: the req should be the event name
  *************************************************************************/
-TSError
+TSMgmtError
 handle_event_active(struct SocketInfo sock_info, char *req)
 {
-  TSError ret;
+  TSMgmtError ret;
   bool active;
 
   // parse msg - don't really need since the request itself is the record name
@@ -838,10 +838,10 @@ handle_event_active(struct SocketInfo sock_info, char *req)
  *        op  - SNAPSHOT_TAKE, SNAPSHOT_REMOVE, or SNAPSHOT_RESTORE
  * output: TS_ERR_xx
  *************************************************************************/
-TSError
+TSMgmtError
 handle_snapshot(struct SocketInfo sock_info, char *req, OpType op)
 {
-  TSError ret;
+  TSMgmtError ret;
 
   if (!req) {
     ret = send_reply(sock_info, TS_ERR_PARAMS);
@@ -875,10 +875,10 @@ handle_snapshot(struct SocketInfo sock_info, char *req, OpType op)
  * output: TS_ERR_xx
  * note: the req should be the event name
  *************************************************************************/
-TSError
+TSMgmtError
 handle_snapshot_get_mlt(struct SocketInfo sock_info)
 {
-  TSError ret;
+  TSMgmtError ret;
   LLQ *snap_list;
   char buf[MAX_BUF_SIZE];
   char *snap_name;
@@ -920,10 +920,10 @@ handle_snapshot_get_mlt(struct SocketInfo sock_info)
  *        req - the diag message (already formatted with arguments)
  * output: TS_ERR_xx
  *************************************************************************/
-TSError
+TSMgmtError
 handle_diags(struct SocketInfo /* sock_info ATS_UNUSED */, char *req)
 {
-  TSError ret;
+  TSMgmtError ret;
   TSDiagsT mode;
   char *diag_msg = NULL;
   DiagsLevel level;
@@ -988,10 +988,10 @@ Lerror:
  *        op - reset type (cluster or node)
  * output: TS_ERR_xx
  *************************************************************************/
-TSError
+TSMgmtError
 handle_stats_reset(struct SocketInfo sock_info, char *req, OpType op)
 {
-  TSError ret;
+  TSMgmtError ret;
 
   ret = StatsReset(op == STATS_RESET_CLUSTER, req);
   ret = send_reply(sock_info, ret);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cb6e6f6a/mgmt/api/TSControlMain.h
----------------------------------------------------------------------
diff --git a/mgmt/api/TSControlMain.h b/mgmt/api/TSControlMain.h
index b53603e..59dfa8a 100644
--- a/mgmt/api/TSControlMain.h
+++ b/mgmt/api/TSControlMain.h
@@ -48,29 +48,29 @@ void delete_client(ClientT * client);
 
 void *ts_ctrl_main(void *arg);
 
-TSError handle_record_get(struct SocketInfo sock_info, char *req);
-TSError handle_record_match(struct SocketInfo sock_info, char *req);
-TSError handle_record_set(struct SocketInfo sock_info, char *req);
+TSMgmtError handle_record_get(struct SocketInfo sock_info, char *req);
+TSMgmtError handle_record_match(struct SocketInfo sock_info, char *req);
+TSMgmtError handle_record_set(struct SocketInfo sock_info, char *req);
 
-TSError handle_file_read(struct SocketInfo sock_info, char *req);
-TSError handle_file_write(struct SocketInfo sock_info, char *req);
+TSMgmtError handle_file_read(struct SocketInfo sock_info, char *req);
+TSMgmtError handle_file_write(struct SocketInfo sock_info, char *req);
 
-TSError handle_proxy_state_get(struct SocketInfo sock_info);
-TSError handle_proxy_state_set(struct SocketInfo sock_info, char *req);
-TSError handle_reconfigure(struct SocketInfo sock_info);
-TSError handle_restart(struct SocketInfo sock_info, char *req, bool bounce);
-TSError handle_storage_device_cmd_offline(struct SocketInfo sock_info, char *req);
+TSMgmtError handle_proxy_state_get(struct SocketInfo sock_info);
+TSMgmtError handle_proxy_state_set(struct SocketInfo sock_info, char *req);
+TSMgmtError handle_reconfigure(struct SocketInfo sock_info);
+TSMgmtError handle_restart(struct SocketInfo sock_info, char *req, bool bounce);
+TSMgmtError handle_storage_device_cmd_offline(struct SocketInfo sock_info, char *req);
 
-TSError handle_event_resolve(struct SocketInfo sock_info, char *req);
-TSError handle_event_get_mlt(struct SocketInfo sock_info);
-TSError handle_event_active(struct SocketInfo sock_info, char *req);
+TSMgmtError handle_event_resolve(struct SocketInfo sock_info, char *req);
+TSMgmtError handle_event_get_mlt(struct SocketInfo sock_info);
+TSMgmtError handle_event_active(struct SocketInfo sock_info, char *req);
 
-TSError handle_snapshot(struct SocketInfo sock_info, char *req, OpType op);
-TSError handle_snapshot_get_mlt(struct SocketInfo sock_info);
+TSMgmtError handle_snapshot(struct SocketInfo sock_info, char *req, OpType op);
+TSMgmtError handle_snapshot_get_mlt(struct SocketInfo sock_info);
 
-TSError handle_diags(struct SocketInfo sock_info, char *req);
+TSMgmtError handle_diags(struct SocketInfo sock_info, char *req);
 
-TSError handle_stats_reset(struct SocketInfo sock_info, char *req, OpType op);
+TSMgmtError handle_stats_reset(struct SocketInfo sock_info, char *req, OpType op);
 
 
 #endif