DPDK patches and discussions
 help / color / mirror / Atom feed
From: Mats Liljegren <liljegren.mats2@gmail.com>
To: David Marchand <david.marchand@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] No information about needed pcap version
Date: Thu, 9 Jan 2014 14:55:14 +0100	[thread overview]
Message-ID: <CA+xJJ1-Rohxk6q0k0mUJ8X6UqMDZ9VkbmcJCXCvDHgNPjpT6Sw@mail.gmail.com> (raw)
In-Reply-To: <CALwxeUv94wAd0K+W_iY8wXy6vMpnQJTrZkoAFO46oQ9_GBq0Mg@mail.gmail.com>

You could let PCAP_SEND be always 1 in rte_eth_pcap.h and then
document that for libpcap < 1.0.0 you need to change PCAP_SEND to 0 to
avoid link error for pcap_sendpacket().

Regards
Mats

On Thu, Jan 9, 2014 at 2:47 PM, David Marchand <david.marchand@6wind.com> wrote:
> Hello,
>
> Indeed, this check on a define is wrong.
>
> pcap.h does not seem to have information on library version (nor a #define
> linked to pcap_sendpacket functionality).
>
> We need to think of a better check but, for now, you can try to #define
> PCAP_SEND to 1 in lib/librte_pmd_pcap/rte_eth_pcap.h.
> pcap_sendpacket() is undefined for really old versions of libpcap (I think <
> 1.0.0).
> I suppose we might need something like configure (trying to link against
> pcap lib and see if pcap_sendpacket symbol is defined).
>
> Or we can revert 4fc6677d995bb46ddf155ee08a215f41e5ecbfe8 and declare
> libpcap < X.X.X unsupported.
>
>
> --
> David Marchand
>
>
> On Thu, Jan 9, 2014 at 12:59 PM, Mats Liljegren <liljegren.mats2@gmail.com>
> wrote:
>>
>> In file lib/librte_pmd_pcap/rte_eth_pcap.h there is a test to see
>> whether function pcap_sendpacket is a macro or not. If not, send is
>> not supported using pcap.
>>
>> My pcap library do have the function, but not defined as a macro.
>>
>> I'm using libpcap-dev version 1.4.0, but I couldn't find any
>> information in the manuals what version I need.
>>
>> Which version do I need to make this work?
>>
>> Regards
>> Mats
>
>

      reply	other threads:[~2014-01-09 13:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-09 11:59 Mats Liljegren
2014-01-09 13:47 ` David Marchand
2014-01-09 13:55   ` Mats Liljegren [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+xJJ1-Rohxk6q0k0mUJ8X6UqMDZ9VkbmcJCXCvDHgNPjpT6Sw@mail.gmail.com \
    --to=liljegren.mats2@gmail.com \
    --cc=david.marchand@6wind.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).