From owner-freebsd-alpha Sun Dec 23 2:19:58 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by hub.freebsd.org (Postfix) with ESMTP id 93D7F37B419 for ; Sun, 23 Dec 2001 02:19:54 -0800 (PST) Received: (from uucp@localhost) by srv1.cosmo-project.de (8.11.6/8.11.6) with UUCP id fBNAJmW36861; Sun, 23 Dec 2001 11:19:49 +0100 (CET) (envelope-from ticso@cicely9.cicely.de) Received: from mail.cicely.de (cicely20.cicely.de [10.1.1.22]) by cicely5.cicely.de (8.12.1/8.12.1) with ESMTP id fBNAKDtx006446; Sun, 23 Dec 2001 11:20:14 +0100 (CET)?g (envelope-from ticso@cicely9.cicely.de) Received: from cicely9.cicely.de (cicely9.cicely.de [10.1.7.11]) by mail.cicely.de (8.11.0/8.11.0) with ESMTP id fBNAKCW25764; Sun, 23 Dec 2001 11:20:12 +0100 (CET) Received: (from ticso@localhost) by cicely9.cicely.de (8.11.6/8.11.6) id fBNAKBs62668; Sun, 23 Dec 2001 11:20:11 +0100 (CET) (envelope-from ticso) Date: Sun, 23 Dec 2001 11:20:11 +0100 From: Bernd Walter To: Matthew Jacob Cc: Wilko Bulte , freebsd-alpha@FreeBSD.ORG Subject: Re: FreeBSD 4.5 alpha buyglet Message-ID: <20011223102010.GC61241@cicely9.cicely.de> References: <20011223080046.GB61241@cicely9.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.24i X-Operating-System: FreeBSD cicely9.cicely.de 5.0-CURRENT alpha Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Sun, Dec 23, 2001 at 12:19:24AM -0800, Matthew Jacob wrote: > > > > What else would you use for loading a 64 bit value? > > > Not if it's not aligned, and because the structure is fully enumerated, it > should be known to be unaligned. Sorry - but I'm completely missing the reason why it should be unaligned. A 64 bit value starts at a n*8 address relative from the structure beginning unless explizit requested otherwise. > > If it starts with the second or later interface I would asume it's because > > several structs are concatenated in the sysctl output and read as one. If > > one of them is not n*8 bytes long you get an alignment offset. But as I > > don't have more debug output than posted on the list I can only guess. > > The structures are all listed in if.h. > > Well- I must be wrong. I'm sure somebody would have fixed soemthing this > egregious. If you look at what Wilko Bulke posted you will notice that the status function gets a 4*n aligned ifm. The first ifm is located at offset 0 from the malloced buf so it should be propper aligned. Sysctl transfers 2 structures for each interface. If the second structure is not n*8 byte in length the next ifm is wrong aligned. This happens in sbin/ifconfig/ifconfig.c and sys/net/rtsock.c -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message