From owner-freebsd-net Fri Jun 7 14:28:27 2002 Delivered-To: freebsd-net@freebsd.org Received: from sasami.jurai.net (sasami.jurai.net [66.92.160.223]) by hub.freebsd.org (Postfix) with ESMTP id 4045137B401 for ; Fri, 7 Jun 2002 14:28:23 -0700 (PDT) Received: from sasami.jurai.net (sasami.jurai.net [66.92.160.223]) by sasami.jurai.net (8.12.2/8.12.2) with ESMTP id g57LSL2A063922; Fri, 7 Jun 2002 17:28:21 -0400 (EDT) (envelope-from winter@jurai.net) Date: Fri, 7 Jun 2002 17:28:21 -0400 (EDT) From: "Matthew N. Dodd" To: Archie Cobbs Cc: freebsd-net@FreeBSD.ORG Subject: Re: m->m_pkthdr.header In-Reply-To: <200206071955.g57JtrJ65814@arch20m.dellroad.org> Message-ID: <20020607172612.G42854-100000@sasami.jurai.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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