summaryrefslogtreecommitdiff
path: root/man/netsnmp_agent_registry.3
blob: ec52c84fd1775f745b778a26d085e6cd10148ea8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
.TH "Maintain a registry of MIB subtrees, together with related information regarding mibmodule, sessions, etc" 3 "23 May 2010" "Version 5.4.3.pre1" "net-snmp" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Maintain a registry of MIB subtrees, together with related information regarding mibmodule, sessions, etc \- 
.SS "Data Structures"

.in +1c
.ti -1c
.RI "struct \fBlookup_cache_s\fP"
.br
.ti -1c
.RI "struct \fBlookup_cache_context_s\fP"
.br
.in -1c
.SS "Defines"

.in +1c
.ti -1c
.RI "#define \fBIN_SNMP_VARS_C\fP"
.br
.ti -1c
.RI "#define \fBSUBTREE_DEFAULT_CACHE_SIZE\fP   8"
.br
.ti -1c
.RI "#define \fBSUBTREE_MAX_CACHE_SIZE\fP   32"
.br
.in -1c
.SS "Typedefs"

.in +1c
.ti -1c
.RI "typedef struct \fBlookup_cache_s\fP \fBlookup_cache\fP"
.br
.ti -1c
.RI "typedef struct \fBlookup_cache_context_s\fP \fBlookup_cache_context\fP"
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "NETSNMP_STATIC_INLINE void \fBinvalidate_lookup_cache\fP (const char *context)"
.br
.ti -1c
.RI "void \fBnetsnmp_set_lookup_cache_size\fP (int newsize)"
.br
.RI "\fIset the lookup cache size for optimized agent registration performance. \fP"
.ti -1c
.RI "int \fBnetsnmp_get_lookup_cache_size\fP (void)"
.br
.RI "\fIretrieves the current value of the lookup cache size \fP"
.ti -1c
.RI "void \fBnetsnmp_subtree_free\fP (\fBnetsnmp_subtree\fP *a)"
.br
.ti -1c
.RI "\fBnetsnmp_subtree\fP * \fBnetsnmp_subtree_deepcopy\fP (\fBnetsnmp_subtree\fP *a)"
.br
.ti -1c
.RI "\fBsubtree_context_cache\fP * \fBget_top_context_cache\fP (void)"
.br
.ti -1c
.RI "\fBnetsnmp_subtree\fP * \fBnetsnmp_subtree_find_first\fP (const char *context_name)"
.br
.ti -1c
.RI "\fBnetsnmp_subtree\fP * \fBadd_subtree\fP (\fBnetsnmp_subtree\fP *new_tree, const char *context_name)"
.br
.ti -1c
.RI "\fBnetsnmp_subtree\fP * \fBnetsnmp_subtree_replace_first\fP (\fBnetsnmp_subtree\fP *new_tree, const char *context_name)"
.br
.ti -1c
.RI "NETSNMP_INLINE void \fBnetsnmp_subtree_change_next\fP (\fBnetsnmp_subtree\fP *ptr, \fBnetsnmp_subtree\fP *thenext)"
.br
.ti -1c
.RI "NETSNMP_INLINE void \fBnetsnmp_subtree_change_prev\fP (\fBnetsnmp_subtree\fP *ptr, \fBnetsnmp_subtree\fP *theprev)"
.br
.ti -1c
.RI "int \fBnetsnmp_subtree_compare\fP (const \fBnetsnmp_subtree\fP *ap, const \fBnetsnmp_subtree\fP *bp)"
.br
.ti -1c
.RI "void \fBnetsnmp_subtree_join\fP (\fBnetsnmp_subtree\fP *root)"
.br
.ti -1c
.RI "\fBnetsnmp_subtree\fP * \fBnetsnmp_subtree_split\fP (\fBnetsnmp_subtree\fP *current, oid name[], int name_len)"
.br
.ti -1c
.RI "int \fBnetsnmp_subtree_load\fP (\fBnetsnmp_subtree\fP *new_sub, const char *context_name)"
.br
.ti -1c
.RI "int \fBnetsnmp_register_mib\fP (const char *moduleName, struct \fBvariable\fP *var, size_t varsize, size_t numvars, oid *mibloc, size_t mibloclen, int priority, int range_subid, oid range_ubound, \fBnetsnmp_session\fP *ss, const char *context, int timeout, int flags, \fBnetsnmp_handler_registration\fP *reginfo, int perform_callback)"
.br
.ti -1c
.RI "void \fBregister_mib_reattach\fP (void)"
.br
.ti -1c
.RI "void \fBregister_mib_detach\fP (void)"
.br
.ti -1c
.RI "int \fBregister_mib_context\fP (const char *moduleName, struct \fBvariable\fP *var, size_t varsize, size_t numvars, oid *mibloc, size_t mibloclen, int priority, int range_subid, oid range_ubound, \fBnetsnmp_session\fP *ss, const char *context, int timeout, int flags)"
.br
.ti -1c
.RI "int \fBregister_mib_range\fP (const char *moduleName, struct \fBvariable\fP *var, size_t varsize, size_t numvars, oid *mibloc, size_t mibloclen, int priority, int range_subid, oid range_ubound, \fBnetsnmp_session\fP *ss)"
.br
.ti -1c
.RI "int \fBregister_mib_priority\fP (const char *moduleName, struct \fBvariable\fP *var, size_t varsize, size_t numvars, oid *mibloc, size_t mibloclen, int priority)"
.br
.ti -1c
.RI "int \fBregister_mib\fP (const char *moduleName, struct \fBvariable\fP *var, size_t varsize, size_t numvars, oid *mibloc, size_t mibloclen)"
.br
.ti -1c
.RI "void \fBnetsnmp_subtree_unload\fP (\fBnetsnmp_subtree\fP *sub, \fBnetsnmp_subtree\fP *prev, const char *context)"
.br
.ti -1c
.RI "int \fBunregister_mib_context\fP (oid *name, size_t len, int priority, int range_subid, oid range_ubound, const char *context)"
.br
.RI "\fIUnregisters an OID that has an associated context name value. \fP"
.ti -1c
.RI "int \fBnetsnmp_unregister_mib_table_row\fP (oid *name, size_t len, int priority, int var_subid, oid range_ubound, const char *context)"
.br
.ti -1c
.RI "int \fBunregister_mib_range\fP (oid *name, size_t len, int priority, int range_subid, oid range_ubound)"
.br
.ti -1c
.RI "int \fBunregister_mib_priority\fP (oid *name, size_t len, int priority)"
.br
.ti -1c
.RI "int \fBunregister_mib\fP (oid *name, size_t len)"
.br
.ti -1c
.RI "void \fBunregister_mibs_by_session\fP (\fBnetsnmp_session\fP *ss)"
.br
.ti -1c
.RI "int \fBin_a_view\fP (oid *name, size_t *namelen, \fBnetsnmp_pdu\fP *pdu, int type)"
.br
.ti -1c
.RI "int \fBcheck_access\fP (\fBnetsnmp_pdu\fP *pdu)"
.br
.ti -1c
.RI "int \fBnetsnmp_acm_check_subtree\fP (\fBnetsnmp_pdu\fP *pdu, oid *name, size_t namelen)"
.br
.RI "\fIchecks to see if everything within a given subtree is either: in view, not in view, or possibly both. \fP"
.ti -1c
.RI "NETSNMP_STATIC_INLINE \fBlookup_cache_context\fP * \fBget_context_lookup_cache\fP (const char *context)"
.br
.ti -1c
.RI "NETSNMP_STATIC_INLINE void \fBlookup_cache_add\fP (const char *context, \fBnetsnmp_subtree\fP *next, \fBnetsnmp_subtree\fP *previous)"
.br
.ti -1c
.RI "NETSNMP_STATIC_INLINE void \fBlookup_cache_replace\fP (\fBlookup_cache\fP *ptr, \fBnetsnmp_subtree\fP *next, \fBnetsnmp_subtree\fP *previous)"
.br
.ti -1c
.RI "NETSNMP_STATIC_INLINE \fBlookup_cache\fP * \fBlookup_cache_find\fP (const char *context, oid *name, size_t name_len, int *retcmp)"
.br
.ti -1c
.RI "\fBnetsnmp_subtree\fP * \fBnetsnmp_subtree_find_prev\fP (oid *name, size_t len, \fBnetsnmp_subtree\fP *subtree, const char *context_name)"
.br
.ti -1c
.RI "\fBnetsnmp_subtree\fP * \fBnetsnmp_subtree_find_next\fP (oid *name, size_t len, \fBnetsnmp_subtree\fP *subtree, const char *context_name)"
.br
.ti -1c
.RI "\fBnetsnmp_subtree\fP * \fBnetsnmp_subtree_find\fP (oid *name, size_t len, \fBnetsnmp_subtree\fP *subtree, const char *context_name)"
.br
.ti -1c
.RI "\fBnetsnmp_session\fP * \fBget_session_for_oid\fP (oid *name, size_t len, const char *context_name)"
.br
.ti -1c
.RI "void \fBsetup_tree\fP (void)"
.br
.ti -1c
.RI "int \fBremove_tree_entry\fP (oid *name, size_t len)"
.br
.ti -1c
.RI "void \fBshutdown_tree\fP (void)"
.br
.ti -1c
.RI "void \fBclear_subtree\fP (\fBnetsnmp_subtree\fP *sub)"
.br
.ti -1c
.RI "void \fBclear_lookup_cache\fP (void)"
.br
.ti -1c
.RI "void \fBclear_context\fP (void)"
.br
.ti -1c
.RI "void \fBdump_idx_registry\fP (void)"
.br
.ti -1c
.RI "void \fBdump_registry\fP (void)"
.br
.ti -1c
.RI "RETSIGTYPE \fBagent_SIGCHLD_handler\fP (int sig)"
.br
.ti -1c
.RI "int \fBregister_signal\fP (int sig, void(*func)(int))"
.br
.ti -1c
.RI "int \fBunregister_signal\fP (int sig)"
.br
.in -1c
.SS "Variables"

