This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 0e771ed69f1fd97ff56a2532e379b0a94383405b
Author: Walt Karas <[email protected]>
AuthorDate: Mon Mar 25 18:40:35 2024 -0400

    Remove symbols with prefix INKUDP from plugin API. (#11171)
    
    (cherry picked from commit 389fd2da570e3532464a9eaaaeb78247205abaf8)
---
 doc/release-notes/whats-new.en.rst |   5 ++
 include/iocore/eventsystem/Event.h |  18 ++---
 include/ts/InkAPIPrivateIOCore.h   |  61 -----------------
 src/api/InkIOCoreAPI.cc            | 132 -------------------------------------
 4 files changed, 14 insertions(+), 202 deletions(-)

diff --git a/doc/release-notes/whats-new.en.rst 
b/doc/release-notes/whats-new.en.rst
index 688e4016bf..ddaa869acc 100644
--- a/doc/release-notes/whats-new.en.rst
+++ b/doc/release-notes/whats-new.en.rst
@@ -59,3 +59,8 @@ C++ Plugin API Deprecated
 ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 It is deprecated in this release.  It will be deleted in ATS 11.
+
+Symbols With INKUDP Prefix
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+In the plugin API, all types and functions starting with the prefix INKUDP are 
removed.
diff --git a/include/iocore/eventsystem/Event.h 
b/include/iocore/eventsystem/Event.h
index 17522e9168..0d2b25e652 100644
--- a/include/iocore/eventsystem/Event.h
+++ b/include/iocore/eventsystem/Event.h
@@ -78,15 +78,15 @@
 #define QPACK_EVENT_EVENTS_START                2700
 #define NT_ASYNC_CONNECT_EVENT_EVENTS_START     3000
 #define NT_ASYNC_IO_EVENT_EVENTS_START          3100
-#define RAFT_EVENT_EVENTS_START                 3200
-#define SIMPLE_EVENT_EVENTS_START               3300
-#define UPDATE_EVENT_EVENTS_START               3500
-#define AIO_EVENT_EVENTS_START                  3900
-#define BLOCK_CACHE_EVENT_EVENTS_START          4000
-#define UTILS_EVENT_EVENTS_START                5000
-#define INK_API_EVENT_EVENTS_START              60000
-#define SRV_EVENT_EVENTS_START                  62000
-#define REMAP_EVENT_EVENTS_START                63000
+// #define RAFT_EVENT_EVENTS_START                 3200 Not currently used
+#define SIMPLE_EVENT_EVENTS_START      3300
+#define UPDATE_EVENT_EVENTS_START      3500
+#define AIO_EVENT_EVENTS_START         3900
+#define BLOCK_CACHE_EVENT_EVENTS_START 4000
+#define UTILS_EVENT_EVENTS_START       5000
+#define INK_API_EVENT_EVENTS_START     60000
+#define SRV_EVENT_EVENTS_START         62000
+#define REMAP_EVENT_EVENTS_START       63000
 
 // define misc events here
 #define ONE_WAY_TUNNEL_EVENT_PEER_CLOSE (SIMPLE_EVENT_EVENTS_START + 1)
diff --git a/include/ts/InkAPIPrivateIOCore.h b/include/ts/InkAPIPrivateIOCore.h
index 33007904e7..ffebaf32c0 100644
--- a/include/ts/InkAPIPrivateIOCore.h
+++ b/include/ts/InkAPIPrivateIOCore.h
@@ -129,64 +129,3 @@ int TSMutexCheck(TSMutex mutex);
 /* IOBuffer */
 int64_t TSIOBufferBlockDataSizeGet(TSIOBufferBlock blockp);
 void TSIOBufferBlockDestroy(TSIOBufferBlock blockp);
-using INKUDPPacket     = void *;
-using INKUDPacketQueue = void *;
-using INKUDPConn       = void *;
-/* ===== UDP Connections ===== */
-/****************************************************************************
- *  contact: OXYGEN
- ****************************************************************************/
-TSAction INKUDPBind(TSCont contp, unsigned int ip, int port);
-
-/****************************************************************************
- *  contact: OXYGEN
- ****************************************************************************/
-TSAction INKUDPSendTo(TSCont contp, INKUDPConn udp, unsigned int ip, int port, 
char *buf, int len);
-
-/****************************************************************************
- *  contact: OXYGEN
- ****************************************************************************/
-TSAction INKUDPRecvFrom(TSCont contp, INKUDPConn udp);
-
-/****************************************************************************
- *  Return file descriptor.
- *  contact: OXYGEN
- ****************************************************************************/
-int INKUDPConnFdGet(INKUDPConn udp);
-
-/* ===== UDP Packet ===== */
-/****************************************************************************
- *  contact: OXYGEN
- ****************************************************************************/
-INKUDPPacket INKUDPPacketCreate();
-
-/****************************************************************************
- *  contact: OXYGEN
- ****************************************************************************/
-TSIOBufferBlock INKUDPPacketBufferBlockGet(INKUDPPacket packet);
-
-/****************************************************************************
- *  contact: OXYGEN
- ****************************************************************************/
-unsigned int INKUDPPacketFromAddressGet(INKUDPPacket packet);
-
-/****************************************************************************
- *  contact: OXYGEN
- ****************************************************************************/
-int INKUDPPacketFromPortGet(INKUDPPacket packet);
-
-/****************************************************************************
- *  contact: OXYGEN
- ****************************************************************************/
-INKUDPConn INKUDPPacketConnGet(INKUDPPacket packet);
-
-/****************************************************************************
- *  contact: OXYGEN
- ****************************************************************************/
-void INKUDPPacketDestroy(INKUDPPacket packet);
-
-/* ===== Packet Queue ===== */
-/****************************************************************************
- *  contact: OXYGEN
- ****************************************************************************/
-INKUDPPacket INKUDPPacketGet(INKUDPacketQueue queuep);
diff --git a/src/api/InkIOCoreAPI.cc b/src/api/InkIOCoreAPI.cc
index 1d1bee73c1..15eef807d6 100644
--- a/src/api/InkIOCoreAPI.cc
+++ b/src/api/InkIOCoreAPI.cc
@@ -422,138 +422,6 @@ INKBasedTimeGet()
   return ink_get_hrtime();
 }
 
