From owner-freebsd-net@FreeBSD.ORG Tue Mar 4 10:27:29 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7E4AF56 for ; Tue, 4 Mar 2014 10:27:29 +0000 (UTC) Received: from mail-we0-x231.google.com (mail-we0-x231.google.com [IPv6:2a00:1450:400c:c03::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 85E39E58 for ; Tue, 4 Mar 2014 10:27:29 +0000 (UTC) Received: by mail-we0-f177.google.com with SMTP id u57so2740766wes.8 for ; Tue, 04 Mar 2014 02:27:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=goTYFgsRD0N6wIIl2sNXxT+HjEaeXqJF9uLgWCA1TTY=; b=Nx1rVSSH2y9rARPW1qMUzlyvDDJ6D2vVxWXu/x7utNtt8naUAqEOt/rC4HfhPBjxip tewEC3MhuD9vPW/7GusRWPXOwtye51JeGQTNjuWaX/yec1bIg8F81z/8tnzfX7VTprja iYIF9uqewW23mUih19WspJknZBWEXNh0KX6/Yx5cQOzbRwh29TQVRepQPyknNY4IL2LE AwCkQbBMVdyj5qLrRv9L/DiHMpqETdw6TPKjKWr5lgLYRGOx/4xSIIAmrZVhf98DnH1f k7wrYs7+h+MF+3a55FojPwMqwgg/LWXb7CNzwMb8dAP8GOWanwGFbP1//ybMrBU40AeL F67g== MIME-Version: 1.0 X-Received: by 10.194.63.228 with SMTP id j4mr26688619wjs.34.1393928843987; Tue, 04 Mar 2014 02:27:23 -0800 (PST) Received: by 10.194.29.163 with HTTP; Tue, 4 Mar 2014 02:27:23 -0800 (PST) Date: Tue, 4 Mar 2014 10:27:23 +0000 Message-ID: Subject: netmap-libpcap doesn't installs under FreeBSD10 From: "C. L. Martinez" To: freebsd-net@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2014 10:27:30 -0000 Hi all, When I try to compile netmap-libpcap, these errors appears: root@plzfsiem01:/tmp/j/netmap-libpcap # make cc -fpic -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./pcap-bpf.c cc -fpic -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -g -O2 -c ./pcap-netmap.c ./pcap-netmap.c:117:9: warning: implicit declaration of function 'nm_dispatch' is invalid in C99 [-Wimplicit-function-declaration] ret = nm_dispatch((void *)d, cnt, (void *)pcap_netmap_filter, (void *)p); ^ ./pcap-netmap.c:131:9: warning: implicit declaration of function 'nm_inject' is invalid in C99 [-Wimplicit-function-declaration] return nm_inject(d, buf, size); ^ ./pcap-netmap.c:139:15: error: variable has incomplete type 'struct ifreq' struct ifreq ifr; ^ ./pcap-netmap.c:139:9: note: forward declaration of 'struct ifreq' struct ifreq ifr; ^ ./pcap-netmap.c:140:19: error: incomplete definition of type 'struct nm_desc' int error, fd = d->fd; ~^ ./pcap-netmap.c:71:9: note: forward declaration of 'struct nm_desc' struct nm_desc *d; /* pointer returned by nm_open() */ ^ ./pcap-netmap.c:152:7: error: use of undeclared identifier 'SIOCSIFFLAGS' case SIOCSIFFLAGS: ^ ./pcap-netmap.c:157:10: warning: implicit declaration of function 'ioctl' is invalid in C99 [-Wimplicit-function-declaration] error = ioctl(fd, what, &ifr); ^ ./pcap-netmap.c:159:4: error: incomplete definition of type 'struct nm_desc' d->req.nr_name, what, error); ~^ ./pcap-netmap.c:71:9: note: forward declaration of 'struct nm_desc' struct nm_desc *d; /* pointer returned by nm_open() */ ^ ./pcap-netmap.c:163:7: error: use of undeclared identifier 'SIOCGIFFLAGS' case SIOCGIFFLAGS: ^ ./pcap-netmap.c:177:24: error: use of undeclared identifier 'SIOCGIFFLAGS' pcap_netmap_ioctl(p, SIOCGIFFLAGS, &if_flags); /* fetch flags */ ^ ./pcap-netmap.c:178:18: error: use of undeclared identifier 'IFF_PPROMISC' if (if_flags & IFF_PPROMISC) { ^ ./pcap-netmap.c:179:17: error: use of undeclared identifier 'IFF_PPROMISC' if_flags &= ~IFF_PPROMISC; ^ ./pcap-netmap.c:180:25: error: use of undeclared identifier 'SIOCSIFFLAGS' pcap_netmap_ioctl(p, SIOCSIFFLAGS, &if_flags); ^ ./pcap-netmap.c:183:2: warning: implicit declaration of function 'nm_close' is invalid in C99 [-Wimplicit-function-declaration] nm_close(d); ^ ./pcap-netmap.c:195:22: warning: implicit declaration of function 'nm_open' is invalid in C99 [-Wimplicit-function-declaration] struct nm_desc *d = nm_open(p->opt.source, NULL, 0, NULL); ^ ./pcap-netmap.c:195:18: warning: incompatible integer to pointer conversion initializing 'struct nm_desc *' with an expression of type 'int' [-Wint-conversion] struct nm_desc *d = nm_open(p->opt.source, NULL, 0, NULL); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./pcap-netmap.c:210:36: error: incomplete definition of type 'struct nm_desc' __FUNCTION__, p->opt.source, d, d->fd, ~^ ./pcap-netmap.c:71:9: note: forward declaration of 'struct nm_desc' struct nm_desc *d; /* pointer returned by nm_open() */ ^ ./pcap-netmap.c:213:11: error: incomplete definition of type 'struct nm_desc' p->fd = d->fd; ~^ ./pcap-netmap.c:71:9: note: forward declaration of 'struct nm_desc' struct nm_desc *d; /* pointer returned by nm_open() */ ^ ./pcap-netmap.c:214:27: error: incomplete definition of type 'struct nm_desc' if (p->opt.promisc && !(d->req.nr_ringid & NETMAP_SW_RING)) { ~^ ./pcap-netmap.c:71:9: note: forward declaration of 'struct nm_desc' struct nm_desc *d; /* pointer returned by nm_open() */ ^ ./pcap-netmap.c:214:45: error: use of undeclared identifier 'NETMAP_SW_RING' if (p->opt.promisc && !(d->req.nr_ringid & NETMAP_SW_RING)) { ^ ./pcap-netmap.c:215:24: error: use of undeclared identifier 'SIOCGIFFLAGS' pcap_netmap_ioctl(p, SIOCGIFFLAGS, &if_flags); /* fetch flags */ ^ ./pcap-netmap.c:216:20: error: use of undeclared identifier 'IFF_PPROMISC' if (!(if_flags & IFF_PPROMISC)) { ^ ./pcap-netmap.c:218:16: error: use of undeclared identifier 'IFF_PPROMISC' if_flags |= IFF_PPROMISC; ^ ./pcap-netmap.c:219:25: error: use of undeclared identifier 'SIOCSIFFLAGS' pcap_netmap_ioctl(p, SIOCSIFFLAGS, &if_flags); ^ 6 warnings and 17 errors generated. *** Error code 1 Stop. make: stopped in /tmp/j/netmap-libpcap Any patch??