This is the mail archive of the ecos-discuss@sources.redhat.com 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]

Re: Determining network ERROR codes


"Trenton D. Adams" wrote:
> 
>   >
>   > On 19-Jul-2001 Trenton D. Adams wrote:
>   > > Ok, how do I know what error corresponds to what?  I got an error
> of
>   > 331
>   > > on a connect () call.  Aren't these supposed to be standard
> errors?
>   >
>   > What do you mean "standard" errors?
> 
> I meant standard error values.  I think linux uses the same error code
> values as windows does, but I'm not sure.

Nope. Although there's some similarities at the start of the list, they do
differ. And there's only some errors in error.h. All the winsock errors are
in winsock2.h and start at 10000.

As for eCos, we should really be copying the linux values, for the sake of
argument (as it says in the comment near the top of codes.h), but
unfortunately that didn't happen for the network stuff. It's no _real_ big
deal though since obviously you're not meant to use the actual values so
it's not worth "fixing".

>   > > They don't seem to return the same errors as they do on Windows.
>   > Maybe
>   > > windows redefines them!
>   >
>   > As far as that goes, you can bet on it (and that they would say they
> had
>   > to, just to standardize the process)

For the winsock errors, instead of having ENOTSOCK, ECONNRESET, ESHUTDOWN,
etc., they renamed them WSAENOTSOCK, WSAECONNRESET, WSAESHUTDOWN.
Completely arbitrary since they have control of the E* codes from errno.h.
 
> I take it you hate windows and Bill's blue sky that pops on the screen
> once in awhile?

They abhor standards that allow interoperability, and will attempt to
sabotage them with versions that lock you into their products. Some people
don't think this is a bad thing, which I find odd. Nuff said.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions    http://www.redhat-techworld.com/


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