[Winpcap-users] error compiling udp = (udp_header*)((u_char*)ip +ip_len);

Gianluca Varenni gianluca.varenni at cacetech.com
Thu Mar 13 22:30:11 GMT 2008

you declared udp in the wrong way. you probably wrote

udp_header udp;

while it should be

udp_header *udp;

BTW, the error message from the compiler tells you what you are doing wrong: you are converting a "udp_header*" (the right side of the assignment) to a "udp_header" type (left hand side of the assignment).


  ----- Original Message ----- 
  From: Ziara . 
  To: winpcap 
  Sent: Thursday, March 13, 2008 12:00 PM
  Subject: [Winpcap-users] error compiling udp = (udp_header*)((u_char*)ip +ip_len); 

  Hello, i'm compiling my application in builder c++ v6 and when I add:
  u_int ip_len = (ip->ver_ihl & 0xf) * 4; //Longitud de Ip header
  udp = (udp_header*)((u_char*)ip + ip_len);
  where ip_header *ip;
  I have a error in the line number two:
  cannot convert udp_header*  to udp_header
  I don't know what happend. Someone know?
  thanks in advanced

  Todo ruedas: información práctica y todo el glamour del mundo del motor. MSN Estilo y Tendencias 


  Winpcap-users mailing list
  Winpcap-users at winpcap.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20080313/8d9150c8/attachment.htm

More information about the Winpcap-users mailing list