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: eth/arp.cpp
- Revision:
- 47:73af5c0b0dc2
- Parent:
- 44:83ce5ace337b
- Child:
- 48:952dddb74b8b
--- a/eth/arp.cpp Tue Oct 24 07:01:35 2017 +0000 +++ b/eth/arp.cpp Thu Oct 26 14:50:24 2017 +0000 @@ -34,36 +34,30 @@ static void logHeader(void * pPacket) { struct header* pHeader = (header*)pPacket; - char text[30]; if (NetTraceVerbose) { LogTime("ARP header\r\n"); if (NetToHost16(pHeader->hardwareType) == ETHERNET) Log (" hardwareType = ETHERNET\r\n"); else LogF(" hardwareType = %d\r\n", NetToHost16(pHeader->hardwareType)); - EthProtocolToString(NetToHost16(pHeader->protocolType), sizeof(text), text); - LogF(" protocolType = %s\r\n", text); + Log (" protocolType = "); EthProtocolLog(pHeader->protocolType); Log("\r\n"); LogF(" hardwareLength = %d\r\n", pHeader->hardwareLength); LogF(" protocolLength = %d\r\n", pHeader->protocolLength); if (NetToHost16(pHeader->opCode) == REQUEST) Log (" opCode = REQUEST\r\n"); else if (NetToHost16(pHeader->opCode) == REPLY ) Log (" opCode = REPLY\r\n"); else LogF(" opCode = %d\r\n", NetToHost16(pHeader->opCode)); - MacToString(pHeader->senderHardwareAddress, sizeof(text), text); - LogF(" senderHardwareAddress = %s\r\n", text); - Ip4AddressToString(pHeader->senderProtocolAddress, sizeof(text), text); - LogF(" senderProtocolAddress = %s\r\n", text); - MacToString(pHeader->targetHardwareAddress, sizeof(text), text); - LogF(" targetHardwareAddress = %s\r\n", text); - Ip4AddressToString(pHeader->targetProtocolAddress, sizeof(text), text); - LogF(" targetProtocolAddress = %s\r\n", text); + Log(" senderHardwareAddress = "); MacLog(pHeader->senderHardwareAddress); Log("\r\n"); + Log(" senderProtocolAddress = "); Ip4AddressLog(pHeader->senderProtocolAddress); Log("\r\n"); + Log(" targetHardwareAddress = "); MacLog(pHeader->targetHardwareAddress); Log("\r\n"); + Log(" targetProtocolAddress = "); Ip4AddressLog(pHeader->targetProtocolAddress); Log("\r\n"); } else { Log("ARP header "); - MacToString (pHeader->senderHardwareAddress, sizeof(text), text); Log(text); - Ip4AddressToString(pHeader->senderProtocolAddress, sizeof(text), text); Log("=="); LogF(text); Log(" >>> "); - MacToString (pHeader->targetHardwareAddress, sizeof(text), text); LogF(text); - Ip4AddressToString(pHeader->targetProtocolAddress, sizeof(text), text); Log("=="); LogF(text); Log("\r\n"); + MacLog(pHeader->senderHardwareAddress); Log("=="); + Ip4AddressLog(pHeader->senderProtocolAddress); Log(" >>> "); + MacLog(pHeader->targetHardwareAddress); Log("=="); + Ip4AddressLog(pHeader->targetProtocolAddress); Log("\r\n"); } }