lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Ethernet frames with extra padding bytes


From: Sergio R. Caprile
Subject: Re: [lwip-users] Ethernet frames with extra padding bytes
Date: Fri, 4 May 2018 11:19:25 -0300
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

All Ethernet frames must be at least 64 bytes long, in order to
guarantee for a collision to be detected on the longest possible
extension (4-repeaters joining 5 10base5 sections, iirc) where colliding
stations are at opposite ends.
That is total Ethernet frame length including preamble, actual payload
length is 46 bytes. If you see 64 bytes then you are probably getting a
whole raw frame.
lwIP expects proper layer-3 datagrams, you have to get rid of layer-2 stuff.
802.3 frames have a 'length' field, so padding bytes can be identified
and removed. This is the controller responsibility, but you can do it in
your driver if you can access the raw 802.3 frame.
With Ethernet that is not possible, in the days of old higher-layer
protocols were supposed to survive to padding bytes, but they must be zero.
So... Try to use 802.3 and check the length field; otherwise you have to
inspect IP and ARP to calculate actual length and clear out padding
bytes, in your driver, before delivering to lwIP




reply via email to

[Prev in Thread] Current Thread [Next in Thread]