Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Aug 2002 07:59:03 -0500 (CDT)
From:      mark tinguely <tinguely@web.cs.ndsu.nodak.edu>
To:        freebsd-atm@FreeBSD.ORG, vjardin@wanadoo.fr
Subject:   Re: BPF into the HARP stack
Message-ID:  <200208221259.g7MCx3I34803@web.cs.ndsu.nodak.edu>
In-Reply-To: <20020821225810.D8DD615039F@venus.vincentjardin.net>

next in thread | previous in thread | raw e-mail | index | archive | help

on Thu, 22 Aug 2002 00:58:10 +0200, Vincent Jardin <vjardin@wanadoo.fr> 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




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