openserSIPPortTable.h

Go to the documentation of this file.
00001 /*
00002  * $Id: openserSIPPortTable.h 4518 2008-07-28 15:39:28Z henningw $
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  * 2007-02-16 Moved all OID registrations from the experimental branch to 
00029  *            OpenSER's IANA assigned enterprise branch. (jmagder)
00030  * 
00031  * Originally Generated with Mib2c using mib2c.array-user.conf.
00032  *
00033  * This file defines the openserSIPPortTable prototypes.  For a full description
00034  * of the table, please see the OPENSER-SIP-COMMON-MIB.
00035  */
00036 
00037 #ifndef OPENSERSIPPORTTABLE_H
00038 #define OPENSERSIPPORTTABLE_H
00039 
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif
00043 
00044 #include <net-snmp/net-snmp-config.h>
00045 #include <net-snmp/library/container.h>
00046 #include <net-snmp/agent/table_array.h>
00047 
00048 #include "../../config.h"
00049 
00050 #define SIP_PORT_TABLE_STR_INDEX_SIZE 10
00051 
00052 /* This strucutre represents a single row in the table. */
00053 typedef struct openserSIPPortTable_context_s 
00054 {
00055 
00056    netsnmp_index index; 
00057    
00058    unsigned char openserSIPStringIndex[SIP_PORT_TABLE_STR_INDEX_SIZE];
00059    unsigned long openserSIPStringIndex_len;
00060 
00061    unsigned char openserSIPTransportRcv[2];
00062    long openserSIPTransportRcv_len;
00063 
00064    void * data;
00065 
00066 } openserSIPPortTable_context;
00067 
00068 
00069 /*
00070  * Initializes the openserSIPPortTable module.  
00071  *
00072  * Specifically, this function will define the tables structure, and then
00073  * populate it with the ports and transports that OpenSER is listening on.
00074  *
00075  */
00076 void  init_openserSIPPortTable(void);
00077 
00078 
00079 /* Initialize the openserSIPPortTable table by defining how it is structured */
00080 void  initialize_table_openserSIPPortTable(void);
00081 
00082 
00083 /*
00084  * This routine is called to process get requests for elements of the table.
00085  * The function is mostly left in its auto-generated form 
00086  */
00087 int   openserSIPPortTable_get_value(netsnmp_request_info *, netsnmp_index *, 
00088       netsnmp_table_request_info *);
00089 
00090 const openserSIPPortTable_context * openserSIPPortTable_get_by_idx(
00091       netsnmp_index *);
00092 
00093 const openserSIPPortTable_context * openserSIPPortTable_get_by_idx_rs(
00094       netsnmp_index *, int row_status);
00095 
00096 /*
00097  * oid declarations
00098  */
00099 extern oid    openserSIPPortTable_oid[];
00100 extern size_t openserSIPPortTable_oid_len;
00101 
00102 #define openserSIPPortTable_TABLE_OID OPENSER_OID,3,1,1,1,1,5
00103    
00104 /*
00105  * column number definitions for table openserSIPPortTable
00106  */
00107 
00108 #define COLUMN_OPENSERSIPTRANSPORTRCV 4
00109 
00110 #define openserSIPPortTable_COL_MIN 4
00111 #define openserSIPPortTable_COL_MAX 4
00112 
00113 
00114 #ifdef __cplusplus
00115 }
00116 #endif
00117 #endif /** OPENSERSIPPORTTABLE_H */

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