I need to search through an existing table to determine which row contains
certain data field values. Based on my searches through the code and reading
about containers, I have come up with the code provided below.
Will someone please tell me what data the "buf" parameter should have as input
into the "read_config_read_objid()" routine. It seems clear the "buf"
parameter is used as input to indicate which "index" oid value to read, but I
just can not figure out how to populate "buf" correctly.
void
ocStbHostAVInterfaceTable_findType(ocStbHostAVInterfaceTable_rowreq_ctx*
cur_rowreq_ctx, void *)
{
ocStbHostAVInterfaceTable_rowreq_ctx* rowreq_ctx;
netsnmp_container* container;
char* buf;
netsnmp_index index;
oid tmp_oid[MAX_ocStbHostAVInterfaceTable_IDX_LEN];
//get the AVInterfaceTable container pointer
container = ocStbHostAVInterfaceTable_container_get();
if (NULL == container)
{
snmp_log(LOG_ERR, "null container\n");
return;
}
index.oids = tmp_oid;
index.len = OID_LENGTH(tmp_oid);
buf = read_config_read_objid(buf, &index.oids, &index.len);
if (NULL == buf)
{
snmp_log(LOG_ERR, "error reading row index\n");
return;
}
rowreq_ctx = (ocStbHostAVInterfaceTable_rowreq_ctx
*)CONTAINER_FIND(container, &index);
if (NULL == rowreq_ctx)
{
snmp_log(LOG_ERR, "error finding row index\n");
return;
}
//look at row contents using "rowreq_ctx"
etc...
etc...
return;
}
---------------------------------
Pinpoint customers who are looking for what you sell. -------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders