こんにちは。

Takahiro Kambe wrote
in <20030816.192204.36852016.taca / back-street.net>
>connect(2)でEINVALが発生する場合を書いてあるのを、どなたか見たことはあ
>りますか?  NetBSDでは前のメールに書いたとおり記述がありません。OpenBSD
>3.3では、
>
>     [EINVAL]      A TCP connection with a local broadcast, the all-ones or a
>                   multicast address as the peer was attempted.

SUSv3では、次のようになっています。

[EINVAL] The address_len argument is not a valid length for the 
         address family; or invalid address family in the sockaddr 
         structure.

ちょっと前のほうも引用すると、

If the connection cannot be established immediately and O_NONBLOCK is 
set for the file descriptor for the socket, connect( ) shall fail and 
set errno to [EINPROGRESS], but the connection request shall not be 
aborted, and the connection shall be established asynchronously.
Subsequent calls to connect( ) for the same socket, before the 
connection is established, shall fail and set errno to [EALREADY].

When the connection has been established asynchronously, select( ) and 
poll ( ) shall indicate that the file descriptor for the socket is 
ready for writing.

The socket in use may require the process to have appropriate 
privileges to use the connect( ) function.

参考になるでしょうか。

-- 
HORIKAWA Hisashi (in Kanji: 堀川 久)
Netsphere Laboratories  http://www.nslabs.jp/