diff --git a/samples/main-header.cc b/samples/main-header.cc index 4c8f4920f..df1b0a1bf 100644 --- a/samples/main-header.cc +++ b/samples/main-header.cc @@ -42,7 +42,7 @@ MyHeader::GetUid (void) // code to keep track of the packet metadata. // You need to make sure that this string is absolutely // unique. The code will detect any duplicate string. - static uint32_t uid = Header::Register ("MyHeader.test.nsnam.org"); + static uint32_t uid = AllocateUid ("MyHeader.test.nsnam.org"); return uid; } diff --git a/src/common/header.h b/src/common/header.h index 6d8db4575..d53a0a2b7 100644 --- a/src/common/header.h +++ b/src/common/header.h @@ -91,7 +91,7 @@ class Header { public: protected: template - static uint32_t Register (std::string uuid); + static uint32_t AllocateUid (std::string uuid); #if 0 private: /** @@ -152,7 +152,7 @@ namespace ns3 { template uint32_t -Header::Register (std::string uuid) +Header::AllocateUid (std::string uuid) { return ChunkRegistry::RegisterHeader (uuid); } diff --git a/src/common/packet-metadata-test.cc b/src/common/packet-metadata-test.cc index c3f829acc..7f3711735 100644 --- a/src/common/packet-metadata-test.cc +++ b/src/common/packet-metadata-test.cc @@ -53,7 +53,7 @@ HistoryHeader::GetUid (void) { std::ostringstream oss; oss << N << "HistoryHeader.ns3"; - static uint32_t uid = Header::Register > (oss.str()); + static uint32_t uid = AllocateUid > (oss.str()); return uid; } @@ -133,7 +133,7 @@ HistoryTrailer::GetUid (void) { std::ostringstream oss; oss << N << "HistoryTrailer.ns3"; - static uint32_t uid = Trailer::Register > (oss.str ()); + static uint32_t uid = AllocateUid > (oss.str ()); return uid; } diff --git a/src/common/trailer.h b/src/common/trailer.h index 4b6b91fac..77647c3f4 100644 --- a/src/common/trailer.h +++ b/src/common/trailer.h @@ -114,7 +114,7 @@ class Trailer { public: protected: template - static uint32_t Register (std::string uidString); + static uint32_t AllocateUid (std::string uidString); #if 0 private: /** @@ -179,7 +179,7 @@ namespace ns3 { template uint32_t -Trailer::Register (std::string uidString) +Trailer::AllocateUid (std::string uidString) { return ChunkRegistry::RegisterTrailer (uidString); } diff --git a/src/internet-node/arp-header.cc b/src/internet-node/arp-header.cc index 587c7d543..02a7e287d 100644 --- a/src/internet-node/arp-header.cc +++ b/src/internet-node/arp-header.cc @@ -30,7 +30,7 @@ namespace ns3 { uint32_t ArpHeader::GetUid (void) { - static uint32_t uid = Header::Register ("ArpHeader.ns3"); + static uint32_t uid = AllocateUid ("ArpHeader.ns3"); return uid; } diff --git a/src/internet-node/ipv4-header.cc b/src/internet-node/ipv4-header.cc index 00dc78ca6..891961cda 100644 --- a/src/internet-node/ipv4-header.cc +++ b/src/internet-node/ipv4-header.cc @@ -35,7 +35,7 @@ bool Ipv4Header::m_calcChecksum = false; uint32_t Ipv4Header::GetUid (void) { - static uint32_t uid = Header::Register ("Ipv4Header.ns3"); + static uint32_t uid = AllocateUid ("Ipv4Header.ns3"); return uid; } diff --git a/src/internet-node/udp-header.cc b/src/internet-node/udp-header.cc index a90a41215..6469d046d 100644 --- a/src/internet-node/udp-header.cc +++ b/src/internet-node/udp-header.cc @@ -31,7 +31,7 @@ bool UdpHeader::m_calcChecksum = false; uint32_t UdpHeader::GetUid (void) { - static uint32_t uid = Header::Register ("UdpHeader.ns3"); + static uint32_t uid = AllocateUid ("UdpHeader.ns3"); return uid; } diff --git a/src/node/ethernet-header.cc b/src/node/ethernet-header.cc index ebbf7cf72..fb7629bde 100644 --- a/src/node/ethernet-header.cc +++ b/src/node/ethernet-header.cc @@ -34,7 +34,7 @@ namespace ns3 { uint32_t EthernetHeader::GetUid (void) { - static uint32_t uid = Header::Register ("EthernetHeader.ns3"); + static uint32_t uid = AllocateUid ("EthernetHeader.ns3"); return uid; } diff --git a/src/node/ethernet-trailer.cc b/src/node/ethernet-trailer.cc index cf16bf2af..dbb27fc2a 100644 --- a/src/node/ethernet-trailer.cc +++ b/src/node/ethernet-trailer.cc @@ -35,7 +35,7 @@ bool EthernetTrailer::m_calcFcs = false; uint32_t EthernetTrailer::GetUid (void) { - static uint32_t uid = Trailer::Register ("EthernetTrailer.ns3"); + static uint32_t uid = AllocateUid ("EthernetTrailer.ns3"); return uid; } diff --git a/src/node/llc-snap-header.cc b/src/node/llc-snap-header.cc index 52a9021a8..883b4e021 100644 --- a/src/node/llc-snap-header.cc +++ b/src/node/llc-snap-header.cc @@ -31,7 +31,7 @@ namespace ns3 { uint32_t LlcSnapHeader::GetUid (void) { - static uint32_t uid = Header::Register ("LlcSnapHeader.ns3"); + static uint32_t uid = AllocateUid ("LlcSnapHeader.ns3"); return uid; }