From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ea0-x22d.google.com (mail-ea0-x22d.google.com [IPv6:2a00:1450:4013:c01::22d]) by dpdk.org (Postfix) with ESMTP id 9A45D58E9 for ; Thu, 9 Jan 2014 14:54:02 +0100 (CET) Received: by mail-ea0-f173.google.com with SMTP id o10so1458738eaj.18 for ; Thu, 09 Jan 2014 05:55:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=QemdXRoEg9R1Qn7mkEFYL90epuVXP0rQrWRGuxIkeBg=; b=hcnG+1T0OllPOILw2JyEAt2wB41RU2JpWKd99XtIHJLM2ZSLZEkH80Kj/56yFj3bst qDjOkYynQyXz+xXMFDYO9h6fIG3lB1GotYd7vX2x/Rxctewb6+7tHs7zLOxlPCSM80zn ZsFZEjPcVWG+ScFVyX86FcnVn0xjf7OSD/NOpoQS0F9sQciRZW9ywhYfFHaPtnXAADm4 WGZWUiiwUxR51iFp+kDPl9dL9RAHGrSk+UdcViMTfLsMNG3Bd5aErpn8q0QD0Q9+7+wL WPwZI4Fb4A8QAMaAqnCJXJqRR8a60Dn4FVwOrrdNWn0qEqjg2BWYneJ6TLxioiC0VrS9 8TmA== MIME-Version: 1.0 X-Received: by 10.14.194.131 with SMTP id m3mr3589016een.2.1389275714716; Thu, 09 Jan 2014 05:55:14 -0800 (PST) Received: by 10.15.94.5 with HTTP; Thu, 9 Jan 2014 05:55:14 -0800 (PST) In-Reply-To: References: Date: Thu, 9 Jan 2014 14:55:14 +0100 Message-ID: From: Mats Liljegren To: David Marchand Content-Type: text/plain; charset=UTF-8 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] No information about needed pcap version X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jan 2014 13:54:02 -0000 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 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 > 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 > >