[SR-Dev] git:ser_core_cvs: tcp: internal macro-hooks for stats & events

Andrei Pelinescu-Onciul andrei at iptel.org
Thu Apr 16 13:25:05 CEST 2009


Module: sip-router
Branch: ser_core_cvs
Commit: 7bb2b4ca371c5c97305c446be64f5ce42371a906
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7bb2b4ca371c5c97305c446be64f5ce42371a906

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date:   Thu Apr  9 19:10:56 2009 +0000

tcp: internal macro-hooks for stats & events

- added macros for tcp statistics (for now empty, keeping
  more statistics will only involve redefining them):

  TCP_STATS_ESTABLISHED(state) - new connection established
  TCP_STATS_CONNECT_FAILED() - new outgoing connection failed
  TCP_STATS_LOCAL_REJECT() - new incoming connection rejected
                            (max. no exceeded)
  TCP_STATS_CON_TIMEOUT() - connection closed for being idle too
                            long
  TCP_STATS_SEND_TIMEOUT() - send fails due to a timeout
  TCP_STATS_SENDQ_FULL()   - send fails because of the buffering
                             capacity being exceed (async mode
                             only)

- added macros for various tcp events (for now some of them are
  used for logging):

  TCP_EV_CONNECT_RST(...) - connect attempt received RST
  TCP_EV_CONNECT_UNREACHABLE(...)
  TCP_EV_CONNECT_TIMEOUT(...)
  TCP_EV_CONNECT_NO_MORE_PORTS(...)
  TCP_EV_CONNECT_ERR(...)  - other connect error
  TCP_EV_SEND_TIMEOUT(...)
  TCP_EV_SENDQ_FULL(...)
  TCP_EV_IDLE_CONN_CLOSED(...)

---

 tcp_ev.h    |   97 ++++++++++++++++++
 tcp_main.c  |  328 +++++++++++++++++++++++++++++++++++++++++++++++------------
 tcp_read.c  |   53 ++++++++--
 tcp_stats.h |   72 +++++++++++++
 4 files changed, 475 insertions(+), 75 deletions(-)

Diff:   http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=7bb2b4ca371c5c97305c446be64f5ce42371a906



More information about the sr-dev mailing list