From owner-freebsd-net Thu Aug 2 17: 6:43 2001 Delivered-To: freebsd-net@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id 21D5337B401; Thu, 2 Aug 2001 17:06:39 -0700 (PDT) (envelope-from julian@elischer.org) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id TAA48308; Thu, 2 Aug 2001 19:11:59 -0700 (PDT) Date: Thu, 2 Aug 2001 19:11:58 -0700 (PDT) From: Julian Elischer To: Brian Somers Cc: Bruce Evans , Thomas Pornin , freebsd-net@FreeBSD.ORG, freebsd-alpha@FreeBSD.ORG, Brian Somers , FreeBSD-gnats-submit@FreeBSD.ORG, Brian Somers Subject: Re: kern/27767: (was: PPPoE + Alpha + 32/64 bits) In-Reply-To: <200108022338.f72Nc6u09427@hak.lan.Awfulhak.org> Message-ID: 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, 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