Date: Fri, 7 Jun 2002 17:28:21 -0400 (EDT) From: "Matthew N. Dodd" <winter@jurai.net> To: Archie Cobbs <archie@dellroad.org> Cc: freebsd-net@FreeBSD.ORG Subject: Re: m->m_pkthdr.header Message-ID: <20020607172612.G42854-100000@sasami.jurai.net> In-Reply-To: <200206071955.g57JtrJ65814@arch20m.dellroad.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 7 Jun 2002, Archie Cobbs wrote:
> - Rejigger the oltr driver to pass its "secret" information using
> an auxillary mbuf instead of m->m_pkthdr.header.
>
> Any comments/objections?
Please look at the 'kluge' that NetBSD uses.
netinet/if_arp.c:
trh = (struct token_header *)M_TRHSTART(m);
net/if_token.h:
/*
* This is a kludge to get at the token ring mac header and the source route
* information after m_adj() has been used on the mbuf.
* Note that m is always an mbuf with a packet header.
*/
#define M_TRHSTART(m) \
(ALIGN(((m)->m_flags & M_EXT ? (m)->m_ext.ext_buf : &(m)->m_pktdat[0]) \
+ sizeof (struct token_header)) - sizeof(struct token_header))
--
| Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD |
| winter@jurai.net | 2 x '84 Volvo 245DL | ix86,sparc,pmax |
| http://www.jurai.net/~winter | For Great Justice! | ISO8802.5 4ever |
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?20020607172612.G42854-100000>
