Thanks for your response Dave. I am also using the mib2c.array-user.conf as it lended itself better to some of my tables. Again, I want to access the add and delete functions from an agent perspective and not a SNMP request. Again, I have issues in understanding how I can remove a row but this time because I have multiple indexes.
CONTAINER_REMOVE requires a container and in order to get that CONTAINER_FIND requires an index. I can pass the indexes of a row into a function easily enough as char* parameters but then need to get it into netsnmp_index format. I have a table with 2 OCTET_STRING columns as indexes. myTable.h has a structure myTable_context_s that says that these two indexes are internal and the first entry is of course netsnmp_index index; The internal comment stumped me a little. Does this netsnmp_index equate to my two OCTET_STRING indexes and if so, how should that be represented. Supposing my 2 OCTET_STRINGS indexes are "Foo" and "Bar". Would it be represented as, netsnmp_index *index; oid index_oid[7]; index = SNMP_MALLOC_TYPEDEF(netsnmp_index); index_oid[0] = 6; // because I am concatenating the indexes index_oid[1] ='f'; index_oid[2] ='o'; index_oid[3] ='o'; index_oid[4] ='b'; index_oid[5] ='a'; index_oid[6] ='r'; index->oids = index_oid; index->len = 7; your help would be appreciated. > > On Tue, 2005-10-18 at 16:29 +0100, Paul Davies wrote: > > > I am implementing tables using table_data.conf. I do need > to be able to > > > add and delete rows external to the incoming SNMP requests. > > > > > > The table_removeEntry function requires netsnmp_table_data* and > > > netsnmp_table_row*. My issue is how can I get a handle on the > > > netsnmp_table_row* if I am not invoking this function via the > > > table_handler method. > > There is an API routine: > > netsnmp_table_row * > netsnmp_table_data_get( netsnmp_table_data *table, > netsnmp_variable_list * indexes) > > which will return the row for a given set of index values > (and a similar one based on encoded OID instance values). > > > > I'm currently in the process of fleshing out a generic table API > framework, and applying it to the main table-related helpers. > This will include a set of standard API calls for constructing > and working with tables using any of these helpers. That should > hopefully be available with the 5.3 release. > But you're fortunate that the particular routines you need > are already in place for the table_data helper. This sounds like a good idea. From looking at the table helpers lately, I can see this being a great benefit. thanks again, Paul D The information contained within this e-mail and any files attached to this e-mail is confidential and in addition may include commercially sensitive information. The contents of this e-mail are for the intended recipient only and therefore if you wish to disclose the information contained within this e-mail or attached files, please contact the sender prior to any such disclosure. If you are not the intended recipient, any disclosure, copying or distribution is prohibited. Please also contact the sender and inform them of the error and delete the e-mail, including any attached files from your system. www.eadsdsuk.com ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
