Remove queue limit from listen
authorCraig Dowell <craigdo@ee.washington.edu>
Thu, 23 Oct 2008 10:48:42 -0700
changeset 3772 f0d8608ab155
parent 3771 21f40ccb03b3
child 3773 dab0c18b39a0
Remove queue limit from listen
src/applications/packet-sink/packet-sink.cc
src/internet-stack/nsc-tcp-socket-impl.cc
src/internet-stack/nsc-tcp-socket-impl.h
src/internet-stack/tcp-socket-impl.cc
src/internet-stack/tcp-socket-impl.h
src/internet-stack/udp-socket-impl.cc
src/internet-stack/udp-socket-impl.h
src/node/packet-socket.cc
src/node/packet-socket.h
src/node/socket.cc
src/node/socket.h
--- a/src/applications/packet-sink/packet-sink.cc	Wed Oct 22 22:13:22 2008 -0700
+++ b/src/applications/packet-sink/packet-sink.cc	Thu Oct 23 10:48:42 2008 -0700
@@ -87,7 +87,7 @@
     {
       m_socket = Socket::CreateSocket (GetNode(), m_tid);
       m_socket->Bind (m_local);
-      m_socket->Listen (0);
+      m_socket->Listen ();
     }
 
   m_socket->SetRecvCallback (MakeCallback(&PacketSink::HandleRead, this));
--- a/src/internet-stack/nsc-tcp-socket-impl.cc	Wed Oct 22 22:13:22 2008 -0700
+++ b/src/internet-stack/nsc-tcp-socket-impl.cc	Thu Oct 23 10:48:42 2008 -0700
@@ -395,9 +395,9 @@
 }
 
 int
-NscTcpSocketImpl::Listen (uint32_t q)
+NscTcpSocketImpl::Listen (void)
 {
-  NS_LOG_FUNCTION (this << q);
+  NS_LOG_FUNCTION (this);
   m_nscTcpSocket->listen(m_localPort);
   m_state = LISTEN;
   return 0;
--- a/src/internet-stack/nsc-tcp-socket-impl.h	Wed Oct 22 22:13:22 2008 -0700
+++ b/src/internet-stack/nsc-tcp-socket-impl.h	Thu Oct 23 10:48:42 2008 -0700
@@ -73,7 +73,7 @@
   virtual int ShutdownSend (void);
   virtual int ShutdownRecv (void);
   virtual int Connect(const Address &address);
-  virtual int Listen(uint32_t queueLimit);
+  virtual int Listen(void);
   virtual uint32_t GetTxAvailable (void) const;
   virtual int Send (Ptr<Packet> p, uint32_t flags);
   virtual int SendTo(Ptr<Packet> p, uint32_t flags, const Address &toAddress);
--- a/src/internet-stack/tcp-socket-impl.cc	Wed Oct 22 22:13:22 2008 -0700
+++ b/src/internet-stack/tcp-socket-impl.cc	Thu Oct 23 10:48:42 2008 -0700
@@ -454,9 +454,9 @@
 }
 
 int
-TcpSocketImpl::Listen (uint32_t q)
+TcpSocketImpl::Listen (void)
 {
-  NS_LOG_FUNCTION (this << q);
+  NS_LOG_FUNCTION (this);
   Actions_t action = ProcessEvent (APP_LISTEN);
   ProcessAction (action);
   return 0;
@@ -1915,7 +1915,7 @@
   InetSocketAddress serverremoteaddr (Ipv4Address(ipaddr0), port);
 
   listeningSock->Bind(serverlocaladdr);
-  listeningSock->Listen (0);
+  listeningSock->Listen ();
 
   sock1->Connect(serverremoteaddr);
 }
