mirror of
https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo.git
synced 2025-06-08 10:03:58 +02:00
Set missing protocol type
This commit is contained in:
parent
435cd8c7a1
commit
03ecb7d5b3
1 changed files with 3 additions and 2 deletions
|
@ -192,6 +192,7 @@ MockNetDevice::AddHeader (Ptr<Packet> p,
|
|||
{
|
||||
NS_LOG_FUNCTION (this << p << protocolNumber);
|
||||
EthernetHeader ethernet;
|
||||
ethernet.SetLengthType (protocolNumber);
|
||||
ethernet.SetSource (Mac48Address::ConvertFrom (src));
|
||||
ethernet.SetDestination (Mac48Address::ConvertFrom (dst));
|
||||
p->AddHeader (ethernet);
|
||||
|
@ -359,8 +360,6 @@ MockNetDevice::Receive (Ptr<Packet> packet, Ptr<MockNetDevice> senderDevice)
|
|||
{
|
||||
NS_LOG_FUNCTION (this << packet << senderDevice);
|
||||
|
||||
uint16_t protocol = 0;
|
||||
|
||||
if (m_receiveErrorModel && m_receiveErrorModel->IsCorrupt (packet) )
|
||||
{
|
||||
//
|
||||
|
@ -388,6 +387,8 @@ MockNetDevice::Receive (Ptr<Packet> packet, Ptr<MockNetDevice> senderDevice)
|
|||
|
||||
EthernetHeader header;
|
||||
packet->RemoveHeader (header);
|
||||
uint16_t protocol = header.GetLengthType ();
|
||||
|
||||
PacketType packetType;
|
||||
if (header.GetDestination ().IsBroadcast ())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue