remove dead code.

This commit is contained in:
Mathieu Lacage committed 2008-03-17 14:49:52 -07:00
1 parent a0a7c6d88c
commit 6b9fc231e1
32 files changed
+193 -855

No files matched your search

+13 -27
View File
@@ -25,30 +25,8 @@
namespace ns3 {
NS_HEADER_ENSURE_REGISTERED (ArpHeader);
NS_OBJECT_ENSURE_REGISTERED (ArpHeader);
TypeId
ArpHeader::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::ArpHeader")
.SetParent<Header> ()
;
return tid;
}
TypeId
ArpHeader::GetInstanceTypeId (void) const
{
return GetTypeId ();
}
uint32_t
ArpHeader::GetUid (void)
{
static uint32_t uid = AllocateUid<ArpHeader> ("ArpHeader.ns3");
return uid;
}
void
ArpHeader::SetRequest (Address sourceHardwareAddress,
Ipv4Address sourceProtocolAddress,
@@ -104,12 +82,20 @@ ArpHeader::GetDestinationIpv4Address (void)
return m_ipv4Dest;
}
std::string
ArpHeader::GetName (void) const
{
return "ARP";
}
TypeId
ArpHeader::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::ArpHeader")
.SetParent<Header> ()
;
return tid;
}
TypeId
ArpHeader::GetInstanceTypeId (void) const
{
return GetTypeId ();
}
void
ArpHeader::Print (std::ostream &os) const
{
+6 -9
View File
@@ -34,10 +34,6 @@ namespace ns3 {
class ArpHeader : public Header
{
public:
static TypeId GetTypeId (void);
virtual TypeId GetInstanceTypeId (void) const;
static uint32_t GetUid (void);
void SetRequest (Address sourceHardwareAddress,
Ipv4Address sourceProtocolAddress,
Address destinationHardwareAddress,
@@ -53,11 +49,12 @@ public:
Ipv4Address GetSourceIpv4Address (void);
Ipv4Address GetDestinationIpv4Address (void);
std::string GetName (void) const;
void Print (std::ostream &os) const;
uint32_t GetSerializedSize (void) const;
void Serialize (Buffer::Iterator start) const;
uint32_t Deserialize (Buffer::Iterator start);
static TypeId GetTypeId (void);
virtual TypeId GetInstanceTypeId (void) const;
virtual void Print (std::ostream &os) const;
virtual uint32_t GetSerializedSize (void) const;
virtual void Serialize (Buffer::Iterator start) const;
virtual uint32_t Deserialize (Buffer::Iterator start);
enum ArpType_e {
ARP_TYPE_REQUEST = 1,
+13 -27
View File
@@ -28,32 +28,10 @@ NS_LOG_COMPONENT_DEFINE ("Ipv4Header");
namespace ns3 {
NS_HEADER_ENSURE_REGISTERED (Ipv4Header);
NS_OBJECT_ENSURE_REGISTERED (Ipv4Header);
bool Ipv4Header::m_calcChecksum = false;
TypeId
Ipv4Header::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::Ipv4Header")
.SetParent<Header> ()
;
return tid;
}
TypeId
Ipv4Header::GetInstanceTypeId (void) const
{
return GetTypeId ();
}
uint32_t
Ipv4Header::GetUid (void)
{
static uint32_t uid = AllocateUid<Ipv4Header> ("Ipv4Header.ns3");
return uid;
}
Ipv4Header::Ipv4Header ()
: m_payloadSize (0),
m_identification (0),
@@ -201,12 +179,20 @@ Ipv4Header::IsChecksumOk (void) const
return m_goodChecksum;
}
std::string
Ipv4Header::GetName (void) const
{
return "IPV4";
}
TypeId
Ipv4Header::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::Ipv4Header")
.SetParent<Header> ()
;
return tid;
}
TypeId
Ipv4Header::GetInstanceTypeId (void) const
{
return GetTypeId ();
}
void
Ipv4Header::Print (std::ostream &os) const
{
+3 -5
View File
@@ -32,9 +32,6 @@ namespace ns3 {
class Ipv4Header : public Header
{
public:
static TypeId GetTypeId (void);
virtual TypeId GetInstanceTypeId (void) const;
static uint32_t GetUid (void);
/**
* \brief Construct a null IPv4 header
*/
@@ -142,8 +139,9 @@ public:
*/
bool IsChecksumOk (void) const;
std::string GetName (void) const;
void Print (std::ostream &os) const;
static TypeId GetTypeId (void);
virtual TypeId GetInstanceTypeId (void) const;
virtual void Print (std::ostream &os) const;
virtual uint32_t GetSerializedSize (void) const;
virtual void Serialize (Buffer::Iterator start) const;
virtual uint32_t Deserialize (Buffer::Iterator start);
+11 -26
View File
@@ -26,32 +26,10 @@
namespace ns3 {
NS_HEADER_ENSURE_REGISTERED (TcpHeader);
NS_OBJECT_ENSURE_REGISTERED (TcpHeader);
bool TcpHeader::m_calcChecksum = false;
TypeId
TcpHeader::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::TcpHeader")
.SetParent<Header> ()
;
return tid;
}
TypeId
TcpHeader::GetInstanceTypeId (void) const
{
return GetTypeId ();
}
uint32_t
TcpHeader::GetUid (void)
{
static uint32_t uid = AllocateUid<TcpHeader> ("TcpHeader.ns3");
return uid;
}
TcpHeader::TcpHeader ()
: m_sourcePort (0),
m_destinationPort (0),
@@ -156,12 +134,19 @@ TcpHeader::InitializeChecksum (Ipv4Address source,
//XXX requires peeking into IP to get length of the TCP segment
}
std::string
TcpHeader::GetName (void) const
TypeId
TcpHeader::GetTypeId (void)
{
return "TCP";
static TypeId tid = TypeId ("ns3::TcpHeader")
.SetParent<Header> ()
;
return tid;
}
TypeId
TcpHeader::GetInstanceTypeId (void) const
{
return GetTypeId ();
}
void TcpHeader::Print (std::ostream &os) const
{
//XXX
+3 -6
View File
@@ -33,10 +33,6 @@ namespace ns3 {
class TcpHeader : public Header
{
public:
static TypeId GetTypeId (void);
virtual TypeId GetInstanceTypeId (void) const;
static uint32_t GetUid (void);
TcpHeader ();
virtual ~TcpHeader ();
@@ -139,8 +135,9 @@ public:
typedef enum { NONE = 0, FIN = 1, SYN = 2, RST = 4, PSH = 8, ACK = 16,
URG = 32} Flags_t;
std::string GetName (void) const;
void Print (std::ostream &os) const;
static TypeId GetTypeId (void);
virtual TypeId GetInstanceTypeId (void) const;
virtual void Print (std::ostream &os) const;
virtual uint32_t GetSerializedSize (void) const;
virtual void Serialize (Buffer::Iterator start) const;
virtual uint32_t Deserialize (Buffer::Iterator start);
+11 -26
View File
@@ -24,32 +24,10 @@
namespace ns3 {
NS_HEADER_ENSURE_REGISTERED (UdpHeader);
NS_OBJECT_ENSURE_REGISTERED (UdpHeader);
bool UdpHeader::m_calcChecksum = false;
TypeId
UdpHeader::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::UdpHeader")
.SetParent<Header> ()
;
return tid;
}
TypeId
UdpHeader::GetInstanceTypeId (void) const
{
return GetTypeId ();
}
uint32_t
UdpHeader::GetUid (void)
{
static uint32_t uid = AllocateUid<UdpHeader> ("UdpHeader.ns3");
return uid;
}
/* The magic values below are used only for debugging.
* They can be used to easily detect memory corruption
* problems so you can see the patterns in memory.
@@ -115,12 +93,19 @@ UdpHeader::InitializeChecksum (Ipv4Address source,
m_initialChecksum = Ipv4ChecksumCalculate (0, buf, 12);
}
std::string
UdpHeader::GetName (void) const
TypeId
UdpHeader::GetTypeId (void)
{
return "UDP";
static TypeId tid = TypeId ("ns3::UdpHeader")
.SetParent<Header> ()
;
return tid;
}
TypeId
UdpHeader::GetInstanceTypeId (void) const
{
return GetTypeId ();
}
void
UdpHeader::Print (std::ostream &os) const
{
+3 -5
View File
@@ -34,9 +34,6 @@ namespace ns3 {
class UdpHeader : public Header
{
public:
static TypeId GetTypeId (void);
virtual TypeId GetInstanceTypeId (void) const;
static uint32_t GetUid (void);
/**
* \brief Constructor
@@ -86,8 +83,9 @@ public:
Ipv4Address destination,
uint8_t protocol);
std::string GetName (void) const;
void Print (std::ostream &os) const;
static TypeId GetTypeId (void);
virtual TypeId GetInstanceTypeId (void) const;
virtual void Print (std::ostream &os) const;
virtual uint32_t GetSerializedSize (void) const;
virtual void Serialize (Buffer::Iterator start) const;
virtual uint32_t Deserialize (Buffer::Iterator start);