|
|
| 22 |
|
22 |
|
| 23 |
#include <stdint.h> |
23 |
#include <stdint.h> |
| 24 |
#include <vector> |
24 |
#include <vector> |
|
|
25 |
#include <limits> |
| 25 |
#include "ns3/callback.h" |
26 |
#include "ns3/callback.h" |
| 26 |
#include "ns3/assert.h" |
27 |
#include "ns3/assert.h" |
| 27 |
#include "ns3/type-id.h" |
28 |
#include "ns3/type-id.h" |
|
|
| 210 |
uint32_t maxSize); |
211 |
uint32_t maxSize); |
| 211 |
struct Data { |
212 |
struct Data { |
| 212 |
/* number of references to this struct Data instance. */ |
213 |
/* number of references to this struct Data instance. */ |
| 213 |
uint16_t m_count; |
214 |
uint32_t m_count; |
| 214 |
/* size (in bytes) of m_data buffer below */ |
215 |
/* size (in bytes) of m_data buffer below */ |
| 215 |
uint16_t m_size; |
216 |
uint16_t m_size; |
| 216 |
/* max of the m_used field over all objects which |
217 |
/* max of the m_used field over all objects which |
|
|
| 376 |
m_packetUid (o.m_packetUid) |
377 |
m_packetUid (o.m_packetUid) |
| 377 |
{ |
378 |
{ |
| 378 |
NS_ASSERT (m_data != 0); |
379 |
NS_ASSERT (m_data != 0); |
|
|
380 |
NS_ASSERT (m_data->m_count < std::numeric_limits<uint32_t>::max()); |
| 379 |
m_data->m_count++; |
381 |
m_data->m_count++; |
| 380 |
} |
382 |
} |
| 381 |
PacketMetadata & |
383 |
PacketMetadata & |