[sr-dev] git:sr_3.0: sctp: SCTP_STATS_ASSOC_SHUTDOWN

Andrei Pelinescu-Onciul andrei at iptel.org
Wed Dec 23 17:07:27 CET 2009


Module: sip-router
Branch: sr_3.0
Commit: 8dfdb3c7a9577438ced848cbbf5d845052ba5032
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8dfdb3c7a9577438ced848cbbf5d845052ba5032

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date:   Wed Dec 23 16:58:45 2009 +0100

sctp: SCTP_STATS_ASSOC_SHUTDOWN

Statistics placeholder for counting shutdowns.

---

 sctp_server.c |    1 +
 sctp_stats.h  |    7 +++++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/sctp_server.c b/sctp_server.c
index 7c5995d..c966ad3 100644
--- a/sctp_server.c
+++ b/sctp_server.c
@@ -2220,6 +2220,7 @@ again:
 			/* no break */
 		case SCTP_SHUTDOWN_COMP:
 			atomic_dec(sctp_conn_no);
+			SCTP_STATS_ASSOC_SHUTDOWN();
 #ifdef SCTP_CONN_REUSE
 			/* connection down*/
 			if (likely(cfg_get(sctp, sctp_cfg, assoc_tracking)))
diff --git a/sctp_stats.h b/sctp_stats.h
index e895ce8..4f6efdb 100644
--- a/sctp_stats.h
+++ b/sctp_stats.h
@@ -37,6 +37,7 @@
 #define SCTP_STATS_CONNECT_FAILED()
 #define SCTP_STATS_LOCAL_REJECT()
 #define SCTP_STATS_REMOTE_SHUTDOWN()
+#define SCTP_STATS_ASSOC_SHUTDOWN()
 #define SCTP_STATS_COMM_LOST()
 #define SCTP_STATS_SENDQ_FULL()
 #define SCTP_STATS_SEND_FAILED()
@@ -69,6 +70,12 @@
 #define SCTP_STATS_REMOTE_SHUTDOWN()
 
 
+/** called each time a connection is shutdown.
+  * sctp notification: SCTP_SHUTDOWN_COMP
+  */
+#define SCTP_STATS_ASSOC_SHUTDOWN()
+
+
 /** called each time an established connection is closed due to some error.
   * sctp notification: SCTP_COMM_LOST
   */




More information about the sr-dev mailing list