src/olsr/model/olsr-header.h
changeset 7184 a15feb312428
parent 6852 8f1a53d3f6ca
child 7385 10beb0e53130
equal deleted inserted replaced
7183:13fae068d099 7184:a15feb312428
    92 
    92 
    93 private:
    93 private:
    94   uint16_t m_packetLength;
    94   uint16_t m_packetLength;
    95   uint16_t m_packetSequenceNumber;
    95   uint16_t m_packetSequenceNumber;
    96 
    96 
    97 public:  
    97 public:
    98   static TypeId GetTypeId (void);
    98   static TypeId GetTypeId (void);
    99   virtual TypeId GetInstanceTypeId (void) const;
    99   virtual TypeId GetInstanceTypeId (void) const;
   100   virtual void Print (std::ostream &os) const;
   100   virtual void Print (std::ostream &os) const;
   101   virtual uint32_t GetSerializedSize (void) const;
   101   virtual uint32_t GetSerializedSize (void) const;
   102   virtual void Serialize (Buffer::Iterator start) const;
   102   virtual void Serialize (Buffer::Iterator start) const;
   187 //   }
   187 //   }
   188 //   uint16_t GetMessageSize () const
   188 //   uint16_t GetMessageSize () const
   189 //   {
   189 //   {
   190 //     return m_messageSize;
   190 //     return m_messageSize;
   191 //   }
   191 //   }
   192   
   192 
   193 private:
   193 private:
   194   MessageType m_messageType;
   194   MessageType m_messageType;
   195   uint8_t m_vTime;
   195   uint8_t m_vTime;
   196   Ipv4Address m_originatorAddress;
   196   Ipv4Address m_originatorAddress;
   197   uint8_t m_timeToLive;
   197   uint8_t m_timeToLive;
   198   uint8_t m_hopCount;
   198   uint8_t m_hopCount;
   199   uint16_t m_messageSequenceNumber;
   199   uint16_t m_messageSequenceNumber;
   200   uint16_t m_messageSize;
   200   uint16_t m_messageSize;
   201 
   201 
   202 public:  
   202 public:
   203   static TypeId GetTypeId (void);
   203   static TypeId GetTypeId (void);
   204   virtual TypeId GetInstanceTypeId (void) const;
   204   virtual TypeId GetInstanceTypeId (void) const;
   205   virtual void Print (std::ostream &os) const;
   205   virtual void Print (std::ostream &os) const;
   206   virtual uint32_t GetSerializedSize (void) const;
   206   virtual uint32_t GetSerializedSize (void) const;
   207   virtual void Serialize (Buffer::Iterator start) const;
   207   virtual void Serialize (Buffer::Iterator start) const;
   429   {
   429   {
   430     NS_ASSERT (m_messageType == HNA_MESSAGE);
   430     NS_ASSERT (m_messageType == HNA_MESSAGE);
   431     return m_message.hna;
   431     return m_message.hna;
   432   }
   432   }
   433 
   433 
   434   
   434 
   435 };
   435 };
   436 
   436 
   437 
   437 
   438 static inline std::ostream& operator<< (std::ostream& os, const PacketHeader & packet)
   438 static inline std::ostream& operator<< (std::ostream& os, const PacketHeader & packet)
   439 {
   439 {
   462   os << "]";
   462   os << "]";
   463   return os;
   463   return os;
   464 }
   464 }
   465 
   465 
   466 
   466 
   467 }} // namespace olsr, ns3
   467 }
       
   468 }  // namespace olsr, ns3
   468 
   469 
   469 #endif /* OLSR_HEADER_H */
   470 #endif /* OLSR_HEADER_H */
   470 
   471