mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
6loWPAN: Add HC06 decompression logic; Remove outboard compressor hooks.
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user