remove more dead code

This commit is contained in:
Tom Henderson
2008-04-28 21:54:48 -07:00
parent c6f7bb2d3e
commit af58cc3026
6 changed files with 6 additions and 58 deletions

View File

@@ -109,35 +109,22 @@ void PacketSink::HandleRead (Ptr<Socket> socket)
uint32_t flags = 0; // no flags
while (packet = socket->Recv (maxSize, flags))
{
NS_LOG_INFO ("Received " << packet->GetSize());
#if 0
// this code waits until we pass address as a Packet tag
SocketRxAddressTag tag;
bool found = packet->PeekTag (tag);
NS_ASSERT (found);
Address from = tag.GetAddress ();
packet->RemoveTag (tag);
if (InetSocketAddress::IsMatchingType (from))
{
address = InetSocketAddress::ConvertFrom (from);
InetSocketAddress address = InetSocketAddress::ConvertFrom (from);
NS_LOG_INFO ("Received " << packet->GetSize() << " bytes from " <<
address.GetIpv4() << " [" << address << "]---'" <<
packet->PeekData() << "'");
}
m_rxTrace (packet, from);
#endif
}
}
// This LOG output inspired by the application on Joseph Kopena's wiki
void PacketSink::Receive(Ptr<Socket> socket, Ptr<Packet> packet,
const Address &from)
{
if (InetSocketAddress::IsMatchingType (from))
{
InetSocketAddress address = InetSocketAddress::ConvertFrom (from);
NS_LOG_INFO ("Received " << packet->GetSize() << " bytes from " <<
address.GetIpv4() << " [" << address << "]---'" <<
packet->PeekData() << "'");
}
m_rxTrace (packet, from);
}
void PacketSink::CloseConnection (Ptr<Socket> socket)
{
socket->Close ();

View File

@@ -65,7 +65,6 @@ private:
virtual void StartApplication (void); // Called at time specified by Start
virtual void StopApplication (void); // Called at time specified by Stop
virtual void Receive (Ptr<Socket> socket, Ptr<Packet> packet, const Address& from);
virtual void HandleRead (Ptr<Socket> socket);
virtual void CloseConnection (Ptr<Socket> socket);

View File

@@ -170,21 +170,4 @@ UdpEchoClient::HandleRead (Ptr<Socket> socket)
}
}
void
UdpEchoClient::Receive(
Ptr<Socket> socket,
Ptr<Packet> packet,
const Address &from)
{
NS_LOG_FUNCTION (this << socket << packet << from);
if (InetSocketAddress::IsMatchingType (from))
{
InetSocketAddress address = InetSocketAddress::ConvertFrom (from);
NS_LOG_INFO ("Received " << packet->GetSize() << " bytes from " <<
address.GetIpv4());
}
}
} // Namespace ns3

View File

@@ -56,7 +56,6 @@ private:
void ScheduleTransmit (Time dt);
void Send (void);
void Receive(Ptr<Socket> socket, Ptr<Packet> packet, const Address &from);
void HandleRead (Ptr<Socket> socket);
uint32_t m_count;

View File

@@ -118,23 +118,4 @@ UdpEchoServer::HandleRead (Ptr<Socket> socket)
}
}
void
UdpEchoServer::Receive(
Ptr<Socket> socket,
Ptr<Packet> packet,
const Address &from)
{
NS_LOG_FUNCTION (this << socket << packet << from);
if (InetSocketAddress::IsMatchingType (from))
{
InetSocketAddress address = InetSocketAddress::ConvertFrom (from);
NS_LOG_INFO ("Received " << packet->GetSize() << " bytes from " <<
address.GetIpv4());
NS_LOG_LOGIC ("Echoing packet");
socket->SendTo (from, packet);
}
}
} // Namespace ns3

View File

@@ -49,7 +49,6 @@ private:
virtual void StartApplication (void);
virtual void StopApplication (void);
void Receive(Ptr<Socket> socket, Ptr<Packet> packet, const Address &from);
void HandleRead (Ptr<Socket> socket);
uint16_t m_port;