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/eth.cpp
- Revision:
- 43:bc028d5a6424
- Parent:
- 42:222a4f45f916
- Child:
- 44:83ce5ace337b
--- a/eth/eth.cpp Sun Oct 15 17:54:09 2017 +0000
+++ b/eth/eth.cpp Thu Oct 19 20:56:58 2017 +0000
@@ -48,10 +48,26 @@
void LogHeader(struct header* pHeader)
{
char text[20];
- Log("ETH header\r\n");
- MacToString(pHeader->dst, sizeof(text), text); LogF(" Destination: %s\r\n", text);
- MacToString(pHeader->src, sizeof(text), text); LogF(" Source: %s\r\n", text);
- EthProtocolToString(NetToHost16(pHeader->typ), sizeof(text), text); LogF(" EtherType: %s\r\n", text);
+ if (NetTraceVerbose)
+ {
+ Log ("ETH header\r\n");
+ MacToString(pHeader->dst, sizeof(text), text); LogF(" Destination: %s\r\n", text);
+ MacToString(pHeader->src, sizeof(text), text); LogF(" Source: %s\r\n", text);
+ EthProtocolToString(NetToHost16(pHeader->typ), sizeof(text), text); LogF(" EtherType: %s\r\n", text);
+ }
+ else
+ {
+ Log("ETH header ");
+ EthProtocolToString(NetToHost16(pHeader->typ), sizeof(text), text);
+ Log(text);
+ Log(" ");
+ MacToString(pHeader->src, sizeof(text), text);
+ Log(text);
+ Log(" >>> ");
+ MacToString(pHeader->dst, sizeof(text), text);
+ Log(text);
+ Log("\r\n");
+ }
}
static void (*pTraceBack)(void);
static void* tracePacket;