tcpdump mailing list archives

Re: Adding loopback adapter detection for Windows


From: Yang Luo <hsluoyb () gmail com>
Date: Mon, 25 Jan 2016 00:30:54 +0800

Hi,

I forgot about one most important thing that libpcap seemingly doesn't
compile under Windows, even if there's a Win32\Prj in it. Actually I got
many errors when I build libpcap under VS2005.

I am quite confused with some lines like this in pcap-int.h:

typedef int (*activate_op_t)(pcap_t *);
typedef int (*can_set_rfmon_op_t)(pcap_t *);
typedef int (*read_op_t)(pcap_t *, int cnt, pcap_handler, u_char *);
typedef int (*inject_op_t)(pcap_t *, const void *, size_t);
typedef int (*setfilter_op_t)(pcap_t *, struct bpf_program *);
typedef int (*setdirection_op_t)(pcap_t *, pcap_direction_t);
typedef int (*set_datalink_op_t)(pcap_t *, int);
typedef int (*getnonblock_op_t)(pcap_t *, char *);
typedef int (*setnonblock_op_t)(pcap_t *, int, char *);
typedef int (*stats_op_t)(pcap_t *, struct pcap_stat *);
#ifdef WIN32
typedef int (*setbuff_op_t)(pcap_t *, int);
typedef int (*setmode_op_t)(pcap_t *, int);
typedef int (*setmintocopy_op_t)(pcap_t *, int);
typedef Adapter *(*getadapter_op_t)(pcap_t *);
#endif
typedef void (*cleanup_op_t)(pcap_t *);

It seems that libpcap has considered Windows as there's WIN32 macro, but
Adapter is not defined as VS2005 error shows.

I paste my whole build log here:

