Re: BPF into the HARP stack
mark tinguely <[email protected]> Thu, 22 Aug 2002 07:59:03 -0500 (CDT)
| Newsgroups | gmane.os.freebsd.devel.atm |
|---|---|
| Message-ID | <[email protected]> |
on Thu, 22 Aug 2002 00:58:10 +0200, Vincent Jardin <[email protected]> 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 [email protected] with "unsubscribe freebsd-atm" in the body of the message