View | Details | Raw Unified | Return to bug 357
Collapse All | Expand All

(-)a/src/applications/packet-sink/packet-sink.cc (-1 / +1 lines)
 Lines 87-93    Link Here 
87
    {
87
    {
88
      m_socket = Socket::CreateSocket (GetNode(), m_tid);
88
      m_socket = Socket::CreateSocket (GetNode(), m_tid);
89
      m_socket->Bind (m_local);
89
      m_socket->Bind (m_local);
90
      m_socket->Listen (0);
90
      m_socket->Listen ();
91
    }
91
    }
92
92
93
  m_socket->SetRecvCallback (MakeCallback(&PacketSink::HandleRead, this));
93
  m_socket->SetRecvCallback (MakeCallback(&PacketSink::HandleRead, this));
(-)a/src/internet-stack/nsc-tcp-socket-impl.cc (-2 / +2 lines)
 Lines 395-403    Link Here 
395
}
395
}
396
396
397
int
397
int
398
NscTcpSocketImpl::Listen (uint32_t q)
398
NscTcpSocketImpl::Listen (void)
399
{
399
{
400
  NS_LOG_FUNCTION (this << q);
400
  NS_LOG_FUNCTION (this);
401
  m_nscTcpSocket->listen(m_localPort);
401
  m_nscTcpSocket->listen(m_localPort);
402
  m_state = LISTEN;
402
  m_state = LISTEN;
403
  return 0;
403
  return 0;
(-)a/src/internet-stack/nsc-tcp-socket-impl.h (-1 / +1 lines)
 Lines 73-79    Link Here 
73
  virtual int ShutdownSend (void);
73
  virtual int ShutdownSend (void);
74
  virtual int ShutdownRecv (void);
74
  virtual int ShutdownRecv (void);
75
  virtual int Connect(const Address &address);
75
  virtual int Connect(const Address &address);
76
  virtual int Listen(uint32_t queueLimit);
76
  virtual int Listen(void);
77
  virtual uint32_t GetTxAvailable (void) const;
77
  virtual uint32_t GetTxAvailable (void) const;
78
  virtual int Send (Ptr<Packet> p, uint32_t flags);
78
  virtual int Send (Ptr<Packet> p, uint32_t flags);
79
  virtual int SendTo(Ptr<Packet> p, uint32_t flags, const Address &toAddress);
79
  virtual int SendTo(Ptr<Packet> p, uint32_t flags, const Address &toAddress);
(-)a/src/internet-stack/tcp-socket-impl.cc (-3 / +3 lines)
 Lines 454-462    Link Here 
454
}
454
}
455
455
456
int
456
int
457
TcpSocketImpl::Listen (uint32_t q)
457
TcpSocketImpl::Listen (void)
458
{
458
{
459
  NS_LOG_FUNCTION (this << q);
459
  NS_LOG_FUNCTION (this);
460
  Actions_t action = ProcessEvent (APP_LISTEN);
460
  Actions_t action = ProcessEvent (APP_LISTEN);
461
  ProcessAction (action);
461
  ProcessAction (action);
462
  return 0;
462
  return 0;
 Lines 1915-1921    Link Here 
1915
  InetSocketAddress serverremoteaddr (Ipv4Address(ipaddr0), port);
1915
  InetSocketAddress serverremoteaddr (Ipv4Address(ipaddr0), port);
1916
1916
1917
  listeningSock->Bind(serverlocaladdr);
1917
  listeningSock->Bind(serverlocaladdr);
1918
  listeningSock->Listen (0);
1918
  listeningSock->Listen ();
1919
1919
1920
  sock1->Connect(serverremoteaddr);
1920
  sock1->Connect(serverremoteaddr);
1921
}
1921
}
(-)a/src/internet-stack/tcp-socket-impl.h (-1 / +1 lines)
 Lines 86-92    Link Here 
86
  virtual int ShutdownSend (void);
86
  virtual int ShutdownSend (void);
87
  virtual int ShutdownRecv (void);
87
  virtual int ShutdownRecv (void);
88
  virtual int Connect(const Address &address);
88
  virtual int Connect(const Address &address);
89
  virtual int Listen(uint32_t queueLimit);
89
  virtual int Listen(void);
90
  virtual uint32_t GetTxAvailable (void) const;
90
  virtual uint32_t GetTxAvailable (void) const;
91
  virtual int Send (Ptr<Packet> p, uint32_t flags);
