Gary Spivey wrote:
Which apparently is packing 2 bytes worth of 0 into the ethernet header.
So ... the ethernet header is padding the packet with ETH_PAD_SIZE bytes of 0.
That's what ETH_PAD_SIZE is meant to do, yes. Obviously, you must not send out these 2 padding bytes on the wire...
So - is this the advised way to handle this?
No.
  (It works :-)
It might, for now, but it's not correct, and so might produce errors later.

There is a perfectly good example in our 'ethernetif.c' of how to handle pbuf chains in the send and receive path. Please follow them instead of creating your own code and wondering why it doesn't work.

In short, only the first pbuf of a chain has padding, the others don't.

Simon

_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to