|Anonymous | Login||2021-05-11 10:25 UTC|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Simple Details|
|ID||Category||Severity||Type||Date Submitted||Last Update|
|0001067||[1003.1(2013)/Issue7+TC1] System Interfaces||Objection||Omission||2016-08-11 08:34||2020-04-21 13:21|
|Priority||normal||Resolution||Accepted As Marked|
|Organization||The Open Group|
|Final Accepted Text||See Note: 0003902|
|Summary||0001067: missing socket() error for unsupported socket type|
The ERRORS section for socket() does not list an error number to be
used when the socket type is not supported by the address family.
This is different from the condition listed for EPROTOTYPE: "The
socket type is not supported by the protocol" because, in
particular, the latter does not cover the case when the protocol
argument is zero.
I have observed three different behaviours on existing systems.
It looks like System V derivatives use EPROTOTYPE for this even
though no protocol was specified (tested on Solaris 11 and HP-UX 11).
OS X uses EPROTONOSUPPORT and Linux uses a non-standard error number
The call I used to test this was socket(AF_INET, SOCK_SEQPACKET, 0).
The socketpair() page has the same problem.
There are seven options (some only included for completeness and not
1. Only allow EPROTOTYPE
2. Only allow EPROTONOSUPPORT
3. Only allow ESOCKTNOSUPPORT
4. Allow EPROTOTYPE or EPROTONOSUPPORT
5. Allow EPROTOTYPE or ESOCKTNOSUPPORT
6. Allow EPROTONOSUPPORT or ESOCKTNOSUPPORT
7. Allow all three.
I will propose wording changes for socket() and socketpair() once the
group chooses one of these options.
In the Dec 14 teleconference it was decided to allow all three behaviours in Issue 8 but with OB shading and future directions as a warning that we intend to require ESOCKTNOSUPPORT in Issue 9.
(All page and line numbers are for the 2016 edition.)
On page 236 line 7959 section XBD <errno.h>, add:
[ESOCKTNOSUPPORT] Socket type not supported.
On page 487 line 16832 section XSH 2.3 Error Numbers, add:
[ESOCKTNOSUPPORT]Socket type not supported. The socket type is not supported by the address family, or the socket type is not supported by the implementation.
On page 2005 line 64494-64497 section socket(), change:
[EPROTONOSUPPORT]to:The protocol is not supported by the address family, or the protocol is not supported by the implementation.
[EPROTONOSUPPORT]The value of protocol is non-zero and either the protocol is not supported by the address family or the protocol is not supported by the implementation.
On page 2005 line 64510-64513 section socket() change:
RATIONALEHistorically the standard did not specify the errno value to be used when the socket type is not supported, and there were differences between implementations. Some reused the existing standard [EPROTONOSUPPORT] or [EPROTOTYPE] values while others set errno to a (then) non-standard value of [ESOCKTNOSUPPORT]. All three values are permitted in this version of the standard, but the use of [EPROTONOSUPPORT] or [EPROTOTYPE] is considered to be misleading when no protocol is specified (that is, the value of protocol is zero) and consequently those alternatives have been marked obsolescent. If protocol is non-zero, since there is no precedence between error conditions, all three values will still be permitted even after the obsolescent alternatives for the [ESOCKTNOSUPPORT] condition have been removed.
|2016-08-11 08:34||geoffclare||New Issue|
|2016-08-11 08:34||geoffclare||Name||=> Geoff Clare|
|2016-08-11 08:34||geoffclare||Organization||=> The Open Group|
|2016-08-11 08:34||geoffclare||Section||=> socket|
|2016-08-11 08:34||geoffclare||Page Number||=> 1984|
|2016-08-11 08:34||geoffclare||Line Number||=> 63551-63559|
|2016-08-11 08:34||geoffclare||Interp Status||=> ---|
|2017-12-15 11:52||geoffclare||Note Added: 0003902|
|2018-01-04 16:22||nick||Final Accepted Text||=> See Note: 0003902|
|2018-01-04 16:22||nick||Status||New => Resolved|
|2018-01-04 16:22||nick||Resolution||Open => Accepted As Marked|
|2018-01-04 16:22||nick||Tag Attached: issue8|
|2020-04-21 13:21||geoffclare||Status||Resolved => Applied|
|Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group|