SCTP Discussions

Text archives Help


Re: [SCTP-Discussion] How about sctp_shutdownLibrary()?


Chronological Thread 
  • From: Andreas Jungmaier <ajung AT exp-math.uni-essen.de>
  • To: discussion AT sctp.de, "Chang Jin-woong" <jwjang AT telcoware.com>
  • Subject: Re: [SCTP-Discussion] How about sctp_shutdownLibrary()?
  • Date: Sun Nov 18 19:27:01 2001
  • List-id: SCTP Discussions <discussion.sctp.de>
  • Organization: University Essen

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

Hello Chang Jin-Woong,


> (1) make a table to keep the data of all active sctp associations.
> (2) arrange the sctplib to call a user callback function when a signal is
> received.

I do not think that should be a function of the library !
The library user, i.e. your demon, may do so, anyway.

> (3) in the user callback function, call sctp_abort() for all
> active sctp associations in the table, and set a global termination flag.

The library user, i.e. your demon, may do this too.

> (4) in the association status notification callback, check the global
> termination flag, and if it is set and all associations are aborted,
> terminate the process itself. Hmmm, not looking good.

But why ?

> So I suggest to implement something like sctp_shutdownLibrary(), for
> graceful termination of sctplib-based applications.

I do not think I understand your problem here. For each SCTP instance
you registered, you can deregister it, to free your resources.
What do you think should _exactly_ be done in sctp_shutdownLibrary() ?

> By the way, are all sctplib APIs async-signal-safe? that
is, can it be used
> safely in the signal handler?

I am afraid not. What would it take to make them async-signal-safe ?

Best regards,
Andreas

- --
- ------------------------------------------------------------------------
Dipl.-Ing. Andreas Jungmaier | _
Computer Networking Technology Group | ASCII ribbon campaign ( )
University of Essen | - against HTML email X
http://www.exp-math.uni-essen.de/~ajung | & vcards / \
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7+Ar2XAsLBNOCSsARAqHPAKDlzvMcZviAUtZUvCbvgxiWb9l3BgCguCmd
EKoEIKla2r3U6A165lO5140=
=Um4s
-----END PGP SIGNATURE-----




Archive powered by MHonArc 2.6.19+.

Top of page