[Winpcap-users] Error Compilation Tutorial Gathering Statistics on the network traffic

Cirix MAN cirixman at hotmail.com
Tue Apr 25 11:25:16 GMT 2006


Hello with all developers,

I am currently trying to produce tools in C++ allowing to post the flow of a 
connection UDP on an interface. I used one of the tutorials of the WinPcap 
library in order to create a filter allowing to print in the screen only UDP 
packet on a port specified by the user. Unfortunately, I have some problems 
to compile the tutorial statistical WinpCap. Indeed, with Microsft Visual 
C++ Studio, I obtain the following errors :

c:\documents and settings\administrateur\mes 
documents\wpdpack\examples-pcap\ttt\cpp2.cpp(30) : error C2065: 'pcap_open' 
: undeclared identifier
c:\documents and settings\administrateur\mes 
documents\wpdpack\examples-pcap\ttt\cpp2.cpp(30) : error C2065: 
'PCAP_OPENFLAG_PROMISCUOUS' : undeclared identifier
c:\documents and settings\administrateur\mes 
documents\wpdpack\examples-pcap\ttt\cpp2.cpp(30) : error C2440: '=' : cannot 
convert from 'int' to 'struct pcap *'
        Conversion from integral type to pointer type requires 
reinterpret_cast, C-style cast or function-style cast

I use this same source code :

http://www.winpcap.org/docs/docs31/html/group__wpcap__tut9.html

Have already succeeds in itself compiling this code?

Thank you in advance, With kind regards

_________________________________________________________________
Retrouvez tout en un clin d'oeil avec la barre d'outil MSN Search ! 
http://desktop.msn.fr/



More information about the Winpcap-users mailing list