6loWPAN: Add HC06 decompression logic; Remove outboard compressor hooks.

This commit is contained in:
Gregory Nutt
2017-04-02 08:08:35 -06:00
parent 5a56d3cce7
commit d16fc98c74
7 changed files with 554 additions and 139 deletions
+11
View File
@@ -526,6 +526,17 @@ bool net_ipv6addr_maskcmp(const net_ipv6addr_t addr1,
const net_ipv6addr_t mask);
#endif
/****************************************************************************
* Function: net_ipv6addr_prefixcmp
*
* Description:
* Compare two IPv6 address prefixes.
*
****************************************************************************/
#define net_ipv6addr_prefixcmp(addr1, addr2, length) \
(memcmp(addr1, addr2, length >> 3) == 0)
/****************************************************************************
* Function: net_ipaddr_mask
*
-41
View File
@@ -477,30 +477,6 @@ struct ieee802154_driver_s
#endif /* CONFIG_NET_6LOWPAN_FRAG */
};
/* The structure of a next header compressor. This compressor is provided
* by architecture-specific logic outside of the network stack.
*
* TODO: needs more parameters when compressing extension headers, etc.
*/
struct sixlowpan_nhcompressor_s
{
CODE int (*is_compressable)(uint8_t next_header);
/* Compress next header (TCP/UDP, etc) - ptr points to next header to
* compress.
*/
CODE int (*compress)(FAR uint8_t *compressed, FAR uint8_t *uncompressed_len);
/* Uncompress next header (TCP/UDP, etc) - ptr points to next header to
* uncompress.
*/
CODE int (*uncompress)(FAR uint8_t *compressed, FAR uint8_t *lowpanbuf,
FAR uint8_t *uncompressed_len);
};
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
@@ -560,21 +536,4 @@ struct sixlowpan_nhcompressor_s
int sixlowpan_input(FAR struct ieee802154_driver_s *ieee);
/****************************************************************************
* Function: sixlowpan_set_compressor
*
* Description:
* Configure to use the architecture-specific compressor.
*
* Input parameters:
* compressor - A reference to the new compressor to be used. This may
* be a NULL value to disable the compressor.
*
* Returned Value:
* None
*
****************************************************************************/
void sixlowpan_set_compressor(FAR struct sixlowpan_nhcompressor_s *compressor);
#endif /* __INCLUDE_NUTTX_NET_SIXLOWOAN_H */