Ilya Moiseenko | 59c6221 | 2011-08-04 19:04:24 -0700 | [diff] [blame^] | 1 | // |
| 2 | // ndn_nonceheader.h |
| 3 | // Abstraction |
| 4 | // |
| 5 | // Created by Ilya Moiseenko on 04.08.11. |
| 6 | // Copyright 2011 UCLA. All rights reserved. |
| 7 | // |
| 8 | |
| 9 | #include "ns3/header.h" |
| 10 | #include <iostream> |
| 11 | |
| 12 | namespace ns3 |
| 13 | { |
| 14 | namespace NDNabstraction |
| 15 | { |
| 16 | class NonceHeader: public Header |
| 17 | { |
| 18 | public: |
| 19 | NonceHeader(); |
| 20 | NonceHeader(uint32_t nonce); |
| 21 | uint32_t GetValue(); |
| 22 | |
| 23 | |
| 24 | // Header serialization/deserialization |
| 25 | static TypeId GetTypeId (); |
| 26 | TypeId GetInstanceTypeId () const; |
| 27 | uint32_t GetSerializedSize () const; |
| 28 | void Serialize (Buffer::Iterator start) const; |
| 29 | uint32_t Deserialize (Buffer::Iterator start); |
| 30 | void Print (std::ostream &os) const; |
| 31 | |
| 32 | private: |
| 33 | uint32_t m_value; |
| 34 | }; |
| 35 | } |
| 36 | } |