1>------ Build started: Project: wpcap, Configuration: Release No AirPcap
x64 ------
1>Compiling...
1>Win32-Extensions.c
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(2988) : warning C4163:
'_InterlockedExchangeAdd8' : not available as an intrinsic function
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(3013) : warning C4163: '__cpuidex'
: not available as an intrinsic function
1>..\libpcap\pcap/pcap.h(450) : error C2143: syntax error : missing '{'
before '*'
1>..\Win32-Extensions\Win32-Extensions.h(103) : warning C4028: formal
parameter 1 different from declaration
1>..\libpcap\pcap-int.h(133) : error C2143: syntax error : missing '{'
before '*'
1>..\libpcap\pcap-int.h(251) : error C2061: syntax error : identifier
'getadapter_op_t'
1>..\libpcap\pcap-int.h(254) : error C2059: syntax error : '}'
1>..\Win32-Extensions\Win32-Extensions.c(39) : fatal error C1083: Cannot
open include file: 'pcap-remote.h': No such file or directory
1>savefile.c
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(2988) : warning C4163:
'_InterlockedExchangeAdd8' : not available as an intrinsic function
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(3013) : warning C4163: '__cpuidex'
: not available as an intrinsic function
1>..\libpcap\pcap/pcap.h(450) : error C2143: syntax error : missing '{'
before '*'
1>..\Win32-Extensions\Win32-Extensions.h(103) : warning C4028: formal
parameter 1 different from declaration
1>j:\npcap\wpcap\libpcap\pcap-int.h(133) : error C2143: syntax error :
missing '{' before '*'
1>j:\npcap\wpcap\libpcap\pcap-int.h(251) : error C2061: syntax error :
identifier 'getadapter_op_t'
1>j:\npcap\wpcap\libpcap\pcap-int.h(254) : error C2059: syntax error : '}'
1>..\libpcap\savefile.c(99) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\savefile.c(99) : warning C4047: 'function' : 'char *' differs
in levels of indirection from 'int'
1>..\libpcap\savefile.c(99) : warning C4024: '_snprintf' : different types
for formal and actual parameter 1
1>..\libpcap\savefile.c(100) : warning C4047: 'function' : 'size_t' differs
in levels of indirection from 'char [47]'
1>..\libpcap\savefile.c(100) : warning C4024: '_snprintf' : different types
for formal and actual parameter 2
1>..\libpcap\savefile.c(100) : error C2198: '_snprintf' : too few arguments
for call
1>..\libpcap\savefile.c(107) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\savefile.c(107) : warning C4047: 'function' : 'char *' differs
in levels of indirection from 'int'
1>..\libpcap\savefile.c(107) : warning C4024: '_snprintf' : different types
for formal and actual parameter 1
1>..\libpcap\savefile.c(108) : warning C4047: 'function' : 'size_t' differs
in levels of indirection from 'char [43]'
1>..\libpcap\savefile.c(108) : warning C4024: '_snprintf' : different types
for formal and actual parameter 2
1>..\libpcap\savefile.c(108) : error C2198: '_snprintf' : too few arguments
for call
1>..\libpcap\savefile.c(116) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\savefile.c(116) : warning C4047: 'function' : 'char *' differs
in levels of indirection from 'int'
1>..\libpcap\savefile.c(116) : warning C4024: '_snprintf' : different types
for formal and actual parameter 1
1>..\libpcap\savefile.c(117) : warning C4047: 'function' : 'size_t' differs
in levels of indirection from 'char [63]'
1>..\libpcap\savefile.c(117) : warning C4024: '_snprintf' : different types
for formal and actual parameter 2
1>..\libpcap\savefile.c(117) : error C2198: '_snprintf' : too few arguments
for call
1>..\libpcap\savefile.c(124) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\savefile.c(124) : warning C4047: 'function' : 'char *' differs
in levels of indirection from 'int'
1>..\libpcap\savefile.c(124) : warning C4024: '_snprintf' : different types
for formal and actual parameter 1
1>..\libpcap\savefile.c(125) : warning C4047: 'function' : 'size_t' differs
in levels of indirection from 'char [49]'
1>..\libpcap\savefile.c(125) : warning C4024: '_snprintf' : different types
for formal and actual parameter 2
1>..\libpcap\savefile.c(125) : error C2198: '_snprintf' : too few arguments
for call
1>..\libpcap\savefile.c(132) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\savefile.c(132) : warning C4047: 'function' : 'char *' differs
in levels of indirection from 'int'
1>..\libpcap\savefile.c(132) : warning C4024: '_snprintf' : different types
for formal and actual parameter 1
1>..\libpcap\savefile.c(133) : warning C4047: 'function' : 'size_t' differs
in levels of indirection from 'char [64]'
1>..\libpcap\savefile.c(133) : warning C4024: '_snprintf' : different types
for formal and actual parameter 2
1>..\libpcap\savefile.c(133) : error C2198: '_snprintf' : too few arguments
for call
1>..\libpcap\savefile.c(142) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\savefile.c(142) : warning C4047: 'function' : 'const char *'
differs in levels of indirection from 'int'
1>..\libpcap\savefile.c(142) : warning C4024: 'strncpy' : different types
for formal and actual parameter 2
1>..\libpcap\savefile.c(142) : error C2198: 'strncpy' : too few arguments
for call
1>..\libpcap\savefile.c(142) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\savefile.c(142) : fatal error C1903: unable to recover from
previous error(s); stopping compilation
1>pcap.c
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(2988) : warning C4163:
'_InterlockedExchangeAdd8' : not available as an intrinsic function
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(3013) : warning C4163: '__cpuidex'
: not available as an intrinsic function
1>..\libpcap\pcap/pcap.h(450) : error C2143: syntax error : missing '{'
before '*'
1>..\Win32-Extensions\Win32-Extensions.h(103) : warning C4028: formal
parameter 1 different from declaration
1>j:\npcap\wpcap\libpcap\pcap-int.h(133) : error C2143: syntax error :
missing '{' before '*'
1>j:\npcap\wpcap\libpcap\pcap-int.h(251) : error C2061: syntax error :
identifier 'getadapter_op_t'
1>j:\npcap\wpcap\libpcap\pcap-int.h(254) : error C2059: syntax error : '}'
1>..\libpcap\pcap.c(119) : error C2143: syntax error : missing '{' before
'*'
1>..\libpcap\pcap.c(133) : error C2037: left of 'can_set_rfmon_op'
specifies undefined struct/union 'pcap'
1>..\libpcap\pcap.c(133) : warning C4033: 'pcap_can_set_rfmon' must return
a value
1>..\libpcap\pcap.c(159) : error C2037: left of 'tstamp_type_count'
specifies undefined struct/union 'pcap'
1>..\libpcap\pcap.c(166) : error C2037: left of 'tstamp_type_count'
specifies undefined struct/union 'pcap'
1>..\libpcap\pcap.c(166) : error C2198: 'calloc' : too few arguments for
call
1>..\libpcap\pcap.c(168) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(168) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(169) : warning C4047: 'function' : 'size_t' differs in
levels of indirection from 'const char *'
1>..\libpcap\pcap.c(169) : warning C4024: '_snprintf' : different types for
formal and actual parameter 2
1>..\libpcap\pcap.c(169) : error C2198: '_snprintf' : too few arguments for
call
1>..\libpcap\pcap.c(172) : error C2037: left of 'tstamp_type_list'
specifies undefined struct/union 'pcap'
1>..\libpcap\pcap.c(173) : error C2037: left of 'tstamp_type_count'
specifies undefined struct/union 'pcap'
1>..\libpcap\pcap.c(173) : error C2168: 'memcpy' : too few actual
parameters for intrinsic function
1>..\libpcap\pcap.c(175) : error C2037: left of 'tstamp_type_count'
specifies undefined struct/union 'pcap'
1>..\libpcap\pcap.c(175) : warning C4033: 'pcap_list_tstamp_types' must
return a value
1>..\libpcap\pcap.c(218) : error C2037: left of 'oneshot_callback'
specifies undefined struct/union 'pcap'
1>..\libpcap\pcap.c(218) : warning C4047: 'function' : 'pcap_handler'
differs in levels of indirection from 'u_char *'
1>..\libpcap\pcap.c(218) : warning C4024: 'pcap_dispatch' : different types
for formal and actual parameter 3
1>..\libpcap\pcap.c(218) : error C2198: 'pcap_dispatch' : too few arguments
for call
1>..\libpcap\pcap.c(229) : error C2037: left of 'pcap_header' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(234) : error C2037: left of 'pcap_header' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(236) : error C2037: left of 'rfile' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(240) : error C2037: left of 'oneshot_callback'
specifies undefined struct/union 'pcap'
1>..\libpcap\pcap.c(241) : warning C4047: 'function' : 'pcap_handler'
differs in levels of indirection from 'u_char *'
1>..\libpcap\pcap.c(241) : warning C4024: 'pcap_offline_read' : different
types for formal and actual parameter 3
1>..\libpcap\pcap.c(241) : error C2198: 'pcap_offline_read' : too few
arguments for call
1>..\libpcap\pcap.c(270) : error C2037: left of 'read_op' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(270) : error C2037: left of 'oneshot_callback'
specifies undefined struct/union 'pcap'
1>..\libpcap\pcap.c(270) : warning C4033: 'pcap_next_ex' must return a value
1>..\libpcap\pcap.c(458) : error C2037: left of 'read_op' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(459) : error C2037: left of 'inject_op' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(460) : error C2037: left of 'setfilter_op' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(461) : error C2037: left of 'setdirection_op' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(462) : error C2037: left of 'set_datalink_op' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(463) : error C2037: left of 'getnonblock_op' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(464) : error C2037: left of 'setnonblock_op' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(465) : error C2037: left of 'stats_op' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(467) : error C2037: left of 'setbuff_op' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(468) : error C2037: left of 'setmode_op' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(469) : error C2037: left of 'setmintocopy_op' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(470) : error C2037: left of 'getadapter_op' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(478) : error C2037: left of 'cleanup_op' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(484) : error C2037: left of 'oneshot_callback'
specifies undefined struct/union 'pcap'
1>..\libpcap\pcap.c(499) : error C2027: use of undefined type 'pcap'
1>        j:\npcap\wpcap\libpcap\pcap-int.h(141) : see declaration of 'pcap'
1>..\libpcap\pcap.c(505) : error C2027: use of undefined type 'pcap'
1>        j:\npcap\wpcap\libpcap\pcap-int.h(141) : see declaration of 'pcap'
1>..\libpcap\pcap.c(519) : error C2037: left of 'priv' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(525) : error C2037: left of 'priv' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(525) : error C2027: use of undefined type 'pcap'
1>        j:\npcap\wpcap\libpcap\pcap-int.h(141) : see declaration of 'pcap'
1>..\libpcap\pcap.c(540) : error C2037: left of 'opt' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(541) : error C2037: left of 'opt' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(554) : error C2037: left of 'can_set_rfmon_op'
specifies undefined struct/union 'pcap'
1>..\libpcap\pcap.c(560) : error C2037: left of 'opt' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(561) : error C2037: left of 'opt' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(562) : error C2037: left of 'opt' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(563) : error C2037: left of 'opt' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(564) : error C2037: left of 'opt' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(565) : error C2037: left of 'opt' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(566) : error C2037: left of 'opt' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(571) : error C2037: left of 'bpf_codegen_flags'
specifies undefined struct/union 'pcap'
1>..\libpcap\pcap.c(579) : error C2037: left of 'activated' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(580) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(580) : warning C4047: 'function' : 'char *' differs in
levels of indirection from 'int'
1>..\libpcap\pcap.c(580) : warning C4024: '_snprintf' : different types for
formal and actual parameter 1
1>..\libpcap\pcap.c(581) : warning C4047: 'function' : 'size_t' differs in
levels of indirection from 'char [46]'
1>..\libpcap\pcap.c(581) : warning C4024: '_snprintf' : different types for
formal and actual parameter 2
1>..\libpcap\pcap.c(581) : error C2198: '_snprintf' : too few arguments for
call
1>..\libpcap\pcap.c(592) : error C2037: left of 'snapshot' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(601) : error C2037: left of 'opt' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(610) : error C2037: left of 'opt' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(619) : error C2037: left of 'opt' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(635) : error C2037: left of 'tstamp_type_count'
specifies undefined struct/union 'pcap'
1>..\libpcap\pcap.c(637) : error C2037: left of 'opt' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(644) : error C2037: left of 'tstamp_type_count'
specifies undefined struct/union 'pcap'
1>..\libpcap\pcap.c(645) : error C2037: left of 'tstamp_type_list'
specifies undefined struct/union 'pcap'
1>..\libpcap\pcap.c(649) : error C2037: left of 'opt' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(666) : error C2037: left of 'opt' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(675) : error C2037: left of 'opt' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(694) : error C2037: left of 'tstamp_precision_count'
specifies undefined struct/union 'pcap'
1>..\libpcap\pcap.c(696) : error C2037: left of 'opt' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(704) : error C2037: left of 'tstamp_precision_count'
specifies undefined struct/union 'pcap'
1>..\libpcap\pcap.c(705) : error C2037: left of 'tstamp_precision_list'
specifies undefined struct/union 'pcap'
1>..\libpcap\pcap.c(709) : error C2037: left of 'opt' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(724) : error C2037: left of 'opt' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(724) : warning C4033: 'pcap_get_tstamp_precision' must
return a value
1>..\libpcap\pcap.c(741) : error C2037: left of 'activate_op' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(743) : error C2037: left of 'activated' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(745) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(752) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(752) : warning C4047: 'function' : 'char *' differs in
levels of indirection from 'int'
1>..\libpcap\pcap.c(752) : warning C4024: '_snprintf' : different types for
formal and actual parameter 1
1>..\libpcap\pcap.c(752) : warning C4047: 'function' : 'size_t' differs in
levels of indirection from 'char [3]'
1>..\libpcap\pcap.c(752) : warning C4024: '_snprintf' : different types for
formal and actual parameter 2
1>..\libpcap\pcap.c(793) : error C2037: left of 'oldstyle' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(801) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(806) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(823) : error C2037: left of 'opt' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(824) : error C2037: left of 'opt' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(825) : error C2037: left of 'opt' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(838) : error C2037: left of 'read_op' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(838) : warning C4033: 'pcap_dispatch' must return a
value
1>..\libpcap\pcap.c(848) : error C2037: left of 'read_op' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(848) : warning C4033: 'pcap_read' must return a value
1>..\libpcap\pcap.c(857) : error C2037: left of 'rfile' specifies undefined
struct/union 'pcap'
1>..\libpcap\pcap.c(868) : error C2037: left of 'read_op' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(887) : error C2037: left of 'break_loop' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(893) : error C2037: left of 'activated' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(895) : error C2037: left of 'linktype' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(895) : warning C4033: 'pcap_datalink' must return a
value
1>..\libpcap\pcap.c(901) : error C2037: left of 'activated' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(903) : error C2037: left of 'linktype_ext' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(903) : warning C4033: 'pcap_datalink_ext' must return a
value
1>..\libpcap\pcap.c(909) : error C2037: left of 'activated' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(911) : error C2037: left of 'dlt_count' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(920) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(920) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(921) : warning C4047: 'function' : 'size_t' differs in
levels of indirection from 'const char *'
1>..\libpcap\pcap.c(921) : warning C4024: '_snprintf' : different types for
formal and actual parameter 2
1>..\libpcap\pcap.c(921) : error C2198: '_snprintf' : too few arguments for
call
1>..\libpcap\pcap.c(924) : error C2037: left of 'linktype' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(927) : error C2037: left of 'dlt_count' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap.c(927) : fatal error C1003: error count exceeds 100;
stopping compilation
1>pcap-win32.c
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(2988) : warning C4163:
'_InterlockedExchangeAdd8' : not available as an intrinsic function
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(3013) : warning C4163: '__cpuidex'
: not available as an intrinsic function
1>..\libpcap\pcap/pcap.h(450) : error C2143: syntax error : missing '{'
before '*'
1>..\Win32-Extensions\Win32-Extensions.h(103) : warning C4028: formal
parameter 1 different from declaration
1>..\libpcap\pcap-int.h(133) : error C2143: syntax error : missing '{'
before '*'
1>..\libpcap\pcap-int.h(251) : error C2061: syntax error : identifier
'getadapter_op_t'
1>..\libpcap\pcap-int.h(254) : error C2059: syntax error : '}'
1>..\libpcap\pcap-win32.c(86) : error C2011: 'bpf_hdr' : 'struct' type
redefinition
1>        ..\..\common\Packet32.h(151) : see declaration of 'bpf_hdr'
1>..\libpcap\pcap-win32.c(142) : error C2037: left of 'adapter' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(142) : warning C4133: 'function' : incompatible
types - from 'bpf_stat *' to 'LPADAPTER'
1>..\libpcap\pcap-win32.c(142) : error C2198: 'PacketGetStats' : too few
arguments for call
1>..\libpcap\pcap-win32.c(143) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(143) : warning C4047: 'function' : 'char *'
differs in levels of indirection from 'int'
1>..\libpcap\pcap-win32.c(143) : warning C4024: '_snprintf' : different
types for formal and actual parameter 1
1>..\libpcap\pcap-win32.c(143) : warning C4047: 'function' : 'size_t'
differs in levels of indirection from 'char [25]'
1>..\libpcap\pcap-win32.c(143) : warning C4024: '_snprintf' : different
types for formal and actual parameter 2
1>..\libpcap\pcap-win32.c(154) : error C2037: left of 'adapter' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(154) : warning C4047: 'function' : 'LPADAPTER'
differs in levels of indirection from 'int'
1>..\libpcap\pcap-win32.c(154) : warning C4024: 'PacketSetBuff' : different
types for formal and actual parameter 1
1>..\libpcap\pcap-win32.c(154) : error C2198: 'PacketSetBuff' : too few
arguments for call
1>..\libpcap\pcap-win32.c(156) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(156) : warning C4047: 'function' : 'char *'
differs in levels of indirection from 'int'
1>..\libpcap\pcap-win32.c(156) : warning C4024: '_snprintf' : different
types for formal and actual parameter 1
1>..\libpcap\pcap-win32.c(156) : warning C4047: 'function' : 'size_t'
differs in levels of indirection from 'char [62]'
1>..\libpcap\pcap-win32.c(156) : warning C4024: '_snprintf' : different
types for formal and actual parameter 2
1>..\libpcap\pcap-win32.c(156) : error C2198: '_snprintf' : too few
arguments for call
1>..\libpcap\pcap-win32.c(166) : error C2037: left of 'adapter' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(166) : warning C4047: 'function' : 'LPADAPTER'
differs in levels of indirection from 'int'
1>..\libpcap\pcap-win32.c(166) : warning C4024: 'PacketSetMode' : different
types for formal and actual parameter 1
1>..\libpcap\pcap-win32.c(166) : error C2198: 'PacketSetMode' : too few
arguments for call
1>..\libpcap\pcap-win32.c(168) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(168) : warning C4047: 'function' : 'char *'
differs in levels of indirection from 'int'
1>..\libpcap\pcap-win32.c(168) : warning C4024: '_snprintf' : different
types for formal and actual parameter 1
1>..\libpcap\pcap-win32.c(168) : warning C4047: 'function' : 'size_t'
differs in levels of indirection from 'char [42]'
1>..\libpcap\pcap-win32.c(168) : warning C4024: '_snprintf' : different
types for formal and actual parameter 2
1>..\libpcap\pcap-win32.c(168) : error C2198: '_snprintf' : too few
arguments for call
1>..\libpcap\pcap-win32.c(179) : error C2037: left of 'adapter' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(179) : warning C4047: 'function' : 'LPADAPTER'
differs in levels of indirection from 'int'
1>..\libpcap\pcap-win32.c(179) : warning C4024: 'PacketSetMinToCopy' :
different types for formal and actual parameter 1
1>..\libpcap\pcap-win32.c(179) : error C2198: 'PacketSetMinToCopy' : too
few arguments for call
1>..\libpcap\pcap-win32.c(181) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(181) : warning C4047: 'function' : 'char *'
differs in levels of indirection from 'int'
1>..\libpcap\pcap-win32.c(181) : warning C4024: '_snprintf' : different
types for formal and actual parameter 1
1>..\libpcap\pcap-win32.c(181) : warning C4047: 'function' : 'size_t'
differs in levels of indirection from 'char [57]'
1>..\libpcap\pcap-win32.c(181) : warning C4024: '_snprintf' : different
types for formal and actual parameter 2
1>..\libpcap\pcap-win32.c(181) : error C2198: '_snprintf' : too few
arguments for call
1>..\libpcap\pcap-win32.c(188) : error C2143: syntax error : missing '{'
before '*'
1>..\libpcap\pcap-win32.c(191) : error C2037: left of 'adapter' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(191) : warning C4033: 'pcap_getadapter_win32'
must return a value
1>..\libpcap\pcap-win32.c(201) : error C2037: left of 'priv' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(203) : error C2037: left of 'cc' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(204) : error C2037: left of 'cc' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(208) : error C2037: left of 'break_loop'
specifies undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(214) : error C2037: left of 'break_loop'
specifies undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(219) : error C2037: left of 'adapter' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(219) : error C2037: left of 'Packet' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(219) : warning C4047: 'function' : 'LPADAPTER'
differs in levels of indirection from 'int'
1>..\libpcap\pcap-win32.c(219) : warning C4024: 'PacketReceivePacket' :
different types for formal and actual parameter 1
1>..\libpcap\pcap-win32.c(219) : error C2198: 'PacketReceivePacket' : too
few arguments for call
1>..\libpcap\pcap-win32.c(220) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(220) : warning C4047: 'function' : 'char *'
differs in levels of indirection from 'int'
1>..\libpcap\pcap-win32.c(220) : warning C4024: '_snprintf' : different
types for formal and actual parameter 1
1>..\libpcap\pcap-win32.c(220) : warning C4047: 'function' : 'size_t'
differs in levels of indirection from 'char [39]'
1>..\libpcap\pcap-win32.c(220) : warning C4024: '_snprintf' : different
types for formal and actual parameter 2
1>..\libpcap\pcap-win32.c(220) : error C2198: '_snprintf' : too few
arguments for call
1>..\libpcap\pcap-win32.c(224) : error C2037: left of 'Packet' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(226) : error C2037: left of 'Packet' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(229) : error C2037: left of 'bp' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(249) : error C2037: left of 'break_loop'
specifies undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(251) : error C2037: left of 'break_loop'
specifies undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(254) : error C2037: left of 'bp' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(255) : error C2037: left of 'cc' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(276) : error C2037: left of 'fcode' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(277) : error C2037: left of 'fcode' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(277) : warning C4133: 'function' : incompatible
types - from 'u_char *' to 'const bpf_insn *'
1>..\libpcap\pcap-win32.c(277) : warning C4047: 'function' : 'const u_char
*' differs in levels of indirection from 'UINT'
1>..\libpcap\pcap-win32.c(277) : warning C4024: 'bpf_filter' : different
types for formal and actual parameter 2
1>..\libpcap\pcap-win32.c(277) : error C2198: 'bpf_filter' : too few
arguments for call
1>..\libpcap\pcap-win32.c(284) : error C2037: left of 'bp' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(285) : error C2037: left of 'cc' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(296) : error C2037: left of 'cc' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(471) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(471) : warning C4047: 'function' : 'char *'
differs in levels of indirection from 'int'
1>..\libpcap\pcap-win32.c(471) : warning C4024: '_snprintf' : different
types for formal and actual parameter 1
1>..\libpcap\pcap-win32.c(471) : warning C4047: 'function' : 'size_t'
differs in levels of indirection from 'char [40]'
1>..\libpcap\pcap-win32.c(471) : warning C4024: '_snprintf' : different
types for formal and actual parameter 2
1>..\libpcap\pcap-win32.c(471) : error C2198: '_snprintf' : too few
arguments for call
1>..\libpcap\pcap-win32.c(475) : warning C4267: 'function' : conversion
from 'size_t' to 'UINT', possible loss of data
1>..\libpcap\pcap-win32.c(476) : error C2037: left of 'adapter' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(476) : warning C4133: 'function' : incompatible
types - from 'LPPACKET' to 'LPADAPTER'
1>..\libpcap\pcap-win32.c(476) : warning C4047: 'function' : 'LPPACKET'
differs in levels of indirection from 'int'
1>..\libpcap\pcap-win32.c(476) : warning C4024: 'PacketSendPacket' :
different types for formal and actual parameter 2
1>..\libpcap\pcap-win32.c(476) : error C2198: 'PacketSendPacket' : too few
arguments for call
1>..\libpcap\pcap-win32.c(477) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(477) : warning C4047: 'function' : 'char *'
differs in levels of indirection from 'int'
1>..\libpcap\pcap-win32.c(477) : warning C4024: '_snprintf' : different
types for formal and actual parameter 1
1>..\libpcap\pcap-win32.c(477) : warning C4047: 'function' : 'size_t'
differs in levels of indirection from 'char [36]'
1>..\libpcap\pcap-win32.c(477) : warning C4024: '_snprintf' : different
types for formal and actual parameter 2
1>..\libpcap\pcap-win32.c(477) : error C2198: '_snprintf' : too few
arguments for call
1>..\libpcap\pcap-win32.c(489) : warning C4267: 'return' : conversion from
'size_t' to 'int', possible loss of data
1>..\libpcap\pcap-win32.c(495) : error C2037: left of 'adapter' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(496) : error C2037: left of 'adapter' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(496) : error C2198: 'PacketCloseAdapter' : too
few arguments for call
1>..\libpcap\pcap-win32.c(497) : error C2037: left of 'adapter' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(499) : error C2037: left of 'Packet' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(500) : error C2037: left of 'Packet' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(500) : error C2198: 'PacketFreePacket' : too few
arguments for call
1>..\libpcap\pcap-win32.c(501) : error C2037: left of 'Packet' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(509) : error C2037: left of 'priv' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(512) : error C2037: left of 'opt' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(524) : error C2037: left of 'adapter' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(524) : error C2037: left of 'opt' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(524) : error C2198: 'PacketOpenAdapter' : too few
arguments for call
1>..\libpcap\pcap-win32.c(526) : error C2037: left of 'adapter' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(529) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(529) : warning C4047: 'function' : 'char *'
differs in levels of indirection from 'int'
1>..\libpcap\pcap-win32.c(529) : warning C4024: '_snprintf' : different
types for formal and actual parameter 1
1>..\libpcap\pcap-win32.c(529) : warning C4047: 'function' : 'size_t'
differs in levels of indirection from 'char [26]'
1>..\libpcap\pcap-win32.c(529) : warning C4024: '_snprintf' : different
types for formal and actual parameter 2
1>..\libpcap\pcap-win32.c(534) : error C2037: left of 'adapter' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(534) : warning C4133: 'function' : incompatible
types - from 'NetType *' to 'LPADAPTER'
1>..\libpcap\pcap-win32.c(534) : error C2198: 'PacketGetNetType' : too few
arguments for call
1>..\libpcap\pcap-win32.c(536) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(536) : warning C4047: 'function' : 'char *'
differs in levels of indirection from 'int'
1>..\libpcap\pcap-win32.c(536) : warning C4024: '_snprintf' : different
types for formal and actual parameter 1
1>..\libpcap\pcap-win32.c(536) : warning C4047: 'function' : 'size_t'
differs in levels of indirection from 'char [38]'
1>..\libpcap\pcap-win32.c(536) : warning C4024: '_snprintf' : different
types for formal and actual parameter 2
1>..\libpcap\pcap-win32.c(544) : error C2037: left of 'linktype' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(548) : error C2037: left of 'linktype' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(559) : error C2037: left of 'dlt_list' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(563) : error C2037: left of 'dlt_list' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(564) : error C2037: left of 'dlt_list' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(565) : error C2037: left of 'dlt_list' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(566) : error C2037: left of 'dlt_count' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(571) : error C2037: left of 'linktype' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(575) : error C2037: left of 'linktype' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(579) : error C2037: left of 'linktype' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(583) : error C2037: left of 'linktype' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(587) : error C2037: left of 'linktype' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(591) : error C2037: left of 'linktype' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(595) : error C2037: left of 'linktype' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(599) : error C2037: left of 'linktype' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(603) : error C2037: left of 'linktype' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(607) : error C2037: left of 'linktype' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(611) : error C2037: left of 'linktype' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(615) : error C2037: left of 'linktype' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(620) : error C2037: left of 'opt' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(623) : error C2037: left of 'adapter' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(623) : warning C4047: 'function' : 'LPADAPTER'
differs in levels of indirection from 'int'
1>..\libpcap\pcap-win32.c(623) : warning C4024: 'PacketSetHwFilter' :
different types for formal and actual parameter 1
1>..\libpcap\pcap-win32.c(623) : error C2198: 'PacketSetHwFilter' : too few
arguments for call
1>..\libpcap\pcap-win32.c(625) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(625) : warning C4047: 'function' : 'char *'
differs in levels of indirection from 'int'
1>..\libpcap\pcap-win32.c(625) : warning C4024: '_snprintf' : different
types for formal and actual parameter 1
1>..\libpcap\pcap-win32.c(625) : warning C4047: 'function' : 'size_t'
differs in levels of indirection from 'char [50]'
1>..\libpcap\pcap-win32.c(625) : warning C4024: '_snprintf' : different
types for formal and actual parameter 2
1>..\libpcap\pcap-win32.c(625) : error C2198: '_snprintf' : too few
arguments for call
1>..\libpcap\pcap-win32.c(631) : error C2037: left of 'adapter' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(631) : warning C4047: 'function' : 'LPADAPTER'
differs in levels of indirection from 'int'
1>..\libpcap\pcap-win32.c(631) : warning C4024: 'PacketSetHwFilter' :
different types for formal and actual parameter 1
1>..\libpcap\pcap-win32.c(631) : error C2198: 'PacketSetHwFilter' : too few
arguments for call
1>..\libpcap\pcap-win32.c(633) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(633) : warning C4047: 'function' : 'char *'
differs in levels of indirection from 'int'
1>..\libpcap\pcap-win32.c(633) : warning C4024: '_snprintf' : different
types for formal and actual parameter 1
1>..\libpcap\pcap-win32.c(633) : warning C4047: 'function' : 'size_t'
differs in levels of indirection from 'char [54]'
1>..\libpcap\pcap-win32.c(633) : warning C4024: '_snprintf' : different
types for formal and actual parameter 2
1>..\libpcap\pcap-win32.c(633) : error C2198: '_snprintf' : too few
arguments for call
1>..\libpcap\pcap-win32.c(639) : error C2037: left of 'bufsize' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(642) : error C2037: left of 'Packet' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(644) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\pcap-win32.c(644) : warning C4047: 'function' : 'char *'
differs in levels of indirection from 'int'
1>..\libpcap\pcap-win32.c(644) : warning C4024: '_snprintf' : different
types for formal and actual parameter 1
1>..\libpcap\pcap-win32.c(644) : warning C4047: 'function' : 'size_t'
differs in levels of indirection from 'char [40]'
1>..\libpcap\pcap-win32.c(644) : warning C4024: '_snprintf' : different
types for formal and actual parameter 2
1>..\libpcap\pcap-win32.c(644) : error C2198: '_snprintf' : too few
arguments for call
1>..\libpcap\pcap-win32.c(644) : fatal error C1003: error count exceeds
100; stopping compilation
1>optimize.c
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(2988) : warning C4163:
'_InterlockedExchangeAdd8' : not available as an intrinsic function
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(3013) : warning C4163: '__cpuidex'
: not available as an intrinsic function
1>..\libpcap\pcap/pcap.h(450) : error C2143: syntax error : missing '{'
before '*'
1>..\Win32-Extensions\Win32-Extensions.h(103) : warning C4028: formal
parameter 1 different from declaration
1>j:\npcap\wpcap\libpcap\pcap-int.h(133) : error C2143: syntax error :
missing '{' before '*'
1>j:\npcap\wpcap\libpcap\pcap-int.h(251) : error C2061: syntax error :
identifier 'getadapter_op_t'
1>j:\npcap\wpcap\libpcap\pcap-int.h(254) : error C2059: syntax error : '}'
1>..\libpcap\optimize.c(894) : warning C4018: '>' : signed/unsigned mismatch
1>..\libpcap\optimize.c(898) : warning C4018: '>=' : signed/unsigned
mismatch
1>..\libpcap\optimize.c(2027) : warning C4244: '=' : conversion from
'__int64' to 'int', possible loss of data
1>..\libpcap\optimize.c(2038) : warning C4018: '<' : signed/unsigned
mismatch
1>..\libpcap\optimize.c(2223) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\optimize.c(2223) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\optimize.c(2224) : error C2198: '_snprintf' : too few
arguments for call
1>..\libpcap\optimize.c(2231) : error C2037: left of 'fcode' specifies
undefined struct/union 'pcap'
1>..\libpcap\optimize.c(2231) : error C2198: 'pcap_freecode' : too few
arguments for call
1>..\libpcap\optimize.c(2234) : error C2037: left of 'fcode' specifies
undefined struct/union 'pcap'
1>..\libpcap\optimize.c(2235) : error C2037: left of 'fcode' specifies
undefined struct/union 'pcap'
1>..\libpcap\optimize.c(2236) : error C2037: left of 'fcode' specifies
undefined struct/union 'pcap'
1>..\libpcap\optimize.c(2237) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\optimize.c(2237) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\optimize.c(2238) : warning C4047: 'function' : 'size_t'
differs in levels of indirection from 'const char *'
1>..\libpcap\optimize.c(2238) : warning C4024: '_snprintf' : different
types for formal and actual parameter 2
1>..\libpcap\optimize.c(2238) : error C2198: '_snprintf' : too few
arguments for call
1>..\libpcap\optimize.c(2241) : error C2037: left of 'fcode' specifies
undefined struct/union 'pcap'
1>..\libpcap\optimize.c(2241) : warning C4022: 'memcpy' : pointer mismatch
for actual parameter 2
1>..\libpcap\optimize.c(2241) : error C2168: 'memcpy' : too few actual
parameters for intrinsic function
1>nametoaddr.c
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(2988) : warning C4163:
'_InterlockedExchangeAdd8' : not available as an intrinsic function
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(3013) : warning C4163: '__cpuidex'
: not available as an intrinsic function
1>..\libpcap\pcap/pcap.h(450) : error C2143: syntax error : missing '{'
before '*'
1>..\Win32-Extensions\Win32-Extensions.h(103) : warning C4028: formal
parameter 1 different from declaration
1>j:\npcap\wpcap\libpcap\pcap-int.h(133) : error C2143: syntax error :
missing '{' before '*'
1>j:\npcap\wpcap\libpcap\pcap-int.h(251) : error C2061: syntax error :
identifier 'getadapter_op_t'
1>j:\npcap\wpcap\libpcap\pcap-int.h(254) : error C2059: syntax error : '}'
1>inet.c
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(2988) : warning C4163:
'_InterlockedExchangeAdd8' : not available as an intrinsic function
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(3013) : warning C4163: '__cpuidex'
: not available as an intrinsic function
1>..\libpcap\pcap/pcap.h(450) : error C2143: syntax error : missing '{'
before '*'
1>..\Win32-Extensions\Win32-Extensions.h(103) : warning C4028: formal
parameter 1 different from declaration
1>j:\npcap\wpcap\libpcap\pcap-int.h(133) : error C2143: syntax error :
missing '{' before '*'
1>j:\npcap\wpcap\libpcap\pcap-int.h(251) : error C2061: syntax error :
identifier 'getadapter_op_t'
1>j:\npcap\wpcap\libpcap\pcap-int.h(254) : error C2059: syntax error : '}'
1>gencode.c
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(2988) : warning C4163:
'_InterlockedExchangeAdd8' : not available as an intrinsic function
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(3013) : warning C4163: '__cpuidex'
: not available as an intrinsic function
1>..\libpcap\pcap/pcap.h(450) : error C2143: syntax error : missing '{'
before '*'
1>..\Win32-Extensions\Win32-Extensions.h(103) : warning C4028: formal
parameter 1 different from declaration
1>j:\npcap\wpcap\libpcap\pcap-int.h(133) : error C2143: syntax error :
missing '{' before '*'
1>j:\npcap\wpcap\libpcap\pcap-int.h(251) : error C2061: syntax error :
identifier 'getadapter_op_t'
1>j:\npcap\wpcap\libpcap\pcap-int.h(254) : error C2059: syntax error : '}'
1>..\libpcap\gencode.c(349) : warning C4267: '=' : conversion from 'size_t'
to 'u_int', possible loss of data
1>..\libpcap\gencode.c(377) : warning C4267: 'initializing' : conversion
from 'size_t' to 'int', possible loss of data
1>..\libpcap\gencode.c(457) : error C2037: left of 'activated' specifies
undefined struct/union 'pcap'
1>..\libpcap\gencode.c(458) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\gencode.c(458) : warning C4047: 'function' : 'char *' differs
in levels of indirection from 'int'
1>..\libpcap\gencode.c(458) : warning C4024: '_snprintf' : different types
for formal and actual parameter 1
1>..\libpcap\gencode.c(459) : warning C4047: 'function' : 'size_t' differs
in levels of indirection from 'char [48]'
1>..\libpcap\gencode.c(459) : warning C4024: '_snprintf' : different types
for formal and actual parameter 2
1>..\libpcap\gencode.c(459) : error C2198: '_snprintf' : too few arguments
for call
1>..\libpcap\gencode.c(486) : error C2037: left of 'errbuf' specifies
undefined struct/union 'pcap'
1>..\libpcap\gencode.c(486) : warning C4047: 'function' : 'char *' differs
in levels of indirection from 'int'
1>..\libpcap\gencode.c(486) : warning C4024: '_snprintf' : different types
for formal and actual parameter 1
1>..\libpcap\gencode.c(487) : warning C4047: 'function' : 'size_t' differs
in levels of indirection from 'char [33]'
1>..\libpcap\gencode.c(487) : warning C4024: '_snprintf' : different types
for formal and actual parameter 2
1>..\libpcap\gencode.c(487) : error C2198: '_snprintf' : too few arguments
for call
1>..\libpcap\gencode.c(943) : error C2037: left of 'fddipad' specifies
undefined struct/union 'pcap'
1>..\libpcap\gencode.c(3104) : error C2037: left of 'rfile' specifies
undefined struct/union 'pcap'
1>..\libpcap\gencode.c(3104) : error C2037: left of 'swapped' specifies
undefined struct/union 'pcap'
1>fad-win32.c
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(2988) : warning C4163:
'_InterlockedExchangeAdd8' : not available as an intrinsic function
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(3013) : warning C4163: '__cpuidex'
: not available as an intrinsic function
1>..\libpcap\pcap/pcap.h(450) : error C2143: syntax error : missing '{'
before '*'
1>..\Win32-Extensions\Win32-Extensions.h(103) : warning C4028: formal
parameter 1 different from declaration
1>..\libpcap\pcap-int.h(133) : error C2143: syntax error : missing '{'
before '*'
1>..\libpcap\pcap-int.h(251) : error C2061: syntax error : identifier
'getadapter_op_t'
1>..\libpcap\pcap-int.h(254) : error C2059: syntax error : '}'
1>etherent.c
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(2988) : warning C4163:
'_InterlockedExchangeAdd8' : not available as an intrinsic function
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(3013) : warning C4163: '__cpuidex'
: not available as an intrinsic function
1>..\libpcap\pcap/pcap.h(450) : error C2143: syntax error : missing '{'
before '*'
1>..\Win32-Extensions\Win32-Extensions.h(103) : warning C4028: formal
parameter 1 different from declaration
1>j:\npcap\wpcap\libpcap\pcap-int.h(133) : error C2143: syntax error :
missing '{' before '*'
1>j:\npcap\wpcap\libpcap\pcap-int.h(251) : error C2061: syntax error :
identifier 'getadapter_op_t'
1>j:\npcap\wpcap\libpcap\pcap-int.h(254) : error C2059: syntax error : '}'
1>bpf_image.c
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(2988) : warning C4163:
'_InterlockedExchangeAdd8' : not available as an intrinsic function
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(3013) : warning C4163: '__cpuidex'
: not available as an intrinsic function
1>..\libpcap\pcap/pcap.h(450) : error C2143: syntax error : missing '{'
before '*'
1>..\Win32-Extensions\Win32-Extensions.h(103) : warning C4028: formal
parameter 1 different from declaration
1>j:\npcap\wpcap\libpcap\pcap-int.h(133) : error C2143: syntax error :
missing '{' before '*'
1>j:\npcap\wpcap\libpcap\pcap-int.h(251) : error C2061: syntax error :
identifier 'getadapter_op_t'
1>j:\npcap\wpcap\libpcap\pcap-int.h(254) : error C2059: syntax error : '}'
1>bpf_filter.c
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(2988) : warning C4163:
'_InterlockedExchangeAdd8' : not available as an intrinsic function
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(3013) : warning C4163: '__cpuidex'
: not available as an intrinsic function
1>..\libpcap\bpf\net\bpf_filter.c(252) : error C2036: 'const bpf_insn *' :
unknown size
1>..\libpcap\bpf\net\bpf_filter.c(254) : error C2036: 'const bpf_insn *' :
unknown size
1>..\libpcap\bpf\net\bpf_filter.c(255) : error C2037: left of 'code'
specifies undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(264) : error C2037: left of 'k' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(264) : warning C4033:
'bpf_filter_with_aux_data' must return a value
1>..\libpcap\bpf\net\bpf_filter.c(270) : error C2037: left of 'k' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(287) : error C2037: left of 'k' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(318) : error C2037: left of 'k' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(357) : error C2037: left of 'k' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(358) : error C2037: left of 'k' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(358) : error C2037: left of 'k' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(375) : error C2037: left of 'k' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(376) : error C2037: left of 'k' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(393) : error C2037: left of 'k' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(394) : error C2037: left of 'k' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(394) : error C2037: left of 'k' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(410) : error C2037: left of 'k' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(423) : error C2037: left of 'k' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(427) : error C2037: left of 'k' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(431) : error C2037: left of 'k' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(435) : error C2037: left of 'k' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(439) : error C2037: left of 'k' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(443) : error C2037: left of 'k' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(447) : error C2037: left of 'k' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(461) : error C2037: left of 'k' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(466) : error C2037: left of 'k' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(466) : error C2037: left of 'jt'
specifies undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(466) : error C2037: left of 'jf'
specifies undefined struct/union 'bpf_insn'
1>..\libpcap\bpf\net\bpf_filter.c(466) : fatal error C1903: unable to
recover from previous error(s); stopping compilation
1>bpf_dump.c
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(2988) : warning C4163:
'_InterlockedExchangeAdd8' : not available as an intrinsic function
1>C:\Program Files (x86)\Windows
Kits\10\Include\10.0.10240.0\um\winnt.h(3013) : warning C4163: '__cpuidex'
: not available as an intrinsic function
1>..\libpcap\pcap/pcap.h(450) : error C2143: syntax error : missing '{'
before '*'
1>..\Win32-Extensions\Win32-Extensions.h(103) : warning C4028: formal
parameter 1 different from declaration
1>..\libpcap\bpf_dump.c(34) : error C2037: left of 'bf_len' specifies
undefined struct/union 'bpf_program'
1>..\libpcap\bpf_dump.c(36) : error C2037: left of 'bf_insns' specifies
undefined struct/union 'bpf_program'
1>..\libpcap\bpf_dump.c(39) : error C2036: 'const bpf_insn *' : unknown size
1>..\libpcap\bpf_dump.c(40) : error C2037: left of 'code' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf_dump.c(41) : error C2037: left of 'jt' specifies undefined
struct/union 'bpf_insn'
1>..\libpcap\bpf_dump.c(41) : error C2037: left of 'jf' specifies undefined
struct/union 'bpf_insn'
1>..\libpcap\bpf_dump.c(41) : error C2037: left of 'k' specifies undefined
struct/union 'bpf_insn'
1>..\libpcap\bpf_dump.c(46) : error C2036: 'const bpf_insn *' : unknown size
1>..\libpcap\bpf_dump.c(48) : error C2037: left of 'code' specifies
undefined struct/union 'bpf_insn'
1>..\libpcap\bpf_dump.c(48) : error C2037: left of 'jt' specifies undefined
struct/union 'bpf_insn'
1>..\libpcap\bpf_dump.c(48) : error C2037: left of 'jf' specifies undefined
struct/union 'bpf_insn'
1>..\libpcap\bpf_dump.c(48) : error C2037: left of 'k' specifies undefined
struct/union 'bpf_insn'
1>..\libpcap\bpf_dump.c(51) : error C2036: 'const bpf_insn *' : unknown size
1>Build log was saved at "file://j:\npcap\wpcap\PRJ\Release No
AirPcap\x64\BuildLog.htm"
1>wpcap - 318 error(s), 173 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