.in +1c
.ti -1c
.RI "\fBsubtree_context_cache\fP * \fBcontext_subtrees\fP = NULL"
.br
.ti -1c
.RI "int \fBlookup_cache_size\fP = 0"
.br
.ti -1c
.RI "int \fBexternal_signal_scheduled\fP [NUM_EXTERNAL_SIGS]"
.br
.ti -1c
.RI "void(* \fBexternal_signal_handler\fP [NUM_EXTERNAL_SIGS])(int)"
.br
.in -1c
.SH "Function Documentation"
.PP 
.SS "int netsnmp_acm_check_subtree (\fBnetsnmp_pdu\fP * pdu, oid * name, size_t namelen)"
.PP
checks to see if everything within a given subtree is either: in view, not in view, or possibly both. If the entire subtree is not-in-view we can use this information to skip calling the sub-handlers entirely. 
.PP
\fBReturns:\fP
.RS 4
0 if entire subtree is accessible, 5 if not and 7 if portions are both. 1 on error (illegal pdu version). 
.RE
.PP

.PP
Definition at line 1323 of file agent_registry.c.
.SS "int netsnmp_get_lookup_cache_size (void)"
.PP
retrieves the current value of the lookup cache size \fBReturns:\fP
.RS 4
the current lookup cache size 
.RE
.PP

