00001 /* 00002 * $Id: core_stats.c 4815 2008-09-03 16:42:04Z henningw $ 00003 * 00004 * Copyright (C) 2006 Voice Sistem SRL 00005 * 00006 * This file is part of Kamailio, a free SIP server. 00007 * 00008 * Kamailio is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * Kamailio is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program; if not, write to the Free Software 00020 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00021 * 00022 * History: 00023 * --------- 00024 * 2006-01-23 first version (bogdan) 00025 * 2006-11-28 Added statistics for the number of bad URI's, methods, and 00026 * proxy requests (Jeffrey Magder - SOMA Networks) 00027 */ 00028 00029 /*! 00030 * \file 00031 * \brief Kamailio Core statistics 00032 */ 00033 00034 00035 #include <string.h> 00036 00037 #include "statistics.h" 00038 00039 00040 #ifdef STATISTICS 00041 00042 stat_var* rcv_reqs; /*!< received requests */ 00043 stat_var* rcv_rpls; /*!< received replies */ 00044 stat_var* fwd_reqs; /*!< forwarded requests */ 00045 stat_var* fwd_rpls; /*!< forwarded replies */ 00046 stat_var* drp_reqs; /*!< dropped requests */ 00047 stat_var* drp_rpls; /*!< dropped replies */ 00048 stat_var* err_reqs; /*!< error requests */ 00049 stat_var* err_rpls; /*!< error replies */ 00050 stat_var* bad_URIs; /*!< number of bad URIs */ 00051 stat_var* unsupported_methods; /*!< unsupported methods */ 00052 stat_var* bad_msg_hdr; /*!< messages with bad header */ 00053 00054 00055 /*! exported core statistics */ 00056 stat_export_t core_stats[] = { 00057 {"rcv_requests" , 0, &rcv_reqs }, 00058 {"rcv_replies" , 0, &rcv_rpls }, 00059 {"fwd_requests" , 0, &fwd_reqs }, 00060 {"fwd_replies" , 0, &fwd_rpls }, 00061 {"drop_requests" , 0, &drp_reqs }, 00062 {"drop_replies" , 0, &drp_rpls }, 00063 {"err_requests" , 0, &err_reqs }, 00064 {"err_replies" , 0, &err_rpls }, 00065 {"bad_URIs_rcvd", 0, &bad_URIs }, 00066 {"unsupported_methods", 0, &unsupported_methods }, 00067 {"bad_msg_hdr", 0, &bad_msg_hdr }, 00068 {0,0,0} 00069 }; 00070 00071 #endif
1.5.6