Info required
"Ramachandrappa, Nataraju Karidasarahalli" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <A13FA4B2F7631E4B854D1AAA030784490284B76E@bgeexc04.asiapacific.cpqcorp.net> |
Hello All,
I have used the mib2.create-dataset.conf configuration for generating
the source code (i.e mib2c -c mib2c.create-dataset.conf TABLENAME). The
following code generated.
void
initialize_table_stbDNSTable(void)
{
static oid stbDNSTable_oid[] =
{ 1, 3, 6, 1, 4, 1, 11, 255, 1, 12, 6 };
size_t stbDNSTable_oid_len = OID_LENGTH(stbDNSTable_oid);
netsnmp_table_data_set *table_set;
netsnmp_table_row *row;
/*
* create the table structure itself
*/
table_set = netsnmp_create_table_data_set("stbDNSTable");
table_set->allow_creation = 1;
/***************************************************
* Adding indexes
*/
DEBUGMSGTL(("initialize_table_stbDNSTable",
"adding indexes to table stbDNSTable\n"));
netsnmp_table_set_add_indexes(table_set, ASN_INTEGER, /*
index: stbDNSIndex */
0);
DEBUGMSGTL(("initialize_table_stbDNSTable",
"adding column types to table stbDNSTable\n"));
netsnmp_table_set_multi_add_default_row(table_set,
COLUMN_STBDNSINDEX,
ASN_INTEGER, 0, NULL, 0,
COLUMN_DNSIPADDRESS,
ASN_IPADDRESS, 0, NULL,
0, 0);
netsnmp_register_table_data_set(netsnmp_create_handler_registration
("stbDNSTable", stbDNSTable_handler,
stbDNSTable_oid,
stbDNSTable_oid_len,
HANDLER_CAN_RWRITE), table_set,
NULL);
}
void
init_stbDNSTable(void)
{
/*
* here we initialize all the tables we're planning on supporting
*/
initialize_table_stbDNSTable();
}
int
stbDNSTable_handler(netsnmp_mib_handler *handler,
netsnmp_handler_registration *reginfo,
netsnmp_agent_request_info *reqinfo,
netsnmp_request_info *requests)
{
/*
* perform anything here that you need to do. The requests have
* already been processed by the master table_dataset handler, but
* this gives you chance to act on the request in some other way
* if need be.
/*return SNMP_ERR_NOERROR;
}
How do I give the values for table variables dynamically.
Thanks in advance
Nataraju
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users