Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Oct 2002 09:26:27 +0200 (CEST)
From:      Harti Brandt <brandt@fokus.gmd.de>
To:        Craig Rodrigues <rodrigc@attbi.com>
Cc:        freebsd-net@FreeBSD.ORG
Subject:   Re: How to add bpf support to if_atmsubr.c?
Message-ID:  <20021014092010.S19145-100000@beagle.fokus.gmd.de>
In-Reply-To: <20021013092500.A35284@attbi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 13 Oct 2002, Craig Rodrigues wrote:

CR>Hi,
CR>
CR>I am on a -current system, using patches from Harti Brandt's
CR>Netgraph ATM work:
CR>http://www.fokus.fhg.de/research/cc/cats/employees/hartmut.brandt/ngatm/
CR>
CR>I am trying to add bpf support to /src/sys/net/if_atmsubr.c so that
CR>I can use tcpdump when sending traffic over my ATM card.
CR>
CR>I've got things mostly working, but I think I'm using the
CR>wrong arguments in the bpfattach() call (I'm not familiar with
CR>bpf and just guessed, based on looking at files in the same directory).
CR>
CR>Here is the line I used:
CR>bpfattach(ifp, DLT_ATM_RFC1483, sizeof(u_int));
CR>
CR>What should I really be using?
CR>
CR>I am attaching the patch I am using, which incorporates
CR>patches from Harti Brandt, and bpf fixes from me.

You my look at dev/en. In revision 1.7 of if_atmsub.c bpf support was
moved from the generic file to the ENI driver ('as it should be'????).
Maybe its time to move it back. The problem is, that at attach time you
don't know what link-level encapsulation is used, because this can be
select when you establish the VCC (via the parameter 'z' (see en(4))).
So BPF_DLC_RFC1483 will not work without LLC/SNAP encapsulation.

harti
-- 
harti brandt, http://www.fokus.gmd.de/research/cc/cats/employees/hartmut.brandt/private
              brandt@fokus.gmd.de, brandt@fokus.fhg.de


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021014092010.S19145-100000>