Dave Shield | 4530d87 | 2011-06-24 12:08:23 +0000 | [diff] [blame] | 1 | .TH "table_data" 3 "24 Jun 2011" "Version 5.4.3.pre1" "net-snmp" \" -*- nroff -*- |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 2 | .ad l |
| 3 | .nh |
| 4 | .SH NAME |
Dave Shield | 3f6f533 | 2009-10-29 10:30:23 +0000 | [diff] [blame] | 5 | table_data \- |
Robert Story | 2254d87 | 2004-09-02 05:57:42 +0000 | [diff] [blame] | 6 | .PP |
Dave Shield | 3f6f533 | 2009-10-29 10:30:23 +0000 | [diff] [blame] | 7 | Helps you implement a table with datamatted storage. |
| 8 | |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 9 | .SS "Modules" |
| 10 | |
| 11 | .in +1c |
| 12 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 13 | .RI "\fBtable_dataset\fP" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 14 | .br |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 15 | .PP |
| 16 | |
Dave Shield | 3f6f533 | 2009-10-29 10:30:23 +0000 | [diff] [blame] | 17 | .RI "\fIHelps you implement a table with automatted storage. \fP" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 18 | .in -1c |
| 19 | .SS "Functions" |
| 20 | |
| 21 | .in +1c |
| 22 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 23 | .RI "void \fBnetsnmp_table_data_generate_index_oid\fP (\fBnetsnmp_table_row\fP *row)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 24 | .br |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 25 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 26 | .RI "\fBnetsnmp_table_data\fP * \fBnetsnmp_create_table_data\fP (const char *name)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 27 | .br |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 28 | .RI "\fIcreates and returns a pointer to table data set \fP" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 29 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 30 | .RI "\fBnetsnmp_table_row\fP * \fBnetsnmp_create_table_data_row\fP (void)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 31 | .br |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 32 | .RI "\fIcreates and returns a pointer to table data set \fP" |
| 33 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 34 | .RI "\fBnetsnmp_table_row\fP * \fBnetsnmp_table_data_clone_row\fP (\fBnetsnmp_table_row\fP *row)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 35 | .br |
| 36 | .RI "\fIclones a data row. \fP" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 37 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 38 | .RI "void * \fBnetsnmp_table_data_delete_row\fP (\fBnetsnmp_table_row\fP *row)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 39 | .br |
Robert Story | 2254d87 | 2004-09-02 05:57:42 +0000 | [diff] [blame] | 40 | .RI "\fIdeletes a row's memory. \fP" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 41 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 42 | .RI "int \fBnetsnmp_table_data_add_row\fP (\fBnetsnmp_table_data\fP *table, \fBnetsnmp_table_row\fP *row)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 43 | .br |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 44 | .RI "\fIAdds a row of data to a given table (stored in proper lexographical order). \fP" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 45 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 46 | .RI "NETSNMP_INLINE void \fBnetsnmp_table_data_replace_row\fP (\fBnetsnmp_table_data\fP *table, \fBnetsnmp_table_row\fP *origrow, \fBnetsnmp_table_row\fP *newrow)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 47 | .br |
Robert Story | 2254d87 | 2004-09-02 05:57:42 +0000 | [diff] [blame] | 48 | .RI "\fIswaps out origrow with newrow. \fP" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 49 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 50 | .RI "\fBnetsnmp_table_row\fP * \fBnetsnmp_table_data_remove_row\fP (\fBnetsnmp_table_data\fP *table, \fBnetsnmp_table_row\fP *row)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 51 | .br |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 52 | .RI "\fIremoves a row of data to a given table and returns it (no free's called) \fP" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 53 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 54 | .RI "void * \fBnetsnmp_table_data_remove_and_delete_row\fP (\fBnetsnmp_table_data\fP *table, \fBnetsnmp_table_row\fP *row)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 55 | .br |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 56 | .RI "\fIremoves and frees a row of data to a given table and returns the void * \fP" |
| 57 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 58 | .RI "\fBnetsnmp_table_data\fP * \fBnetsnmp_table_data_create_table\fP (const char *name, long flags)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 59 | .br |
| 60 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 61 | .RI "void \fBnetsnmp_table_data_delete_table\fP (\fBnetsnmp_table_data\fP *table)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 62 | .br |
| 63 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 64 | .RI "\fBnetsnmp_table_row\fP * \fBnetsnmp_table_data_create_row\fP (void *entry)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 65 | .br |
| 66 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 67 | .RI "int \fBnetsnmp_table_data_copy_row\fP (\fBnetsnmp_table_row\fP *old_row, \fBnetsnmp_table_row\fP *new_row)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 68 | .br |
| 69 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 70 | .RI "void * \fBnetsnmp_table_data_remove_delete_row\fP (\fBnetsnmp_table_data\fP *table, \fBnetsnmp_table_row\fP *row)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 71 | .br |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 72 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 73 | .RI "\fBnetsnmp_mib_handler\fP * \fBnetsnmp_get_table_data_handler\fP (\fBnetsnmp_table_data\fP *table)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 74 | .br |
Robert Story | 2254d87 | 2004-09-02 05:57:42 +0000 | [diff] [blame] | 75 | .RI "\fICreates a table_data handler and returns it. \fP" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 76 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 77 | .RI "int \fBnetsnmp_register_table_data\fP (\fBnetsnmp_handler_registration\fP *reginfo, \fBnetsnmp_table_data\fP *table, \fBnetsnmp_table_registration_info\fP *table_info)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 78 | .br |
Robert Story | 2254d87 | 2004-09-02 05:57:42 +0000 | [diff] [blame] | 79 | .RI "\fIregisters a handler as a data table. \fP" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 80 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 81 | .RI "int \fBnetsnmp_register_read_only_table_data\fP (\fBnetsnmp_handler_registration\fP *reginfo, \fBnetsnmp_table_data\fP *table, \fBnetsnmp_table_registration_info\fP *table_info)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 82 | .br |
Robert Story | 2254d87 | 2004-09-02 05:57:42 +0000 | [diff] [blame] | 83 | .RI "\fIregisters a handler as a read-only data table If table_info != NULL, it registers it as a normal table too. \fP" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 84 | .ti -1c |
Robert Story | 2254d87 | 2004-09-02 05:57:42 +0000 | [diff] [blame] | 85 | .RI "int \fBnetsnmp_table_data_helper_handler\fP (\fBnetsnmp_mib_handler\fP *handler, \fBnetsnmp_handler_registration\fP *reginfo, \fBnetsnmp_agent_request_info\fP *reqinfo, \fBnetsnmp_request_info\fP *requests)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 86 | .br |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 87 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 88 | .RI "\fBnetsnmp_table_data\fP * \fBnetsnmp_extract_table\fP (\fBnetsnmp_request_info\fP *request)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 89 | .br |
Robert Story | 2254d87 | 2004-09-02 05:57:42 +0000 | [diff] [blame] | 90 | .RI "\fIextracts the table being accessed passed from the table_data helper \fP" |
| 91 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 92 | .RI "\fBnetsnmp_table_row\fP * \fBnetsnmp_extract_table_row\fP (\fBnetsnmp_request_info\fP *request)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 93 | .br |
| 94 | .RI "\fIextracts the row being accessed passed from the table_data helper \fP" |
| 95 | .ti -1c |
Robert Story | 2254d87 | 2004-09-02 05:57:42 +0000 | [diff] [blame] | 96 | .RI "void * \fBnetsnmp_extract_table_row_data\fP (\fBnetsnmp_request_info\fP *request)" |
| 97 | .br |
| 98 | .RI "\fIextracts the data from the row being accessed passed from the table_data helper \fP" |
| 99 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 100 | .RI "NETSNMP_INLINE void \fBnetsnmp_insert_table_row\fP (\fBnetsnmp_request_info\fP *request, \fBnetsnmp_table_row\fP *row)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 101 | .br |
| 102 | .RI "\fIinserts a newly created table_data row into a request \fP" |
| 103 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 104 | .RI "int \fBnetsnmp_table_data_build_result\fP (\fBnetsnmp_handler_registration\fP *reginfo, \fBnetsnmp_agent_request_info\fP *reqinfo, \fBnetsnmp_request_info\fP *request, \fBnetsnmp_table_row\fP *row, int column, u_char type, u_char *result_data, size_t result_data_len)" |
Robert Story | 2254d87 | 2004-09-02 05:57:42 +0000 | [diff] [blame] | 105 | .br |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 106 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 107 | .RI "\fBnetsnmp_table_row\fP * \fBnetsnmp_table_data_get_first_row\fP (\fBnetsnmp_table_data\fP *table)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 108 | .br |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 109 | .RI "\fIreturns the first row in the table \fP" |
| 110 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 111 | .RI "\fBnetsnmp_table_row\fP * \fBnetsnmp_table_data_get_next_row\fP (\fBnetsnmp_table_data\fP *table, \fBnetsnmp_table_row\fP *row)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 112 | .br |
| 113 | .RI "\fIreturns the next row in the table \fP" |
| 114 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 115 | .RI "\fBnetsnmp_table_row\fP * \fBnetsnmp_table_data_get\fP (\fBnetsnmp_table_data\fP *table, \fBnetsnmp_variable_list\fP *indexes)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 116 | .br |
| 117 | .RI "\fIfinds the data in 'datalist' stored at 'indexes' \fP" |
| 118 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 119 | .RI "\fBnetsnmp_table_row\fP * \fBnetsnmp_table_data_get_from_oid\fP (\fBnetsnmp_table_data\fP *table, oid *searchfor, size_t searchfor_len)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 120 | .br |
| 121 | .RI "\fIfinds the data in 'datalist' stored at the searchfor oid \fP" |
Robert Story | 2254d87 | 2004-09-02 05:57:42 +0000 | [diff] [blame] | 122 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 123 | .RI "int \fBnetsnmp_table_data_num_rows\fP (\fBnetsnmp_table_data\fP *table)" |
Robert Story | 2254d87 | 2004-09-02 05:57:42 +0000 | [diff] [blame] | 124 | .br |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 125 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 126 | .RI "\fBnetsnmp_table_row\fP * \fBnetsnmp_table_data_row_first\fP (\fBnetsnmp_table_data\fP *table)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 127 | .br |
| 128 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 129 | .RI "\fBnetsnmp_table_row\fP * \fBnetsnmp_table_data_row_get\fP (\fBnetsnmp_table_data\fP *table, \fBnetsnmp_table_row\fP *row)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 130 | .br |
| 131 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 132 | .RI "\fBnetsnmp_table_row\fP * \fBnetsnmp_table_data_row_next\fP (\fBnetsnmp_table_data\fP *table, \fBnetsnmp_table_row\fP *row)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 133 | .br |
| 134 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 135 | .RI "\fBnetsnmp_table_row\fP * \fBnetsnmp_table_data_row_get_byoid\fP (\fBnetsnmp_table_data\fP *table, oid *instance, size_t len)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 136 | .br |
| 137 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 138 | .RI "\fBnetsnmp_table_row\fP * \fBnetsnmp_table_data_row_next_byoid\fP (\fBnetsnmp_table_data\fP *table, oid *instance, size_t len)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 139 | .br |
| 140 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 141 | .RI "\fBnetsnmp_table_row\fP * \fBnetsnmp_table_data_row_get_byidx\fP (\fBnetsnmp_table_data\fP *table, \fBnetsnmp_variable_list\fP *indexes)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 142 | .br |
| 143 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 144 | .RI "\fBnetsnmp_table_row\fP * \fBnetsnmp_table_data_row_next_byidx\fP (\fBnetsnmp_table_data\fP *table, \fBnetsnmp_variable_list\fP *indexes)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 145 | .br |
| 146 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 147 | .RI "int \fBnetsnmp_table_data_row_count\fP (\fBnetsnmp_table_data\fP *table)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 148 | .br |
| 149 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 150 | .RI "void * \fBnetsnmp_table_data_entry_first\fP (\fBnetsnmp_table_data\fP *table)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 151 | .br |
| 152 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 153 | .RI "void * \fBnetsnmp_table_data_entry_get\fP (\fBnetsnmp_table_data\fP *table, \fBnetsnmp_table_row\fP *row)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 154 | .br |
| 155 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 156 | .RI "void * \fBnetsnmp_table_data_entry_next\fP (\fBnetsnmp_table_data\fP *table, \fBnetsnmp_table_row\fP *row)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 157 | .br |
| 158 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 159 | .RI "void * \fBnetsnmp_table_data_entry_get_byidx\fP (\fBnetsnmp_table_data\fP *table, \fBnetsnmp_variable_list\fP *indexes)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 160 | .br |
| 161 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 162 | .RI "void * \fBnetsnmp_table_data_entry_next_byidx\fP (\fBnetsnmp_table_data\fP *table, \fBnetsnmp_variable_list\fP *indexes)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 163 | .br |
| 164 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 165 | .RI "void * \fBnetsnmp_table_data_entry_get_byoid\fP (\fBnetsnmp_table_data\fP *table, oid *instance, size_t len)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 166 | .br |
| 167 | .ti -1c |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 168 | .RI "void * \fBnetsnmp_table_data_entry_next_byoid\fP (\fBnetsnmp_table_data\fP *table, oid *instance, size_t len)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 169 | .br |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 170 | .in -1c |
Robert Story | 2254d87 | 2004-09-02 05:57:42 +0000 | [diff] [blame] | 171 | .SH "Detailed Description" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 172 | .PP |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 173 | Helps you implement a table with datamatted storage. |
Dave Shield | 3f6f533 | 2009-10-29 10:30:23 +0000 | [diff] [blame] | 174 | |
Dave Shield | cac11a9 | 2011-06-01 15:08:51 +0000 | [diff] [blame] | 175 | This helper is obsolete. If you are writing a new \fBmodule\fP, please consider using the table_tdata helper instead. |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 176 | .PP |
Robert Story | 2254d87 | 2004-09-02 05:57:42 +0000 | [diff] [blame] | 177 | 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. |
| 178 | .SH "Function Documentation" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 179 | .PP |
Dave Shield | cac11a9 | 2011-06-01 15:08:51 +0000 | [diff] [blame] | 180 | .SS "\fBnetsnmp_table_data\fP* netsnmp_create_table_data (const char * name)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 181 | .PP |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 182 | creates and returns a pointer to table data set |
Wes Hardaker | cb5885f | 2003-11-14 02:42:44 +0000 | [diff] [blame] | 183 | .PP |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 184 | Definition at line 52 of file table_data.c. |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 185 | .SS "\fBnetsnmp_table_row\fP* netsnmp_create_table_data_row (void)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 186 | .PP |
Robert Story | 2254d87 | 2004-09-02 05:57:42 +0000 | [diff] [blame] | 187 | creates and returns a pointer to table data set |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 188 | .PP |
| 189 | \fBExamples: \fP |
| 190 | .in +1c |
| 191 | \fBdata_set.c\fP. |
| 192 | .PP |
Dave Shield | 1579626 | 2006-01-09 15:06:32 +0000 | [diff] [blame] | 193 | Definition at line 62 of file table_data.c. |
Dave Shield | cac11a9 | 2011-06-01 15:08:51 +0000 | [diff] [blame] | 194 | .SS "\fBnetsnmp_table_data\fP* netsnmp_extract_table (\fBnetsnmp_request_info\fP * request)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 195 | .PP |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 196 | extracts the table being accessed passed from the table_data helper |
| 197 | .PP |
Dave Shield | 8080a81 | 2011-05-06 17:22:14 +0000 | [diff] [blame] | 198 | Definition at line 656 of file table_data.c. |
Dave Shield | cac11a9 | 2011-06-01 15:08:51 +0000 | [diff] [blame] | 199 | .SS "\fBnetsnmp_table_row\fP* netsnmp_extract_table_row (\fBnetsnmp_request_info\fP * request)" |
Robert Story | 2254d87 | 2004-09-02 05:57:42 +0000 | [diff] [blame] | 200 | .PP |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 201 | extracts the row being accessed passed from the table_data helper |
| 202 | .PP |
Dave Shield | 8080a81 | 2011-05-06 17:22:14 +0000 | [diff] [blame] | 203 | Definition at line 664 of file table_data.c. |
Dave Shield | cac11a9 | 2011-06-01 15:08:51 +0000 | [diff] [blame] | 204 | .SS "void* netsnmp_extract_table_row_data (\fBnetsnmp_request_info\fP * request)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 205 | .PP |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 206 | extracts the data from the row being accessed passed from the table_data helper |
Wes Hardaker | cb5885f | 2003-11-14 02:42:44 +0000 | [diff] [blame] | 207 | .PP |
Dave Shield | 8080a81 | 2011-05-06 17:22:14 +0000 | [diff] [blame] | 208 | Definition at line 673 of file table_data.c. |
Dave Shield | cac11a9 | 2011-06-01 15:08:51 +0000 | [diff] [blame] | 209 | .SS "\fBnetsnmp_mib_handler\fP* netsnmp_get_table_data_handler (\fBnetsnmp_table_data\fP * table)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 210 | .PP |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 211 | Creates a table_data handler and returns it. |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 212 | .PP |
Dave Shield | 8080a81 | 2011-05-06 17:22:14 +0000 | [diff] [blame] | 213 | Definition at line 378 of file table_data.c. |
Dave Shield | cac11a9 | 2011-06-01 15:08:51 +0000 | [diff] [blame] | 214 | .SS "NETSNMP_INLINE void netsnmp_insert_table_row (\fBnetsnmp_request_info\fP * request, \fBnetsnmp_table_row\fP * row)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 215 | .PP |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 216 | inserts a newly created table_data row into a request |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 217 | .PP |
Dave Shield | 8080a81 | 2011-05-06 17:22:14 +0000 | [diff] [blame] | 218 | Definition at line 685 of file table_data.c. |
Dave Shield | cac11a9 | 2011-06-01 15:08:51 +0000 | [diff] [blame] | 219 | .SS "int netsnmp_register_read_only_table_data (\fBnetsnmp_handler_registration\fP * reginfo, \fBnetsnmp_table_data\fP * table, \fBnetsnmp_table_registration_info\fP * table_info)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 220 | .PP |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 221 | registers a handler as a read-only data table If table_info != NULL, it registers it as a normal table too. |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 222 | .PP |
Dave Shield | 8080a81 | 2011-05-06 17:22:14 +0000 | [diff] [blame] | 223 | Definition at line 412 of file table_data.c. |
Dave Shield | cac11a9 | 2011-06-01 15:08:51 +0000 | [diff] [blame] | 224 | .SS "int netsnmp_register_table_data (\fBnetsnmp_handler_registration\fP * reginfo, \fBnetsnmp_table_data\fP * table, \fBnetsnmp_table_registration_info\fP * table_info)" |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 225 | .PP |
Dave Shield | 3f6f533 | 2009-10-29 10:30:23 +0000 | [diff] [blame] | 226 | registers a handler as a data table. If table_info != NULL, it registers it as a normal table too. |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 227 | .PP |
Dave Shield | 8080a81 | 2011-05-06 17:22:14 +0000 | [diff] [blame] | 228 | Definition at line 401 of file table_data.c. |
Dave Shield | cac11a9 | 2011-06-01 15:08:51 +0000 | [diff] [blame] | 229 | .SS "int netsnmp_table_data_add_row (\fBnetsnmp_table_data\fP * table, \fBnetsnmp_table_row\fP * row)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 230 | .PP |
Dave Shield | 3f6f533 | 2009-10-29 10:30:23 +0000 | [diff] [blame] | 231 | 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) |
Wes Hardaker | cb5885f | 2003-11-14 02:42:44 +0000 | [diff] [blame] | 232 | .PP |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 233 | xxx-rks: remove invalid row? |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 234 | .PP |
Dave Shield | 3f6f533 | 2009-10-29 10:30:23 +0000 | [diff] [blame] | 235 | Definition at line 134 of file table_data.c. |
Dave Shield | cac11a9 | 2011-06-01 15:08:51 +0000 | [diff] [blame] | 236 | .SS "\fBnetsnmp_table_row\fP* netsnmp_table_data_clone_row (\fBnetsnmp_table_row\fP * row)" |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 237 | .PP |
Dave Shield | 3f6f533 | 2009-10-29 10:30:23 +0000 | [diff] [blame] | 238 | clones a data row. DOES NOT CLONE THE CONTAINED DATA. |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 239 | .PP |
| 240 | Definition at line 70 of file table_data.c. |
Dave Shield | cac11a9 | 2011-06-01 15:08:51 +0000 | [diff] [blame] | 241 | .SS "void* netsnmp_table_data_delete_row (\fBnetsnmp_table_row\fP * row)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 242 | .PP |
Dave Shield | 3f6f533 | 2009-10-29 10:30:23 +0000 | [diff] [blame] | 243 | deletes a row's memory. returns the void data that it doesn't know how to delete. |
Wes Hardaker | cb5885f | 2003-11-14 02:42:44 +0000 | [diff] [blame] | 244 | .PP |
Dave Shield | 3f6f533 | 2009-10-29 10:30:23 +0000 | [diff] [blame] | 245 | Definition at line 105 of file table_data.c. |
Dave Shield | cac11a9 | 2011-06-01 15:08:51 +0000 | [diff] [blame] | 246 | .SS "\fBnetsnmp_table_row\fP* netsnmp_table_data_get (\fBnetsnmp_table_data\fP * table, \fBnetsnmp_variable_list\fP * indexes)" |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 247 | .PP |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 248 | finds the data in 'datalist' stored at 'indexes' |
Robert Story | 6fbe194 | 2005-10-31 09:27:14 +0000 | [diff] [blame] | 249 | .PP |
Dave Shield | 8080a81 | 2011-05-06 17:22:14 +0000 | [diff] [blame] | 250 | Definition at line 811 of file table_data.c. |
Dave Shield | cac11a9 | 2011-06-01 15:08:51 +0000 | [diff] [blame] | 251 | .SS "\fBnetsnmp_table_row\fP* netsnmp_table_data_get_first_row (\fBnetsnmp_table_data\fP * table)" |
Wes Hardaker | cb5885f | 2003-11-14 02:42:44 +0000 | [diff] [blame] | 252 | .PP |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 253 | returns the first row in the table |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 254 | .PP |
Dave Shield | 8080a81 | 2011-05-06 17:22:14 +0000 | [diff] [blame] | 255 | Definition at line 792 of file table_data.c. |
Dave Shield | cac11a9 | 2011-06-01 15:08:51 +0000 | [diff] [blame] | 256 | .SS "\fBnetsnmp_table_row\fP* netsnmp_table_data_get_from_oid (\fBnetsnmp_table_data\fP * table, oid * searchfor, size_t searchfor_len)" |
Wes Hardaker | cb5885f | 2003-11-14 02:42:44 +0000 | [diff] [blame] | 257 | .PP |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 258 | finds the data in 'datalist' stored at the searchfor oid |
Wes Hardaker | cb5885f | 2003-11-14 02:42:44 +0000 | [diff] [blame] | 259 | .PP |
Dave Shield | 8080a81 | 2011-05-06 17:22:14 +0000 | [diff] [blame] | 260 | Definition at line 825 of file table_data.c. |
Dave Shield | cac11a9 | 2011-06-01 15:08:51 +0000 | [diff] [blame] | 261 | .SS "\fBnetsnmp_table_row\fP* netsnmp_table_data_get_next_row (\fBnetsnmp_table_data\fP * table, \fBnetsnmp_table_row\fP * row)" |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 262 | .PP |
| 263 | returns the next row in the table |
| 264 | .PP |
Dave Shield | 8080a81 | 2011-05-06 17:22:14 +0000 | [diff] [blame] | 265 | Definition at line 801 of file table_data.c. |
Dave Shield | cac11a9 | 2011-06-01 15:08:51 +0000 | [diff] [blame] | 266 | .SS "void* netsnmp_table_data_remove_and_delete_row (\fBnetsnmp_table_data\fP * table, \fBnetsnmp_table_row\fP * row)" |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 267 | .PP |
Dave Shield | 3f6f533 | 2009-10-29 10:30:23 +0000 | [diff] [blame] | 268 | 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) |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 269 | .PP |
Dave Shield | 3f6f533 | 2009-10-29 10:30:23 +0000 | [diff] [blame] | 270 | Definition at line 274 of file table_data.c. |
Dave Shield | cac11a9 | 2011-06-01 15:08:51 +0000 | [diff] [blame] | 271 | .SS "\fBnetsnmp_table_row\fP* netsnmp_table_data_remove_row (\fBnetsnmp_table_data\fP * table, \fBnetsnmp_table_row\fP * row)" |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 272 | .PP |
Dave Shield | 3f6f533 | 2009-10-29 10:30:23 +0000 | [diff] [blame] | 273 | 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) |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 274 | .PP |
Dave Shield | 3f6f533 | 2009-10-29 10:30:23 +0000 | [diff] [blame] | 275 | Definition at line 248 of file table_data.c. |
Dave Shield | cac11a9 | 2011-06-01 15:08:51 +0000 | [diff] [blame] | 276 | .SS "NETSNMP_INLINE void netsnmp_table_data_replace_row (\fBnetsnmp_table_data\fP * table, \fBnetsnmp_table_row\fP * origrow, \fBnetsnmp_table_row\fP * newrow)" |
Wes Hardaker | 27ff28a | 2002-04-20 00:29:28 +0000 | [diff] [blame] | 277 | .PP |
Dave Shield | 3f6f533 | 2009-10-29 10:30:23 +0000 | [diff] [blame] | 278 | swaps out origrow with newrow. This does *not* delete/free anything! |
Wes Hardaker | fdd5648 | 2006-09-20 00:29:56 +0000 | [diff] [blame] | 279 | .PP |
Dave Shield | 3f6f533 | 2009-10-29 10:30:23 +0000 | [diff] [blame] | 280 | Definition at line 233 of file table_data.c. |
| 281 | .SH "Author" |
| 282 | .PP |
| 283 | Generated automatically by Doxygen for net-snmp from the source code. |