Subject: Re: Proposal: socketfrom()
To: None <tech-net@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-net
Date: 07/05/2007 11:11:19
>> int socketfrom(int template, int domain, int type, int protocol);
> I dislike this approach becaues it is a new way to create a socket.
> Currently you create a socket with socket(), have the system allocate
> you a new one with accept() and...I think that is the limit.
Yes, this is a third way - and what's wrong with that?
> I would rather see something like:
> setsockopt(fd, SOL_SOCKET, SO_TEMPLATE, &template, sizeof(template))
> The next question is then how to define the "template" data structure
> in such a way that it is extensible for arbitrary sockets.
My own suggestion would be to make it an opaque-to-userland blob
created by the kernel with something like getsockopt(SO_GET_TEMPLATE).
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B