Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERL-550: inet:posix/0 type is missing values #3347

Closed
OTP-Maintainer opened this issue Jan 5, 2018 · 4 comments
Closed

ERL-550: inet:posix/0 type is missing values #3347

OTP-Maintainer opened this issue Jan 5, 2018 · 4 comments
Assignees
Labels
bug Issue is reported as a bug priority:low team:PS Assigned to OTP team PS
Milestone

Comments

@OTP-Maintainer
Copy link

Original reporter: okeuday
Affected version: Not Specified
Fixed in version: OTP-21.0
Component: Not Specified
Migrated from: https://bugs.erlang.org/browse/ERL-550


I have seen that {{gen_udp:send/4}} may return 
{code}
{error, enetunreach}
{code}
though the {{enetunreach}} value is not represented in the {{inet:posix/0}} type specification.  I saw this on a multicast socket that used the options:
{code}
[{ip, Interface}, {multicast_ttl, TTL}, {multicast_loop, true}]
{code}
There may be other posix errors that are not yet in the {{inet:posix/0}} type specification.
@OTP-Maintainer
Copy link
Author

raimo said:

Yes.  This seems to need a thorough overhaul since the {{inet:posix/0}} type definition is hardly even close by using type {{file:posix/0}}...

@OTP-Maintainer
Copy link
Author

raimo said:

I have created an internal ticket OTP-14019 and added a topic branch to proposed updates for our master branch.

I kept the reference from {{inet:posix/0}} to {{file:posix/0}}, since socket operations concerning sendfile and AF_UNIX may return many file errors.

So I have added {{ebadmsg | edeadlk | edeadlock | eftype | emultihop | enobufs | enolck | enolink | enosr | enostr | enosys | eopnotsupp | eoverflow | erange | etxtbsy}} to {{file:posix/0}}, and {{eaddrinuse | eaddrnotavail | eafnosupport | ealready | econnaborted | econnrefused | econnreset | edestaddrreq | ehostdown | ehostunreach | einprogress | eisconn | emsgsize | enetdown | enetunreach | enopkg | enoprotoopt | enotconn | enotty | enotsock | eproto | eprotonosupport | eprototype | esocktnosupport | etimedout | ewouldblock}} to {{inet:posix/0}}.

I hope I have not missed any... :-)

@OTP-Maintainer
Copy link
Author

okeuday said:

Thank you for adding that.  That list looks like it should cover everything file/socket related.

@OTP-Maintainer
Copy link
Author

raimo said:

I hope so...  Unfortunately I found 78 error codes in erts/emulator/beam/erl_posix_str.c that are neither i {{file:posix/0}} nor in {{inet:posix/0}}.  Some maybe should.

Anyway, merged to master.

@OTP-Maintainer OTP-Maintainer added bug Issue is reported as a bug team:PS Assigned to OTP team PS priority:low labels Feb 10, 2021
@OTP-Maintainer OTP-Maintainer added this to the OTP-21.0 milestone Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug priority:low team:PS Assigned to OTP team PS
Projects
None yet
Development

No branches or pull requests

2 participants