I can not read Ethernet headers.
***************************************************
type
ETHERNET_HDR = packed record
Destination: TEtherAddr;
Source: TEtherAddr;
Protocol: word;
Data: array[0..0] of UCHAR;
end;
PETHERNET_HDR = ^ETHERNET_HDR;
.
.
.
const
MAX_CHAR = 1024 * 5;
var
buf: Array[0..MAX_CHAR] Of char;
iRet: Integer;
EthernetHdr: PETHERNET_HDR;
RawSocket: TSocket;
begin
iRet:=recv(RawSocket,buf,sizeof(buf),0);
EthernetHdr:=PETHERNET_HDR(@buf);
but from buf I read only IP, UDP, TCP
IP – UDP
4500 00CA DC6D 0000 8011 DB63 C0A8 0002 C0A8 00FF 008A 008A
00B6 03CA 1102 8384 C0A8 0002 008A 00A0 0000 2045 4945 5045
4E45 4643 4143 ….
…………….
Help!