[zeromq-dev] 0MQ/2.0-beta1 on OSX
Martin Sustrik
sustrik at 250bpm.com
Mon Jan 18 08:16:54 CET 2010
Steven McCoy wrote:
> 2010/1/18 Steven McCoy <steven.mccoy at miru.hk <mailto:steven.mccoy at miru.hk>>
>
> The error code should be ENODEV.
> Or to be different you can use ENXIO, for detecting network device
> functionality you also have ENETDOWN and ENONET. There are so many
> error codes with overlapping domains, at a stretch you could also
> use EADDRNOTAVAIL, ENOENT, or EFAULT.
ENODEV reads "Operation not supported by device"
ENXIO reads "No such device or address."
My feeling is that the latter is more appropriate for "not able to
resolve interface name".
> For datagram sockets the state of the interface isn't normally
> important, you should be able to unplug the cable and replug it in and
> resume communications. Similarly, receive side of connection orientated
> services don't have to care too much. It all depends on what conditions
> you are expecting, do you expect the interface specified to be
> absolutely correct and the error to be a transient state such as a
> network fault or do you want to bail out and have to have the
> application keep retrying to connect? A transient adapter includes VPN
> connections such as PPTP from a desktop.
That's why I said it's tricky. I would say we should gradually refine
the semantics. At the moment we can start with a single error code
returned when interface name resolving fails for whatever reason.
Martin
More information about the zeromq-dev
mailing list