add GetUid methods to all headers and trailers
This commit is contained in:
@@ -25,6 +25,12 @@
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
const char *
|
||||
ArpHeader::GetUid (void)
|
||||
{
|
||||
return "ArpHeader.ns3";
|
||||
}
|
||||
|
||||
ArpHeader::~ArpHeader ()
|
||||
{}
|
||||
|
||||
|
||||
@@ -30,8 +30,11 @@ namespace ns3 {
|
||||
/**
|
||||
* \brief The packet header for an ARP packet
|
||||
*/
|
||||
class ArpHeader : public Header {
|
||||
public:
|
||||
class ArpHeader : public Header
|
||||
{
|
||||
public:
|
||||
static const char *GetUid (void);
|
||||
|
||||
virtual ~ArpHeader ();
|
||||
|
||||
void SetRequest (MacAddress sourceHardwareAddress,
|
||||
|
||||
@@ -30,6 +30,12 @@ namespace ns3 {
|
||||
|
||||
bool Ipv4Header::m_calcChecksum = false;
|
||||
|
||||
const char *
|
||||
Ipv4Header::GetUid (void)
|
||||
{
|
||||
return "Ipv4Header.ns3";
|
||||
}
|
||||
|
||||
Ipv4Header::Ipv4Header ()
|
||||
: m_payloadSize (0),
|
||||
m_identification (0),
|
||||
|
||||
@@ -29,8 +29,10 @@ namespace ns3 {
|
||||
/**
|
||||
* \brief Packet header for IPv4
|
||||
*/
|
||||
class Ipv4Header : public Header {
|
||||
class Ipv4Header : public Header
|
||||
{
|
||||
public:
|
||||
static const char *GetUid (void);
|
||||
/**
|
||||
* \brief Construct a null IPv4 header
|
||||
*/
|
||||
|
||||
@@ -26,6 +26,12 @@ namespace ns3 {
|
||||
|
||||
bool UdpHeader::m_calcChecksum = false;
|
||||
|
||||
const char *
|
||||
UdpHeader::GetUid (void)
|
||||
{
|
||||
return "UdpHeader.ns3";
|
||||
}
|
||||
|
||||
/* 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.
|
||||
|
||||
@@ -30,8 +30,11 @@ namespace ns3 {
|
||||
/**
|
||||
* \brief Packet header for UDP packets
|
||||
*/
|
||||
class UdpHeader : public Header {
|
||||
class UdpHeader : public Header
|
||||
{
|
||||
public:
|
||||
static const char *GetUid (void);
|
||||
|
||||
/**
|
||||
* \brief Constructor
|
||||
*
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -30,6 +30,12 @@ namespace ns3 {
|
||||
|
||||
bool EthernetTrailer::m_calcFcs = false;
|
||||
|
||||
const char *
|
||||
EthernetTrailer::GetUid (void)
|
||||
{
|
||||
return "EthernetTrailer.ns3";
|
||||
}
|
||||
|
||||
EthernetTrailer::EthernetTrailer ()
|
||||
{
|
||||
Init();
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -25,6 +25,12 @@
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
const char *
|
||||
LlcSnapHeader::GetUid (void)
|
||||
{
|
||||
return "LlcSnapHeader.ns3";
|
||||
}
|
||||
|
||||
LlcSnapHeader::LlcSnapHeader ()
|
||||
{}
|
||||
|
||||
|
||||
@@ -27,8 +27,11 @@
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
class LlcSnapHeader : public Header {
|
||||
public:
|
||||
class LlcSnapHeader : public Header
|
||||
{
|
||||
public:
|
||||
static const char *GetUid (void);
|
||||
|
||||
LlcSnapHeader ();
|
||||
virtual ~LlcSnapHeader ();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user