snmpstats_globals.h

Go to the documentation of this file.
00001 /*
00002  * $Id: snmpstats_globals.h 5764 2009-03-24 22:54:33Z osas $
00003  *
00004  * SNMPStats Module 
00005  * Copyright (C) 2006 SOMA Networks, INC.
00006  * Written by: Jeffrey Magder (jmagder@somanetworks.com)
00007  *
00008  * This file is part of Kamailio, a free SIP server.
00009  *
00010  * Kamailio is free software; you can redistribute it and/or modify it
00011  * under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version
00014  *
00015  * Kamailio is distributed in the hope that it will be useful, but
00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  * General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with this program; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023  * USA
00024  *
00025  * History:
00026  * --------
00027  * 2006-11-23 initial version (jmagder)
00028  *
00029  */
00030 
00031 /*!
00032  * \file
00033  * \brief SNMP statistic module, globals
00034  * \ingroup snmpstats
00035  * - Module: \ref snmpstats
00036  */
00037 
00038 
00039 #ifndef _SNMP_STATS_GLOBALS_
00040 #define _SNMP_STATS_GLOBALS_
00041 
00042 #include "../../sr_module.h"
00043 
00044 /***************************************************************
00045  * Textual Conventions for BITS types - begins
00046  *
00047  * To set a bit  : |= with the define
00048  * To clear a bit: &= ~(the_define)
00049  *
00050  * Example:
00051  *
00052  * 1) Setting a minor alarm status:
00053  *
00054  *    currentAlarmStatus |=  TC_ALARM_STATUS_MINOR
00055  *
00056  * 2) Clearing a minor alarm status:
00057  *
00058  *    currentAlarmStatus &= ~TC_ALARM_STATUS_MINOR
00059  */
00060 #define TC_SIP_TRANSPORT_PROTOCOL_OTHER (128>>0)
00061 #define TC_SIP_TRANSPORT_PROTOCOL_UDP   (128>>1)
00062 #define TC_SIP_TRANSPORT_PROTOCOL_TCP   (128>>2)
00063 #define TC_SIP_TRANSPORT_PROTOCOL_SCTP  (128>>3)
00064 #define TC_SIP_TRANSPORT_PROTOCOL_TLS   (128>>4)
00065 
00066 #define TC_SIP_ENTITY_ROLE_OTHER            (128 >> 0)
00067 #define TC_SIP_ENTITY_ROLE_USER_AGENT       (128 >> 1)
00068 #define TC_SIP_ENTITY_ROLE_PROXY_SERVER     (128 >> 2)
00069 #define TC_SIP_ENTITY_ROLE_REDIRECT_SERVER  (128 >> 3)
00070 #define TC_SIP_ENTITY_ROLE_REGISTRAR_SERVER (128 >> 4)
00071 
00072 #define TC_SIP_OPTION_TAG_REQUIRE       (128 >> 0)
00073 #define TC_SIP_OPTION_TAG_PROXY_REQUIRE (128 >> 1)
00074 #define TC_SIP_OPTION_TAG_SUPPORTED     (128 >> 2)
00075 #define TC_SIP_OPTION_TAG_UNSUPPORTED   (128 >> 3)
00076 
00077 #define TC_ALARM_STATUS_UNDER_REPAIR      (128 >> 0)
00078 #define TC_ALARM_STATUS_CRITICAL          (128 >> 1)
00079 #define TC_ALARM_STATUS_MAJOR             (128 >> 2)
00080 #define TC_ALARM_STATUS_MINOR             (128 >> 3)
00081 #define TC_ALARM_STATUS_ALARM_OUTSTANDING (128 >> 4)
00082 #define TC_ALARM_STATUS_UNKNOWN           (128 >> 5)
00083 
00084 #define TC_TRANSPORT_PROTOCOL_OTHER (128 >> 0)
00085 #define TC_TRANSPORT_PROTOCOL_UDP   (128 >> 1)
00086 #define TC_TRANSPORT_PROTOCOL_TCP   (128 >> 2)
00087 #define TC_TRANSPORT_PROTOCOL_SCTP  (128 >> 3)
00088 #define TC_TRANSPORT_PROTOCOL_TLS   (128 >> 4)
00089 /*
00090  * Textual Conventions for BITS types - ends
00091  *************************************************************/
00092 
00093 
00094 
00095 /***************************************************************
00096  * Textual Conventions for INTEGER types - begins
00097  */
00098 #define TC_ALARM_STATE_CLEAR    0
00099 #define TC_ALARM_STATE_CRITICAL 1
00100 #define TC_ALARM_STATE_MAJOR    2
00101 #define TC_ALARM_STATE_MINOR    3
00102 #define TC_ALARM_STATE_UNKNOWN  4
00103 
00104 #define TC_USAGE_STATE_IDLE    0
00105 #define TC_USAGE_STATE_ACTIVE  1
00106 #define TC_USAGE_STATE_BUSY    2
00107 #define TC_USAGE_STATE_UNKNOWN 3
00108 
00109 #define TC_ROWSTATUS_ACTIVE        1
00110 #define TC_ROWSTATUS_NOTINSERVICE  2
00111 #define TC_ROWSTATUS_NOTREADY      3
00112 #define TC_ROWSTATUS_CREATEANDGO   4
00113 #define TC_ROWSTATUS_CREATEANDWAIT 5 
00114 #define TC_ROWSTATUS_DESTROY       6
00115 /*
00116  * Textual Conventions for INTEGER types - ends
00117  *************************************************************/
00118 
00119 
00120 #define TC_TRUE  1
00121 #define TC_FALSE 2
00122 
00123 #define SNMPGET_TEMP_FILE "/tmp/openSER_SNMPAgent.txt"
00124 #define SNMPGET_MAX_BUFFER 80
00125 #define MAX_PROC_BUFFER    256
00126 
00127 #define MAX_USER_LOOKUP_COUNTER 255
00128 
00129 #define HASH_SIZE 32
00130 
00131 extern unsigned int global_UserLookupCounter;
00132 
00133 /*******************************************************************************
00134  * Configuration File Handler Prototypes
00135  */
00136 
00137 /*! Handles setting of the sip entity type parameter. */
00138 int handleSipEntityType( modparam_t type, void* val);
00139 
00140 /*! Handles setting of the Msg Queue Depth Minor Threshold */
00141 int set_queue_minor_threshold(modparam_t type, void *val);
00142 
00143 /*! Handles setting of the Msg Queue Depth Major Threshold */
00144 int set_queue_major_threshold(modparam_t type, void *val);
00145 
00146 /*! Handles setting of the dialog minor threshold */
00147 int set_dlg_minor_threshold(modparam_t type, void *val);
00148 
00149 /*! Handles setting of the dialog major threshold */
00150 int set_dlg_major_threshold(modparam_t type, void *val);
00151 
00152 /*! Handles setting of the path to the snmpget binary. */
00153 int set_snmpget_path( modparam_t type, void *val);
00154 
00155 /*! Handles setting of the snmp community string. */
00156 int set_snmp_community( modparam_t type, void *val);
00157 
00158 
00159 #endif

Generated on Thu May 24 12:00:31 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6