Tuesday 15 June 2010

linux - Is ethernet checksum exposed via AF_PACKET? -


As it is contained, it seems that checksum is calculated and verified by Ethernet hardware, so it is highly likely It is not necessary that it is necessary to send frames using the AFPACKET socket when generated by the software, and it seems. Apart from this, I do not think it can be obtained from the socket nor by any simple means, because even Virus Hark does not display it.

So can anyone confirm it? Do I need to send checksum to myself as shown in the last two links? Will checksum be automatically created and tested by the ethernet adapter?

No, you do not need to include it CRC.

When using the packet socket in Linux, while using the socket (AFIFKET, SOCK_RAU, HTTO (atop_AL)) , when you send the layer 2 headers when you send it < Defined in the code> struct ether_header in the netinet / if_ether.h and includes the destination host, source host and type. The frame check sequence is not included, nor is the introduction, frame delimiter or the beginning of the trailer. These are added by hardware.

No comments:

Post a Comment