Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: oldheating gps motorhome heating
Diff: ip6/icmp/icmp6.cpp
- Revision:
- 44:83ce5ace337b
- Parent:
- 43:bc028d5a6424
- Child:
- 46:40d33e9037e4
--- a/ip6/icmp/icmp6.cpp Thu Oct 19 20:56:58 2017 +0000
+++ b/ip6/icmp/icmp6.cpp Sun Oct 22 17:19:17 2017 +0000
@@ -104,7 +104,7 @@
pTraceBack();
logHeader();
}
-int Icmp6HandleReceivedPacket(void (*traceback)(void), char* pSrcIp, char* pDstIp, int* pSize, void* pPacket)
+int Icmp6HandleReceivedPacket(void (*traceback)(void), int scope, char* pSrcIp, char* pDstIp, int* pSize, void* pPacket)
{
pTraceBack = traceback;
@@ -134,8 +134,8 @@
if (!action) return DO_NOTHING;
Ip6Copy(pDstIp, pSrcIp);
- Ip6Copy(pSrcIp, SlaacLinkLocalIp);
- Ip6DestIpFromDest(ActionGetDestPart(action), pDstIp);
+ Ip6SrcIpFromScope(scope, pSrcIp);
+ Ip6DstIpFromDest(ActionGetDestPart(action), pDstIp);
*pSize = HEADER_LENGTH + dataLength;
@@ -153,9 +153,9 @@
if (!action) action = NsGetWaitingSolicitation(pData, &dataLength, &type, &code);
if (!action) return DO_NOTHING;
- Ip6Copy(pSrcIp, SlaacLinkLocalIp);
-
- Ip6DestIpFromDest(ActionGetDestPart(action), pDstIp);
+ int scope = SCOPE_LOCAL;
+ Ip6SrcIpFromScope(scope, pSrcIp);
+ Ip6DstIpFromDest(ActionGetDestPart(action), pDstIp);
*pSize = HEADER_LENGTH + dataLength;