Date: Tue, 4 Mar 2014 10:27:23 +0000 From: "C. L. Martinez" <carlopmart@gmail.com> To: freebsd-net@freebsd.org Subject: netmap-libpcap doesn't installs under FreeBSD10 Message-ID: <CAEjQA5%2BAcMAApi7_RMw6frjxsyfudanRnfp=iLahg3faOgzhYw@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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??
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAEjQA5%2BAcMAApi7_RMw6frjxsyfudanRnfp=iLahg3faOgzhYw>