[Winpcap-users] bpf_filter compile error for libpcap on FreeBSD 8

Marcus I. Ryan marcus at riboflavin.net
Tue Jun 1 06:47:51 PDT 2010


I am trying to compile rpacpd on FreeBSD 8 and am getting a compile  
error on conflicting types for bpf_filter (full details below).

Oddly a Google search (including the mailing list archives) turned up  
only one other instance of the error, and that was from someone trying  
to compile on AIX:
http://www.winpcap.org/pipermail/winpcap-bugs/2010-January/001161.html

Unfortunately the answer was the (reasonable, but no help to me) that  
AIX is not supported, but patches are welcome.

Platform is FreeBSD 8.0-RELEASE-p2 amd64
WinPCAP source version.h indicates 4.1.0.1753

============================================================================
CONFIGURE
============================================================================
checking build system type... amd64-unknown-freebsd8.0
checking host system type... amd64-unknown-freebsd8.0
checking target system type... amd64-unknown-freebsd8.0
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking gcc version... 4
checking for inline... inline
checking for __attribute__... yes
checking for u_int8_t using gcc... yes
checking for u_int16_t using gcc... yes
checking for u_int32_t using gcc... yes
checking for u_int64_t using gcc... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for _LARGEFILE_SOURCE value needed for large files... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/ioccom.h usability... yes
checking sys/ioccom.h presence... yes
checking for sys/ioccom.h... yes
checking sys/sockio.h usability... yes
checking sys/sockio.h presence... yes
checking for sys/sockio.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking paths.h usability... yes
checking paths.h presence... yes
checking for paths.h... yes
checking for net/pfvar.h... yes
checking whether net/pfvar.h defines PF_NAT through PF_NORDR... yes
checking for netinet/if_ether.h... no
configure: Rechecking with some additional includes
checking for netinet/if_ether.h... yes
checking for ANSI ioctl definitions... yes
checking for strerror... yes
checking for strlcpy... yes
checking for vsnprintf... yes
checking for snprintf... yes
checking for library containing gethostbyname... none required
checking for library containing socket... none required
checking for library containing putmsg... no
checking for ether_hostton... yes
checking whether ether_hostton is declared... yes
checking if --disable-protochain option is specified... enabled
checking packet capture type... bpf
checking net/if_media.h usability... yes
checking net/if_media.h presence... yes
checking for net/if_media.h... yes
checking whether the system supports zerocopy BPF... yes
checking for getifaddrs... yes
checking ifaddrs.h usability... yes
checking ifaddrs.h presence... yes
checking for ifaddrs.h... yes
checking for socklen_t... yes
checking if --disable-remote option is specified... enabled
checking if remote capture is supported... yes
checking if --disable-turbocap option is specified... turbocap enabled
checking if turbocap is supported... no
checking for getaddrinfo... yes
checking whether to build optimizer debugging code... no
checking whether to build parser debugging code... no
checking whether we have /proc/net/dev... no
checking whether we have DAG API headers... no (/usr/local/include)
checking whether we have the DAG API... no
checking whether we have Septel API... no
checking for flex... flex
checking for flex 2.4 or higher... yes
checking for bison... bison
checking for ranlib... ranlib
checking if sockaddr struct has sa_len member... yes
checking if sockaddr_storage struct exists... yes
checking if dl_hp_ppa_info_t struct has dl_module_id_1 member... no
checking if unaligned accesses fail... no
checking for USB sniffing support... no
configure: no Bluetooth sniffing support
checking for a BSD-compatible install... /usr/bin/install -c
configure: creating ./config.status
config.status: creating Makefile
config.status: creating pcap-filter.manmisc
config.status: creating pcap-linktype.manmisc
config.status: creating pcap-savefile.manfile
config.status: creating pcap.3pcap
config.status: creating pcap_compile.3pcap
config.status: creating pcap_datalink.3pcap
config.status: creating pcap_dump_open.3pcap
config.status: creating pcap_list_datalinks.3pcap
config.status: creating pcap_open_dead.3pcap
config.status: creating pcap_open_offline.3pcap
config.status: creating config.h

============================================================================
MAKE
============================================================================
gcc -O2 -I. -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))"  
-DHAVE_REMOTE -c ./pcap-bpf.c
In file included from ./pcap-int.h:39,
                  from ./pcap-bpf.c:106:
./pcap/pcap.h:354: error: conflicting types for 'bpf_filter'
./net/bpf.h:255: error: previous declaration of 'bpf_filter' was here
./pcap-bpf.c: In function 'pcap_next_zbuf_shm':
./pcap-bpf.c:244: error: dereferencing pointer to incomplete type
./pcap-bpf.c:245: error: dereferencing pointer to incomplete type
./pcap-bpf.c:248: error: dereferencing pointer to incomplete type
./pcap-bpf.c:249: error: dereferencing pointer to incomplete type
./pcap-bpf.c:254: error: dereferencing pointer to incomplete type
./pcap-bpf.c:255: error: dereferencing pointer to incomplete type
./pcap-bpf.c:258: error: dereferencing pointer to incomplete type
./pcap-bpf.c:259: error: dereferencing pointer to incomplete type
./pcap-bpf.c: In function 'pcap_next_zbuf':
./pcap-bpf.c:277: error: storage size of 'bz' isn't known
./pcap-bpf.c:312: error: 'BIOCROTZBUF' undeclared (first use in this function)
./pcap-bpf.c:312: error: (Each undeclared identifier is reported only once
./pcap-bpf.c:312: error: for each function it appears in.)
./pcap-bpf.c: In function 'pcap_ack_zbuf':
./pcap-bpf.c:375: error: dereferencing pointer to incomplete type
./pcap-bpf.c:376: error: dereferencing pointer to incomplete type
./pcap-bpf.c: In function 'pcap_create':
./pcap-bpf.c:406: warning: passing argument 1 of  
'pcap_opensource_remote' from incompatible pointer type
./pcap-bpf.c:406: error: too many arguments to function  
'pcap_opensource_remote'
./pcap-bpf.c:406: warning: assignment makes pointer from integer  
without a cast
./pcap-bpf.c:411: error: 'snaplen' undeclared (first use in this function)
./pcap-bpf.c:412: error: 'pcap_t' has no member named 'timeout'
./pcap-bpf.c:412: error: 'to_ms' undeclared (first use in this function)
./pcap-bpf.c:413: error: 'promisc' undeclared (first use in this function)
./pcap-bpf.c: In function 'pcap_activate_bpf':
./pcap-bpf.c:1395: error: storage size of 'bz' isn't known
./pcap-bpf.c:1520: error: 'BPF_BUFMODE_ZBUF' undeclared (first use in  
this function)
./pcap-bpf.c:1521: error: 'BIOCSETBUFMODE' undeclared (first use in  
this function)
./pcap-bpf.c:1544: error: 'BIOCGETZMAX' undeclared (first use in this  
function)
./pcap-bpf.c:1579: error: 'BIOCSETZBUF' undeclared (first use in this  
function)
./pcap-bpf.c:1590: error: invalid application of 'sizeof' to  
incomplete type 'struct bpf_zbuf_header'
*** Error code 1

Stop in /usr/home/shad/pcap/winpcap/wpcap/libpcap.


-- 
Marcus I. Ryan, marcus at riboflavin.net
------------------------------------------
People often find it easier to be a result
of the past than a cause of the future.
------------------------------------------







More information about the Winpcap-users mailing list