--- a/samples/main-packet-header.cc Mon Mar 17 14:01:55 2008 -0700
+++ b/samples/main-packet-header.cc Mon Mar 17 14:49:52 2008 -0700
@@ -11,7 +11,6 @@
class MyHeader : public Header
{
public:
- static uint32_t GetUid (void);
MyHeader ();
virtual ~MyHeader ();
@@ -21,8 +20,7 @@
static TypeId GetTypeId (void);
virtual TypeId GetInstanceTypeId (void) const;
- std::string GetName (void) const;
- void Print (std::ostream &os) const;
+ virtual void Print (std::ostream &os) const;
virtual void Serialize (Buffer::Iterator start) const;
virtual uint32_t Deserialize (Buffer::Iterator start);
virtual uint32_t GetSerializedSize (void) const;
@@ -52,24 +50,6 @@
return GetTypeId ();
}
-uint32_t
-MyHeader::GetUid (void)
-{
- // This string is used by the internals of the packet
- // 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 = AllocateUid<MyHeader> ("MyHeader.test.nsnam.org");
- return uid;
-}
-
-std::string
-MyHeader::GetName (void) const
-{
- // This string is used to identify the type of
- // my header by the packet printing routines.
- return "MYHEADER";
-}
void
MyHeader::Print (std::ostream &os) const
{