This is a discussion on RE: implementation of table row removal within the SNMP Coders forums, part of the Networking and Network Related category; Thanks for your response Dave. I am also using the mib2c.array-user.conf as it lended itself better to = ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 =3D SNMP_MALLOC_TYPEDEF(netsnmp_index); index_oid[0] =3D 6; // because I am concatenating the indexes index_oid[1] =3D'f';=20 index_oid[2] =3D'o';=20 index_oid[3] =3D'o'; index_oid[4] =3D'b'; index_oid[5] =3D'a'; index_oid[6] =3D'r'; index->oids =3D index_oid; index->len =3D 7; your help would be appreciated. >=20 > On Tue, 2005-10-18 at 16:29 +0100, Paul Davies wrote: > > > I am implementing tables using table_data.conf. I do need=20 > to be able to > > > add and delete rows external to the incoming SNMP requests. > > >=20 > > > 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. >=20 > There is an API routine: >=20 > netsnmp_table_row * > netsnmp_table_data_get( netsnmp_table_data *table, > netsnmp_variable_list * indexes) >=20 > which will return the row for a given set of index values > (and a similar one based on encoded OID instance values). >=20 > =20 >=20 > 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.=20 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=20 ------------------------------------------------------- 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 Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/...et-snmp-coders |