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:
- 86:55bc5ddac16c
- Parent:
- 61:aad055f1b0d1
- Child:
- 94:e2973a2c488e
--- a/eth/eth.c Sat Nov 17 18:50:48 2018 +0000 +++ b/eth/eth.c Sun Nov 18 12:13:15 2018 +0000 @@ -67,10 +67,16 @@ int dataLengthTx = *pSizeTx - sizeof(struct header); if (dataLengthTx > MTU) dataLengthTx = MTU; //Limit the transmitted length to the maximum ethernet frame payload length - if (!MacAccept(pHeaderRx->dst)) return DO_NOTHING; + if (!MacAccept(pHeaderRx->dst)) + { + return DO_NOTHING; + } protocol = NetToHost16(pHeaderRx->typ); - if (protocol < 1500) return DO_NOTHING; //drop 802.3 messages + if (protocol < 1500) + { + return DO_NOTHING; //drop 802.3 messages + } NetTraceHostCheckMac(pHeaderRx->src); @@ -91,7 +97,10 @@ LogTimeF("ETH protocol %d not handled", protocol); break; } - if (!action) return DO_NOTHING; + if (!action) + { + return DO_NOTHING; + } MacMakeFromDest(ActionGetDestPart(action), protocol, macRemote); MacCopy(pHeaderTx->src, MacLocal);