-/* UDP Connection Interface */
-
-TSAction
-INKUDPBind(TSCont contp, unsigned int ip, int port)
-{
-  sdk_assert(sdk_sanity_check_continuation(contp) == TS_SUCCESS);
-
-  FORCE_PLUGIN_SCOPED_MUTEX(contp);
-
-  struct sockaddr_in addr;
-  ats_ip4_set(&addr, ip, htons(port));
-
-  return reinterpret_cast<TSAction>(
-    udpNet.UDPBind((Continuation *)contp, ats_ip_sa_cast(&addr), -1, 
INK_ETHERNET_MTU_SIZE, INK_ETHERNET_MTU_SIZE));
-}
-
-TSAction
-INKUDPSendTo(TSCont contp, INKUDPConn udp, unsigned int ip, int port, char 
*data, int64_t len)
-{
-  sdk_assert(sdk_sanity_check_continuation(contp) == TS_SUCCESS);
-
-  FORCE_PLUGIN_SCOPED_MUTEX(contp);
-  UDPPacket *packet   = UDPPacket::new_UDPPacket();
-  UDPConnection *conn = (UDPConnection *)udp;
-
-  ats_ip4_set(&packet->to, ip, htons(port));
-
-  IOBufferBlock *blockp = new_IOBufferBlock();
-  blockp->alloc(BUFFER_SIZE_INDEX_32K);
-
-  if (len > index_to_buffer_size(BUFFER_SIZE_INDEX_32K)) {
-    len = index_to_buffer_size(BUFFER_SIZE_INDEX_32K) - 1;
-  }
-
-  memcpy(blockp->start(), data, len);
-  blockp->fill(len);
-
-  packet->append_block((IOBufferBlock *)blockp);
-  /* (Jinsheng 11/27/00) set connection twice which causes:
-     FATAL: ../../../proxy/iocore/UDPPacket.h:136:
-     failed assert `!m_conn` */
-
-  /* packet->setConnection ((UDPConnection *)udp); */
-  return reinterpret_cast<TSAction>(conn->send((Continuation *)contp, packet));
-}
-
-TSAction
-INKUDPRecvFrom(TSCont contp, INKUDPConn udp)
-{
-  sdk_assert(sdk_sanity_check_continuation(contp) == TS_SUCCESS);
-
-  FORCE_PLUGIN_SCOPED_MUTEX(contp);
-  UDPConnection *conn = (UDPConnection *)udp;
-  return reinterpret_cast<TSAction>(conn->recv((Continuation *)contp));
-}
-
-int
-INKUDPConnFdGet(INKUDPConn udp)
-{
-  UDPConnection *conn = (UDPConnection *)udp;
-  return conn->getFd();
-}
-
-/* UDP Packet */
-INKUDPPacket
-INKUDPPacketCreate()
-{
-  UDPPacket *packet = UDPPacket::new_UDPPacket();
-  return ((INKUDPPacket)packet);
-}
-
-TSIOBufferBlock
-INKUDPPacketBufferBlockGet(INKUDPPacket packet)
-{
-  sdk_assert(sdk_sanity_check_null_ptr((void *)packet) == TS_SUCCESS);
-
-  UDPPacket *p = (UDPPacket *)packet;
-  return ((TSIOBufferBlock)p->getIOBlockChain());
-}
-
-unsigned int
-INKUDPPacketFromAddressGet(INKUDPPacket packet)
-{
-  sdk_assert(sdk_sanity_check_null_ptr((void *)packet) == TS_SUCCESS);
-
-  UDPPacket *p = (UDPPacket *)packet;
-  return ats_ip4_addr_cast(&p->from);
-}
-
-int
-INKUDPPacketFromPortGet(INKUDPPacket packet)
-{
-  sdk_assert(sdk_sanity_check_null_ptr((void *)packet) == TS_SUCCESS);
-
-  UDPPacket *p = (UDPPacket *)packet;
-  return ats_ip_port_host_order(&p->from);
-}
-
-INKUDPConn
-INKUDPPacketConnGet(INKUDPPacket packet)
-{
-  sdk_assert(sdk_sanity_check_null_ptr((void *)packet) == TS_SUCCESS);
-
-  UDPPacket *p = (UDPPacket *)packet;
-  return ((INKUDPConn)p->getConnection());
-}
-
-void
-INKUDPPacketDestroy(INKUDPPacket packet)
-{
-  sdk_assert(sdk_sanity_check_null_ptr((void *)packet) == TS_SUCCESS);
-
-  UDPPacket *p = (UDPPacket *)packet;
-  p->free();
-}
-
-/* Packet Queue */
-
-INKUDPPacket
-INKUDPPacketGet(INKUDPacketQueue queuep)
-{
-  if (queuep != nullptr) {
-    UDPPacket *packet;
-    Queue<UDPPacket> *qp = (Queue<UDPPacket> *)queuep;
-
-    packet = qp->pop();
-    return (packet);
-  }
-
-  return nullptr;
-}
-
 /* Buffers */
 
 TSIOBuffer

Reply via email to