On Sun, Jan 24, 2016 at 10:46 PM, Yang Luo <hsluoyb () gmail com> wrote:

Hi list,

I am a developer for Npcap, a fork for WinPcap (
https://github.com/nmap/npcap). My libpcap code is still some very old
version 1.0 branch 1_0_rel0b (20091008). And I want to update to the latest
release. But before that happens, I need to handle some updates of mine to
the libpcap folder code by merging it to libpcap.

I have implemented a loopback adapter called "Npcap Loopback Adapter" on
Windows. It's like lo in linux. I know that libpcap recognizes "lo" by just
matching the adapter name with "lo". And I want libpcap to recognize my
"Npcap Loopback Adapter". Unfortunately all adapter's names in Windows are
random strings, something
like \Device\{B4B27BF5-DECC-428F-AE74-C57344D5402B}. So it can't be
hard-coded like lo. I have stored this value in registry. Also I have
provided a function in Packet.dll module called PacketIsLoopbackAdapter
(packet.dll module is the lower layer below libpcap/wpcap). So possible
solutions are:

1) Adding registry read code to libpcap, read the name of "Npcap Loopback
Adapter" and compare it with the value in the code.
2) Call my provided PacketIsLoopbackAdapter. Unfortunately, as my Npcap is
not a official successor of WinPcap. I can't expect anyone can statically
compile against my added PacketIsLoopbackAdapter function. Maybe
dynamically function load is needed (LoadLibrary and GetProcAddress).
3) ..

Currently my way is like 2), except that I directly built libpcap against
my new function. My modification is:
https://github.com/nmap/npcap/commit/d18318c495578887829fce8cb366770d3b3c7616

I'm not sure which is the best practice to let libpcap recognize my
adapter. Any opinions? Thanks!


Cheers,
Yang

_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers


Current thread: