mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
wireless/ieee802154: Add initialization logic for loopback driver; configs/sim: Add configuration for testing 6loWPAN; net/sixlowpan: Fix for compilation with debug output enabled.
This commit is contained in:
@@ -455,7 +455,7 @@ void sixlowpan_compresshdr_hc06(FAR struct ieee802154_driver_s *ieee,
|
||||
uint8_t iphc1;
|
||||
uint8_t tmp;
|
||||
|
||||
ninfodumpbuffer("IPv6 before compression", ipv6, sizeof(ipv6_hdr_s));
|
||||
ninfodumpbuffer("IPv6 before compression", ipv6, sizeof(struct ipv6_hdr_s));
|
||||
|
||||
g_hc06ptr = g_rimeptr + 2;
|
||||
|
||||
|
||||
@@ -470,7 +470,8 @@ copypayload:
|
||||
}
|
||||
#endif /* CONFIG_NET_6LOWPAN_FRAG */
|
||||
|
||||
ninfodumpbuffer("IPv6 header", IPv6BUF(ieee->i_dev), IPv6_HDRLEN)
|
||||
ninfodumpbuffer("IPv6 header", (FAR const uint8_t *)IPv6BUF(&ieee->i_dev),
|
||||
IPv6_HDRLEN);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -249,7 +249,8 @@ ssize_t psock_6lowpan_tcp_send(FAR struct socket *psock, FAR const void *buf,
|
||||
net_ipv6addr_hdrcopy(ipv6tcp.ipv6.srcipaddr, conn->u.ipv6.laddr);
|
||||
net_ipv6addr_hdrcopy(ipv6tcp.ipv6.destipaddr, conn->u.ipv6.raddr);
|
||||
|
||||
ninfo("IPv6 length: %d\n", ((int)ipv6->len[0] << 8) + ipv6->len[1]);
|
||||
ninfo("IPv6 length: %d\n",
|
||||
((int)ipv6tcp.ipv6.len[0] << 8) + ipv6tcp.ipv6.len[1]);
|
||||
|
||||
#ifdef CONFIG_NET_STATISTICS
|
||||
g_netstats.ipv6.sent++;
|
||||
@@ -289,7 +290,7 @@ ssize_t psock_6lowpan_tcp_send(FAR struct socket *psock, FAR const void *buf,
|
||||
ipv6tcp.tcp.tcpchksum = 0;
|
||||
ipv6tcp.tcp.tcpchksum = ~sixlowpan_tcp_chksum(&ipv6tcp, buf, buflen);
|
||||
|
||||
ninfo("Outgoing TCP packet length: %d bytes\n", iplen + IOPv6_HDRLEN);
|
||||
ninfo("Outgoing TCP packet length: %d bytes\n", iplen + IPv6_HDRLEN);
|
||||
|
||||
#ifdef CONFIG_NET_STATISTICS
|
||||
g_netstats.tcp.sent++;
|
||||
|
||||
@@ -263,7 +263,8 @@ ssize_t psock_6lowpan_udp_sendto(FAR struct socket *psock,
|
||||
net_ipv6addr_hdrcopy(ipv6udp.ipv6.srcipaddr, to6->sin6_addr.in6_u.u6_addr16);
|
||||
net_ipv6addr_hdrcopy(ipv6udp.ipv6.destipaddr, conn->u.ipv6.raddr);
|
||||
|
||||
ninfo("IPv6 length: %d\n", ((int)ipv6->len[0] << 8) + ipv6->len[1]);
|
||||
ninfo("IPv6 length: %d\n",
|
||||
((int)ipv6udp.ipv6.len[0] << 8) + ipv6udp.ipv6.len[1]);
|
||||
|
||||
#ifdef CONFIG_NET_STATISTICS
|
||||
g_netstats.ipv6.sent++;
|
||||
|
||||
Reference in New Issue
Block a user