Thank you

I checked the protocol field in the ip header.  It is 6 for TCP packets
and 17 for UDP.  Are there any definitions for these values for the
protocol field?

-----Original Message-----
From: Flamur Rogova [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 31, 2005 6:14 AM
To: winpcap-users@winpcap.polito.it
Subject: Re: [WinPcap-users] determionation of the packet protocol


Hi,

> How can I determine after pcap_next_ex whether the caught packet was
> from UDP or TCP connection?

you have to parse IP header and read the protocol field, which tells
what type of packet is carried within IP packet, (TCP, UDP, ICMP, .... )

here is an example
http://winpcap.polito.it/docs/docs31beta4/html/index.html


Flamur Rogova


==================================================================
 This is the WinPcap users list. It is archived at
 http://www.mail-archive.com/winpcap-users@winpcap.polito.it/

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




==================================================================
 This is the WinPcap users list. It is archived at
 http://www.mail-archive.com/winpcap-users@winpcap.polito.it/

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

Reply via email to