This is the mail archive of the mailing list for the eCos project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FWD: Re: [ECOS] Problems with init_all_network_interfaces

> > This patch should solve this problem. socket will return EINVAL.
> Actually, I think it would be better to return EPROTONOSUPPORT, which
> is what you would get if there were entries in the table but none of
> them supported the protocol requested.

Humm, POSIX says

    int socket(int domain, int type, int protocol);

    The socket() function shall fail if:


        The implementation does not support the specified address family.
        No more file descriptors are available for this process.
        No more file descriptors are available for the system.
        The protocol is not supported by the address family, or the
        protocol is not supported by the implementation.
        The socket type is not supported by the protocol.

So for me, EPROTONOSUPPORT is talking about the third parameter,
protocol. ie we have found something that supports the domain and the
type, but not the protocol.

In the case of the bug, we don't even support the domain, so
EAFNOSUPPORT seems more appropriate.

Having said that, i don't really case so long as its something


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]