News for hackers. Stuff that matters.
Re:Show HN: I made a discrete logic network card by jiveturkey on Tuesday April 09, 2024 @05:44AM (#39977765)
> Fixing the frame length doesn’t have any effect on higher-level protocols because they encode the packet size in their headers and do not rely on the actual Ethernet frame length.

Interesting. I just wrote a packet decoder and I specifically verify at each layer that the lower layer length matches. So for IP, in my decoder the IP datagram length must match exactly the ethernet frame length + link layer header. I didn't do this to be pedantic but rather to detect short frames, and then I decided that long frames were also errors.

You (author) are using uIP but I wonder what Linux or any other modern OS does. You don't specifically mention interoperability but I wonder if you've tested that.

Re:Show HN: I made a discrete logic network card by ynoxinul on Tuesday April 09, 2024 @06:30AM (#39977989)
I'm sending my long frames out to the network and no OS I have has any problem with that. I've read somewhere that long frames are actually used by some routers to store metadata after the packet.
Re:Show HN: I made a discrete logic network card by jiveturkey on Tuesday April 09, 2024 @03:24PM (#39983173)
wireshark doesn’t complain either?
Re:Show HN: I made a discrete logic network card by ynoxinul on Tuesday April 09, 2024 @03:33PM (#39983274)
Of course not. Long frames are totally valid.
Re:Show HN: I made a discrete logic network card by darrin on Tuesday April 09, 2024 @09:19AM (#39979152)
Timestamps and other types of in-band network telemetry are sometimes inserted in the frame as a trailer (with a new FCS). If an application isn't looking for the L2 data, it's just ignored by the Linux IP stack.