mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-26 15:03:53 +01:00
net: fix header dumps for nanospec newlib
This commit is contained in:
parent
156cd54140
commit
11d3cd8efa
@ -25,11 +25,12 @@ void ipv6_hdr_print(ipv6_hdr_t *hdr)
|
||||
printf("illegal version field: %" PRIu8 "\n", ipv6_hdr_get_version(hdr));
|
||||
}
|
||||
|
||||
printf("traffic class: 0x%02" PRIx8 " (ECN: 0x%" PRIx8 ", DSCP: 0x%02" PRIx8 ")\n",
|
||||
ipv6_hdr_get_tc(hdr), ipv6_hdr_get_tc_ecn(hdr), ipv6_hdr_get_tc_dscp(hdr));
|
||||
printf("traffic class: 0x%02x (ECN: 0x%x, DSCP: 0x%02x)\n",
|
||||
(unsigned)ipv6_hdr_get_tc(hdr), (unsigned)ipv6_hdr_get_tc_ecn(hdr),
|
||||
(unsigned)ipv6_hdr_get_tc_dscp(hdr));
|
||||
printf("flow label: 0x%05" PRIx32 "\n", ipv6_hdr_get_fl(hdr));
|
||||
printf("length: %" PRIu16 " next header: %" PRIu8 " hop limit: %" PRIu8 "\n",
|
||||
byteorder_ntohs(hdr->len), hdr->nh, hdr->hl);
|
||||
printf("length: %" PRIu16 " next header: %u hop limit: %u\n",
|
||||
byteorder_ntohs(hdr->len), (unsigned)hdr->nh, (unsigned)hdr->hl);
|
||||
printf("source address: %s\n", ipv6_addr_to_str(addr_str, &hdr->src,
|
||||
sizeof(addr_str)));
|
||||
printf("destination address: %s\n", ipv6_addr_to_str(addr_str, &hdr->dst,
|
||||
|
||||
@ -55,7 +55,7 @@ void sixlowpan_print(uint8_t *data, size_t size)
|
||||
printf("datagram size: %" PRIu16 "\n",
|
||||
(uint16_t) (byteorder_ntohs(hdr->disp_size) & SIXLOWPAN_FRAG_SIZE_MASK));
|
||||
printf("tag: 0x%" PRIu16 "\n", byteorder_ntohs(hdr->tag));
|
||||
printf("offset: 0x%" PRIu8 "\n", hdr->offset);
|
||||
printf("offset: 0x%u\n", (unsigned)hdr->offset);
|
||||
|
||||
od_hex_dump(data + sizeof(sixlowpan_frag_n_t),
|
||||
size - sizeof(sixlowpan_frag_n_t),
|
||||
@ -239,8 +239,8 @@ void sixlowpan_print(uint8_t *data, size_t size)
|
||||
|
||||
if (data[1] & SIXLOWPAN_IPHC2_CID_EXT) {
|
||||
offset += SIXLOWPAN_IPHC_CID_EXT_LEN;
|
||||
printf("SCI: 0x%" PRIx8 "; DCI: 0x%" PRIx8 "\n",
|
||||
(uint8_t) (data[2] >> 4), (uint8_t) (data[2] & 0xf));
|
||||
printf("SCI: 0x%x, DCI: 0x%x\n", (unsigned)(data[2] >> 4),
|
||||
(unsigned)(data[2] & 0xf));
|
||||
}
|
||||
|
||||
od_hex_dump(data + offset, size - offset, OD_WIDTH_DEFAULT);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user