Lines Matching refs:lowpan6_buffer
391 lowpan6_decompress_hdr(u8_t *lowpan6_buffer, size_t lowpan6_bufsize, in lowpan6_decompress_hdr() argument
404 LWIP_ASSERT("lowpan6_buffer != NULL", lowpan6_buffer != NULL); in lowpan6_decompress_hdr()
425 LWIP_DEBUGF(LWIP_LOWPAN6_IP_COMPRESSED_DEBUG, ("%2X ", lowpan6_buffer[j])); in lowpan6_decompress_hdr()
435 if (lowpan6_buffer[1] & 0x80) { in lowpan6_decompress_hdr()
440 if ((lowpan6_buffer[0] & 0x18) == 0x00) { in lowpan6_decompress_hdr()
441 header_temp = ((lowpan6_buffer[lowpan6_offset+1] & 0x0f) << 16) | \ in lowpan6_decompress_hdr()
442 (lowpan6_buffer[lowpan6_offset + 2] << 8) | lowpan6_buffer[lowpan6_offset+3]; in lowpan6_decompress_hdr()
444 lowpan6_buffer[lowpan6_offset],header_temp)); in lowpan6_decompress_hdr()
445 IP6H_VTCFL_SET(ip6hdr, 6, lowpan6_buffer[lowpan6_offset], header_temp); in lowpan6_decompress_hdr()
449 } else if ((lowpan6_buffer[0] & 0x18) == 0x08) { in lowpan6_decompress_hdr()
450 …header_temp = ((lowpan6_buffer[lowpan6_offset] & 0x0f) << 16) | (lowpan6_buffer[lowpan6_offset + 1… in lowpan6_decompress_hdr()
452 lowpan6_buffer[lowpan6_offset] & 0xc0,header_temp)); in lowpan6_decompress_hdr()
453 IP6H_VTCFL_SET(ip6hdr, 6, lowpan6_buffer[lowpan6_offset] & 0xc0, header_temp); in lowpan6_decompress_hdr()
457 } else if ((lowpan6_buffer[0] & 0x18) == 0x10) { in lowpan6_decompress_hdr()
458 …PRESSION_DEBUG, ("TF: 10, DCSP+ECN: 0x%"X8_F", Flowlabel ignored\n", lowpan6_buffer[lowpan6_offset… in lowpan6_decompress_hdr()
459 IP6H_VTCFL_SET(ip6hdr, 6, lowpan6_buffer[lowpan6_offset],0); in lowpan6_decompress_hdr()
463 } else if ((lowpan6_buffer[0] & 0x18) == 0x18) { in lowpan6_decompress_hdr()
470 if ((lowpan6_buffer[0] & 0x04) == 0x00) { in lowpan6_decompress_hdr()
472 … LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("NH: 0x%2X\n", lowpan6_buffer[lowpan6_offset+1])); in lowpan6_decompress_hdr()
473 IP6H_NEXTH_SET(ip6hdr, lowpan6_buffer[lowpan6_offset++]); in lowpan6_decompress_hdr()
482 if ((lowpan6_buffer[0] & 0x03) == 0x00) { in lowpan6_decompress_hdr()
483 …LWIP_DEBUGF(LWIP_LOWPAN6_DECOMPRESSION_DEBUG, ("Hops: full value: %d\n", lowpan6_buffer[lowpan6_of… in lowpan6_decompress_hdr()
484 IP6H_HOPLIM_SET(ip6hdr, lowpan6_buffer[lowpan6_offset++]); in lowpan6_decompress_hdr()
485 } else if ((lowpan6_buffer[0] & 0x03) == 0x01) { in lowpan6_decompress_hdr()
488 } else if ((lowpan6_buffer[0] & 0x03) == 0x02) { in lowpan6_decompress_hdr()
491 } else if ((lowpan6_buffer[0] & 0x03) == 0x03) { in lowpan6_decompress_hdr()
497 if ((lowpan6_buffer[1] & 0x40) == 0x00) { in lowpan6_decompress_hdr()
501 if ((lowpan6_buffer[1] & 0x30) == 0x00) { in lowpan6_decompress_hdr()
504 MEMCPY(&ip6hdr->src.addr[0], lowpan6_buffer + lowpan6_offset, 16); in lowpan6_decompress_hdr()
506 } else if ((lowpan6_buffer[1] & 0x30) == 0x10) { in lowpan6_decompress_hdr()
512 MEMCPY(&ip6hdr->src.addr[2], lowpan6_buffer + lowpan6_offset, 8); in lowpan6_decompress_hdr()
514 } else if ((lowpan6_buffer[1] & 0x30) == 0x20) { in lowpan6_decompress_hdr()
521 ip6hdr->src.addr[3] = lwip_htonl(0xfe000000UL | (lowpan6_buffer[lowpan6_offset] << 8) | in lowpan6_decompress_hdr()
522 lowpan6_buffer[lowpan6_offset + 1]); in lowpan6_decompress_hdr()
524 } else if ((lowpan6_buffer[1] & 0x30) == 0x30) { in lowpan6_decompress_hdr()
546 if ((lowpan6_buffer[1] & 0x30) == 0x00) { in lowpan6_decompress_hdr()
555 if (lowpan6_buffer[1] & 0x80) { in lowpan6_decompress_hdr()
556 i = (lowpan6_buffer[2] >> 4) & 0x0f; in lowpan6_decompress_hdr()
574 if ((lowpan6_buffer[1] & 0x30) == 0x10) { in lowpan6_decompress_hdr()
576 MEMCPY(&ip6hdr->src.addr[2], lowpan6_buffer + lowpan6_offset, 8); in lowpan6_decompress_hdr()
579 } else if ((lowpan6_buffer[1] & 0x30) == 0x20) { in lowpan6_decompress_hdr()
582 …ip6hdr->src.addr[3] = lwip_htonl(0xfe000000UL | (lowpan6_buffer[lowpan6_offset] << 8) | lowpan6_bu… in lowpan6_decompress_hdr()
585 } else if ((lowpan6_buffer[1] & 0x30) == 0x30) { in lowpan6_decompress_hdr()
603 if (lowpan6_buffer[1] & 0x08) { in lowpan6_decompress_hdr()
606 if (lowpan6_buffer[1] & 0x04) { in lowpan6_decompress_hdr()
612 if ((lowpan6_buffer[1] & 0x03) == 0x00) { in lowpan6_decompress_hdr()
615 MEMCPY(&ip6hdr->dest.addr[0], lowpan6_buffer + lowpan6_offset, 16); in lowpan6_decompress_hdr()
617 } else if ((lowpan6_buffer[1] & 0x03) == 0x01) { in lowpan6_decompress_hdr()
620 ip6hdr->dest.addr[0] = lwip_htonl(0xff000000UL | (lowpan6_buffer[lowpan6_offset++] << 16)); in lowpan6_decompress_hdr()
622 ip6hdr->dest.addr[2] = lwip_htonl(lowpan6_buffer[lowpan6_offset++]); in lowpan6_decompress_hdr()
623 …onl((lowpan6_buffer[lowpan6_offset] << 24) | (lowpan6_buffer[lowpan6_offset + 1] << 16) | (lowpan6… in lowpan6_decompress_hdr()
625 } else if ((lowpan6_buffer[1] & 0x03) == 0x02) { in lowpan6_decompress_hdr()
628 ip6hdr->dest.addr[0] = lwip_htonl(0xff000000UL | (lowpan6_buffer[lowpan6_offset++] << 16)); in lowpan6_decompress_hdr()
631 …dest.addr[3] = lwip_htonl((lowpan6_buffer[lowpan6_offset] << 16) | (lowpan6_buffer[lowpan6_offset … in lowpan6_decompress_hdr()
633 } else if ((lowpan6_buffer[1] & 0x03) == 0x03) { in lowpan6_decompress_hdr()
639 ip6hdr->dest.addr[3] = lwip_htonl(lowpan6_buffer[lowpan6_offset++]); in lowpan6_decompress_hdr()
644 if (lowpan6_buffer[1] & 0x04) { in lowpan6_decompress_hdr()
648 if (lowpan6_buffer[1] & 0x80) { in lowpan6_decompress_hdr()
649 i = lowpan6_buffer[2] & 0x0f; in lowpan6_decompress_hdr()
669 if ((lowpan6_buffer[1] & 0x03) == 0x00) { in lowpan6_decompress_hdr()
672 MEMCPY(&ip6hdr->dest.addr[0], lowpan6_buffer + lowpan6_offset, 16); in lowpan6_decompress_hdr()
674 } else if ((lowpan6_buffer[1] & 0x03) == 0x01) { in lowpan6_decompress_hdr()
677 MEMCPY(&ip6hdr->dest.addr[2], lowpan6_buffer + lowpan6_offset, 8); in lowpan6_decompress_hdr()
679 } else if ((lowpan6_buffer[1] & 0x03) == 0x02) { in lowpan6_decompress_hdr()
683 …ip6hdr->dest.addr[3] = lwip_htonl(0xfe000000UL | (lowpan6_buffer[lowpan6_offset] << 8) | lowpan6_b… in lowpan6_decompress_hdr()
685 } else if ((lowpan6_buffer[1] & 0x03) == 0x03) { in lowpan6_decompress_hdr()
704 if (lowpan6_buffer[0] & 0x04) { in lowpan6_decompress_hdr()
707 if ((lowpan6_buffer[lowpan6_offset] & 0xf8) == 0xf0) { in lowpan6_decompress_hdr()
720 if (lowpan6_buffer[lowpan6_offset] & 0x04) { in lowpan6_decompress_hdr()
727 i = lowpan6_buffer[lowpan6_offset++] & 0x03; in lowpan6_decompress_hdr()
729 …udphdr->src = lwip_htons(lowpan6_buffer[lowpan6_offset] << 8 | lowpan6_buffer[lowpan6_offset + 1]); in lowpan6_decompress_hdr()
730 …udphdr->dest = lwip_htons(lowpan6_buffer[lowpan6_offset + 2] << 8 | lowpan6_buffer[lowpan6_offset … in lowpan6_decompress_hdr()
733 …udphdr->src = lwip_htons(lowpan6_buffer[lowpan6_offset] << 8 | lowpan6_buffer[lowpan6_offset + 1]); in lowpan6_decompress_hdr()
734 udphdr->dest = lwip_htons(0xf000 | lowpan6_buffer[lowpan6_offset + 2]); in lowpan6_decompress_hdr()
737 udphdr->src = lwip_htons(0xf000 | lowpan6_buffer[lowpan6_offset]); in lowpan6_decompress_hdr()
738 …udphdr->dest = lwip_htons(lowpan6_buffer[lowpan6_offset + 1] << 8 | lowpan6_buffer[lowpan6_offset … in lowpan6_decompress_hdr()
741 udphdr->src = lwip_htons(0xf0b0 | ((lowpan6_buffer[lowpan6_offset] >> 4) & 0x0f)); in lowpan6_decompress_hdr()
742 udphdr->dest = lwip_htons(0xf0b0 | (lowpan6_buffer[lowpan6_offset] & 0x0f)); in lowpan6_decompress_hdr()
746 …udphdr->chksum = lwip_htons(lowpan6_buffer[lowpan6_offset] << 8 | lowpan6_buffer[lowpan6_offset + … in lowpan6_decompress_hdr()