[Winpcap-users] The example of "Sending Packets" for "Send queues" can't be work at my computer
Sean Chen
seanchen.mvp at gmail.com
Tue Jan 3 18:52:01 PST 2012
*When I use the source code of Send queses there was a problem as follows:*
1>------ Build started: Project: winpcap1, Configuration: Debug Win32 ------
1>Compiling...
1>main.c
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(54) : error
C2065: 'pcap_send_queue' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(54) : error
C2065: 'squeue' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(54) : warning
C4552: '*' : operator has no effect; expected operator with side-effect
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(55) : error
C2143: syntax error : missing ';' before 'type'
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(56) : error
C2275: 'u_char' : illegal use of this type as an expression
1> c:\program files\microsoft
sdks\windows\v6.0a\include\winsock2.h(103) : see declaration of 'u_char'
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(56) : error
C2065: 'pktdata' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(57) : error
C2143: syntax error : missing ';' before 'type'
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(58) : error
C2275: 'u_int' : illegal use of this type as an expression
1> c:\program files\microsoft
sdks\windows\v6.0a\include\winsock2.h(105) : see declaration of 'u_int'
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(58) : error
C2146: syntax error : missing ';' before identifier 'npacks'
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(58) : error
C2065: 'npacks' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(59) : error
C2275: 'errno_t' : illegal use of this type as an expression
1> c:\program files\microsoft visual studio
9.0\vc\include\crtdefs.h(553) : see declaration of 'errno_t'
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(59) : error
C2146: syntax error : missing ';' before identifier 'fopen_error'
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(59) : error
C2065: 'fopen_error' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(69) : error
C2065: 'fopen_error' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(70) : error
C2065: 'fopen_error' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(71) : error
C2065: 'fopen_error' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(122) : error
C2065: 'squeue' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(122) : warning
C4013: 'pcap_sendqueue_alloc' undefined; assuming extern returning int
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(125) : error
C2065: 'pktheader' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(125) : warning
C4047: 'function' : 'pcap_pkthdr **' differs in levels of indirection from
'int *'
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(125) : warning
C4024: 'pcap_next_ex' : different types for formal and actual parameter 2
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(125) : error
C2065: 'pktdata' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(125) : warning
C4047: 'function' : 'const u_char **' differs in levels of indirection from
'int *'
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(125) : warning
C4024: 'pcap_next_ex' : different types for formal and actual parameter 3
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(127) : warning
C4013: 'pcap_sendqueue_queue' undefined; assuming extern returning int
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(127) : error
C2065: 'squeue' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(127) : error
C2065: 'pktheader' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(127) : error
C2065: 'pktdata' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(133) : error
C2065: 'npacks' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(139) : warning
C4013: 'pcap_sendqueue_destroy' undefined; assuming extern returning int
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(139) : error
C2065: 'squeue' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(145) : error
C2065: 'cpu_time' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(145) : warning
C4244: '=' : conversion from 'float' to 'int', possible loss of data
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(147) : warning
C4013: 'pcap_sendqueue_transmit' undefined; assuming extern returning int
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(147) : error
C2065: 'squeue' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(147) : error
C2065: 'squeue' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(147) : error
C2223: left of '->len' must point to struct/union
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(152) : error
C2065: 'cpu_time' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(152) : error
C2065: 'cpu_time' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(154) : error
C2065: 'cpu_time' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(155) : error
C2065: 'npacks' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(156) : error
C2065: 'npacks' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(156) : error
C2065: 'cpu_time' : undeclared identifier
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(160) : error
C2065: 'squeue' : undeclared identifier
1>Build log was saved at
"file://e:\videoTest\videocode\socket\winpcap10\winpcap1\Debug\BuildLog.htm"
1>winpcap1 - 34 error(s), 10 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
*when I found the reason of this problem on internet , It was said that,
file "Win32-Extensions.h" must be include, so I included this file, but
another problem appeared:*
1>------ Build started: Project: winpcap1, Configuration: Debug Win32 ------
1>Compiling...
1>main.c
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(91) :
error C2143: syntax error : missing ')' before '*'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(91) :
error C2143: syntax error : missing '{' before '*'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(91) :
error C2371: 'pcap_send_queue' : redefinition; different basic types
1>
e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(53) :
see declaration of 'pcap_send_queue'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(91) :
error C2143: syntax error : missing ';' before '*'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(91) :
error C2059: syntax error : 'type'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(91) :
error C2059: syntax error : ')'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(93) :
error C2143: syntax error : missing ')' before '*'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(93) :
error C2143: syntax error : missing '{' before '*'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(93) :
error C2059: syntax error : ')'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(95) :
error C2143: syntax error : missing ')' before '*'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(95) :
error C2143: syntax error : missing '{' before '*'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(95) :
error C2059: syntax error : 'type'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(95) :
error C2059: syntax error : ')'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(97) :
error C2143: syntax error : missing ')' before '*'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(97) :
error C2143: syntax error : missing '{' before '*'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(97) :
error C2059: syntax error : 'type'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(97) :
error C2059: syntax error : ')'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(99) :
error C2143: syntax error : missing ')' before '*'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(99) :
error C2143: syntax error : missing '{' before '*'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(99) :
error C2059: syntax error : 'type'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(99) :
error C2059: syntax error : ')'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(101) :
error C2143: syntax error : missing ')' before '*'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(101) :
error C2143: syntax error : missing '{' before '*'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(101) :
error C2059: syntax error : 'type'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(101) :
error C2059: syntax error : ')'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(107) :
error C2143: syntax error : missing ')' before '*'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(107) :
error C2143: syntax error : missing '{' before '*'
1>e:\videotest\videocode\socket\winpcap1\include\win32-extensions.h(107) :
error C2059: syntax error : ')'
1>e:\videotest\videocode\socket\winpcap10\winpcap1\main.c(147) : warning
C4013: 'pcap_sendqueue_transmit' undefined; assuming extern returning int
1>Build log was saved at
"file://e:\videoTest\videocode\socket\winpcap10\winpcap1\Debug\BuildLog.htm"
1>winpcap1 - 28 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
*Now I can't find the reason, so please tell me how to deal with this
problem, I'm new of winpcap, thank you!*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winpcap.org/pipermail/winpcap-users/attachments/20120104/d6b2220e/attachment.html>
More information about the Winpcap-users
mailing list