From owner-freebsd-hackers Wed Aug 4 10: 0:32 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from janus.syracuse.net (janus.syracuse.net [205.232.47.15]) by hub.freebsd.org (Postfix) with ESMTP id C3429153EE for ; Wed, 4 Aug 1999 10:00:27 -0700 (PDT) (envelope-from green@FreeBSD.org) Received: from localhost (green@localhost) by janus.syracuse.net (8.9.3/8.8.7) with ESMTP id MAA55782; Wed, 4 Aug 1999 12:59:44 -0400 (EDT) X-Authentication-Warning: janus.syracuse.net: green owned process doing -bs Date: Wed, 4 Aug 1999 12:59:44 -0400 (EDT) From: "Brian F. Feldman" X-Sender: green@janus.syracuse.net To: Assar Westerlund Cc: Mike Smith , Matthew Dillon , Ollivier Robert , hackers@FreeBSD.org Subject: Re: Jail syscalls In-Reply-To: <5lr9ljssjj.fsf@assaris.sics.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 4 Aug 1999, Assar Westerlund wrote: > "Brian F. Feldman" writes: > > On Tue, 3 Aug 1999, Mike Smith wrote: > > > > > > Actually, with interfaces like this you should generally pass a pointer > > > to the structure in userspace, and stick a version number constant in > > > the beginning of the structure. The size is often not enough of a > > > determining factor... > > > > Actually, the structure shouldn't change size because it should be > > using a sockaddr. > > No, because sizeof(struct sockaddr) < sizeof(struct sockaddr_in6). > This is kind of bad but that's the way it is. It would make sense to > use a `struct sockaddr_storage' but I still think it's worthwhile and > better to have a version number. As I read it, sockaddr is a transparent type (overloaded, as it were). So we would use something like: struct jail { ... struct sockaddr; char [SOCK_MAXADDRLEN - sizeof(struct sockaddr)]; char [sizeof(int) - SOCK_MAXADDRLEN % sizeof(int)];/* padding */ ... } > > /assar > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > Brian Fundakowski Feldman _ __ ___ ____ ___ ___ ___ green@FreeBSD.org _ __ ___ | _ ) __| \ FreeBSD: The Power to Serve! _ __ | _ \._ \ |) | http://www.FreeBSD.org/ _ |___/___/___/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message