[Winpcap-users] unexpected warning

Ziara . essence_z at hotmail.com
Mon Nov 26 14:56:49 GMT 2007


Hi again! yes, I read the winpcap FAQ and in this says that I have to convert wpcap.lib and packet.lib from coff format to omf format to use in Builder c++, and I think I obtain this.
 
But when I compile a example, It appear this warning, and the content of line 786 in wspiapi.h is:
 
if ((iFlags & NI_NOFQDN) && (pc = strchr(pszNode, '.')))
 
With this warning I can build the .exe file I don't know very well what's the meaning of the example, because when a run this .exe file, a ms-dos windows is opened and in a second it's closed, and I don't know what's is happened.
 
this is the example:
 
void dispatcher_handler(u_char *, const struct pcap_pkthdr *, const u_char *);
main(int argc, char **argv){ pcap_t *fp; char errbuf[PCAP_ERRBUF_SIZE];  if(argc != 2) {  printf("usage: %s filename", argv[0]);  return -1;
 }  /* Open the capture file */ if ((fp = pcap_open_offline(argv[1],   // name of the device       errbuf     // error buffer       )) == NULL) {  fprintf(stderr,"\nUnable to open the file %s.\n", argv[1]);  return -1; }
 /* read and dispatch packets until EOF is reached */ pcap_loop(fp, 0, dispatcher_handler, NULL);
 pcap_close(fp);  system("pause");
 return 0;}
 
void dispatcher_handler(u_char *temp1,      const struct pcap_pkthdr *header,      const u_char *pkt_data){ u_int i=0;
 /* print pkt timestamp and pkt len */ printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len);
 /* Print the packet */ for (i=1; (i < header->caplen + 1 ) ; i++) {  printf("%.2x ", pkt_data[i-1]);  if ( (i % LINE_LEN) == 0) printf("\n"); }
 printf("\n\n");
}
 
 
 


From: gianluca.varenni at cacetech.comTo: winpcap-users at winpcap.orgSubject: Re: RE:[Winpcap-users] unexpected warningDate: Fri, 23 Nov 2007 09:00:57 -0800

The WinPcap developer's pack doesn't official support the Borland C++ environment, so I'm just trying to guess what's going on.
 
What's the content of line 786 in wspiapi.h? That header file is a system include file (i.e. it doesn't come with WinPcap), so it's quite weird that the compiler spits out a warning on that file.
 
Have a nice day
GV
 
 

----- Original Message ----- 
From: nechoe_cn at sina.com 
To: winpcap-users at winpcap.org 
Sent: Thursday, November 22, 2007 4:34 PM
Subject: RE:[Winpcap-users] unexpected warning

----- Original Message -----From:Ziara . To:Subject:[Winpcap-users] unexpected warningDate:07-11-23 02:15:39

Hello, I'm now in this.. I'm using winpcap with builder c++ and when I build one example, it appear one warning said:  (C++ Warning) wspiapi.h(786): W8060 Possibly incorrect assignment and, I don't know why??  

Express yourself instantly with MSN Messenger! MSN Messenger _______________________________________________ Winpcap-users mailing list Winpcap-users at winpcap.org https://www.winpcap.org/mailman/listinfo/winpcap-users 

 
sorry,i did not study builder c++~-------------------------------------------------------------------贺金山上市 毒霸历史最低价 25元半年( http://d1.sina.com.cn/sina/limeng3/mail_zhuiyu/2007/mail_zhuiyu_20071112.html )===================================================================看股票最新行情,与大家分享讨论,新浪财经吧火热上线!( http://bar.sina.com.cn/channel.php?chid=1 ) 



_______________________________________________Winpcap-users mailing listWinpcap-users at winpcap.orghttps://www.winpcap.org/mailman/listinfo/winpcap-users
_________________________________________________________________
Tecnología, moda, motor, viajes,…suscríbete a nuestros boletines para estar a la última
http://newsletters.msn.com/hm/maintenanceeses.asp?L=ES&C=ES&P=WCMaintenance&Brand=WL&RU=http%3a%2f%2fmail.live.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20071126/3bf3363b/attachment.htm


More information about the Winpcap-users mailing list