netsnmp_table_data(3snmp)

netsnmp_table_data3snmp

Helps you implement a table with datamatted storage.

Detailed Description

Helps you implement a table with datamatted storage.

This helper is obsolete. If you are writing a new module, please consider using the table_tdata helper instead.

This helper helps you implement a table where all the indexes are expected to be stored within the agent itself and not in some external storage location. It can be used to store a list of rows, where a row consists of the indexes to the table and a generic data pointer. You can then implement a subhandler which is passed the exact row definition and data it must return data for or accept data for. Complex GETNEXT handling is greatly simplified in this case.

Function Documentation

netsnmp_table_data* netsnmp_create_table_data (const char * name)

creates and returns a pointer to table data set

Definition at line 52 of file table_data.c.

netsnmp_table_row* netsnmp_create_table_data_row (void)

creates and returns a pointer to table data set

Examples: data_set.c.

Definition at line 62 of file table_data.c.

netsnmp_table_data* netsnmp_extract_table (netsnmp_request_info * request)

extracts the table being accessed passed from the table_data helper

Definition at line 653 of file table_data.c.

netsnmp_table_row* netsnmp_extract_table_row (netsnmp_request_info * request)

extracts the row being accessed passed from the table_data helper

Definition at line 661 of file table_data.c.

void* netsnmp_extract_table_row_data (netsnmp_request_info * request)

extracts the data from the row being accessed passed from the table_data helper

Definition at line 670 of file table_data.c.

netsnmp_mib_handler* netsnmp_get_table_data_handler (netsnmp_table_data * table)

Creates a table_data handler and returns it.

Definition at line 375 of file table_data.c.

NETSNMP_INLINE void netsnmp_insert_table_row (netsnmp_request_info * request, netsnmp_table_row * row)

inserts a newly created table_data row into a request

Definition at line 682 of file table_data.c.

int netsnmp_register_read_only_table_data (netsnmp_handler_registration * reginfo, netsnmp_table_data * table, netsnmp_table_registration_info * table_info)

registers a handler as a read-only data table If table_info != NULL, it registers it as a normal table too.

Definition at line 409 of file table_data.c.

int netsnmp_register_table_data (netsnmp_handler_registration * reginfo, netsnmp_table_data * table, netsnmp_table_registration_info * table_info)

registers a handler as a data table. If table_info != NULL, it registers it as a normal table too.

Definition at line 398 of file table_data.c.

int netsnmp_table_data_add_row (netsnmp_table_data * table, netsnmp_table_row * row)

Adds a row of data to a given table (stored in proper lexographical order). returns SNMPERR_SUCCESS on successful addition. or SNMPERR_GENERR on failure (E.G., indexes already existed)

xxx-rks: remove invalid row?

Definition at line 134 of file table_data.c.

netsnmp_table_row* netsnmp_table_data_clone_row (netsnmp_table_row * row)

clones a data row. DOES NOT CLONE THE CONTAINED DATA.

Definition at line 70 of file table_data.c.

void* netsnmp_table_data_delete_row (netsnmp_table_row * row)

deletes a row's memory. returns the void data that it doesn't know how to delete.

Definition at line 105 of file table_data.c.

netsnmp_table_row* netsnmp_table_data_get (netsnmp_table_data * table, netsnmp_variable_list * indexes)

finds the data in 'datalist' stored at 'indexes'

Definition at line 808 of file table_data.c.

netsnmp_table_row* netsnmp_table_data_get_first_row (netsnmp_table_data * table)

returns the first row in the table

Definition at line 789 of file table_data.c.

netsnmp_table_row* netsnmp_table_data_get_from_oid (netsnmp_table_data * table, oid * searchfor, size_t searchfor_len)

finds the data in 'datalist' stored at the searchfor oid

Definition at line 822 of file table_data.c.

netsnmp_table_row* netsnmp_table_data_get_next_row (netsnmp_table_data * table, netsnmp_table_row * row)

returns the next row in the table

Definition at line 798 of file table_data.c.

void* netsnmp_table_data_remove_and_delete_row (netsnmp_table_data * table, netsnmp_table_row * row)

removes and frees a row of data to a given table and returns the void * returns the void * data on successful deletion. or NULL on failure (bad arguments)

Definition at line 274 of file table_data.c.

netsnmp_table_row* netsnmp_table_data_remove_row (netsnmp_table_data * table, netsnmp_table_row * row)

removes a row of data to a given table and returns it (no free's called) returns the row pointer itself on successful removing. or NULL on failure (bad arguments)

Definition at line 248 of file table_data.c.

NETSNMP_INLINE void netsnmp_table_data_replace_row (netsnmp_table_data * table, netsnmp_table_row * origrow, netsnmp_table_row * newrow)

swaps out origrow with newrow. This does *not* delete/free anything!

Definition at line 233 of file table_data.c.

Releases

5 releases since Debian 3.1 (Sarge); the text changed 3 times.

  1. 3.1
  2. 4.0
  3. 5.0
  4. 6.0–7

Author

Generated automatically by Doxygen for net-snmp from the source code.

From libsnmp-dev 5.4.3~dfsg-2.8+deb7u1 in Debian 7 (Wheezy). Parsed by carta from the page's man source.