Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jul 2006 14:12:51 -0400
From:      Charles Swiger <cswiger@mac.com>
To:        =?ISO-8859-1?Q?Cl=E9ment_Lecigne?= <clemun@gmail.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Packet Construction and Protocol Testing...
Message-ID:  <E091142D-950C-43E3-9149-F73A2775E6FB@mac.com>
In-Reply-To: <44C11242.9090300@gmail.com>
References:  <m2bqrkr5a5.wl%gnn@neville-neil.com> <44BF95E9.2030102@mac.com> <m2hd1bpv0t.wl%gnn@neville-neil.com> <3724C08A-4ADD-4294-8953-A4ADA2326577@mac.com> <44C11242.9090300@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Jul 21, 2006, at 1:43 PM, Cl=E9ment Lecigne wrote:
>> 44-pi# grep -l pcap_inject /usr/lib/libpcap*
>> 45-pi# nm -g /usr/local/lib/python2.4/site-packages/pcap.so | grep =20=

>> pcap_inject
>>          U pcap_inject
>
> Have you disable bpf support ? Which version of libpcap do you use ?

No, bpf is compiled into the kernel, and C code which uses libpcap =20
seems to work fine:

1-pi# ident /usr/lib/libpcap.a
/usr/lib/libpcap.a:
      $Header: /tcpdump/master/libpcap/bpf_dump.c,v 1.13.2.1 =20
2003/11/15 23:26:37 guy Exp $
      $Header: /tcpdump/master/libpcap/bpf_image.c,v 1.25.2.1 =20
2003/11/15 23:26:38 guy Exp $
      $Header: /tcpdump/master/libpcap/etherent.c,v 1.21.6.1 =20
2003/11/15 23:26:38 guy Exp $
      $Header: /tcpdump/master/libpcap/scanner.l,v 1.95.2.3 =20
2004/03/28 21:45:33 fenner Exp $
      $Header: /tcpdump/master/libpcap/savefile.c,v 1.92.2.11 =20
2004/03/11 23:46:14 guy Exp $
      $Header: /tcpdump/master/libpcap/nametoaddr.c,v 1.68.2.3 =20
2003/11/19 18:13:48 guy Exp $
      $Header: /tcpdump/master/libpcap/optimize.c,v 1.76.2.3 =20
2003/12/22 00:26:36 guy Exp $
      $Header: /tcpdump/master/libpcap/gencode.c,v 1.193.2.8 =20
2004/03/29 20:53:47 guy Exp $
      $FreeBSD: src/usr.bin/yacc/skeleton.c,v 1.37 2003/02/12 =20
18:03:55 davidc Exp $
      $Header: /tcpdump/master/libpcap/grammar.y,v 1.79.2.3 =20
2004/03/28 21:45:32 fenner Exp $
      $Header: /tcpdump/master/libpcap/fad-getad.c,v 1.7.2.2 =20
2004/03/11 23:04:52 guy Exp $
      $Header: /tcpdump/master/libpcap/inet.c,v 1.58.2.1 2003/11/15 =20
23:26:41 guy Exp $
      $Header: /tcpdump/master/libpcap/pcap-bpf.c,v 1.67.2.4 =20
2003/11/22 00:06:28 guy Exp $
      $Header: /tcpdump/master/libpcap/bpf/net/bpf_filter.c,v =20
1.43.2.1 2003/11/15 23:26:49 guy Exp $
      $Header: /tcpdump/master/libpcap/pcap.c,v 1.63.2.9 2004/03/25 =20
22:40:52 guy Exp $


> The problem seems due to your libpcap library which doesn't have =20
> the pcap_inject() API.
>
> Personally, I've just tried the py-pypcap port from George and it =20
> works well. i.e, I was able to inject packets...

Interesting...thanks for the reply.

--=20
-Chuck




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E091142D-950C-43E3-9149-F73A2775E6FB>