Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

libnet (LIBNET_LINK) and libpcap cannot share same DLPI

From: <jraventos(at)yahoo.com>
Date: Wed Feb 12 2003 - 18:34:07 EST
('binary' encoding is not supported, stored as-is)

Hi,

I'm trying to use libpcap and libnet (in LIBNET_LINK mode) in the same card. When initializing libnet with libnet_init (after libpcap is on), it'll return a "failed: recv_ack: bind: Device busy".

The OS is HPUX. Could it be a problem with DLPI impl? (the above works fine in Linux)

Interestingly enough everything works fine if the mode is LIBNET_RAW4...

I'd appreciate if somebody can explain the above behavior, and what are the alternatives (ie. besides using two cards) if one needs to read-write non-IP packets.

Thanks in advance!

Best regards,
J.

PS. To reproduce simply start tcpdump. Then run libnet/samples/udp1 and libnet/samples/udp2. The latter will fail miserably while the first one (uses LIBNET_RAW4) works fine.
PS2. When looking at the libnet_init src, it looks like in the LIBNET_LINK mode, the libnet_select operation is mandatory whereas this is not the case in the LIBNET_RAW4. What's the rationale behind this?



To unsubscribe, e-mail: libnet-unsubscribe@securityfocus.com For additional commands, e-mail: libnet-help@securityfocus.com Received on Wed Feb 12 18:49:28 2003
Do you need help?X

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:02:22 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library