public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Determining network ERROR codes
@ 2001-07-19 13:44 Trenton D. Adams
  2001-07-19 14:57 ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Trenton D. Adams @ 2001-07-19 13:44 UTC (permalink / raw)
  To: 'eCos mailing list'

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?
They don't seem to return the same errors as they do on Windows.  Maybe
windows redefines them!

Anyhow, where do I look for this information?

Trenton D. Adams
Embedded Developer
Windows Developer
Extreme Engineering Ltd.
Calgary Alberta.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [ECOS] Determining network ERROR codes
  2001-07-19 13:44 [ECOS] Determining network ERROR codes Trenton D. Adams
@ 2001-07-19 14:57 ` Gary Thomas
  2001-07-19 15:01   ` Trenton D. Adams
  0 siblings, 1 reply; 4+ messages in thread
From: Gary Thomas @ 2001-07-19 14:57 UTC (permalink / raw)
  To: Trenton D. Adams; +Cc: eCos mailing list

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?

The error numbers are in the file .../error/current/include/codes.h
You can turn an error number into a printable string by calling strerror()

> 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)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [ECOS] Determining network ERROR codes
  2001-07-19 14:57 ` Gary Thomas
@ 2001-07-19 15:01   ` Trenton D. Adams
  2001-07-19 19:29     ` Jonathan Larmour
  0 siblings, 1 reply; 4+ messages in thread
From: Trenton D. Adams @ 2001-07-19 15:01 UTC (permalink / raw)
  To: 'Gary Thomas'; +Cc: 'eCos mailing list'

  > 
  > 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.

  > > 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)

I take it you hate windows and Bill's blue sky that pops on the screen
once in awhile?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] Determining network ERROR codes
  2001-07-19 15:01   ` Trenton D. Adams
@ 2001-07-19 19:29     ` Jonathan Larmour
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Larmour @ 2001-07-19 19:29 UTC (permalink / raw)
  To: Trenton D. Adams; +Cc: 'eCos mailing list'

"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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-07-19 19:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-19 13:44 [ECOS] Determining network ERROR codes Trenton D. Adams
2001-07-19 14:57 ` Gary Thomas
2001-07-19 15:01   ` Trenton D. Adams
2001-07-19 19:29     ` Jonathan Larmour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).