You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by sc...@apache.org on 2019/11/15 07:27:15 UTC

[trafficserver] branch master updated: Remove unimplement UDP function

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

scw00 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 e93da34  Remove unimplement UDP function
e93da34 is described below

commit e93da34cb76c4a4c6b826ea9c257e6ca0eba094a
Author: scw00 <sc...@apache.org>
AuthorDate: Fri Nov 15 14:46:51 2019 +0800

    Remove unimplement UDP function
---
 iocore/net/P_UDPPacket.h | 69 ------------------------------------------------
 1 file changed, 69 deletions(-)

diff --git a/iocore/net/P_UDPPacket.h b/iocore/net/P_UDPPacket.h
index d6473aa..a9f015b 100644
--- a/iocore/net/P_UDPPacket.h
+++ b/iocore/net/P_UDPPacket.h
@@ -38,8 +38,6 @@ public:
   UDPPacketInternal();
   ~UDPPacketInternal() override;
 
-  void append_block_internal(IOBufferBlock *block);
-
   void free() override;
 
   SLINK(UDPPacketInternal, alink); // atomic link
@@ -164,47 +162,6 @@ UDPPacket::getConnection()
 }
 
 TS_INLINE UDPPacket *
-new_UDPPacket(struct sockaddr const *to, ink_hrtime when, char *buf, int len)
-{
-  UDPPacketInternal *p = udpPacketAllocator.alloc();
-
-  p->in_the_priority_queue = 0;
-  p->in_heap               = 0;
-  p->delivery_time         = when;
-  ats_ip_copy(&p->to, to);
-
-  if (buf) {
-    IOBufferBlock *body = new_IOBufferBlock();
-    body->alloc(iobuffer_size_to_index(len));
-    memcpy(body->end(), buf, len);
-    body->fill(len);
-    p->append_block(body);
-  }
-
-  return p;
-}
-
-TS_INLINE UDPPacket *
-new_UDPPacket(struct sockaddr const *to, ink_hrtime when, IOBufferBlock *buf, int len)
-{
-  (void)len;
-  UDPPacketInternal *p = udpPacketAllocator.alloc();
-
-  p->in_the_priority_queue = 0;
-  p->in_heap               = 0;
-  p->delivery_time         = when;
-  ats_ip_copy(&p->to, to);
-
-  while (buf) {
-    IOBufferBlock *body = buf->clone();
-    p->append_block(body);
-    buf = buf->next.get();
-  }
-
-  return p;
-}
-
-TS_INLINE UDPPacket *
 new_UDPPacket(struct sockaddr const *to, ink_hrtime when, Ptr<IOBufferBlock> &buf)
 {
   UDPPacketInternal *p = udpPacketAllocator.alloc();
@@ -219,32 +176,6 @@ new_UDPPacket(struct sockaddr const *to, ink_hrtime when, Ptr<IOBufferBlock> &bu
 }
 
 TS_INLINE UDPPacket *
-new_UDPPacket(ink_hrtime when, Ptr<IOBufferBlock> buf)
-{
-  return new_UDPPacket(nullptr, when, buf);
-}
-
-TS_INLINE UDPPacket *
-new_incoming_UDPPacket(struct sockaddr *from, struct sockaddr *to, char *buf, int len)
-{
-  UDPPacketInternal *p = udpPacketAllocator.alloc();
-
-  p->in_the_priority_queue = 0;
-  p->in_heap               = 0;
-  p->delivery_time         = 0;
-  ats_ip_copy(&p->from, from);
-  ats_ip_copy(&p->to, to);
-
-  IOBufferBlock *body = new_IOBufferBlock();
-  body->alloc(iobuffer_size_to_index(len));
-  memcpy(body->end(), buf, len);
-  body->fill(len);
-  p->append_block(body);
-
-  return p;
-}
-
-TS_INLINE UDPPacket *
 new_incoming_UDPPacket(struct sockaddr *from, struct sockaddr *to, Ptr<IOBufferBlock> &block)
 {
   UDPPacketInternal *p = udpPacketAllocator.alloc();