• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Data Structures
  • Files
  • Directories
  • File List
  • Globals

core_stats.h

Go to the documentation of this file.
00001 /* 
00002  * Copyright (C) 2010 iptelorg GmbH
00003  *
00004  * Permission to use, copy, modify, and distribute this software for any
00005  * purpose with or without fee is hereby granted, provided that the above
00006  * copyright notice and this permission notice appear in all copies.
00007  *
00008  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
00009  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
00010  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
00011  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
00012  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
00013  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
00014  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
00015  */
00016 
00026 /*
00027  * History:
00028  * --------
00029  *  2010-02-01  initial version (andrei)
00030 */
00031 
00032 #ifndef __core_stats_h
00033 #define __core_stats_h
00034 
00035 /* define USE_CORE_STATS to enable statistics events 
00036    (SREV_CORE_STATS callbacks) */
00037 /*#define USE_CORE_STATS */
00038 
00039 #ifndef USE_CORE_STATS
00040 
00041 #define STATS_REQ_FWD_DROP()
00042 #define STATS_REQ_FWD_OK()
00043 #define STATS_RPL_FWD_DROP()
00044 #define STATS_RPL_FWD_OK()
00045 #define STATS_BAD_MSG()
00046 #define STATS_BAD_RPL()
00047 #define STATS_BAD_URI()
00048 #define STATS_BAD_MSG_HDR()
00049 
00050 #else /* USE_CORE_STATS */
00051 
00052 #include "events.h"
00053 
00058 #define STATS_REQ_FWD_DROP() sr_event_exec(SREV_CORE_STATS, (void*)3)
00059 
00060 
00062 #define STATS_REQ_FWD_OK() sr_event_exec(SREV_CORE_STATS, (void*)1)
00063 
00064 
00070 #define STATS_RPL_FWD_DROP() sr_event_exec(SREV_CORE_STATS, (void*)4)
00071 
00072 
00073 /* called each time forwarding a reply succeeds. */
00074 #define STATS_RPL_FWD_OK() sr_event_exec(SREV_CORE_STATS, (void*)2)
00075 
00076 
00080 #define STATS_BAD_MSG() sr_event_exec(SREV_CORE_STATS, (void*)5)
00081 
00082 
00086 #define STATS_BAD_RPL() sr_event_exec(SREV_CORE_STATS, (void*)6)
00087 
00088 
00090 #define STATS_BAD_URI() sr_event_exec(SREV_CORE_STATS, (void*)7)
00091 
00092 
00094 #define STATS_BAD_MSG_HDR() sr_event_exec(SREV_CORE_STATS, (void*)8)
00095 
00096 
00097 
00098 #endif /* USE_CORE_STATS */
00099 
00100 #endif /*__core_stats_h*/
00101 
00102 /* vi: set ts=4 sw=4 tw=79:ai:cindent: */

Generated on Tue May 22 2012 13:10:04 for SIP Router by  doxygen 1.7.1