*/
uint8_t linklocal_prefix [] = {0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-uint8_t multicast_prefix [] = {0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
struct in6_addr __my_address = {{{0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65}}};
}
// otherwise we either have an invalid compression, or else it's a
// multicast address
- ip_memcpy(dest, multicast_prefix, 8);
- ip_memclr(dest + 8, 8);
+ // ip_memcpy(dest, multicast_prefix, 8);
+ ip_memclr(dest, 16);
+ dest[0] = 0xff;
+ dest[1] = 0x02;
switch (*s_addr & LOWPAN_IPHC_SHORT_LONG_MASK) {
case LOWPAN_IPHC_HC1_MCAST:
dest[14] = (*s_addr) & ~LOWPAN_IPHC_SHORT_LONG_MASK;
}
nxt_hdr = hdr->nxt_hdr;
- if (hdr->nxt_hdr == IANA_UDP /* or other compressed values... */) {
+ if (hdr->nxt_hdr == IANA_UDP && /* or other compressed values... */
+ msg->headers != NULL) {
// we will add the HCNH encoding at the end of the header
*encoding |= LOWPAN_IPHC_NH_MASK;
} else {