[dpdk-dev] [PATCH v2 4/6] net/pcap: add libpcap wrappers

Ferruh Yigit ferruh.yigit at intel.com
Thu Feb 25 15:59:18 CET 2021

On 2/14/2021 2:16 AM, Dmitry Kozlyuk wrote:
> libpcap headers can expose OS headers. On Windows, system networking
> headers are incompatible with DPDK ones, causing multiple name clashes.
> API of libpcap itself involves a non-standard u_char type.
> Add a limited set of trivial libpcap wrappers, so that libpcap headers
> are not included directly by OS-independent PMD code. Use EAL types and
> functions for time instead of POSIX ones.

It is not nice to duplicate the pcap struct and macros and have dpdk versions of 
them, it may have long term maintanance issues too.

What are the clashes in question?

If they are macros, can the issue solved after undefining some after including 

And at the end of the day, shouldn't we need to resolve these clashes globally 
since we may hit same things with other PMDs or libraries as we enable them. I 
am for a global solution instead of these changes in pcap, but I guess question 
is how possible that global solution is..

> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>


More information about the dev mailing list