PktRadio: Some initial fixes resulting for early testing with loopback device.

This commit is contained in:
Gregory Nutt
2017-07-31 09:31:24 -06:00
parent 86df036ff2
commit 00d8dd3912
6 changed files with 183 additions and 28 deletions
+20
View File
@@ -267,6 +267,26 @@
* NOTE: we currently assume 64-bits prefixes
*/
/* Check whether we can compress the IID in address 'a' to 16 bits. This is
* used for unicast addresses only, and is true if the address is on the
* format <PREFIX>::0000:00ff:fe00:00xx.
*
* NOTE: we currently assume 64-bits prefixes. Big-endian, network order is
* assumed.
*/
/* Check whether we can compress the IID in address 'a' to 8 bits. This is
* used for unicast addresses only, and is true if the address is on the
* format <PREFIX>::0000:00ff:fe00:00XX.
*
* NOTE: we currently assume 64-bits prefixes. Big-endian, network order is
* assumed.
*/
#define SIXLOWPAN_IS_IID_8BIT_COMPRESSABLE(a) \
((((a)[4]) == 0x0000) && (((a)[5]) == HTONS(0x00ff)) && \
(((a)[6]) == HTONS(0xfe00)) && ((((a)[7]) & HTONS(0x00ff)) == 0))
/* Check whether we can compress the IID in address 'a' to 16 bits. This is
* used for unicast addresses only, and is true if the address is on the
* format <PREFIX>::0000:00ff:fe00:XXXX.