Subject: Re: Proposal: socketfrom()
To: None <tls@rek.tjls.com>
From: Greg A. Woods <woods@planix.com>
List: tech-net
Date: 07/05/2007 02:05:11
--pgp-sign-Multipart_Thu_Jul__5_02:05:11_2007-1
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

At Thu, 5 Jul 2007 01:38:05 -0400, Thor Lancelot Simon wrote:
Subject: Proposal: socketfrom()
>=20
> I'd like to make it possible to set options on one "template" or "master"
> socket and then have them inherited by children, as listen()/accept() make
> possible for the other direction.  I'm thinking of something along the li=
nes
> of this:
>=20
> int socketfrom(int template, int domain, int type, int protocol);

That might be easier to implement inside the kernel, but wouldn't it be
better from a clean API design point of view to have something like a:

	set
	setsockopt_default(int level,
			   int optname,
			   const void *optval,
			   socklen_t optlen);

Which would set the default option(s) for all new sockets created by the
process until the next call to it?

(options would be set back to the system defaults across exec, and
perhaps also when called with all params zeros except "level")

--=20
						Greg A. Woods

H:+1 416 218-0098 W:+1 416 489-5852 x122 VE3TCP RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com>       Secrets of the Weird <woods@weird.com>

--pgp-sign-Multipart_Thu_Jul__5_02:05:11_2007-1
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
MessageID: uDHnfbeCwZW/5O1nVWbZ30BdDSKcZVCr

iQA/AwUBRoyKF2Z9cbd4v/R/EQKwIgCfdi1Y767QWAM7yvHcps+whP+mnbcAoM1V
owJKLRAHxIsrgvABHRgDND1o
=Nq7r
-----END PGP SIGNATURE-----

--pgp-sign-Multipart_Thu_Jul__5_02:05:11_2007-1--