Bug 2272 - SixLowPan NetDevice can not send uncompressed packets larger than 802.15.4 MTU
This commit is contained in:
@@ -82,6 +82,7 @@ Bugs fixed
|
||||
- Bug 2257 - Ipv[4,6]InterfaceContainer::Add are not consistent
|
||||
- Bug 2259 - GSL not successfully enabled for Wi-Fi DSSS error rate model
|
||||
- Bug 2267 - Wrong channel bandwidth value in pcap files
|
||||
- Bug 2272 - SixLowPan NetDevice can not send uncompressed packets larger than 802.15.4 MTU
|
||||
|
||||
Known issues
|
||||
------------
|
||||
|
||||
@@ -62,8 +62,8 @@ The attributes are:
|
||||
The CompressionThreshold attribute is similar to Contiki's SICSLOWPAN_CONF_MIN_MAC_PAYLOAD
|
||||
option. If a compressed packet size is less than the threshold, the uncompressed version is
|
||||
used (plus one byte for the correct dispatch header).
|
||||
This option is useful only when a MAC with specific requirement for minimum frame size is
|
||||
used (e.g., ContikiMAC).
|
||||
This option is useful when a MAC requires a minimum frame size (e.g., ContikiMAC) and the
|
||||
compression would violate the requirement.
|
||||
|
||||
The last two attributes are needed to use the module with a NetDevice other than 802.15.4, as
|
||||
neither IANA or IEEE did reserve an EtherType for 6LoWPAN. As a consequence there might be a
|
||||
|
||||
@@ -437,13 +437,25 @@ bool SixLowPanNetDevice::DoSend (Ptr<Packet> packet,
|
||||
protocolNumber = m_etherType;
|
||||
}
|
||||
|
||||
if (m_useIphc)
|
||||
if (origPacketSize > m_compressionThreshold)
|
||||
{
|
||||
origHdrSize += CompressLowPanIphc (packet, m_netDevice->GetAddress (), dest);
|
||||
if (m_useIphc)
|
||||
{
|
||||
NS_LOG_LOGIC ("Compressing packet using IPHC");
|
||||
origHdrSize += CompressLowPanIphc (packet, m_netDevice->GetAddress (), dest);
|
||||
}
|
||||
else
|
||||
{
|
||||
NS_LOG_LOGIC ("Compressing packet using HC1");
|
||||
origHdrSize += CompressLowPanHc1 (packet, m_netDevice->GetAddress (), dest);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
origHdrSize += CompressLowPanHc1 (packet, m_netDevice->GetAddress (), dest);
|
||||
NS_LOG_LOGIC ("Compressed packet too short, using uncompressed one");
|
||||
packet = origPacket;
|
||||
SixLowPanIpv6 ipv6UncompressedHdr;
|
||||
packet->AddHeader (ipv6UncompressedHdr);
|
||||
}
|
||||
|
||||
if ( packet->GetSize () > m_netDevice->GetMtu () )
|
||||
@@ -471,14 +483,6 @@ bool SixLowPanNetDevice::DoSend (Ptr<Packet> packet,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (packet->GetSize () < m_compressionThreshold)
|
||||
{
|
||||
NS_LOG_LOGIC ("Compressed packet too short, using uncompressed one");
|
||||
packet = origPacket;
|
||||
SixLowPanIpv6 ipv6UncompressedHdr;
|
||||
packet->AddHeader (ipv6UncompressedHdr);
|
||||
}
|
||||
|
||||
m_txTrace (packet, m_node->GetObject<SixLowPanNetDevice> (), GetIfIndex ());
|
||||
if (doSendFrom)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user