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/eth.c
- Revision:
- 171:f708d6776752
- Parent:
- 142:a8c0890a58d1
- Child:
- 172:9bc3c7b2cca1
diff -r 96c637dc3f52 -r f708d6776752 eth/eth.c --- a/eth/eth.c Wed Dec 09 18:11:05 2020 +0000 +++ b/eth/eth.c Sat Dec 12 20:10:02 2020 +0000 @@ -20,14 +20,14 @@ static uint16_t hdrTypGet(char* pPacket) { uint16_t res; NetInvert16(&res, hdrTypPtr(pPacket) ); return res; } static void hdrTypSet(char* pPacket, uint16_t value) { NetInvert16( hdrTypPtr(pPacket), &value); } -void EthProtocolLog(uint16_t prototype) +void EthProtocolLog(uint16_t protocol) { - switch (prototype) + switch (protocol) { - case ARP: Log("ARP"); break; - case IPV4: Log("IPV4"); break; - case IPV6: Log("IPV6"); break; - default: LogF("%04hX", prototype); break; + case ARP: Log("ARP"); break; + case IPV4: Log("IPV4"); break; + case IPV6: Log("IPV6"); break; + default: LogF("%04hX", protocol); break; } } void LogHeader(char* pPacket)