Date: Thu, 2 Aug 2001 19:11:58 -0700 (PDT) From: Julian Elischer <julian@elischer.org> To: Brian Somers <brian@Awfulhak.org> Cc: Bruce Evans <bde@zeta.org.au>, Thomas Pornin <Thomas.Pornin@ens.fr>, freebsd-net@FreeBSD.ORG, freebsd-alpha@FreeBSD.ORG, Brian Somers <brian@freebsd-services.com>, FreeBSD-gnats-submit@FreeBSD.ORG, Brian Somers <brian@freebsd-services.com> Subject: Re: kern/27767: (was: PPPoE + Alpha + 32/64 bits) Message-ID: <Pine.BSF.4.21.0108021907190.41008-100000@InterJet.elischer.org> In-Reply-To: <200108022338.f72Nc6u09427@hak.lan.Awfulhak.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 3 Aug 2001, Brian Somers wrote:
>
> That's probably better. I went with the __attribute((packed)) stuff
> because it was already done that way in the rest of the code.
>
> In this specific case however, it may be best to just send the variable
> plus the alignment padding as the tag:
>
> struct {
> struct pppoe_tag hdr;
> union uniq data;
> } uniqtag;
>
> ......
> uniqtag.hdr.tag_type = PTT_HOST_UNIQ;
> uniqtag.hdr.tag_len = htons((u_int16_t)(sizeof(uniqtag) - sizeof(uniqtag.hdr));
> uniqtag.data.pointer = sp;
urk
I prefer bruce's method :-) but if the rest use
packed.. we can probably use it here to be consistant..
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?Pine.BSF.4.21.0108021907190.41008-100000>
