Skip to content
Snippets Groups Projects
Commit e3a2422b authored by Cenk Gündoğan's avatar Cenk Gündoğan
Browse files

Merge pull request #3189 from authmillenon/ng_net/enh-fix/debug

ng_net: fixes and enhancements to DEBUG output in IPv6 related modules
parents 1487b1c8 64303f66
Branches
No related tags found
No related merge requests found
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "net/ng_netbase.h" #include "net/ng_netbase.h"
#include "od.h"
#include "net/ng_icmpv6.h" #include "net/ng_icmpv6.h"
#include "net/ng_icmpv6/echo.h" #include "net/ng_icmpv6/echo.h"
#include "utlist.h" #include "utlist.h"
......
...@@ -80,6 +80,7 @@ void ng_ipv6_demux(kernel_pid_t iface, ng_pktsnip_t *pkt, uint8_t nh) ...@@ -80,6 +80,7 @@ void ng_ipv6_demux(kernel_pid_t iface, ng_pktsnip_t *pkt, uint8_t nh)
switch (nh) { switch (nh) {
case NG_PROTNUM_ICMPV6: case NG_PROTNUM_ICMPV6:
DEBUG("ipv6: handle ICMPv6 packet (nh = %" PRIu8 ")\n", nh);
ng_icmpv6_demux(iface, pkt); ng_icmpv6_demux(iface, pkt);
break; break;
#ifdef MODULE_NG_IPV6_EXT #ifdef MODULE_NG_IPV6_EXT
...@@ -90,6 +91,7 @@ void ng_ipv6_demux(kernel_pid_t iface, ng_pktsnip_t *pkt, uint8_t nh) ...@@ -90,6 +91,7 @@ void ng_ipv6_demux(kernel_pid_t iface, ng_pktsnip_t *pkt, uint8_t nh)
case NG_PROTNUM_IPV6_EXT_AH: case NG_PROTNUM_IPV6_EXT_AH:
case NG_PROTNUM_IPV6_EXT_ESP: case NG_PROTNUM_IPV6_EXT_ESP:
case NG_PROTNUM_IPV6_EXT_MOB: case NG_PROTNUM_IPV6_EXT_MOB:
DEBUG("ipv6: handle extension header (nh = %" PRIu8 ")\n", nh);
if (!ng_ipv6_ext_demux(iface, pkt, nh)) { if (!ng_ipv6_ext_demux(iface, pkt, nh)) {
DEBUG("ipv6: unable to parse extension headers.\n"); DEBUG("ipv6: unable to parse extension headers.\n");
ng_pktbuf_release(pkt); ng_pktbuf_release(pkt);
...@@ -97,12 +99,14 @@ void ng_ipv6_demux(kernel_pid_t iface, ng_pktsnip_t *pkt, uint8_t nh) ...@@ -97,12 +99,14 @@ void ng_ipv6_demux(kernel_pid_t iface, ng_pktsnip_t *pkt, uint8_t nh)
} }
#endif #endif
case NG_PROTNUM_IPV6: case NG_PROTNUM_IPV6:
DEBUG("ipv6: handle encapsulated IPv6 packet (nh = %" PRIu8 ")\n", nh);
_decapsulate(pkt); _decapsulate(pkt);
break; break;
default: default:
break; break;
} }
DEBUG("ipv6: forward nh = %" PRIu8 " to other threads\n", nh);
receiver_num = ng_netreg_num(pkt->type, NG_NETREG_DEMUX_CTX_ALL) + receiver_num = ng_netreg_num(pkt->type, NG_NETREG_DEMUX_CTX_ALL) +
ng_netreg_num(NG_NETTYPE_IPV6, nh); ng_netreg_num(NG_NETTYPE_IPV6, nh);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment