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