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
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,7 @@
#include "net/ng_netbase.h"
#include "od.h"
#include "net/ng_icmpv6.h"
#include "net/ng_icmpv6/echo.h"
#include "utlist.h"
......
......@@ -80,6 +80,7 @@ void ng_ipv6_demux(kernel_pid_t iface, ng_pktsnip_t *pkt, uint8_t nh)
switch (nh) {
case NG_PROTNUM_ICMPV6:
DEBUG("ipv6: handle ICMPv6 packet (nh = %" PRIu8 ")\n", nh);
ng_icmpv6_demux(iface, pkt);
break;
#ifdef MODULE_NG_IPV6_EXT
......@@ -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_ESP:
case NG_PROTNUM_IPV6_EXT_MOB:
DEBUG("ipv6: handle extension header (nh = %" PRIu8 ")\n", nh);
if (!ng_ipv6_ext_demux(iface, pkt, nh)) {
DEBUG("ipv6: unable to parse extension headers.\n");
ng_pktbuf_release(pkt);
......@@ -97,12 +99,14 @@ void ng_ipv6_demux(kernel_pid_t iface, ng_pktsnip_t *pkt, uint8_t nh)
}
#endif
case NG_PROTNUM_IPV6:
DEBUG("ipv6: handle encapsulated IPv6 packet (nh = %" PRIu8 ")\n", nh);
_decapsulate(pkt);
break;
default:
break;
}
DEBUG("ipv6: forward nh = %" PRIu8 " to other threads\n", nh);
receiver_num = ng_netreg_num(pkt->type, NG_NETREG_DEMUX_CTX_ALL) +
ng_netreg_num(NG_NETTYPE_IPV6, nh);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment