This is an automated email from the ASF dual-hosted git repository.
dmeden pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 483d7e9db3 Clean up: Remove mgmt/api folder. This was unused code,
functions were (#9945)
483d7e9db3 is described below
commit 483d7e9db3a8b175099e93a8af075649f58baed0
Author: Damian Meden <[email protected]>
AuthorDate: Wed Jul 5 18:28:54 2023 +0100
Clean up: Remove mgmt/api folder. This was unused code, functions were
(#9945)
incompleted and some not even implemented(just declared).
Removed:
mgmt/api/CoreAPIShared.cc
mgmt/api/CoreAPIShared.h
mgmt/api/INKMgmtAPI.cc
mgmt/api/Makefile.am
mgmt/api/include/Makefile.am
mgmt/api/include/mgmtapi.h
---
.gitignore | 2 -
configure.ac | 2 -
mgmt/Makefile.am | 2 +-
mgmt/api/CoreAPIShared.cc | 279 --------------------
mgmt/api/CoreAPIShared.h | 48 ----
mgmt/api/INKMgmtAPI.cc | 527 --------------------------------------
mgmt/api/Makefile.am | 44 ----
mgmt/api/include/Makefile.am | 22 --
mgmt/api/include/mgmtapi.h | 343 -------------------------
mgmt/utils/Makefile.am | 2 -
proxy/shared/Makefile.am | 2 -
src/records/CMakeLists.txt | 1 -
src/traffic_crashlog/Makefile.inc | 1 -
src/traffic_via/Makefile.inc | 1 -
14 files changed, 1 insertion(+), 1275 deletions(-)
diff --git a/.gitignore b/.gitignore
index 9f4a871f17..051188ee14 100644
--- a/.gitignore
+++ b/.gitignore
@@ -166,13 +166,11 @@ plugins/experimental/uri_signing/test_uri_signing
mgmt/rpc/overridable_txn_vars.cc
mgmt/rpc/test_jsonrpc
mgmt/rpc/test_jsonrpcserver
-mgmt/api/traffic_api_cli_remote
mgmt/tools/traffic_mcast_snoop
mgmt/tools/traffic_net_config
mgmt/tools/traffic_shmem_clean
mgmt/tools/traffic_time_config
mgmt/tools/traffic_vip_config
-mgmt/api/api_cli_remote
mgmt/tools/shmem_clean
mgmt/utils/test_mgmt_utils
diff --git a/configure.ac b/configure.ac
index b70ead313a..555a8a7baa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2382,8 +2382,6 @@ AC_CONFIG_FILES([
lib/swoc/Makefile
lib/yamlcpp/Makefile
mgmt/Makefile
- mgmt/api/Makefile
- mgmt/api/include/Makefile
mgmt/utils/Makefile
mgmt/rpc/Makefile
mgmt/config/Makefile
diff --git a/mgmt/Makefile.am b/mgmt/Makefile.am
index e2f6750f70..cf331565da 100644
--- a/mgmt/Makefile.am
+++ b/mgmt/Makefile.am
@@ -17,7 +17,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-SUBDIRS = utils api config rpc
+SUBDIRS = utils config rpc
AM_CPPFLAGS += \
$(iocore_include_dirs) \
diff --git a/mgmt/api/CoreAPIShared.cc b/mgmt/api/CoreAPIShared.cc
deleted file mode 100644
index 5514afe14b..0000000000
--- a/mgmt/api/CoreAPIShared.cc
+++ /dev/null
@@ -1,279 +0,0 @@
-/** @file
-
- This file contains functions that are shared by local and remote
- API; in particular it has helper functions used by TSMgmtAPI.cc
-
- @section license License
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-#include "tscore/ink_platform.h"
-#include "tscore/ink_sock.h"
-#include "tscore/ink_string.h"
-#include "tscore/ink_memory.h"
-
-#include "CoreAPIShared.h"
-
-// Forward declarations, used to be in the CoreAPIShared.h include file but
-// that doesn't make any sense since these are both statically declared. /leif
-static int poll_write(int fd, int timeout);
-static int poll_read(int fd, int timeout);
-
-/* parseHTTPResponse
- * - parse the response buffer into header and body and calculate
- * the correct size of the header and body.
- * INPUT: buffer -- response buffer to be parsed
- * header -- pointer to the head of the header
- * hdr_size -- size of the header
- * body -- pointer to the head of the body
- * bdy_size -- size of the body
- * OUTPUT: TSMgmtError -- error status
- */
-TSMgmtError
-parseHTTPResponse(char *buffer, char **header, int *hdr_size, char **body, int
*bdy_size)
-{
- TSMgmtError err = TS_ERR_OKAY;
- char *buf;
-
- // locate HTTP divider
- if (!(buf = strstr(buffer, HTTP_DIVIDER))) {
- err = TS_ERR_FAIL;
- goto END;
- }
- // calculate header info
- if (header) {
- *header = buffer;
- }
- if (hdr_size) {
- *hdr_size = buf - buffer;
- }
-
- // calculate body info
- buf += strlen(HTTP_DIVIDER);
- if (body) {
- *body = buf;
- }
- if (bdy_size) {
- *bdy_size = strlen(buf);
- }
-
-END:
- return err;
-}
-
-/* readHTTPResponse
- * - read from an opened socket to memory-allocated buffer and close the
- * socket regardless success or failure.
- * INPUT: sock -- the socket to read the response from
- * buffer -- the buffer to be filled with the HTTP response
- * bufsize -- the size allocated for the buffer
- * OUTPUT: bool -- true if everything went well. false otherwise
- */
-TSMgmtError
-readHTTPResponse(int sock, char *buffer, int bufsize, uint64_t timeout)
-{
- int64_t err, idx;
-
- idx = 0;
- for (;;) {
- // printf("%d\n", idx);
- if (idx >= bufsize) {
- // printf("(test) response is too large [%d] %d\n", idx, bufsize);
- goto error;
- }
- // printf("before poll_read\n");
- err = poll_read(sock, timeout);
- if (err < 0) {
- // printf("(test) poll read failed [%d '%s']\n", errno, strerror
(errno));
- goto error;
- } else if (err == 0) {
- // printf("(test) read timeout\n");
- goto error;
- }
- // printf("before do\n");
- do {
- // printf("in do\n");
- err = read(sock, &buffer[idx], bufsize - idx);
- } while ((err < 0) && ((errno == EINTR) || (errno == EAGAIN)));
- // printf("content: %s\n", buffer);
-
- if (err < 0) {
- // printf("(test) read failed [%d '%s']\n", errno, strerror
(errno));
- goto error;
- } else if (err == 0) {
- buffer[idx] = '\0';
- close(sock);
- return TS_ERR_OKAY;
- } else {
- idx += err;
- }
- }
-
-error: /* "Houston, we have a problem!" (Apollo 13) */
- if (sock >= 0) {
- close_socket(sock);
- }
- return TS_ERR_NET_READ;
-}
-
-/* sendHTTPRequest
- * - Compose a HTTP GET request and sent it via an opened socket.
- * INPUT: sock -- the socket to send the message to
- * req -- the request to send
- * OUTPUT: bool -- true if everything went well. false otherwise (and sock is
- * closed)
- */
-TSMgmtError
-sendHTTPRequest(int sock, char *req, uint64_t timeout)
-{
- char request[BUFSIZ];
- size_t length = 0;
-
- memset(request, 0, BUFSIZ);
- snprintf(request, BUFSIZ, "GET %s HTTP/1.0\r\n\r\n", req);
- length = strlen(request);
-
- int err = poll_write(sock, timeout);
- if (err < 0) {
- // printf("(test) poll write failed [%d '%s']\n", errno, strerror
(errno));
- goto error;
- } else if (err == 0) {
- // printf("(test) write timeout\n");
- goto error;
- }
- // Write the request to the server.
- while (length > 0) {
- do {
- err = write(sock, request, length);
- } while ((err < 0) && ((errno == EINTR) || (errno == EAGAIN)));
-
- if (err < 0) {
- // printf("(test) write failed [%d '%s']\n", errno, strerror
(errno));
- goto error;
- }
- length -= err;
- }
-
- /* everything went well */
- return TS_ERR_OKAY;
-
-error: /* "Houston, we have a problem!" (Apollo 13) */
- if (sock >= 0) {
- close_socket(sock);
- }
- return TS_ERR_NET_WRITE;
-}
-
-int
-connectDirect(const char *host, int port, uint64_t /* timeout ATS_UNUSED */)
-{
- int sock;
-
- // Create a socket
- do {
- sock = socket(AF_INET, SOCK_STREAM, 0);
- } while ((sock < 0) && ((errno == EINTR) || (errno == EAGAIN)));
-
- if (sock < 0) {
- // printf("(test) unable to create socket [%d '%s']\n", errno,
strerror(errno));
- goto error;
- }
-
- struct sockaddr_in name;
- memset((void *)&name, 0, sizeof(sockaddr_in));
-
- int err;
-
- // Put the socket in non-blocking mode...just to be extra careful
- // that we never block.
- do {
- err = fcntl(sock, F_SETFL, O_NONBLOCK);
- } while ((err < 0) && ((errno == EINTR) || (errno == EAGAIN)));
-
- if (err < 0) {
- // printf("(test) unable to put socket in non-blocking mode [%d
'%s']\n", errno, strerror (errno));
- goto error;
- }
- // Connect to the specified port on the machine we're running on.
- name.sin_family = AF_INET;
- name.sin_port = htons(port);
-
- struct hostent *pHostent;
- pHostent = gethostbyname(host);
- if (!pHostent) {
- goto error;
- }
- memcpy(reinterpret_cast<caddr_t>(&(name.sin_addr)), pHostent->h_addr,
pHostent->h_length);
-
- do {
- err = connect(sock, reinterpret_cast<struct sockaddr *>(&name),
sizeof(name));
- } while ((err < 0) && ((errno == EINTR) || (errno == EAGAIN)));
-
- if ((err < 0) && (errno != EINPROGRESS)) {
- // printf("(test) unable to connect to server [%d '%s'] at port
%d\n", errno, strerror (errno), port);
- goto error;
- }
- return sock;
-
-error:
- if (sock >= 0) {
- close_socket(sock);
- }
- return -1;
-} /* connectDirect */
-
-static int
-poll_read(int fd, int timeout)
-{
- struct pollfd info;
- int err;
-
- info.fd = fd;
- info.events = POLLIN;
- info.revents = 0;
-
- do {
- err = poll(&info, 1, timeout);
- } while ((err < 0) && ((errno == EINTR) || (errno == EAGAIN)));
-
- if ((err > 0) && (info.revents & POLLIN)) {
- return 1;
- }
-
- return err;
-}
-
-static int
-poll_write(int fd, int timeout)
-{
- struct pollfd info;
- int err;
-
- info.fd = fd;
- info.events = POLLOUT;
- info.revents = 0;
-
- do {
- err = poll(&info, 1, timeout);
- } while ((err < 0) && ((errno == EINTR) || (errno == EAGAIN)));
-
- if ((err > 0) && (info.revents & POLLOUT)) {
- return 1;
- }
-
- return err;
-}
diff --git a/mgmt/api/CoreAPIShared.h b/mgmt/api/CoreAPIShared.h
deleted file mode 100644
index a17a98d0e5..0000000000
--- a/mgmt/api/CoreAPIShared.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/** @file
-
- A brief file description
-
- @section license License
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-/*****************************************************************************
- * Filename: CoreAPIShared.h
- * Purpose: This file contains functions that are same for local and remote API
- * Created: 01/29/00
- * Created by: Lan Tran
- *
- *
- ***************************************************************************/
-
-#pragma once
-
-#include "mgmtapi.h"
-
-// used by TSReadFromUrl
-#define HTTP_DIVIDER "\r\n\r\n"
-#define URL_BUFSIZE 65536 // the max. length of URL obtainable (in bytes)
-#define URL_TIMEOUT 5000 // the timeout value for send/recv HTTP in ms
-#define HTTP_PORT 80
-#define BUFSIZE 1024
-
-// used by TSReadFromUrl
-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);
diff --git a/mgmt/api/INKMgmtAPI.cc b/mgmt/api/INKMgmtAPI.cc
deleted file mode 100644
index e38282898a..0000000000
--- a/mgmt/api/INKMgmtAPI.cc
+++ /dev/null
@@ -1,527 +0,0 @@
-/** @file
-
- A brief file description
-
- @section license License
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-/*****************************************************************************
- * Filename: InkMgmtAPI.cc
- * Purpose: This file implements all traffic server management functions.
- * Created: 9/11/00
- * Created by: Lan Tran
- *
- *
- ***************************************************************************/
-#include "tscore/ink_platform.h"
-#include "tscore/ink_memory.h"
-#include "tscore/ParseRules.h"
-#include <climits>
-#include "tscore/I_Layout.h"
-
-#include "mgmtapi.h"
-#include "CoreAPIShared.h"
-#include "tscore/ink_llqueue.h"
-
-#include "tscore/TextBuffer.h"
-
-/***************************************************************************
- * API Memory Management
- ***************************************************************************/
-void *
-_TSmalloc(size_t size, const char * /* path ATS_UNUSED */)
-{
- return ats_malloc(size);
-}
-
-void *
-_TSrealloc(void *ptr, size_t size, const char * /* path ATS_UNUSED */)
-{
- return ats_realloc(ptr, size);
-}
-
-char *
-_TSstrdup(const char *str, int64_t length, const char * /* path ATS_UNUSED */)
-{
- return ats_strndup(str, length);
-}
-
-void
-_TSfree(void *ptr)
-{
- ats_free(ptr);
-}
-
-/***************************************************************************
- * API Helper Functions for Data Carrier Structures
- ***************************************************************************/
-
-/*--- TSList operations -------------------------------------------------*/
-tsapi TSList
-TSListCreate(void)
-{
- return (void *)create_queue();
-}
-
-/* NOTE: The List must be EMPTY */
-tsapi void
-TSListDestroy(TSList l)
-{
- if (!l) {
- return;
- }
-
- delete_queue(static_cast<LLQ *>(l));
- return;
-}
-
-tsapi TSMgmtError
-TSListEnqueue(TSList l, void *data)
-{
- int ret;
-
- ink_assert(l && data);
- if (!l || !data) {
- return TS_ERR_PARAMS;
- }
-
- ret = enqueue(static_cast<LLQ *>(l), data); /* returns TRUE=1 or FALSE=0 */
- if (ret == 0) {
- return TS_ERR_FAIL;
- } else {
- return TS_ERR_OKAY;
- }
-}
-
-tsapi void *
-TSListDequeue(TSList l)
-{
- ink_assert(l);
- if (!l || queue_is_empty(static_cast<LLQ *>(l))) {
- return nullptr;
- }
-
- return dequeue(static_cast<LLQ *>(l));
-}
-
-tsapi bool
-TSListIsEmpty(TSList l)
-{
- ink_assert(l);
- if (!l) {
- return true; // list doesn't exist, so it's empty
- }
-
- return queue_is_empty(static_cast<LLQ *>(l));
-}
-
-tsapi int
-TSListLen(TSList l)
-{
- ink_assert(l);
- if (!l) {
- return -1;
- }
-
- return queue_len(static_cast<LLQ *>(l));
-}
-
-tsapi bool
-TSListIsValid(TSList l)
-{
- int i, len;
-
- if (!l) {
- return false;
- }
-
- len = queue_len(static_cast<LLQ *>(l));
- for (i = 0; i < len; i++) {
- void *ele = dequeue(static_cast<LLQ *>(l));
- if (!ele) {
- return false;
- }
- enqueue(static_cast<LLQ *>(l), ele);
- }
- return true;
-}
-
-/*--- TSStringList operations --------------------------------------*/
-tsapi TSStringList
-TSStringListCreate()
-{
- return (void *)create_queue(); /* this queue will be a list of char* */
-}
-
-/* usually, must be an empty list before destroying*/
-tsapi void
-TSStringListDestroy(TSStringList strl)
-{
- if (!strl) {
- return;
- }
-
- /* dequeue each element and free it */
- while (!queue_is_empty(static_cast<LLQ *>(strl))) {
- char *str = static_cast<char *>(dequeue(static_cast<LLQ *>(strl)));
- ats_free(str);
- }
-
- delete_queue(static_cast<LLQ *>(strl));
-}
-
-tsapi TSMgmtError
-TSStringListEnqueue(TSStringList strl, char *str)
-{
- int ret;
-
- ink_assert(strl && str);
- if (!strl || !str) {
- return TS_ERR_PARAMS;
- }
-
- ret = enqueue(static_cast<LLQ *>(strl), str); /* returns TRUE=1 or FALSE=0 */
- if (ret == 0) {
- return TS_ERR_FAIL;
- } else {
- return TS_ERR_OKAY;
- }
-}
-
-tsapi char *
-TSStringListDequeue(TSStringList strl)
-{
- ink_assert(strl);
- if (!strl || queue_is_empty(static_cast<LLQ *>(strl))) {
- return nullptr;
- }
-
- return static_cast<char *>(dequeue(static_cast<LLQ *>(strl)));
-}
-
-tsapi bool
-TSStringListIsEmpty(TSStringList strl)
-{
- ink_assert(strl);
- if (!strl) {
- return true;
- }
-
- return queue_is_empty(static_cast<LLQ *>(strl));
-}
-
-tsapi int
-TSStringListLen(TSStringList strl)
-{
- ink_assert(strl);
- if (!strl) {
- return -1;
- }
-
- return queue_len(static_cast<LLQ *>(strl));
-}
-
-// returns false if any element is NULL string
-tsapi bool
-TSStringListIsValid(TSStringList strl)
-{
- int i, len;
-
- if (!strl) {
- return false;
- }
-
- len = queue_len(static_cast<LLQ *>(strl));
- for (i = 0; i < len; i++) {
- char *str = static_cast<char *>(dequeue(static_cast<LLQ *>(strl)));
- if (!str) {
- return false;
- }
- enqueue(static_cast<LLQ *>(strl), str);
- }
- return true;
-}
-
-/*--- TSIntList operations --------------------------------------*/
-tsapi TSIntList
-TSIntListCreate()
-{
- return (void *)create_queue(); /* this queue will be a list of int* */
-}
-
-/* usually, must be an empty list before destroying*/
-tsapi void
-TSIntListDestroy(TSIntList intl)
-{
- if (!intl) {
- return;
- }
-
- /* dequeue each element and free it */
- while (!queue_is_empty(static_cast<LLQ *>(intl))) {
- int *iPtr = static_cast<int *>(dequeue(static_cast<LLQ *>(intl)));
- ats_free(iPtr);
- }
-
- delete_queue(static_cast<LLQ *>(intl));
- return;
-}
-
-tsapi TSMgmtError
-TSIntListEnqueue(TSIntList intl, int *elem)
-{
- int ret;
-
- ink_assert(intl && elem);
- if (!intl || !elem) {
- return TS_ERR_PARAMS;
- }
-
- ret = enqueue(static_cast<LLQ *>(intl), elem); /* returns TRUE=1 or FALSE=0
*/
- if (ret == 0) {
- return TS_ERR_FAIL;
- } else {
- return TS_ERR_OKAY;
- }
-}
-
-tsapi int *
-TSIntListDequeue(TSIntList intl)
-{
- ink_assert(intl);
- if (!intl || queue_is_empty(static_cast<LLQ *>(intl))) {
- return nullptr;
- }
-
- return static_cast<int *>(dequeue(static_cast<LLQ *>(intl)));
-}
-
-tsapi bool
-TSIntListIsEmpty(TSIntList intl)
-{
- ink_assert(intl);
- if (!intl) {
- return true;
- }
-
- return queue_is_empty(static_cast<LLQ *>(intl));
-}
-
-tsapi int
-TSIntListLen(TSIntList intl)
-{
- ink_assert(intl);
- if (!intl) {
- return -1;
- }
-
- return queue_len(static_cast<LLQ *>(intl));
-}
-
-tsapi bool
-TSIntListIsValid(TSIntList intl, int min, int max)
-{
- if (!intl) {
- return false;
- }
-
- for (unsigned long i = 0; i < queue_len(static_cast<LLQ *>(intl)); i++) {
- int *item = static_cast<int *>(dequeue(static_cast<LLQ *>(intl)));
- if (*item < min) {
- return false;
- }
- if (*item > max) {
- return false;
- }
- enqueue(static_cast<LLQ *>(intl), item);
- }
- return true;
-}
-
-/* NOTE: user must deallocate the memory for the string returned */
-char *
-TSGetErrorMessage(TSMgmtError err_id)
-{
- char msg[1024]; // need to define a MAX_ERR_MSG_SIZE???
- char *err_msg = nullptr;
-
- switch (err_id) {
- case TS_ERR_OKAY:
- snprintf(msg, sizeof(msg), "[%d] Everything's looking good.", err_id);
- break;
- case TS_ERR_READ_FILE: /* Error occur in reading file */
- snprintf(msg, sizeof(msg), "[%d] Unable to find/open file for reading.",
err_id);
- break;
- case TS_ERR_WRITE_FILE: /* Error occur in writing file */
- snprintf(msg, sizeof(msg), "[%d] Unable to find/open file for writing.",
err_id);
- break;
- case TS_ERR_PARSE_CONFIG_RULE: /* Error in parsing configuration file */
- snprintf(msg, sizeof(msg), "[%d] Error parsing configuration file.",
err_id);
- break;
- case TS_ERR_INVALID_CONFIG_RULE: /* Invalid Configuration Rule */
- snprintf(msg, sizeof(msg), "[%d] Invalid configuration rule reached.",
err_id);
- break;
- case TS_ERR_NET_ESTABLISH:
- snprintf(msg, sizeof(msg), "[%d] Error establishing socket connection.",
err_id);
- break;
- case TS_ERR_NET_READ: /* Error reading from socket */
- snprintf(msg, sizeof(msg), "[%d] Error reading from socket.", err_id);
- break;
- case TS_ERR_NET_WRITE: /* Error writing to socket */
- snprintf(msg, sizeof(msg), "[%d] Error writing to socket.", err_id);
- break;
- case TS_ERR_NET_EOF: /* Hit socket EOF */
- snprintf(msg, sizeof(msg), "[%d] Reached socket EOF.", err_id);
- break;
- case TS_ERR_NET_TIMEOUT: /* Timed out waiting for socket read */
- snprintf(msg, sizeof(msg), "[%d] Timed out waiting for socket read.",
err_id);
- break;
- case TS_ERR_SYS_CALL: /* Error in sys/utility call, eg.malloc */
- snprintf(msg, sizeof(msg), "[%d] Error in basic system/utility call.",
err_id);
- break;
- case TS_ERR_PARAMS: /* Invalid parameters for a fn */
- snprintf(msg, sizeof(msg), "[%d] Invalid parameters passed into function
call.", err_id);
- break;
- case TS_ERR_FAIL:
- snprintf(msg, sizeof(msg), "[%d] Generic Fail message (ie. CoreAPI
call).", err_id);
- break;
- case TS_ERR_NOT_SUPPORTED:
- snprintf(msg, sizeof(msg), "[%d] Operation not supported on this
platform.", err_id);
- break;
- case TS_ERR_PERMISSION_DENIED:
- snprintf(msg, sizeof(msg), "[%d] Operation not permitted.", err_id);
- break;
-
- default:
- snprintf(msg, sizeof(msg), "[%d] Invalid error type.", err_id);
- break;
- }
-
- err_msg = ats_strdup(msg);
- return err_msg;
-}
-
-/* ReadFromUrl: reads a remotely located config file into a buffer
- * Input: url - remote location of the file
- * header - a buffer is allocated on the header char* pointer
- * 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: 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
- * - http://www.example.com/products/network/
- * - http://www.example.com/
- * - http://www.example.com
- * - www.example.com
- * NOTE: header and headerSize can be NULL
- */
-tsapi TSMgmtError
-TSReadFromUrl(char *url, char **header, int *headerSize, char **body, int
*bodySize)
-{
- // return ReadFromUrl(url, header, headerSize, body, bodySize);
- return TSReadFromUrlEx(url, header, headerSize, body, bodySize, URL_TIMEOUT);
-}
-
-tsapi TSMgmtError
-TSReadFromUrlEx(const char *url, char **header, int *headerSize, char **body,
int *bodySize, int timeout)
-{
- int hFD = -1;
- char *httpHost = nullptr;
- char *httpPath = nullptr;
- int httpPort = HTTP_PORT;
- int bufsize = URL_BUFSIZE;
- char buffer[URL_BUFSIZE];
- char request[BUFSIZE];
- char *hdr_temp;
- char *bdy_temp;
- TSMgmtError status = TS_ERR_OKAY;
-
- // Sanity check
- if (!url) {
- return TS_ERR_FAIL;
- }
- if (timeout < 0) {
- timeout = URL_TIMEOUT;
- }
- // Chop the protocol part, if it exists
- const char *doubleSlash = strstr(url, "//");
- if (doubleSlash) {
- url = doubleSlash + 2; // advance two positions to get rid of leading '//'
- }
- // the path starts after the first occurrence of '/'
- const char *tempPath = strstr(url, "/");
- char *host_and_port;
- if (tempPath) {
- host_and_port = ats_strndup(url, strlen(url) - strlen(tempPath));
- tempPath += 1; // advance one position to get rid of leading '/'
- httpPath = ats_strdup(tempPath);
- } else {
- host_and_port = ats_strdup(url);
- httpPath = ats_strdup("");
- }
-
- // the port proceed by a ":", if it exists
- char *colon = strstr(host_and_port, ":");
- if (colon) {
- httpHost = ats_strndup(host_and_port, strlen(host_and_port) -
strlen(colon));
- colon += 1; // advance one position to get rid of leading ':'
- httpPort = ink_atoi(colon);
- if (httpPort <= 0) {
- httpPort = HTTP_PORT;
- }
- } else {
- httpHost = ats_strdup(host_and_port);
- }
- ats_free(host_and_port);
-
- hFD = connectDirect(httpHost, httpPort, timeout);
- if (hFD == -1) {
- status = TS_ERR_NET_ESTABLISH;
- goto END;
- }
-
- /* sending the HTTP request via the established socket */
- snprintf(request, BUFSIZE, "http://%s:%d/%s", httpHost, httpPort, httpPath);
- if ((status = sendHTTPRequest(hFD, request, static_cast<uint64_t>(timeout)))
!= TS_ERR_OKAY) {
- goto END;
- }
-
- memset(buffer, 0, bufsize); /* empty the buffer */
- if ((status = readHTTPResponse(hFD, buffer, bufsize,
static_cast<uint64_t>(timeout))) != TS_ERR_OKAY) {
- goto END;
- }
-
- if ((status = parseHTTPResponse(buffer, &hdr_temp, headerSize, &bdy_temp,
bodySize)) != TS_ERR_OKAY) {
- goto END;
- }
-
- if (header && headerSize) {
- *header = ats_strndup(hdr_temp, *headerSize);
- }
- *body = ats_strndup(bdy_temp, *bodySize);
-
-END:
- ats_free(httpHost);
- ats_free(httpPath);
-
- return status;
-}
diff --git a/mgmt/api/Makefile.am b/mgmt/api/Makefile.am
deleted file mode 100644
index 55b2b5d3f7..0000000000
--- a/mgmt/api/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# Makefile.am for the Enterprise Management module.
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-include $(top_srcdir)/mk/tidy.mk
-
-SUBDIRS = include
-
-AM_CPPFLAGS += \
- $(iocore_include_dirs) \
- -I$(abs_top_srcdir)/include \
- -I$(abs_top_srcdir)/lib \
- -I$(abs_top_srcdir)/mgmt \
- -I$(abs_top_srcdir)/mgmt/utils \
- -I$(abs_top_srcdir)/mgmt/api/include \
- @SWOC_INCLUDES@ \
- $(TS_INCLUDES) \
- $(LIBUNWIND_CFLAGS)
-
-noinst_LTLIBRARIES = libmgmtapi.la
-
-libmgmtapi_la_SOURCES = \
- CoreAPIShared.cc \
- CoreAPIShared.h \
- INKMgmtAPI.cc \
- include/mgmtapi.h
-
-clang-tidy-local: $(DIST_SOURCES)
- $(CXX_Clang_Tidy)
diff --git a/mgmt/api/include/Makefile.am b/mgmt/api/include/Makefile.am
deleted file mode 100644
index f57bc55ae9..0000000000
--- a/mgmt/api/include/Makefile.am
+++ /dev/null
@@ -1,22 +0,0 @@
-# mgmt/api/include Makefile.am
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-library_includedir=$(includedir)/ts
-
-library_include_HEADERS = \
- mgmtapi.h
diff --git a/mgmt/api/include/mgmtapi.h b/mgmt/api/include/mgmtapi.h
deleted file mode 100644
index d30cc518c8..0000000000
--- a/mgmt/api/include/mgmtapi.h
+++ /dev/null
@@ -1,343 +0,0 @@
-/** @file
-
- 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
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-#pragma once
-
-#include <cstdint>
-#include <cstddef>
-
-/***************************************************************************
- * System Specific Items
- ***************************************************************************/
-
-#define tsapi
-#define inkexp
-#define inkimp
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#ifndef TS_RES_MEM_PATH
-#define __TS_RES_PATH(x) #x
-#define _TS_RES_PATH(x) __TS_RES_PATH(x)
-#define TS_RES_PATH(x) x __FILE__ ":" _TS_RES_PATH(__LINE__)
-#define TS_RES_MEM_PATH TS_RES_PATH("memory/")
-#endif
-
-#define TM_OPT_BIND_STDOUT "bind_stdout"
-#define TM_OPT_BIND_STDERR "bind_stderr"
-
-/***************************************************************************
- * Error and Return Values
- ***************************************************************************/
-
-typedef enum {
- TS_ERR_OKAY = 0,
-
- TS_ERR_READ_FILE, /* Error occur in reading file */
- TS_ERR_WRITE_FILE, /* Error occur in writing file */
- TS_ERR_PARSE_CONFIG_RULE, /* Error in parsing configuration file */
- TS_ERR_INVALID_CONFIG_RULE, /* Invalid Configuration Rule */
-
- TS_ERR_NET_ESTABLISH, /* Problem in establishing a TCP socket */
- TS_ERR_NET_READ, /* Problem reading from socket */
- TS_ERR_NET_WRITE, /* Problem writing to socket */
- TS_ERR_NET_EOF, /* Hit socket EOF */
- TS_ERR_NET_TIMEOUT, /* Timed out while waiting for socket read */
-
- TS_ERR_SYS_CALL, /* Error in basic system call, eg. malloc */
- TS_ERR_PARAMS, /* Invalid parameters for a fn */
-
- TS_ERR_NOT_SUPPORTED, /* Operation not supported */
- TS_ERR_PERMISSION_DENIED, /* Operation not permitted */
-
- TS_ERR_FAIL
-} TSMgmtError;
-
-/***************************************************************************
- * Types
- ***************************************************************************/
-
-typedef int64_t TSInt;
-typedef int64_t TSCounter;
-typedef float TSFloat;
-typedef bool TSBool;
-typedef char *TSString;
-typedef char *TSIpAddr;
-
-typedef void *TSHandle;
-typedef TSHandle TSList;
-typedef TSHandle TSStringList; /* contains char* 's */
-typedef TSHandle TSIntList; /* contains int* 's */
-
-/*--- basic control operations --------------------------------------------*/
-
-typedef enum {
- TS_ACTION_SHUTDOWN, /* change requires user to stop then start the
Traffic Server */
- TS_ACTION_RESTART, /* change requires restart Traffic Server */
- TS_ACTION_DYNAMIC, /* change is already made in function call */
- TS_ACTION_RECONFIGURE, /* change requires TS to reread configuration files */
- TS_ACTION_UNDEFINED
-} TSActionNeedT;
-
-typedef enum {
- TS_PROXY_ON,
- TS_PROXY_OFF,
- TS_PROXY_UNDEFINED,
-} TSProxyStateT;
-
-/* used when starting Traffic Server process */
-typedef enum {
- TS_CACHE_CLEAR_NONE = 0, /* starts TS in regular mode w/o any
options */
- TS_CACHE_CLEAR_CACHE = (1 << 0), /* run TS in "clear cache" mode */
- TS_CACHE_CLEAR_HOSTDB = (1 << 1), /* run TS in "clear the host db cache"
mode */
-} TSCacheClearT;
-
-/*--- event operations ----------------------------------------------------*/
-typedef enum {
- TS_EVENT_PRIORITY_WARNING,
- TS_EVENT_PRIORITY_ERROR,
- TS_EVENT_PRIORITY_FATAL,
- TS_EVENT_PRIORITY_UNDEFINED
-} TSEventPriorityT;
-
-typedef enum {
- TS_REC_INT,
- TS_REC_COUNTER,
- TS_REC_FLOAT,
- TS_REC_STRING,
- TS_REC_UNDEFINED,
-} TSRecordT;
-
-/* These are initialization options for the Init() function. */
-typedef enum {
- TS_MGMT_OPT_DEFAULTS = 0,
- TS_MGMT_OPT_NO_EVENTS, /* No event callbacks and threads */
- TS_MGMT_OPT_NO_SOCK_TESTS /* No socket test thread */
-} TSInitOptionT;
-
-typedef enum {
- TS_RESTART_OPT_NONE = 0x0,
- TS_RESTART_OPT_DRAIN = 0x02, /* Wait for traffic to drain before restarting.
*/
-} TSRestartOptionT;
-
-typedef enum {
- TS_STOP_OPT_NONE = 0x0,
- TS_STOP_OPT_DRAIN, /* Wait for traffic to drain before stopping. */
-} TSStopOptionT;
-
-typedef enum {
- TS_DRAIN_OPT_NONE = 0x0,
- TS_DRAIN_OPT_IDLE, /* Wait for idle from new connections before draining. */
- TS_DRAIN_OPT_UNDO, /* Recover TS from drain mode */
-} TSDrainOptionT;
-
-/***************************************************************************
- * Structures
- ***************************************************************************/
-
-/*--- records -------------------------------------------------------------*/
-typedef union { /* record value */
- TSInt int_val;
- TSCounter counter_val;
- TSFloat float_val;
- TSString string_val;
-} TSRecordValueT;
-
-typedef struct {
- char *rec_name; /* record name */
- TSInt rec_class; /* record class (RecT) */
- TSRecordT rec_type; /* record type {TS_REC_INT...} */
- TSRecordValueT valueT; /* record value */
-} TSRecordEle;
-
-typedef struct {
- /* Common RecRecord fields ... */
- char *rec_name;
- TSRecordValueT rec_value;
- TSRecordValueT rec_default;
- TSRecordT rec_type; /* data type (RecDataT) */
- TSInt rec_class; /* data class (RecT) */
- TSInt rec_version;
- TSInt rec_rsb; /* Raw Stat Block ID */
- TSInt rec_order;
-
- /* RecConfigMeta fields ... */
- TSInt rec_access; /* access rights (RecAccessT) */
- TSInt rec_update; /* update_required bitmask */
- TSInt rec_updatetype; /* update type (RecUpdateT) */
- TSInt rec_checktype; /* syntax check type (RecCheckT) */
- TSInt rec_source; /* source of data */
- char *rec_checkexpr; /* syntax check expression */
-} TSConfigRecordDescription;
-
-/* Free (the contents of) a TSConfigRecordDescription */
-tsapi void TSConfigRecordDescriptionFree(TSConfigRecordDescription *val);
-
-/* Heap-allocate a TSConfigRecordDescription. */
-tsapi TSConfigRecordDescription *TSConfigRecordDescriptionCreate(void);
-/* Free and destroy a heap-allocated TSConfigRecordDescription. */
-tsapi void TSConfigRecordDescriptionDestroy(TSConfigRecordDescription *);
-
-/*--- events --------------------------------------------------------------*/
-
-/* Note: Each event has a format String associated with it from which the
- * description is constructed when an event is signalled. This format
- * string though can be retrieved from the event-mapping table which
- * is stored both locally and remotely.
- */
-
-typedef struct {
- int id;
- char *name; /* pre-set, immutable for PREDEFINED events */
- char *description; /* predefined events have default */
- TSEventPriorityT priority; /* WARNING, ERROR, FATAL */
-} TSMgmtEvent;
-
-/***************************************************************************
- * Function Types
- ***************************************************************************/
-typedef void (*TSEventSignalFunc)(char *name, char *msg, int pri, void *data);
-typedef void (*TSDisconnectFunc)(void *data);
-
-/***************************************************************************
- * API Memory Management
- ***************************************************************************/
-#define TSmalloc(s) _TSmalloc((s), TS_RES_MEM_PATH)
-#define TSrealloc(p, s) _TSrealloc((p), (s), TS_RES_MEM_PATH)
-#define TSstrdup(p) _TSstrdup((p), -1, TS_RES_MEM_PATH)
-#define TSstrndup(p, n) _TSstrdup((p), (n), TS_RES_MEM_PATH)
-#define TSfree(p) _TSfree(p)
-
-tsapi void *_TSmalloc(size_t size, const char *path);
-tsapi void *_TSrealloc(void *ptr, size_t size, const char *path);
-tsapi char *_TSstrdup(const char *str, int64_t length, const char *path);
-tsapi void _TSfree(void *ptr);
-
-/***************************************************************************
- * API Helper Functions for Data Carrier Structures
- ***************************************************************************/
-
-/*--- TSList operations --------------------------------------------------*/
-tsapi TSList TSListCreate();
-tsapi void TSListDestroy(TSList l); /* list must be empty */
-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 */
-tsapi bool TSListIsValid(TSList l);
-
-/*--- TSStringList operations --------------------------------------------*/
-tsapi TSStringList TSStringListCreate();
-tsapi void TSStringListDestroy(TSStringList strl);
-tsapi TSMgmtError TSStringListEnqueue(TSStringList strl, char *str);
-tsapi char *TSStringListDequeue(TSStringList strl);
-tsapi bool TSStringListIsEmpty(TSStringList strl);
-tsapi int TSStringListLen(TSStringList strl);
-tsapi bool TSStringListIsValid(TSStringList strl);
-
-/*--- TSIntList operations --------------------------------------------*/
-tsapi TSIntList TSIntListCreate();
-tsapi void TSIntListDestroy(TSIntList intl);
-tsapi TSMgmtError TSIntListEnqueue(TSIntList intl, int *str);
-tsapi int *TSIntListDequeue(TSIntList intl);
-tsapi bool TSIntListIsEmpty(TSIntList intl);
-tsapi int TSIntListLen(TSIntList intl);
-tsapi bool TSIntListIsValid(TSIntList intl, int min, int max);
-
-tsapi TSMgmtEvent *TSEventCreate();
-tsapi void TSEventDestroy(TSMgmtEvent *event);
-tsapi TSRecordEle *TSRecordEleCreate();
-tsapi void TSRecordEleDestroy(TSRecordEle *ele);
-
-/***************************************************************************
- * API Core
- ***************************************************************************/
-
-/*--- plugin initialization -----------------------------------------------*/
-/* TSPluginInit: called by traffic_manager to initialize the plugin
- * Input: argc - argument count
- * argv - argument array
- * Output: <none>
- */
-inkexp extern void TSPluginInit(int argc, const char *argv[]);
-
-/*--- network operations --------------------------------------------------*/
-/* UNIMPLEMENTED: used for remote clients on a different machine */
-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();
-
-/* TSGetErrorMessage: convert error id to error message
- * Input: error id (defined in TSMgmtError)
- * Output: corresponding error message (allocated memory)
- */
-char *TSGetErrorMessage(TSMgmtError error_id);
-
-/* TSReadFromUrl: reads a remotely located config file into a buffer
- * Input: url - remote location of the file
- * header - a buffer is allocated on the header char* pointer
- * 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: 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
- * - http://www.example.com/products/network/
- * - http://www.example.com/
- * - http://www.example.com
- * - www.example.com
- * NOTE: header and headerSize can be NULL
- */
-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
- * header - a buffer is allocated on the header char* pointer
- * 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
- * timeout - the max. connection timeout value before aborting.
- * 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
- * - http://www.example.com/products/network/
- * - http://www.example.com/
- * - http://www.example.com
- * - www.example.com
- * NOTE: header and headerSize can be NULL
- */
-tsapi TSMgmtError TSReadFromUrlEx(const char *url, char **header, int
*headerSize, char **body, int *bodySize, int timeout);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
diff --git a/mgmt/utils/Makefile.am b/mgmt/utils/Makefile.am
index 77b08c1651..5f5d504af6 100644
--- a/mgmt/utils/Makefile.am
+++ b/mgmt/utils/Makefile.am
@@ -20,8 +20,6 @@
AM_CPPFLAGS += \
-I$(abs_top_srcdir)/iocore/utils \
-I$(abs_top_srcdir)/mgmt \
- -I$(abs_top_srcdir)/mgmt/api \
- -I$(abs_top_srcdir)/mgmt/api/include \
-I$(abs_top_srcdir)/proxy \
-I$(abs_top_srcdir)/include \
-I$(abs_top_srcdir)/lib \
diff --git a/proxy/shared/Makefile.am b/proxy/shared/Makefile.am
index 82b2c24786..f4d153f4af 100644
--- a/proxy/shared/Makefile.am
+++ b/proxy/shared/Makefile.am
@@ -27,8 +27,6 @@ AM_CPPFLAGS += \
-I$(abs_top_srcdir)/include \
-I$(abs_top_srcdir)/lib \
-I$(abs_top_srcdir)/mgmt \
- -I$(abs_top_srcdir)/mgmt/api \
- -I$(abs_top_srcdir)/mgmt/api/include \
-I$(abs_top_srcdir)/mgmt/utils \
-I$(abs_top_srcdir)/proxy \
-I$(abs_top_srcdir)/proxy/http \
diff --git a/src/records/CMakeLists.txt b/src/records/CMakeLists.txt
index a414e60b0b..a833909460 100644
--- a/src/records/CMakeLists.txt
+++ b/src/records/CMakeLists.txt
@@ -38,7 +38,6 @@ target_include_directories(records_p
"${CMAKE_SOURCE_DIR}/iocore/eventsystem"
PRIVATE
"${CMAKE_SOURCE_DIR}/mgmt"
- "${CMAKE_SOURCE_DIR}/mgmt/api/include"
"${CMAKE_SOURCE_DIR}/mgmt/utils"
"${CMAKE_SOURCE_DIR}/iocore/utils"
)
diff --git a/src/traffic_crashlog/Makefile.inc
b/src/traffic_crashlog/Makefile.inc
index ceee194fc6..6fbf0b5416 100644
--- a/src/traffic_crashlog/Makefile.inc
+++ b/src/traffic_crashlog/Makefile.inc
@@ -24,7 +24,6 @@ traffic_crashlog_traffic_crashlog_CPPFLAGS = \
-I$(abs_top_srcdir)/lib \
-I$(abs_top_srcdir)/mgmt \
-I$(abs_top_srcdir)/mgmt/utils \
- -I$(abs_top_srcdir)/mgmt/api/include \
@SWOC_INCLUDES@ \
$(TS_INCLUDES)
diff --git a/src/traffic_via/Makefile.inc b/src/traffic_via/Makefile.inc
index fa75a84212..51a0997d08 100644
--- a/src/traffic_via/Makefile.inc
+++ b/src/traffic_via/Makefile.inc
@@ -23,7 +23,6 @@ traffic_via_traffic_via_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(iocore_include_dirs) \
-I$(abs_top_srcdir)/include \
- -I$(abs_top_srcdir)/mgmt/api/include \
$(TS_INCLUDES)
traffic_via_traffic_via_LDFLAGS = \