add GetUid methods to all headers and trailers

This commit is contained in:
Mathieu Lacage
2007-08-03 09:23:41 +02:00
parent 740ad8c1b2
commit e672f9711f
12 changed files with 61 additions and 8 deletions

View File

@@ -29,6 +29,12 @@ NS_DEBUG_COMPONENT_DEFINE ("EthernetHeader");
namespace ns3 {
const char *
EthernetHeader::GetUid (void)
{
return "EthernetHeader.ns3";
}
EthernetHeader::EthernetHeader (bool hasPreamble)
: m_enPreambleSfd (hasPreamble),
m_lengthType (0)

View File

@@ -45,8 +45,11 @@ namespace ns3 {
* the packet. Eventually the class will be improved to also support
* VLAN tags in packet headers.
*/
class EthernetHeader : public Header {
class EthernetHeader : public Header
{
public:
static const char *GetUid (void);
/**
* \brief Construct a null ethernet header
* \param hasPreamble if true, insert and remove an ethernet preamble from the

View File

@@ -30,6 +30,12 @@ namespace ns3 {
bool EthernetTrailer::m_calcFcs = false;
const char *
EthernetTrailer::GetUid (void)
{
return "EthernetTrailer.ns3";
}
EthernetTrailer::EthernetTrailer ()
{
Init();

View File

@@ -33,8 +33,11 @@ namespace ns3 {
* ethernet packet. The actual FCS functionality is not yet coded and
* so this acts more as a placeholder.
*/
class EthernetTrailer : public Trailer {
class EthernetTrailer : public Trailer
{
public:
static const char *GetUid (void);
/**
* \brief Construct a null ethernet trailer
*/

View File

@@ -25,6 +25,12 @@
namespace ns3 {
const char *
LlcSnapHeader::GetUid (void)
{
return "LlcSnapHeader.ns3";
}
LlcSnapHeader::LlcSnapHeader ()
{}

View File

@@ -27,8 +27,11 @@
namespace ns3 {
class LlcSnapHeader : public Header {
public:
class LlcSnapHeader : public Header
{
public:
static const char *GetUid (void);
LlcSnapHeader ();
virtual ~LlcSnapHeader ();