[Winpcap-users] Re: [error]'pcap_dump' : cannot convert parameter1 from 'struct pcap_dumper *' to 'unsigned char *'

Gianluca Varenni gianluca.varenni at cacetech.com
Mon May 15 16:05:40 GMT 2006


  ----- Original Message ----- 
  From: joe kibz 
  To: winpcap-users at winpcap.org 
  Sent: Monday, May 15, 2006 12:57 AM
  Subject: Re: [Winpcap-users] Re: [error]'pcap_dump' : cannot convert parameter1 from 'struct pcap_dumper *' to 'unsigned char *'


  It worked , i was wondering though won't a typecast from struct to char* result in MASSIVE data loss ?


You are not typecasting from a struct to a char*, but from struct* to a char* (so pointer to pointer). As a consequence, no data loss is involved.

Have a nice day
GV


  joe

  Guy Harris <guy at alum.mit.edu> wrote:
    joe kibz wrote:

    > the one error
    > cannot convert parameter 1 from 'struct pcap_dumper *' to 
    > 'unsigned char *'

    What happens if you explicitly cast the argument to "unsigned char *"?

    pcap_dump((unsigned char *)dumpfile, header, pkt_data);
    _______________________________________________
    Winpcap-users mailing list
    Winpcap-users at winpcap.org
    https://www.winpcap.org/mailman/listinfo/winpcap-users





------------------------------------------------------------------------------
  Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.


------------------------------------------------------------------------------


  _______________________________________________
  Winpcap-users mailing list
  Winpcap-users at winpcap.org
  https://www.winpcap.org/mailman/listinfo/winpcap-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20060515/7d1c6d45/attachment.htm


More information about the Winpcap-users mailing list