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: eth/arp.cpp
- Revision:
- 35:93c39d260a83
- Parent:
- 30:e34173b7585c
- Child:
- 36:900e24b27bfb
--- a/eth/arp.cpp Fri Sep 01 15:06:59 2017 +0000 +++ b/eth/arp.cpp Fri Sep 22 13:55:56 2017 +0000 @@ -5,12 +5,14 @@ #include "mac.h" #include "dhcp.h" #include "ar.h" -#include "dnscache.h" +#include "nr.h" #include "io.h" #define REQUEST 1 #define REPLY 2 +#define DEBUG false + uint32_t ArpAddressToResolve; bool ArpResolveRequestFlag = false; @@ -53,8 +55,8 @@ memcpy(pDstMac, pSrcMac, 6); return UNICAST; case REPLY: - ArAdd4(pHeader->senderHardwareAddress, pHeader->senderProtocolAddress); - DnsCacheMakeRequestForNameFromIp4(pHeader->senderProtocolAddress); + ArAddIp4Record(pHeader->senderHardwareAddress, pHeader->senderProtocolAddress); + NrMakeRequestForNameFromIp4(pHeader->senderProtocolAddress); return DO_NOTHING; default: return DO_NOTHING; @@ -81,4 +83,4 @@ *pSize = sizeof(header); return BROADCAST; -} \ No newline at end of file +}