How to detect and remove ethernet padding
<p>I am writing the network stack for my os.
While receiving the data from ethernet, I have to detect and remove the padding if data is less than 64 bytes and set the data length, as the standard says.</p>

<p>What is the algorithm for doing this?</p>

<p>If the data contains 'a0' , it is less than 64 bytes and it will be padded. If I am checking bytewise, I will get the second bye 0, so it will also be counted as padded data, however it is not.</p>