remove dead code.

This commit is contained in:
Mathieu Lacage
2008-03-17 14:49:52 -07:00
parent a0a7c6d88c
commit 6b9fc231e1
32 changed files with 193 additions and 855 deletions

View File

@@ -31,30 +31,8 @@ NS_LOG_COMPONENT_DEFINE ("EthernetHeader");
namespace ns3 {
NS_HEADER_ENSURE_REGISTERED (EthernetHeader);
NS_OBJECT_ENSURE_REGISTERED (EthernetHeader);
TypeId
EthernetHeader::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::EthernetHeader")
.SetParent<Header> ()
;
return tid;
}
TypeId
EthernetHeader::GetInstanceTypeId (void) const
{
return GetTypeId ();
}
uint32_t
EthernetHeader::GetUid (void)
{
static uint32_t uid = AllocateUid<EthernetHeader> ("EthernetHeader.ns3");
return uid;
}
EthernetHeader::EthernetHeader (bool hasPreamble)
: m_enPreambleSfd (hasPreamble),
m_lengthType (0)
@@ -121,12 +99,20 @@ EthernetHeader::GetHeaderSize (void) const
return GetSerializedSize();
}
std::string
EthernetHeader::GetName (void) const
{
return "ETHERNET";
}
TypeId
EthernetHeader::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::EthernetHeader")
.SetParent<Header> ()
;
return tid;
}
TypeId
EthernetHeader::GetInstanceTypeId (void) const
{
return GetTypeId ();
}
void
EthernetHeader::Print (std::ostream &os) const
{

View File

@@ -49,9 +49,6 @@ namespace ns3 {
class EthernetHeader : public Header
{
public:
static TypeId GetTypeId (void);
virtual TypeId GetInstanceTypeId (void) const;
static uint32_t GetUid (void);
/**
* \brief Construct a null ethernet header
@@ -105,8 +102,9 @@ public:
*/
uint32_t GetHeaderSize() 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);

View File

@@ -28,32 +28,10 @@ NS_LOG_COMPONENT_DEFINE ("EthernetTrailer");
namespace ns3 {
NS_TRAILER_ENSURE_REGISTERED (EthernetTrailer);
NS_OBJECT_ENSURE_REGISTERED (EthernetTrailer);
bool EthernetTrailer::m_calcFcs = false;
TypeId
EthernetTrailer::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::EthernetTrailer")
.SetParent<Trailer> ()
;
return tid;
}
TypeId
EthernetTrailer::GetInstanceTypeId (void) const
{
return GetTypeId ();
}
uint32_t
EthernetTrailer::GetUid (void)
{
static uint32_t uid = AllocateUid<EthernetTrailer> ("EthernetTrailer.ns3");
return uid;
}
EthernetTrailer::EthernetTrailer ()
{
Init();
@@ -76,7 +54,9 @@ EthernetTrailer::CheckFcs (Ptr<Packet> p) const
if (!m_calcFcs)
{
return true;
} else {
}
else
{
NS_LOG_WARN ("FCS calculation is not yet enabled");
return false;
}
@@ -105,12 +85,20 @@ EthernetTrailer::GetTrailerSize (void) const
{
return GetSerializedSize();
}
std::string
EthernetTrailer::GetName (void) const
{
return "ETHERNET";
}
TypeId
EthernetTrailer::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::EthernetTrailer")
.SetParent<Trailer> ()
;
return tid;
}
TypeId
EthernetTrailer::GetInstanceTypeId (void) const
{
return GetTypeId ();
}
void
EthernetTrailer::Print (std::ostream &os) const
{

View File

@@ -39,10 +39,6 @@ class Packet;
class EthernetTrailer : public Trailer
{
public:
static TypeId GetTypeId (void);
virtual TypeId GetInstanceTypeId (void) const;
static uint32_t GetUid (void);
/**
* \brief Construct a null ethernet trailer
*/
@@ -85,11 +81,12 @@ public:
*/
uint32_t GetTrailerSize() const;
std::string GetName (void) const;
void Print (std::ostream &os) const;
uint32_t GetSerializedSize (void) const;
void Serialize (Buffer::Iterator end) const;
uint32_t Deserialize (Buffer::Iterator end);
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 end) const;
virtual uint32_t Deserialize (Buffer::Iterator end);
private:
/**

View File

@@ -25,30 +25,8 @@
namespace ns3 {
NS_HEADER_ENSURE_REGISTERED (LlcSnapHeader);
NS_OBJECT_ENSURE_REGISTERED (LlcSnapHeader);
TypeId
LlcSnapHeader::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::LlcSnapHeader")
.SetParent<Header> ()
;
return tid;
}
TypeId
LlcSnapHeader::GetInstanceTypeId (void) const
{
return GetTypeId ();
}
uint32_t
LlcSnapHeader::GetUid (void)
{
static uint32_t uid = AllocateUid<LlcSnapHeader> ("LlcSnapHeader.ns3");
return uid;
}
LlcSnapHeader::LlcSnapHeader ()
{}
@@ -69,12 +47,19 @@ LlcSnapHeader::GetSerializedSize (void) const
return 1 + 1 + 1 + 3 + 2;
}
std::string
LlcSnapHeader::GetName (void) const
TypeId
LlcSnapHeader::GetTypeId (void)
{
return "LLCSNAP";
static TypeId tid = TypeId ("ns3::LlcSnapHeader")
.SetParent<Header> ()
;
return tid;
}
TypeId
LlcSnapHeader::GetInstanceTypeId (void) const
{
return GetTypeId ();
}
void
LlcSnapHeader::Print (std::ostream &os) const
{

View File

@@ -31,17 +31,14 @@ namespace ns3 {
class LlcSnapHeader : public Header
{
public:
static TypeId GetTypeId (void);
virtual TypeId GetInstanceTypeId (void) const;
static uint32_t GetUid (void);
LlcSnapHeader ();
void SetType (uint16_t type);
uint16_t GetType (void);
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);