-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ng_sixlowpan_ctx: add compression flag support #3143
ng_sixlowpan_ctx: add compression flag support #3143
Conversation
Ping? |
23c81a7
to
8ea1a1c
Compare
Rebased and adapted for changes in #3159. |
*/ | ||
static inline void ng_sixlowpan_ctx_remove(uint8_t id) | ||
{ | ||
ng_sixlowpan_ctx_lookup_id(id)->prefix_len = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would argue that one doesn't need a function for it, but that's only a weak opinion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's why it is a inline function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed, but after all this is just a suggestion to the compiler.
Adressed comments |
ACK, please squash! |
The compression flag allows a context to be invalidated for compression, but still be valid for decompression. This is needed for context dissimination in a LoWPAN.
8fcc7fc
to
e6747b8
Compare
Squashed. |
…flag ng_sixlowpan_ctx: add compression flag support
} | ||
} | ||
|
||
if ((src_ctx != NULL) || ng_ipv6_addr_is_link_local(&(ipv6_hdr->src))) { | ||
eui64_t iid; | ||
eui64_t iid = { 0 }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting the following error:
.../riot/sys/net/network_layer/ng_sixlowpan/iphc/ng_sixlowpan_iphc.c: In function ‘ng_sixlowpan_iphc_encode’:
.../riot/sys/net/network_layer/ng_sixlowpan/iphc/ng_sixlowpan_iphc.c:502:13: error: missing braces around initializer [-Werror=missing-braces]
eui64_t iid = { 0 };
^
.../riot/sys/net/network_layer/ng_sixlowpan/iphc/ng_sixlowpan_iphc.c:502:13: error: (near initialization for ‘iid.uint64’) [-Werror=missing-braces]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eui64_t iid = { .uint64.u64 = 0, };
works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(see #3435)
The compression flag allows a context to be invalidated for compression, but still be valid for decompression. This is needed for context dissimination in a LoWPAN.