Change the protocol stack processing to pass packets by non-const
reference, rather than const reference and value as was previously done. Also change the queue semantics to return the packet on a deque, rather than requiring a packet as a parameter. The problem with the original approach was that packet UID's were getting skipped. The fix handles the uid properly, and we get sequential packet uid's on the trace file.
This commit is contained in:
1 parent
08bcb4249d
commit
391b3eef11
31 files changed
+152
-179
No files matched your search
+2
-2
@@ -158,7 +158,7 @@ public:
|
||||
/**
|
||||
* A protocol handler
|
||||
*/
|
||||
typedef Callback<void,Ptr<NetDevice>, const Packet &,uint16_t,const Address &> ProtocolHandler;
|
||||
typedef Callback<void,Ptr<NetDevice>, Packet &,uint16_t,const Address &> ProtocolHandler;
|
||||
/**
|
||||
* \param handler the handler to register
|
||||
* \param protocolType the type of protocol this handler is
|
||||
@@ -210,7 +210,7 @@ private:
|
||||
*/
|
||||
virtual void NotifyDeviceAdded (Ptr<NetDevice> device);
|
||||
|
||||
bool ReceiveFromDevice (Ptr<NetDevice> device, const Packet &packet,
|
||||
bool ReceiveFromDevice (Ptr<NetDevice> device, Packet &packet,
|
||||
uint16_t protocol, const Address &from);
|
||||
void Construct (void);
|
||||
TraceResolver *CreateDevicesTraceResolver (const TraceContext &context);
|
||||
|
||||
Reference in new issue
Block a user