Date: 04 Aug 1999 19:13:30 +0200 From: Assar Westerlund <assar@sics.se> To: "Brian F. Feldman" <green@FreeBSD.org> Cc: Mike Smith <mike@smith.net.au>, Matthew Dillon <dillon@apollo.backplane.com>, Ollivier Robert <roberto@keltia.freenix.fr>, hackers@FreeBSD.org Subject: Re: Jail syscalls Message-ID: <5lpv13o4ed.fsf@assaris.sics.se> In-Reply-To: "Brian F. Feldman"'s message of "Wed, 4 Aug 1999 12:59:44 -0400 (EDT)" References: <Pine.BSF.4.10.9908041251530.55682-100000@janus.syracuse.net>
next in thread | previous in thread | raw e-mail | index | archive | help
"Brian F. Feldman" <green@FreeBSD.org> writes: > 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 */ > ... > } Yes, that would work, as would: union { struct sockaddr sa; struct sockaddr_storage ss; } u; I was just trying to say that not all socket addresses fit into a `struct sockaddr' but they should fit into a `struct sockaddr_storage'. /assar To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5lpv13o4ed.fsf>