| 1 |
/* |
| 2 |
* Note: this file originally auto-generated by mib2c using |
| 3 |
* : mib2c.create-dataset.conf,v 5.2 2002/07/17 14:41:53 dts12 Exp $ |
| 4 |
*/ |
| 5 |
|
| 6 |
#include <net-snmp/net-snmp-config.h> |
| 7 |
#include <net-snmp/net-snmp-features.h> |
| 8 |
#include <net-snmp/net-snmp-includes.h> |
| 9 |
#include <net-snmp/agent/net-snmp-agent-includes.h> |
| 10 |
#include "mteEventNotificationTable.h" |
| 11 |
|
| 12 |
netsnmp_feature_require(table_dataset); |
| 13 |
netsnmp_feature_require(table_set_multi_add_default_row); |
| 14 |
|
| 15 |
netsnmp_table_data_set *mteEventNotif_table_set; |
| 16 |
|
| 17 |
|
| 18 |
/** Initialize the mteEventNotificationTable table by defining its contents and how it's structured */ |
| 19 |
void |
| 20 |
initialize_table_mteEventNotificationTable(void) |
| 21 |
{ |
| 22 |
static oid mteEventNotificationTable_oid[] = |
| 23 |
{ 1, 3, 6, 1, 2, 1, 88, 1, 4, 3 }; |
| 24 |
size_t mteEventNotificationTable_oid_len = |
| 25 |
OID_LENGTH(mteEventNotificationTable_oid); |
| 26 |
|
| 27 |
/* |
| 28 |
* create the table structure itself |
| 29 |
*/ |
| 30 |
mteEventNotif_table_set = netsnmp_create_table_data_set("mteEventNotificationTable"); |
| 31 |
|
| 32 |
/* |
| 33 |
* comment this out or delete if you don't support creation of new rows |
| 34 |
*/ |
| 35 |
mteEventNotif_table_set->allow_creation = 1; |
| 36 |
|
| 37 |
/*************************************************** |
| 38 |
* Adding indexes |
| 39 |
*/ |
| 40 |
DEBUGMSGTL(("initialize_table_mteEventNotificationTable", |
| 41 |
"adding indexes to table mteEventNotificationTable\n")); |
| 42 |
netsnmp_table_set_add_indexes(mteEventNotif_table_set, |
| 43 |
/* index: mteOwner */ |
| 44 |
ASN_OCTET_STR, |
| 45 |
/* index: mteEventName */ |
| 46 |
ASN_PRIV_IMPLIED_OCTET_STR, |
| 47 |
0); |
| 48 |
|
| 49 |
DEBUGMSGTL(("initialize_table_mteEventNotificationTable", |
| 50 |
"adding column types to table mteEventNotificationTable\n")); |
| 51 |
netsnmp_table_set_multi_add_default_row(mteEventNotif_table_set, |
| 52 |
COLUMN_MTEEVENTNOTIFICATION, |
| 53 |
ASN_OBJECT_ID, 1, NULL, 0, |
| 54 |
COLUMN_MTEEVENTNOTIFICATIONOBJECTSOWNER, |
| 55 |
ASN_OCTET_STR, 1, NULL, 0, |
| 56 |
COLUMN_MTEEVENTNOTIFICATIONOBJECTS, |
| 57 |
ASN_OCTET_STR, 1, NULL, 0, 0); |
| 58 |
|
| 59 |
/* keep index values around for comparisons later */ |
| 60 |
mteEventNotif_table_set->table->store_indexes = 1; |
| 61 |
/* |
| 62 |
* registering the table with the master agent |
| 63 |
*/ |
| 64 |
/* |
| 65 |
* note: if you don't need a subhandler to deal with any aspects |
| 66 |
* of the request, change mteEventNotificationTable_handler to "NULL" |
| 67 |
*/ |
| 68 |
#ifndef NETSNMP_NO_WRITE_SUPPORT |
| 69 |
netsnmp_register_table_data_set(netsnmp_create_handler_registration |
| 70 |
("mteEventNotificationTable", |
| 71 |
mteEventNotificationTable_handler, |
| 72 |
mteEventNotificationTable_oid, |
| 73 |
mteEventNotificationTable_oid_len, |
| 74 |
HANDLER_CAN_RWRITE), mteEventNotif_table_set, NULL); |
| 75 |
#else /* !NETSNMP_NO_WRITE_SUPPORT */ |
| 76 |
netsnmp_register_table_data_set(netsnmp_create_handler_registration |
| 77 |
("mteEventNotificationTable", |
| 78 |
mteEventNotificationTable_handler, |
| 79 |
mteEventNotificationTable_oid, |
| 80 |
mteEventNotificationTable_oid_len, |
| 81 |
HANDLER_CAN_RONLY), mteEventNotif_table_set, NULL); |
| 82 |
#endif /* !NETSNMP_NO_WRITE_SUPPORT */ |
| 83 |
} |
| 84 |
|
| 85 |
/** Initializes the mteEventNotificationTable module */ |
| 86 |
void |
| 87 |
init_mteEventNotificationTable(void) |
| 88 |
{ |
| 89 |
|
| 90 |
/* |
| 91 |
* here we initialize all the tables we're planning on supporting |
| 92 |
*/ |
| 93 |
initialize_table_mteEventNotificationTable(); |
| 94 |
} |
| 95 |
|
| 96 |
/** handles requests for the mteEventNotificationTable table, if anything else needs to be done */ |
| 97 |
int |
| 98 |
mteEventNotificationTable_handler(netsnmp_mib_handler *handler, |
| 99 |
netsnmp_handler_registration *reginfo, |
| 100 |
netsnmp_agent_request_info *reqinfo, |
| 101 |
netsnmp_request_info *requests) |
| 102 |
{ |
| 103 |
/* |
| 104 |
* perform anything here that you need to do. The requests have |
| 105 |
* already been processed by the master table_dataset handler, but |
| 106 |
* this gives you chance to act on the request in some other way |
| 107 |
* if need be. |
| 108 |
*/ |
| 109 |
return SNMP_ERR_NOERROR; |
| 110 |
} |