SCTP Discussions

Text archives Help


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


Chronological Thread 
  • From: "Chang Jin-woong" <jwjang AT telcoware.com>
  • To: <discussion AT sctp.de>
  • Subject: Re: [SCTP-Discussion] How about sctp_shutdownLibrary()?
  • Date: Sun Nov 18 20:07:01 2001
  • List-id: SCTP Discussions <discussion.sctp.de>
  • Organization: Telcoware, Inc.

Thanks for your comments.

What I would like to do was protocol-level disconnection of all existing
sctp associations when my application is teminating, so that each peer of
my sctp application can detect the lost of their connection as soon as
possible.
(Suppose you're making a TCP application with socket API. when your
application
exits, the kernel will automatically disconnect the TCP connection associated
with it.
You don't have to explicitly close all TCP connections before exiting. My
idea came
from this behavior of UNIX systems.)

But the source code of sctp_unregisterInstance does not seem to disconnect
the associations in protocol level. (seem to only remove internal data
structures)
All I could do was explicitly calling sctp_abort() before terminating my
application.

Regards,
Chang Jin-woong

----- Original Message -----
From: "Andreas Jungmaier"
<ajung AT exp-math.uni-essen.de>
To:
<discussion AT sctp.de>;
"Chang Jin-woong"
<jwjang AT telcoware.com>
Sent: Monday, November 19, 2001 4:24 AM
Subject: Re: [SCTP-Discussion] How about sctp_shutdownLibrary()?


> -----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-----
> _______________________________________________
> discussion mailing list
> discussion AT sctp.de
> http://www.sctp.de/mailman/listinfo/discussion
>





Archive powered by MHonArc 2.6.19+.

Top of page