A stack which works with or without an Mbed os library. Provides IPv4 or IPv6 with a full 1500 byte buffer.
Dependents: oldheating gps motorhome heating
Diff: ip6/ip6.cpp
- Revision:
- 34:e3a7bff69bfc
- Parent:
- 30:e34173b7585c
- Child:
- 35:93c39d260a83
--- a/ip6/ip6.cpp Wed Aug 23 18:02:42 2017 +0000 +++ b/ip6/ip6.cpp Fri Sep 01 15:06:59 2017 +0000 @@ -13,6 +13,7 @@ #include "io.h" #define DEBUG false +#define SHOW_FILTERED true static void addHexNibble(bool* pAdded, int number, int index, char** pp) @@ -171,13 +172,13 @@ bool isMe = getIsSame(Ip6Dst, SlaacLinkLocalIp) || getIsSame(Ip6Dst, SlaacGlobalIp); bool isMulticast = Ip6Dst[0] == 0xFF; bool isSolicited = getIsSolicited(Ip6Dst); - bool isGroup = isSolicited && getIsSameGroup(Ip6Dst, SlaacLinkLocalIp); + bool isGroup = getIsSameGroup(Ip6Dst, SlaacLinkLocalIp); - bool doIt = isMe || (isMulticast && !isSolicited) || isGroup; + bool doIt = isMe || (isMulticast && !isSolicited) || (isGroup && isSolicited); if (!doIt) { - if (DEBUG) + if (DEBUG || SHOW_FILTERED) { char text[100]; Ip6AddressToString(Ip6Dst, sizeof(text), text);