Debian Codegraph @

agent/mibgroup/ip-mib/ipAddressTable/ipAddressTable.h

raw
1 /*
2 * Note: this file originally auto-generated by mib2c using
3 * version : 1.48 $ of : mfd-top.m2c,v $
4 *
5 * $Id$
6 */
7 #ifndef IPADDRESSTABLE_H
8 #define IPADDRESSTABLE_H
9
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13
14
15 /** @addtogroup misc misc: Miscellaneous routines
16 *
17 * @{
18 */
19 #include <net-snmp/library/asn1.h>
20 #include <net-snmp/data_access/ipaddress.h>
21
22 /*
23 * other required module components
24 */
25 /* *INDENT-OFF* */
26 config_require(if-mib/data_access/interface);
27 config_require(ip-mib/data_access/ipaddress);
28 config_require(ip-mib/ipAddressTable/ipAddressTable_interface);
29 config_require(ip-mib/ipAddressTable/ipAddressTable_data_access);
30 /* *INDENT-ON* */
31
32 /*
33 * OID, column number and enum definions for ipAddressTable
34 */
35 #include "ipAddressTable_constants.h"
36
37 /*
38 *********************************************************************
39 * function declarations
40 */
41 void init_ipAddressTable(void);
42 void shutdown_ipAddressTable(void);
43
44 /*
45 *********************************************************************
46 * Table declarations
47 */
48 /**********************************************************************
49 **********************************************************************
50 ***
51 *** Table ipAddressTable
52 ***
53 **********************************************************************
54 **********************************************************************/
55 /*
56 * IP-MIB::ipAddressTable is subid 34 of ip.
57 * Its status is Current.
58 * OID: .1.3.6.1.2.1.4.34, length: 8
59 */
60 /*
61 *********************************************************************
62 * When you register your mib, you get to provide a generic
63 * pointer that will be passed back to you for most of the
64 * functions calls.
65 *
66 * TODO:100:r: Review all context structures
67 */
68 /*
69 * TODO:101:o: |-> Review ipAddressTable registration context.
70 */
71 typedef netsnmp_data_list ipAddressTable_registration;
72
73 /**********************************************************************/
74 /*
75 * TODO:110:r: |-> Review ipAddressTable data context structure.
76 * This structure is used to represent the data for ipAddressTable.
77 */
78 typedef netsnmp_ipaddress_entry ipAddressTable_data;
79
80
81 /*
82 *********************************************************************
83 * TODO:115:o: |-> Review ipAddressTable undo context.
84 * We're just going to use the same data structure for our
85 * undo_context. If you want to do something more efficent,
86 * define your typedef here.
87 */
88 typedef ipAddressTable_data ipAddressTable_undo_data;
89
90 /*
91 * TODO:120:r: |-> Review ipAddressTable mib index.
92 * This structure is used to represent the index for ipAddressTable.
93 */
94 typedef struct ipAddressTable_mib_index_s {
95
96 /*
97 * ipAddressAddrType(1)/InetAddressType/ASN_INTEGER/long(u_long)//l/a/w/E/r/d/h
98 */
99 long ipAddressAddrType;
100
101 /*
102 * ipAddressAddr(2)/InetAddress/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/h
103 */
104 /** 128 - 1(other indexes) - oid length(10) = 116 */
105 u_char ipAddressAddr[116];
106 size_t ipAddressAddr_len;
107
108
109 } ipAddressTable_mib_index;
110
111 /*
112 * TODO:121:r: | |-> Review ipAddressTable max index length.
113 * If you KNOW that your indexes will never exceed a certain
114 * length, update this macro to that length.
115 *
116 * BE VERY CAREFUL TO TAKE INTO ACCOUNT THE MAXIMUM
117 * POSSIBLE LENGHT FOR EVERY VARIABLE LENGTH INDEX!
118 * Guessing 128 - col/entry(2) - oid len(8)
119 */
120 #define MAX_ipAddressTable_IDX_LEN 118
121
122
123 /*
124 *********************************************************************
125 * TODO:130:o: |-> Review ipAddressTable Row request (rowreq) context.
126 * When your functions are called, you will be passed a
127 * ipAddressTable_rowreq_ctx pointer.
128 */
129 typedef struct ipAddressTable_rowreq_ctx_s {
130
131 /** this must be first for container compare to work */
132 netsnmp_index oid_idx;
133 oid oid_tmp[MAX_ipAddressTable_IDX_LEN];
134
135 ipAddressTable_mib_index tbl_idx;
136
137 ipAddressTable_data *data;
138 ipAddressTable_undo_data *undo;
139 unsigned int column_set_flags; /* flags for set columns */
140
141
142 /*
143 * flags per row. Currently, the first (lower) 8 bits are reserved
144 * for the user. See mfd.h for other flags.
145 */
146 u_int rowreq_flags;
147
148 /*
149 * TODO:131:o: | |-> Add useful data to ipAddressTable rowreq context.
150 */
151
152 /*
153 * not available from net-snmp ipaddress data_access
154 */
155 uint32_t ipAddressCreated; /* sysUpTime */
156 uint32_t ipAddressLastChanged, ipAddressLastChanged_undo; /* sysUpTime */
157 int ipAddressRowStatus, ipAddressRowStatus_undo;
158
159 /*
160 * storage for future expansion
161 */
162 netsnmp_data_list *ipAddressTable_data_list;
163
164 } ipAddressTable_rowreq_ctx;
165
166 typedef struct ipAddressTable_ref_rowreq_ctx_s {
167 ipAddressTable_rowreq_ctx *rowreq_ctx;
168 } ipAddressTable_ref_rowreq_ctx;
169
170 /*
171 *********************************************************************
172 * function prototypes
173 */
174 int ipAddressTable_pre_request(ipAddressTable_registration
175 * user_context);
176 int ipAddressTable_post_request(ipAddressTable_registration
177 * user_context, int rc);
178
179 int
180 ipAddressTable_rowreq_ctx_init(ipAddressTable_rowreq_ctx *
181 rowreq_ctx, void *user_init_ctx);
182 void
183 ipAddressTable_rowreq_ctx_cleanup(ipAddressTable_rowreq_ctx *
184 rowreq_ctx);
185
186 ipAddressTable_data *ipAddressTable_allocate_data(void);
187 void ipAddressTable_release_data(ipAddressTable_data *
188 data);
189 ipAddressTable_rowreq_ctx
190 * ipAddressTable_row_find_by_mib_index(ipAddressTable_mib_index *
191 mib_idx);
192
193 extern const oid ipAddressTable_oid[];
194 extern const int ipAddressTable_oid_size;
195
196
197 #include "ipAddressTable_interface.h"
198 #include "ipAddressTable_data_access.h"
199 /*
200 *********************************************************************
201 * GET function declarations
202 */
203
204 /*
205 *********************************************************************
206 * GET Table declarations
207 */
208 /**********************************************************************
209 **********************************************************************
210 ***
211 *** Table ipAddressTable
212 ***
213 **********************************************************************
214 **********************************************************************/
215 /*
216 * IP-MIB::ipAddressTable is subid 34 of ip.
217 * Its status is Current.
218 * OID: .1.3.6.1.2.1.4.34, length: 8
219 */
220 /*
221 * indexes
222 */
223 int ipAddressAddrType_map(long *
224 mib_ipAddressAddrType_val_ptr,
225 long
226 raw_ipAddressAddrType_val);
227
228 int ipAddressIfIndex_get(ipAddressTable_rowreq_ctx *
229 rowreq_ctx,
230 long *ipAddressIfIndex_val_ptr);
231 int ipAddressType_get(ipAddressTable_rowreq_ctx *
232 rowreq_ctx,
233 u_long * ipAddressType_val_ptr);
234 int ipAddressPrefix_get(ipAddressTable_rowreq_ctx *
235 rowreq_ctx,
236 oid ** ipAddressPrefix_val_ptr_ptr,
237 size_t
238 * ipAddressPrefix_val_ptr_len_ptr);
239 int ipAddressOrigin_get(ipAddressTable_rowreq_ctx *
240 rowreq_ctx,
241 u_long * ipAddressOrigin_val_ptr);
242 int ipAddressStatus_get(ipAddressTable_rowreq_ctx *
243 rowreq_ctx,
244 u_long * ipAddressStatus_val_ptr);
245 int ipAddressCreated_get(ipAddressTable_rowreq_ctx *
246 rowreq_ctx,
247 u_long *
248 ipAddressCreated_val_ptr);
249 int ipAddressLastChanged_get(ipAddressTable_rowreq_ctx *
250 rowreq_ctx,
251 u_long *
252 ipAddressLastChanged_val_ptr);
253 int ipAddressRowStatus_get(ipAddressTable_rowreq_ctx *
254 rowreq_ctx,
255 u_long *
256 ipAddressRowStatus_val_ptr);
257 int ipAddressStorageType_get(ipAddressTable_rowreq_ctx *
258 rowreq_ctx,
259 u_long *
260 ipAddressStorageType_val_ptr);
261
262
263 int
264 ipAddressTable_indexes_set_tbl_idx(ipAddressTable_mib_index *
265 tbl_idx,
266 long ipAddressAddrType_val,
267 u_char *ipAddressAddr_val_ptr,
268 size_t
269 ipAddressAddr_val_ptr_len);
270 int ipAddressTable_indexes_set(ipAddressTable_rowreq_ctx *
271 rowreq_ctx,
272 u_long
273 ipAddressAddrType_val,
274 u_char *ipAddressAddr_val_ptr,
275 size_t
276 ipAddressAddr_val_ptr_len);
277
278
279
280 /*
281 *********************************************************************
282 * SET function declarations
283 */
284
285 /*
286 *********************************************************************
287 * SET Table declarations
288 */
289 /**********************************************************************
290 **********************************************************************
291 ***
292 *** Table ipAddressTable
293 ***
294 **********************************************************************
295 **********************************************************************/
296 /*
297 * IP-MIB::ipAddressTable is subid 34 of ip.
298 * Its status is Current.
299 * OID: .1.3.6.1.2.1.4.34, length: 8
300 */
301
302
303 int ipAddressTable_undo_setup(ipAddressTable_rowreq_ctx *
304 rowreq_ctx);
305 int ipAddressTable_undo_cleanup(ipAddressTable_rowreq_ctx *
306 rowreq_ctx);
307 int ipAddressTable_undo(ipAddressTable_rowreq_ctx *
308 rowreq_ctx);
309 int ipAddressTable_commit(ipAddressTable_rowreq_ctx *
310 rowreq_ctx);
311 int ipAddressTable_undo_commit(ipAddressTable_rowreq_ctx *
312 rowreq_ctx);
313
314
315 int ipAddressIfIndex_check_value(ipAddressTable_rowreq_ctx
316 * rowreq_ctx, long
317 ipAddressIfIndex_val);
318
319 int ipAddressIfIndex_undo_setup(ipAddressTable_rowreq_ctx *
320 rowreq_ctx);
321 int ipAddressIfIndex_set(ipAddressTable_rowreq_ctx *
322 rowreq_ctx,
323 long ipAddressIfIndex_val);
324 int ipAddressIfIndex_undo(ipAddressTable_rowreq_ctx *
325 rowreq_ctx);
326
327 int ipAddressType_check_value(ipAddressTable_rowreq_ctx *
328 rowreq_ctx,
329 u_long ipAddressType_val);
330 int ipAddressType_undo_setup(ipAddressTable_rowreq_ctx *
331 rowreq_ctx);
332 int ipAddressType_set(ipAddressTable_rowreq_ctx *
333 rowreq_ctx,
334 u_long ipAddressType_val);
335 int ipAddressType_undo(ipAddressTable_rowreq_ctx *
336 rowreq_ctx);
337
338 int ipAddressPrefix_check_value(ipAddressTable_rowreq_ctx *
339 rowreq_ctx,
340 oid *
341 ipAddressPrefix_val_ptr,
342 size_t
343 ipAddressPrefix_val_ptr_len);
344 int ipAddressPrefix_undo_setup(ipAddressTable_rowreq_ctx *
345 rowreq_ctx);
346 int ipAddressPrefix_set(ipAddressTable_rowreq_ctx *
347 rowreq_ctx,
348 oid * ipAddressPrefix_val_ptr,
349 size_t
350 ipAddressPrefix_val_ptr_len);
351 int ipAddressPrefix_undo(ipAddressTable_rowreq_ctx *
352 rowreq_ctx);
353
354 int ipAddressOrigin_check_value(ipAddressTable_rowreq_ctx *
355 rowreq_ctx,
356 u_long
357 ipAddressOrigin_val);
358 int ipAddressOrigin_undo_setup(ipAddressTable_rowreq_ctx *
359 rowreq_ctx);
360 int ipAddressOrigin_set(ipAddressTable_rowreq_ctx *
361 rowreq_ctx,
362 u_long ipAddressOrigin_val);
363 int ipAddressOrigin_undo(ipAddressTable_rowreq_ctx *
364 rowreq_ctx);
365
366 int ipAddressStatus_check_value(ipAddressTable_rowreq_ctx *
367 rowreq_ctx,
368 u_long
369 ipAddressStatus_val);
370 int ipAddressStatus_undo_setup(ipAddressTable_rowreq_ctx *
371 rowreq_ctx);
372 int ipAddressStatus_set(ipAddressTable_rowreq_ctx *
373 rowreq_ctx,
374 u_long ipAddressStatus_val);
375 int ipAddressStatus_undo(ipAddressTable_rowreq_ctx *
376 rowreq_ctx);
377
378 int ipAddressCreated_check_value(ipAddressTable_rowreq_ctx
379 * rowreq_ctx,
380 u_long
381 ipAddressCreated_val);
382 int ipAddressCreated_undo_setup(ipAddressTable_rowreq_ctx *
383 rowreq_ctx);
384 int ipAddressCreated_set(ipAddressTable_rowreq_ctx *
385 rowreq_ctx,
386 u_long ipAddressCreated_val);
387 int ipAddressCreated_undo(ipAddressTable_rowreq_ctx *
388 rowreq_ctx);
389
390 int
391 ipAddressLastChanged_check_value(ipAddressTable_rowreq_ctx *
392 rowreq_ctx,
393 u_long ipAddressLastChanged_val);
394 int
395 ipAddressLastChanged_undo_setup(ipAddressTable_rowreq_ctx *
396 rowreq_ctx);
397 int ipAddressLastChanged_set(ipAddressTable_rowreq_ctx *
398 rowreq_ctx,
399 u_long
400 ipAddressLastChanged_val);
401 int ipAddressLastChanged_undo(ipAddressTable_rowreq_ctx *
402 rowreq_ctx);
403
404 int
405 ipAddressRowStatus_check_value(ipAddressTable_rowreq_ctx *
406 rowreq_ctx,
407 u_long ipAddressRowStatus_val);
408 int ipAddressRowStatus_undo_setup(ipAddressTable_rowreq_ctx
409 * rowreq_ctx);
410 int ipAddressRowStatus_set(ipAddressTable_rowreq_ctx *
411 rowreq_ctx,
412 u_long ipAddressRowStatus_val);
413 int ipAddressRowStatus_undo(ipAddressTable_rowreq_ctx *
414 rowreq_ctx);
415
416 int
417 ipAddressStorageType_check_value(ipAddressTable_rowreq_ctx *
418 rowreq_ctx,
419 u_long ipAddressStorageType_val);
420 int
421 ipAddressStorageType_undo_setup(ipAddressTable_rowreq_ctx *
422 rowreq_ctx);
423 int ipAddressStorageType_set(ipAddressTable_rowreq_ctx *
424 rowreq_ctx,
425 u_long
426 ipAddressStorageType_val);
427 int ipAddressStorageType_undo(ipAddressTable_rowreq_ctx *
428 rowreq_ctx);
429
430
431 int
432 ipAddressTable_check_dependencies(ipAddressTable_rowreq_ctx * ctx);
433
434
435 /*
436 * DUMMY markers, ignore
437 *
438 * TODO:099:x: *************************************************************
439 * TODO:199:x: *************************************************************
440 * TODO:299:x: *************************************************************
441 * TODO:399:x: *************************************************************
442 * TODO:499:x: *************************************************************
443 */
444
445 #ifdef __cplusplus
446 }
447 #endif
448 #endif /* IPADDRESSTABLE_H */
449 /** @} */
450