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: arp/arp.c
- Revision:
- 172:9bc3c7b2cca1
- Parent:
- 136:8a65abb0dc63
- Child:
- 187:122fc1996c86
--- a/arp/arp.c Sat Dec 12 20:10:02 2020 +0000
+++ b/arp/arp.c Wed Dec 16 17:33:22 2020 +0000
@@ -9,7 +9,7 @@
#include "mac.h"
#include "dhcp.h"
#include "ar4.h"
-#include "nr4.h"
+#include "nr.h"
#include "ip4addr.h"
#include "arphdr.h"
@@ -70,7 +70,7 @@
uint32_t targetProtocolAddress = ArpHdrGetTargetProtocolAddr(pPacketRx);
if (hardwareType != ETHERNET ) return DO_NOTHING; //This is not ethernet
- if (protocolType != IPV4 ) return DO_NOTHING; //This is not IPv4
+ if (protocolType != ETH_IPV4 ) return DO_NOTHING; //This is not IPv4
if (hardwareLength != 6 ) return DO_NOTHING; //This is not a MAC hardware address
if (protocolLength != 4 ) return DO_NOTHING; //This is not an IPv4 IP address
if (targetProtocolAddress != DhcpLocalIp ) return DO_NOTHING; //This packet was not addressed to us
@@ -86,7 +86,7 @@
logHeader(pPacketRx);
}
ArpHdrSetHardwareType (pPacketTx, ETHERNET );
- ArpHdrSetProtocolType (pPacketTx, IPV4 );
+ ArpHdrSetProtocolType (pPacketTx, ETH_IPV4 );
ArpHdrSetHardwareLength (pPacketTx, 6 );
ArpHdrSetProtocolLength (pPacketTx, 4 );
ArpHdrSetOpCode (pPacketTx, REPLY );
@@ -107,7 +107,7 @@
logHeader(pPacketRx);
}
Ar4AddIpRecord(trace, ArpHdrPtrSenderHardwareAddr(pPacketRx), ArpHdrGetSenderProtocolAddr(pPacketRx));
- Nr4MakeRequestForNameFromIp(ArpHdrGetSenderProtocolAddr(pPacketRx));
+ NrMakeRequestForNameFromAddress4(ArpHdrGetSenderProtocolAddr(pPacketRx));
return DO_NOTHING;
default:
@@ -120,7 +120,7 @@
ArpResolveRequestFlag = false;
ArpHdrSetHardwareType (pPacketTx, ETHERNET );
- ArpHdrSetProtocolType (pPacketTx, IPV4 );
+ ArpHdrSetProtocolType (pPacketTx, ETH_IPV4 );
ArpHdrSetHardwareLength (pPacketTx, 6 );
ArpHdrSetProtocolLength (pPacketTx, 4 );
ArpHdrSetOpCode (pPacketTx, REQUEST );