--- a/src/internet-stack/tcp-socket-impl.h	Wed Oct 22 22:13:22 2008 -0700
+++ b/src/internet-stack/tcp-socket-impl.h	Thu Oct 23 10:48:42 2008 -0700
@@ -86,7 +86,7 @@
   virtual int ShutdownSend (void);
   virtual int ShutdownRecv (void);
   virtual int Connect(const Address &address);
-  virtual int Listen(uint32_t queueLimit);
+  virtual int Listen(void);
   virtual uint32_t GetTxAvailable (void) const;
   virtual int Send (Ptr<Packet> p, uint32_t flags);
   virtual int SendTo(Ptr<Packet> p, uint32_t flags, const Address &toAddress);
--- a/src/internet-stack/udp-socket-impl.cc	Wed Oct 22 22:13:22 2008 -0700
+++ b/src/internet-stack/udp-socket-impl.cc	Thu Oct 23 10:48:42 2008 -0700
@@ -216,7 +216,7 @@
 }
 
 int 
-UdpSocketImpl::Listen (uint32_t queueLimit)
+UdpSocketImpl::Listen (void)
 {
   m_errno = Socket::ERROR_OPNOTSUPP;
   return -1;
--- a/src/internet-stack/udp-socket-impl.h	Wed Oct 22 22:13:22 2008 -0700
+++ b/src/internet-stack/udp-socket-impl.h	Thu Oct 23 10:48:42 2008 -0700
@@ -65,7 +65,7 @@
   virtual int ShutdownSend (void);
   virtual int ShutdownRecv (void);
   virtual int Connect(const Address &address);
-  virtual int Listen (uint32_t queueLimit);
+  virtual int Listen (void);
   virtual uint32_t GetTxAvailable (void) const;
   virtual int Send (Ptr<Packet> p, uint32_t flags);
   virtual int SendTo (Ptr<Packet> p, uint32_t flags, const Address &address);
--- a/src/node/packet-socket.cc	Wed Oct 22 22:13:22 2008 -0700
+++ b/src/node/packet-socket.cc	Thu Oct 23 10:48:42 2008 -0700
@@ -222,7 +222,7 @@
   return -1;
 }
 int 
-PacketSocket::Listen(uint32_t queueLimit)
+PacketSocket::Listen(void)
 {
   m_errno = Socket::ERROR_OPNOTSUPP;
   return -1;
--- a/src/node/packet-socket.h	Wed Oct 22 22:13:22 2008 -0700
+++ b/src/node/packet-socket.h	Thu Oct 23 10:48:42 2008 -0700
@@ -93,7 +93,7 @@
   virtual int ShutdownSend (void);
   virtual int ShutdownRecv (void);
   virtual int Connect(const Address &address);
-  virtual int Listen(uint32_t queueLimit);
+  virtual int Listen(void);
   virtual uint32_t GetTxAvailable (void) const;
   virtual int Send (Ptr<Packet> p, uint32_t flags);
   virtual int SendTo(Ptr<Packet> p, uint32_t flags, const Address &toAddress);
--- a/src/node/socket.cc	Wed Oct 22 22:13:22 2008 -0700
+++ b/src/node/socket.cc	Thu Oct 23 10:48:42 2008 -0700
@@ -100,12 +100,6 @@
   return Send (p, 0);
 }
 
-
-int Socket::Listen (uint32_t queueLimit)
-{
-  return 0; //XXX the base class version does nothing
-}
-
 int 
 Socket::Send (const uint8_t* buf, uint32_t size, uint32_t flags)
 {
--- a/src/node/socket.h	Wed Oct 22 22:13:22 2008 -0700
+++ b/src/node/socket.h	Thu Oct 23 10:48:42 2008 -0700
@@ -222,7 +222,7 @@
    * \param queueLimit maximum number of incoming request to queue
    * \returns 0 on success, -1 on error (in which case errno is set).
    */
-  virtual int Listen (uint32_t queueLimit) = 0;
+  virtual int Listen (void) = 0;
 
   /**
    * \brief Returns the number of bytes which can be sent in a single call