From owner-freebsd-atm Wed Aug 21 15:44:47 2002 Delivered-To: freebsd-atm@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A17F37B400 for ; Wed, 21 Aug 2002 15:44:46 -0700 (PDT) Received: from venus.vincentjardin.net (AVelizy-102-1-5-103.abo.wanadoo.fr [80.13.229.103]) by mx1.FreeBSD.org (Postfix) with ESMTP id 937D343E91 for ; Wed, 21 Aug 2002 15:44:45 -0700 (PDT) (envelope-from jardin@venus.vincentjardin.net) Received: by venus.vincentjardin.net (Postfix, from userid 501) id D8DD615039F; Thu, 22 Aug 2002 00:58:10 +0200 (CEST) Content-Type: text/plain; charset="iso-8859-15" From: Vincent Jardin To: freebsd-atm@freebsd.org Subject: BPF into the HARP stack Date: Thu, 22 Aug 2002 00:58:10 +0200 X-Mailer: KMail [version 1.3.1] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20020821225810.D8DD615039F@venus.vincentjardin.net> Sender: owner-freebsd-atm@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi, I am wondering where the best place could be to add a bpf_[m]tap support into the HARP stack. For example, I think that the incoming mbufs could be tapped into atm_subr.c: atm_intr() About's the outgoing mbufs, I think that they could be tapped into atm_if.c: atm_ifoutput(). However, which DLT_XXX should I use ? I do not think that DLT_ATM_RFC1483, nor DLT_ATM_CLIP are the right one because it is not useful for the ILMI, ARP, ... cells. Moreover, which header shoud be appended in order to be compatible with tcpdump and ethereal ? Thanks, Vincent To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-atm" in the body of the message From owner-freebsd-atm Thu Aug 22 5:59: 8 2002 Delivered-To: freebsd-atm@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A1D0137B406 for ; Thu, 22 Aug 2002 05:59:04 -0700 (PDT) Received: from web.cs.ndsu.nodak.edu (web.cs.ndsu.NoDak.edu [134.129.125.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 105B443E42 for ; Thu, 22 Aug 2002 05:59:04 -0700 (PDT) (envelope-from tinguely@web.cs.ndsu.nodak.edu) Received: (from tinguely@localhost) by web.cs.ndsu.nodak.edu (8.11.4/8.11.4) id g7MCx3I34803; Thu, 22 Aug 2002 07:59:03 -0500 (CDT) (envelope-from tinguely) Date: Thu, 22 Aug 2002 07:59:03 -0500 (CDT) From: mark tinguely Message-Id: <200208221259.g7MCx3I34803@web.cs.ndsu.nodak.edu> To: freebsd-atm@FreeBSD.ORG, vjardin@wanadoo.fr Subject: Re: BPF into the HARP stack In-Reply-To: <20020821225810.D8DD615039F@venus.vincentjardin.net> Sender: owner-freebsd-atm@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org on Thu, 22 Aug 2002 00:58:10 +0200, Vincent Jardin said: > I am wondering where the best place could be to add a bpf_[m]tap support into > the HARP stack. > > For example, I think that the incoming mbufs could be tapped into atm_subr.c: > atm_intr() > > About's the outgoing mbufs, I think that they could be tapped into atm_if.c: > atm_ifoutput(). > > However, which DLT_XXX should I use ? I do not think that DLT_ATM_RFC1483, > nor DLT_ATM_CLIP are the right one because it is not useful for the ILMI, > ARP, ... cells. > > Moreover, which header shoud be appended in order to be compatible with > tcpdump and ethereal ? In my Nicstar driver, I put the hooks into the device driver, right after transmission, and as it recieved a new packet. In this way we are not HARP specific. I added a pseudo-header consisting of the following 5 octects: DIRECTION VPI VCI GFC Payload Type Cell Loss Priority 8bits 8bits 16 bits 4 bits 3 bits 1 bit 0x80 = transmit 0x00 = recieve New pcap rules have to be added to use the ATM packets with tcpdump and family. when I supplied the DMA address for the first buffer of the PDU, I left 8 octects, so I knew I had room to add the pseudo-header without needing a m_pullup(). --mark tinguely. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-atm" in the body of the message From owner-freebsd-atm Thu Aug 22 10:55:26 2002 Delivered-To: freebsd-atm@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AAD1537B400 for ; Thu, 22 Aug 2002 10:55:24 -0700 (PDT) Received: from venus.vincentjardin.net (AVelizy-102-1-5-103.abo.wanadoo.fr [80.13.229.103]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0849C43E6E for ; Thu, 22 Aug 2002 10:55:24 -0700 (PDT) (envelope-from jardin@venus.vincentjardin.net) Received: by venus.vincentjardin.net (Postfix, from userid 501) id A849A15039F; Thu, 22 Aug 2002 20:08:51 +0200 (CEST) Content-Type: text/plain; charset="iso-8859-1" From: Vincent Jardin To: mark tinguely , freebsd-atm@FreeBSD.ORG Subject: Re: BPF into the HARP stack Date: Thu, 22 Aug 2002 20:08:51 +0200 X-Mailer: KMail [version 1.3.1] References: <200208221259.g7MCx3I34803@web.cs.ndsu.nodak.edu> In-Reply-To: <200208221259.g7MCx3I34803@web.cs.ndsu.nodak.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20020822180851.A849A15039F@venus.vincentjardin.net> Sender: owner-freebsd-atm@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > In my Nicstar driver, I put the hooks into the device driver, right > after transmission, and as it recieved a new packet. In this way we > are not HARP specific. I saw your source code, however I would prefer a solution that is not driver depedent. > > I added a pseudo-header consisting of the following 5 octects: > > DIRECTION VPI VCI GFC Payload Type Cell Loss Priority > 8bits 8bits 16 bits 4 bits 3 bits 1 bit > 0x80 = transmit > 0x00 = recieve > > New pcap rules have to be added to use the ATM packets with tcpdump and > family. Is it included into the official libpcap or tcpdump release ? > > when I supplied the DMA address for the first buffer of the PDU, I > left 8 octects, so I knew I had room to add the pseudo-header without > needing a m_pullup(). grr, the famous m_pullup issues ;-( Thanks, Vincent To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-atm" in the body of the message