91
  virtual int Send (Ptr<Packet> p, uint32_t flags);
92
  virtual int SendTo(Ptr<Packet> p, uint32_t flags, const Address &toAddress);
92
  virtual int SendTo(Ptr<Packet> p, uint32_t flags, const Address &toAddress);
(-)a/src/internet-stack/udp-socket-impl.cc (-1 / +1 lines)
 Lines 216-222    Link Here 
216
}
216
}
217
217
218
int 
218
int 
219
UdpSocketImpl::Listen (uint32_t queueLimit)
219
UdpSocketImpl::Listen (void)
220
{
220
{
221
  m_errno = Socket::ERROR_OPNOTSUPP;
221
  m_errno = Socket::ERROR_OPNOTSUPP;
222
  return -1;
222
  return -1;
(-)a/src/internet-stack/udp-socket-impl.h (-1 / +1 lines)
 Lines 65-71    Link Here 
65
  virtual int ShutdownSend (void);
65
  virtual int ShutdownSend (void);
66
  virtual int ShutdownRecv (void);
66
  virtual int ShutdownRecv (void);
67
  virtual int Connect(const Address &address);
67
  virtual int Connect(const Address &address);
68
  virtual int Listen (uint32_t queueLimit);
68
  virtual int Listen (void);
69
  virtual uint32_t GetTxAvailable (void) const;
69
  virtual uint32_t GetTxAvailable (void) const;
70
  virtual int Send (Ptr<Packet> p, uint32_t flags);
70
  virtual int Send (Ptr<Packet> p, uint32_t flags);
71
  virtual int SendTo (Ptr<Packet> p, uint32_t flags, const Address &address);
71
  virtual int SendTo (Ptr<Packet> p, uint32_t flags, const Address &address);
(-)a/src/node/packet-socket.cc (-1 / +1 lines)
 Lines 222-228    Link Here 
222
  return -1;
222
  return -1;
223
}
223
}
224
int 
224
int 
225
PacketSocket::Listen(uint32_t queueLimit)
225
PacketSocket::Listen(void)
226
{
226
{
227
  m_errno = Socket::ERROR_OPNOTSUPP;
227
  m_errno = Socket::ERROR_OPNOTSUPP;
228
  return -1;
228
  return -1;
(-)a/src/node/packet-socket.h (-1 / +1 lines)
 Lines 93-99    Link Here 
93
  virtual int ShutdownSend (void);
93
  virtual int ShutdownSend (void);
94
  virtual int ShutdownRecv (void);
94
  virtual int ShutdownRecv (void);
95
  virtual int Connect(const Address &address);
95
  virtual int Connect(const Address &address);
96
  virtual int Listen(uint32_t queueLimit);
96
  virtual int Listen(void);
97
  virtual uint32_t GetTxAvailable (void) const;
97
  virtual uint32_t GetTxAvailable (void) const;
98
  virtual int Send (Ptr<Packet> p, uint32_t flags);
98
  virtual int Send (Ptr<Packet> p, uint32_t flags);
99
  virtual int SendTo(Ptr<Packet> p, uint32_t flags, const Address &toAddress);
99
  virtual int SendTo(Ptr<Packet> p, uint32_t flags, const Address &toAddress);
(-)a/src/node/socket.cc (-6 lines)
 Lines 100-111    Link Here 
100
  return Send (p, 0);
100
  return Send (p, 0);
101
}
101
}
102
102
103
104
int Socket::Listen (uint32_t queueLimit)
105
{
106
  return 0; //XXX the base class version does nothing
107
}
108
109
int 
103
int 
110
Socket::Send (const uint8_t* buf, uint32_t size, uint32_t flags)
104
Socket::Send (const uint8_t* buf, uint32_t size, uint32_t flags)
111
{
105
{
(-)a/src/node/socket.h (-1 / +1 lines)
 Lines 222-228    Link Here 
222
   * \param queueLimit maximum number of incoming request to queue
222
   * \param queueLimit maximum number of incoming request to queue
223
   * \returns 0 on success, -1 on error (in which case errno is set).
223
   * \returns 0 on success, -1 on error (in which case errno is set).
224
   */
224
   */
225
  virtual int Listen (uint32_t queueLimit) = 0;
225
  virtual int Listen (void) = 0;
226
226
227
  /**
227
  /**
228
   * \brief Returns the number of bytes which can be sent in a single call
228
   * \brief Returns the number of bytes which can be sent in a single call

Return to bug 357