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:
- 46:40d33e9037e4
- Parent:
- 44:83ce5ace337b
- Child:
- 47:73af5c0b0dc2
--- a/ip6/ip6.cpp Sun Oct 22 17:19:48 2017 +0000 +++ b/ip6/ip6.cpp Tue Oct 24 07:01:35 2017 +0000 @@ -10,7 +10,7 @@ #include "eth.h" #include "ip.h" #include "ip6.h" -#include "ra.h" +#include "ndp.h" #include "io.h" #include "ntp.h" #include "mac.h" @@ -80,7 +80,7 @@ switch (dest) { case UNICAST: break; - case UNICAST_DNS: Ip6Copy(pDstIp, RaDnsServer ); break; + case UNICAST_DNS: Ip6Copy(pDstIp, NdpDnsServer ); break; case UNICAST_NTP: Ip6Copy(pDstIp, NtpServerIp6 ); break; case MULTICAST_NODE: Ip6Copy(pDstIp, Ip6AllNodes ); break; case MULTICAST_ROUTER: Ip6Copy(pDstIp, Ip6AllRouters); break; @@ -249,8 +249,8 @@ } if (!action) return DO_NOTHING; - if (RaIpNeedsToBeRouted(dstIp)) MacCopy(pDstMac, RaRouterMac); //Send to the router MAC - else MacCopy(pDstMac, pSrcMac); //Send back to the source + if (NdpIpNeedsToBeRouted(dstIp)) MacCopy(pDstMac, NdpRouterMac); //Send to the router MAC + else MacCopy(pDstMac, pSrcMac); //Send back to the source writeHeader(pHeader); @@ -288,8 +288,8 @@ case UNICAST_DNS: case UNICAST_DHCP: case UNICAST_NTP: - if (RaIpNeedsToBeRouted(dstIp)) MacCopy(pDstMac, RaRouterMac); //Send to the router MAC - else ArIpToMac6(dstIp, pDstMac); //Make the remote MAC from NP + if (NdpIpNeedsToBeRouted(dstIp)) MacCopy (pDstMac, NdpRouterMac); //Send to the router MAC + else ArIpToMac6(dstIp, pDstMac); //Make the remote MAC from NP break; case MULTICAST_NODE: case MULTICAST_ROUTER: