SCTP Discussions

Text archives Help


Re: [SCTP-Discussion] Update on API definition (sctp.h)


Chronological Thread 
  • From: Andreas Jungmaier <ajung AT exp-math.uni-essen.de>
  • To: discussion AT sctp.de, Salbrechter Bernd <bernd.salbrechter AT siemens.at>
  • Subject: Re: [SCTP-Discussion] Update on API definition (sctp.h)
  • Date: Wed Mar 7 10:53:01 2001
  • List-id: SCTP Discussions <discussion.sctp.de>
  • Organization: University of Essen, Germany

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Well,

for now the error codes are used as documented in the API description,
and this was thought to be an idea for future releases.
Anyway, where do I find the proper declaration of all the errno-
values ?
I looked at the man page, but there POSIX was mentioned...and
I do not have these standards.

The problem with positive numbers that the return values of many
functions are either a (positive, good) result, or a
negative value (as error code). Probably one would have to change
all functions, so that the return value always gives an error
code, and the result is passed via pointers in the parameter list.


> Why not use positive numbers and a range above the values used by errno.
> That way one can mix the values in one variable and can figure out later
> where the error comes from.
>
> You should
> #define SCTP_ERRORS_START
> and
> #define SCTP_UNSPECIFIED_ERROR SCTP_ERRORS_START+1
> ...

> > #define SCTP_SUCCESS 0
> > #define SCTP_UNSPECIFIED_ERROR -1 /*look at errno*/
> > #define SCTP_ASSOC_NOT_EXISTING -2
> > #define SCTP_PATH_NOT_EXISTING -3
> > #define SCTP_INVALID_ADDRESS -4
> > #define SCTP_LACK_OF_RESOURCES -5
> > #define SCTP_SEND_QUEUE_FULL -6
> > #define SCTP_WRONG_STATE -7
> > #define SCTP_INVALID_PARAMETERS -8
> > #define ...
- --

Andreas Jungmaier

- ----------------------------------------------------------------------------
void hamlet()
{#define question=((bb)||(!bb))}
- ----------------------------------------------------------------------------
Andreas Jungmaier, Dipl.-Ing.
University of Essen email:
ajung AT exp-math.uni-essen.de
Computer Networking Technology Group Tel. : +49 (0201) 183-7636
- ----------------------------------------------------------------------------
PGP Public Key and Fingerprint: see http://www.exp-math.uni-essen.de/~ajung
- ----------------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6pgQ0d2Uw+xBvGUIRAhtLAKCL810dpQaSve4/pAscf2iw98vidwCgobPd
GI38G/WAM0v7L7Sbu6vYR5M=
=KW7d
-----END PGP SIGNATURE-----




Archive powered by MHonArc 2.6.19+.

Top of page