Witam,
mam problem z, ktorym juz troche sie mecze i zaczyna mnie to troche denerwowac. A mianowicie mam takie typy i nie mam pojęcia jak wydostac z pakietu TCP zapytanie http np:
GET / HTTP/1.1
Host: host.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.6) Gecko/20040122
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8
Accept-Language: pl,en-us;q=0.7,en;q=0.3
Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-aliveserwerem HTTP/1.0)
Typy
TEthernetHdr = packed record
Destination,
Source : MACADDRESS;
Protocol : WORD;
end;
(** Ethernet - Packet **)
PEthernetPckt = ^TEthernetPckt;
TEthernetPckt = Packed record
Header : TEthernetHdr;
Data : Array[0..0] of uchar;
End;
(** IP - Header **)
PIPHdr = ^TIPhdr;
TIPHdr = packed record
EthernetHeader : TEthernetHdr;
Verlen : UCHAR;
Service : UCHAR;
Length : WORD;
Ident : WORD;
Flagoff : WORD;
TimeLive : UCHAR;
Protocol : UCHAR;
Checksum : WORD;
Source : DWORD;
Destination : DWORD;
end;
(** IP - Packet **)
PIPPckt = ^TIPPckt;
TIPPckt = Packed record
IPHeaderr : TIPHdr;
Data : Array[0..0] of uchar;
End;
(** IP - TCP Header **)
PTCPHdr = ^TTCPHdr;
TTCPHdr = packed record
IPHeader : TIPHdr;
Source,
Destination : WORD;
Seq,
Ack : DWORD;
Off_Rsvd : UCHAR;
Rsvd_Flags : UCHAR;
Window : WORD;
Checksum : WORD;
UrgPoint : WORD;
end;
z góry dziękuję za pomoc