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:
- 94:e2973a2c488e
- Parent:
- 86:55bc5ddac16c
- Child:
- 97:d91f7db00235
--- a/eth/eth.c Sun Dec 02 18:40:35 2018 +0000 +++ b/eth/eth.c Wed Dec 05 18:30:37 2018 +0000 @@ -118,7 +118,8 @@ struct header * pHeader = (struct header*)pPacket; void* pData = (char*)pPacket + sizeof(struct header); - int dataLength = 0; + int dataLength = *pSize - sizeof(struct header); + if (dataLength > MTU) dataLength = MTU; //Limit the transmitted length to the maximum ethernet frame payload length protocol = 0; int action = DO_NOTHING; if (!action)