Subject: Re: Proposal: socketfrom()
To: None <>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-net
Date: 07/05/2007 10:59:59
>> int socketfrom(int template, int domain, int type, int protocol);
> Is there any other useful application than using this for outbound
> connection?

I don't see one offhand, but I wouldn't want to assume there aren't
any; there are socket types that don't need connect() - UDP, raw
sockets, and special cases like routing sockets.  I'm not convinced
they need this kind of socket cloning, but I'm not convinced they
don't, either, and I can easily imagine it being useful for UDP.

> If there isn't what about this:

> int connectfrom(int template, int domain, int type, int protocol,
>                 struct sockaddr *name, socklen_t namelen);

I still think the domain/type/protocol should be inherited from the
template socket rather than passed in.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B