[icmp6] allow config of echo handling for unicast/multicast separately (#2609)

Previously, ICMPv6 Echo Request handling was either enabled or disabled.
This commit allows enabling/disabling the handler for ICMPv6 Echo Requests
sent to unicast and multicast destinations separately.

This commit also adds an associated spinel property and NCP implementation.
This commit is contained in:
Jonathan Hui
2018-03-13 18:10:28 +00:00
committed by GitHub
parent 0dd689752c
commit f602dcd5e7
13 changed files with 172 additions and 22 deletions
@@ -786,7 +786,7 @@ otLwfEventWorkerThread(
NT_ASSERT(otCtxToFilter(pFilter->otCtx) == pFilter);
// Disable Icmp (ping) handling
otIcmp6SetEchoEnabled(pFilter->otCtx, FALSE);
otIcmp6SetEchoMode(pFilter->otCtx, OT_ICMP6_ECHO_HANDLER_DISABLED);
// Register callbacks with OpenThread
otSetStateChangedCallback(pFilter->otCtx, otLwfStateChangedCallback, pFilter);
+1 -1
View File
@@ -82,7 +82,7 @@ otPlatReset(
NT_ASSERT(otCtxToFilter(pFilter->otCtx) == pFilter);
// Disable Icmp (ping) handling
otIcmp6SetEchoEnabled(pFilter->otCtx, FALSE);
otIcmp6SetEchoMode(pFilter->otCtx, OT_ICMP6_ECHO_HANDLER_DISABLED);
// Register callbacks with OpenThread
otSetStateChangedCallback(pFilter->otCtx, otLwfStateChangedCallback, pFilter);