.PP
Definition at line 1396 of file agent_registry.c.
.SS "void netsnmp_set_lookup_cache_size (int newsize)"
.PP
set the lookup cache size for optimized agent registration performance. \fBParameters:\fP
.RS 4
\fInewsize\fP set to the maximum size of a cache for a given context. Set to 0 to completely disable caching, or to -1 to set to the default cache size (8), or to a number of your chosing. The rough guide is that it should be equal to the maximum number of simultanious managers you expect to talk to the agent (M) times 80% (or so, he says randomly) the average number (N) of varbinds you expect to receive in a given request for a manager. ie, M times N. Bigger does NOT necessarily mean better. Certainly 16 should be an upper limit. 32 is the hard coded limit. 
.RE
.PP

.PP
Definition at line 1383 of file agent_registry.c.
.SS "int unregister_mib_context (oid * name, size_t len, int priority, int range_subid, oid range_ubound, const char * context)"
.PP
Unregisters an OID that has an associated context name value. Typically used when a \fBmodule\fP has multiple contexts defined. The parameters priority, range_subid, and range_ubound should be used in conjunction with agentx, see RFC 2741, otherwise these values should always be 0.
.PP
\fBParameters:\fP
.RS 4
\fIname\fP the specific OID to unregister if it conatins the associated context.
.br
\fIlen\fP the length of the OID, use OID_LENGTH macro.
.br
\fIpriority\fP a value between 1 and 255, used to achieve a desired configuration when different sessions register identical or overlapping regions. Subagents with no particular knowledge of priority should register with the default value of 127.
.br
\fIrange_subid\fP permits specifying a range in place of one of a subtree sub-identifiers. When this value is zero, no range is being specified.
.br
\fIrange_ubound\fP the upper bound of a sub-identifier's range. This field is present only if range_subid is not 0.
.br
\fIcontext\fP a context name that has been created
.RE
.PP
\fBReturns:\fP
.RS 4
.RE
.PP

.PP
Definition at line 969 of file agent_registry.c.
.SH "Author"
.PP 
Generated automatically by Doxygen for net-snmp from the source code.