On 12/09/2019 15:42, Anton Ivanov wrote:


On 12/09/2019 13:14, Ritesh Raj Sarraf wrote:
Hi,

I am not sure if this has been reported upstream but with libpcap 1.9,
user mode linux fails to build. The build failure happens with both,
5.2 and 4.19 LTS kernels.

A much detailed report is available at:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=938962

libpcap 1.9 introduces `pcap_open` which is also declared in linux
headers in arch/um/drivers/pcap_user.c




I think the best way forward here is to kill the old libpcap driver altogether.

You get the same functionality from vector raw including the ability to load a bpf filter.

The only thing that needs is a wrapper to compile the filter before handing it to UML.

A side effect is that it is ~ 10+ time faster - in the multigigabit range.

Alternatively, I can wrap it so it looks like pcap to any existing scripts and is actually vector underneath, but that will lose some of the tunables, like offloads, vector depth, etc.


Thanks,
Ritesh

On Sat, 2019-09-07 at 17:18 +0200, Romain Francoise wrote:
Hi,

On Tue, Sep 3, 2019 at 3:21 PM Ritesh Raj Sarraf <r...@debian.org>
wrote:
[...]
In file included from /usr/include/pcap.h:43,
                  from arch/um/drivers/pcap_user.c:7:
/usr/include/pcap/pcap.h:835:18: note: previous declaration of
‘pcap_open’ was here
  PCAP_API pcap_t *pcap_open(const char *source, int snaplen, int
flags,
                   ^~~~~~~~~
make[2]: *** [scripts/Makefile.build:309:
arch/um/drivers/pcap_user.o] Error 1

libpcap 1.9 includes support for remote capture, which was originally
a part of WinPcap extensions. The `pcap_open()' symbol is part of
that
API and that's why it's defined in the header file even though remote
support is not enabled in Debian. I suggest you rename the function
defined in your program so that it doesn't conflict with libpcap.

_______________________________________________
linux-um mailing list
linux...@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um


I am going to try to write a wrapper to form arguments for the current vector raw driver and if there is something that needs to be fixed in it.

I will post is as a proposed patch vs the debian package once  its ready.

Brgds,

A

--
Anton R. Ivanov
https://www.kot-begemot.co.uk/

Reply via email to