Skip to content

Commit

Permalink
added processing for logging count of unknown RPL codes, and now coun…
Browse files Browse the repository at this point in the history
…t the DIS
  • Loading branch information
mcr committed Nov 7, 2015
1 parent cd51567 commit 32f8206
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile.ver
@@ -1,4 +1,4 @@
PANDORA_VERSION=1.11.0
PANDORA_VERSION=1.11.1
BUILDNUMBER="$(shell date +%Y%m%d_%s)"


3 changes: 3 additions & 0 deletions include/counter_names.h
Expand Up @@ -23,6 +23,9 @@ enum packet_stats {
PS_DAOACK_NO_DAGID_IGNORED,
PS_DAOACK_WRONG_PARENT,
PS_DAOACK_WRONG_SEQNO,
PS_RPL_UNKNOWN_CODE,
PS_DIS_PACKET_RECEIVED,
PS_DIS_PACKET_IGNORED,
PS_MAX,
};

Expand Down
12 changes: 10 additions & 2 deletions lib/libndmgmt/iface.cpp
Expand Up @@ -546,9 +546,17 @@ void network_interface::receive_packet(struct in6_addr ip6_src,
icmp6->icmp6_data8, bytes_end - icmp6->icmp6_data8);
break;

case ND_RPL_DAG_IS:
dag_network::globalStats[PS_DIS_PACKET_IGNORED]++;
#if 0
this->receive_dis(ip6_src, ip6_dst, now,
icmp6->icmp6_data8, bytes_end - icmp6->icmp6_data8);
#endif
break;

default:
this->log_received_packet(ip6_src, ip6_dst);
logged=true;
this->log_received_packet(ip6_src, ip6_dst); logged=true;
dag_network::globalStats[PS_RPL_UNKNOWN_CODE]++;
debug->warn("Got unknown RPL code: %u\n", icmp6->icmp6_code);
break;
}
Expand Down

0 comments on commit 32f8206

Please sign in to comment.