Function capsules::net::sixlowpan_compression::is_ip6_nh_compressible
[−]
[src]
fn is_ip6_nh_compressible(
next_header: u8,
next_headers: &[u8]
) -> Result<(bool, u8), ()>
Determines if the next header is LoWPAN_NHC compressible, which depends on
both the next header type and the length of the IPv6 next header extensions.
Returns Ok((false, 0))
if the next header is not compressible or
Ok((true, nh_len))
. nh_len
is only meaningful when the next header type
is an IPv6 next header extension, in which case it is the number of bytes
after the first two bytes in the IPv6 next header extension. Returns
Err(())
in the case of an invalid IPv6 packet.