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:26 UTC

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

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