socket.2 does not document invalid domain errno

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

socket.2 does not document invalid domain errno

Kristaps Johnson-2
>Submitter-Id:  net
>Originator:    kristaps
>Organization:
net
>Synopsis:      socket.2 does not document invalid domain errno
>Severity:      non-critical
>Priority:      low
>Category:      library
>Class:         doc-bug
>Release:       3.9
>Environment:
         System      : OpenBSD 3.9
         Architecture: OpenBSD.i386
         Machine     : i386
>Description:
socket.2 does not mention the errno set by an invalid domain.
The code is EPROTONOSUPPORT, which is currently documented
"[t]he protocol type or the specified protocol is not support-
ed within this domain".

It should include something along the lines of "or invalid domain
was specified".

Should this not return an EINVAL?  The errno documentation does
not mention bad socket domains as a reason, only protocols.

>How-To-Repeat:

(void)socket(-1, SOCK_STREAM, 0);
/* errno == EPROTONOSUPPORT */

>Fix: