Hello-

I don't think the strcmp is the problem, I get the same error when I take that whole 
if statement out.

Also recvPacket is a struct/union that I created to help in reading headers and data, 
ect.

It is just curious that it always stops after 160 calls to pcap_next_ex... does that 
mean anything to anyone??

Thanks in advance...

Bill-

-----Original Message-----
From: Gisle Vanem [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 16, 2003 6:05 PM
To: [EMAIL PROTECTED]
Subject: Re: [WinPcap-users] pcap_next_ex Problem


"Speirs, William R (William)" <[EMAIL PROTECTED]> said:

> if(recvPacket.headers.transProto.myICMPHeader.sequence != SEQUENCE || 
> recvPacket.headers.transProto.myICMPHeader.type != 0x00 ||
>    strcmp(recvPacket.headers.theMessage, MESSAGE) != 0) continue; // wrong responce

Don't treat network packets as C-strings. It won't work.
You should also clear recvPacket before the read so old data won't
mess up current read.

--gv




==================================================================
 This is the WinPcap users list. It is archived at
 http://www.mail-archive.com/[EMAIL PROTECTED]/

 To unsubscribe use 
 mailto: [EMAIL PROTECTED]
==================================================================


==================================================================
 This is the WinPcap users list. It is archived at
 http://www.mail-archive.com/[EMAIL PROTECTED]/

 To unsubscribe use 
 mailto: [EMAIL PROTECTED]
==================================================================

Reply via email to