sl_stats.h

00001 /*
00002  *
00003  * $Id$
00004  *
00005  *
00006  *
00007  * Copyright (C) 2001-2003 FhG Fokus
00008  *
00009  * This file is part of ser, a free SIP server.
00010  *
00011  * ser is free software; you can redistribute it and/or modify
00012  * it under the terms of the GNU General Public License as published by
00013  * the Free Software Foundation; either version 2 of the License, or
00014  * (at your option) any later version
00015  *
00016  * For a license to use the ser software under conditions
00017  * other than those described here, or to purchase support for this
00018  * software, please contact iptel.org by e-mail at the following addresses:
00019  *    info@iptel.org
00020  *
00021  * ser is distributed in the hope that it will be useful,
00022  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00023  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00024  * GNU General Public License for more details.
00025  *
00026  * You should have received a copy of the GNU General Public License 
00027  * along with this program; if not, write to the Free Software 
00028  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00029  */
00030 
00031 
00032 #ifndef _SL_STATS_H
00033 #define _SL_STATS_H
00034 
00035 #include "../../rpc.h"
00036 
00037 enum reply_type { RT_1xx = 0,  RT_200, RT_202, RT_2xx,
00038                   RT_300, RT_301, RT_302, RT_3xx,
00039                   RT_400, RT_401, RT_403, RT_404, RT_407, 
00040                   RT_408, RT_483, RT_4xx,
00041                   RT_500, RT_5xx, 
00042                   RT_6xx,
00043                   RT_xxx,
00044                   RT_END };
00045 
00046 struct sl_stats {
00047         unsigned long err[RT_END];
00048         unsigned long all_replies;
00049         unsigned long err_replies;
00050         unsigned long failures;
00051         unsigned long filtered_acks;
00052 };
00053 
00054 int init_sl_stats(void);
00055 int init_sl_stats_child(void);
00056 void update_sl_stats( int code );
00057 void update_sl_failures( void );
00058 void update_sl_err_replies( void );
00059 void update_sl_filtered_acks( void );
00060 void sl_stats_destroy();
00061 
00062 extern rpc_export_t sl_rpc[];
00063 
00064 int sl_register_kstats(void);
00065 
00066 #endif /* _SL_STATS_H */