1 .TH "generic linked-list data handling with a string as a key." 3 "23 Sep 2009" "Version 5.5" "net-snmp" \" -*- nroff -*-
5 generic linked-list data handling with a string as a key. \-
10 .RI "NETSNMP_INLINE void \fBnetsnmp_free_list_data\fP (\fBnetsnmp_data_list\fP *\fBnode\fP)"
12 .RI "\fIfrees the data and a name at a given data_list \fBnode\fP. \fP"
14 .RI "NETSNMP_INLINE void \fBnetsnmp_free_all_list_data\fP (\fBnetsnmp_data_list\fP *head)"
16 .RI "\fIfrees all data and nodes in a list. \fP"
18 .RI "NETSNMP_INLINE \fBnetsnmp_data_list\fP * \fBnetsnmp_create_data_list\fP (const char *name, void *data, Netsnmp_Free_List_Data *beer)"
20 .RI "\fIadds creates a data_list \fBnode\fP given a name, data and a free function ptr. \fP"
22 .RI "NETSNMP_INLINE void \fBnetsnmp_data_list_add_node\fP (\fBnetsnmp_data_list\fP **head, \fBnetsnmp_data_list\fP *\fBnode\fP)"
24 .RI "\fIadds data to a datalist \fP"
26 .RI "NETSNMP_INLINE void \fBnetsnmp_add_list_data\fP (\fBnetsnmp_data_list\fP **head, \fBnetsnmp_data_list\fP *\fBnode\fP)"
28 .RI "\fIadds data to a datalist \fP"
30 .RI "NETSNMP_INLINE \fBnetsnmp_data_list\fP * \fBnetsnmp_data_list_add_data\fP (\fBnetsnmp_data_list\fP **head, const char *name, void *data, Netsnmp_Free_List_Data *beer)"
32 .RI "\fIadds data to a datalist \fP"
34 .RI "NETSNMP_INLINE void * \fBnetsnmp_get_list_data\fP (\fBnetsnmp_data_list\fP *head, const char *name)"
36 .RI "\fIreturns a data_list node's data for a given name within a data_list \fP"
38 .RI "NETSNMP_INLINE \fBnetsnmp_data_list\fP * \fBnetsnmp_get_list_node\fP (\fBnetsnmp_data_list\fP *head, const char *name)"
40 .RI "\fIreturns a data_list \fBnode\fP for a given name within a data_list \fP"
42 .RI "int \fBnetsnmp_remove_list_node\fP (\fBnetsnmp_data_list\fP **realhead, const char *name)"
44 .RI "\fIRemoves a named \fBnode\fP from a data_list (and frees it). \fP"
46 .RI "void \fBnetsnmp_register_save_list\fP (\fBnetsnmp_data_list\fP **datalist, const char *type, const char *token, Netsnmp_Save_List_Data *data_list_save_ptr, Netsnmp_Read_List_Data *data_list_read_ptr, Netsnmp_Free_List_Data *data_list_free_ptr)"
48 .RI "\fIregisters to store a data_list set of data at persistent storage time \fP"
50 .RI "int \fBnetsnmp_save_all_data_callback\fP (int major, int minor, void *serverarg, void *clientarg)"
52 .RI "\fIintended to be registerd as a callback operation. \fP"
54 .RI "int \fBnetsnmp_save_all_data\fP (\fBnetsnmp_data_list\fP *head, const char *type, const char *token, Netsnmp_Save_List_Data *data_list_save_ptr)"
56 .RI "\fIintended to be called as a callback during persistent save operations. \fP"
58 .RI "void \fBnetsnmp_read_data_callback\fP (const char *token, char *line)"
60 .RI "\fIintended to be registerd as a .conf parser It should be registered using: \fP"
62 .SH "Function Documentation"
64 .SS "NETSNMP_INLINE void netsnmp_add_list_data (\fBnetsnmp_data_list\fP ** head, \fBnetsnmp_data_list\fP * node)"
66 adds data to a datalist depreciated: use \fBnetsnmp_data_list_add_node()\fP
70 netsnmp_data_list_add_node is preferred
75 \fIhead\fP a pointer to the head \fBnode\fP of a data_list
77 \fI\fBnode\fP\fP a \fBnode\fP to stash in the data_list
82 Definition at line 117 of file data_list.c.
83 .SS "NETSNMP_INLINE \fBnetsnmp_data_list\fP* netsnmp_create_data_list (const char * name, void * data, Netsnmp_Free_List_Data * beer)"
85 adds creates a data_list \fBnode\fP given a name, data and a free function ptr. \fBParameters:\fP
87 \fIname\fP the name of the \fBnode\fP to cache the data.
89 \fIdata\fP the data to be stored under that name
91 \fIbeer\fP A function that can free the data pointer (in the future)
96 a newly created data_list \fBnode\fP which can be given to the netsnmp_add_list_data function.
103 \fBdelayed_instance.c\fP.
105 Definition at line 53 of file data_list.c.
106 .SS "NETSNMP_INLINE \fBnetsnmp_data_list\fP* netsnmp_data_list_add_data (\fBnetsnmp_data_list\fP ** head, const char * name, void * data, Netsnmp_Free_List_Data * beer)"
108 adds data to a datalist \fBParameters:\fP
110 \fIhead\fP a pointer to the head \fBnode\fP of a data_list
112 \fIname\fP the name of the \fBnode\fP to cache the data.
114 \fIdata\fP the data to be stored under that name
116 \fIbeer\fP A function that can free the data pointer (in the future)
121 a newly created data_list \fBnode\fP which was inserted in the list
126 Definition at line 130 of file data_list.c.
127 .SS "NETSNMP_INLINE void netsnmp_data_list_add_node (\fBnetsnmp_data_list\fP ** head, \fBnetsnmp_data_list\fP * node)"
129 adds data to a datalist \fBParameters:\fP
131 \fIhead\fP a pointer to the head \fBnode\fP of a data_list
133 \fI\fBnode\fP\fP a \fBnode\fP to stash in the data_list
138 Definition at line 74 of file data_list.c.
139 .SS "NETSNMP_INLINE void netsnmp_free_all_list_data (\fBnetsnmp_data_list\fP * head)"
141 frees all data and nodes in a list. \fBParameters:\fP
143 \fIhead\fP the top \fBnode\fP of the list to be freed.
148 Definition at line 35 of file data_list.c.
149 .SS "NETSNMP_INLINE void netsnmp_free_list_data (\fBnetsnmp_data_list\fP * node)"
151 frees the data and a name at a given data_list \fBnode\fP. Note that this doesn't free the \fBnode\fP itself.
155 \fI\fBnode\fP\fP the \fBnode\fP for which the data should be freed
160 Definition at line 19 of file data_list.c.
161 .SS "NETSNMP_INLINE void* netsnmp_get_list_data (\fBnetsnmp_data_list\fP * head, const char * name)"
163 returns a data_list node's data for a given name within a data_list \fBParameters:\fP
165 \fIhead\fP the head \fBnode\fP of a data_list
167 \fIname\fP the name to find
172 a pointer to the data cached at that \fBnode\fP
177 Definition at line 155 of file data_list.c.
178 .SS "NETSNMP_INLINE \fBnetsnmp_data_list\fP* netsnmp_get_list_node (\fBnetsnmp_data_list\fP * head, const char * name)"
180 returns a data_list \fBnode\fP for a given name within a data_list \fBParameters:\fP
182 \fIhead\fP the head \fBnode\fP of a data_list
184 \fIname\fP the name to find
189 a pointer to the data_list \fBnode\fP
194 Definition at line 173 of file data_list.c.
195 .SS "void netsnmp_read_data_callback (const char * token, char * line)"
197 intended to be registerd as a .conf parser It should be registered using: register_app_config_handler('token', netsnmp_read_data_callback, XXX)
199 where INFO_POINTER is a pointer to a netsnmp_data_list_saveinfo object containing apporpriate registration information
203 make netsnmp_read_data_callback deal with a free routine
208 Definition at line 326 of file data_list.c.
209 .SS "void netsnmp_register_save_list (\fBnetsnmp_data_list\fP ** datalist, const char * type, const char * token, Netsnmp_Save_List_Data * data_list_save_ptr, Netsnmp_Read_List_Data * data_list_read_ptr, Netsnmp_Free_List_Data * data_list_free_ptr)"
211 registers to store a data_list set of data at persistent storage time \fBParameters:\fP
213 \fIdatalist\fP the data to be saved
215 \fItype\fP the name of the application to save the data as. If left NULL the default application name that was registered during the init_snmp call will be used (recommended).
217 \fItoken\fP the unique token identifier string to use as the first word in the persistent file line.
219 \fIdata_list_save_ptr\fP a function pointer which will be called to save the rest of the data to a buffer.
221 \fIdata_list_read_ptr\fP a function pointer which can read the remainder of a saved line and return the application specific void * pointer.
223 \fIdata_list_free_ptr\fP a function pointer which will be passed to the data \fBnode\fP for freeing it in the future when/if the list/node is cleaned up or destroyed.
230 netsnmp_register_save_list should handle the same token name being saved from different types?
235 Definition at line 224 of file data_list.c.
236 .SS "int netsnmp_remove_list_node (\fBnetsnmp_data_list\fP ** realhead, const char * name)"
238 Removes a named \fBnode\fP from a data_list (and frees it). \fBParameters:\fP
240 \fIrealhead\fP a pointer to the head \fBnode\fP of a data_list
242 \fIname\fP the name to find and remove
247 0 on successful find-and-delete, 1 otherwise.
252 Definition at line 191 of file data_list.c.
253 .SS "int netsnmp_save_all_data (\fBnetsnmp_data_list\fP * head, const char * type, const char * token, Netsnmp_Save_List_Data * data_list_save_ptr)"
255 intended to be called as a callback during persistent save operations. See the netsnmp_save_all_data_callback for where this is typically used.
257 Definition at line 290 of file data_list.c.
258 .SS "int netsnmp_save_all_data_callback (int major, int minor, void * serverarg, void * clientarg)"
260 intended to be registerd as a callback operation. It should be registered using:
262 snmp_register_callback(SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, netsnmp_save_all_data_callback, INFO_POINTER);
264 where INFO_POINTER is a pointer to a netsnmp_data_list_saveinfo object containing apporpriate registration information
266 Definition at line 273 of file data_list.c.
269 Generated automatically by Doxygen for net-snmp from the source code.