Debian Codegraph @

agent/mibgroup/ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable.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 IPCIDRROUTETABLE_H
8 #define IPCIDRROUTETABLE_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/route.h>
21
22 #include "mibII/route_headers.h"
23
24 /*
25 * other required module components
26 */
27 /* *INDENT-OFF* */
28 config_require(ip-forward-mib/data_access/route);
29 config_require(ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_interface);
30 config_require(ip-forward-mib/ipCidrRouteTable/ipCidrRouteTable_data_access);
31 /* *INDENT-ON* */
32
33 /*
34 * OID, column number and enum definions for ipCidrRouteTable
35 */
36 #include "ipCidrRouteTable_constants.h"
37
38 /*
39 *********************************************************************
40 * function declarations
41 */
42 void init_ipCidrRouteTable(void);
43 void shutdown_ipCidrRouteTable(void);
44
45 /*
46 *********************************************************************
47 * Table declarations
48 */
49 /**********************************************************************
50 **********************************************************************
51 ***
52 *** Table ipCidrRouteTable
53 ***
54 **********************************************************************
55 **********************************************************************/
56 /*
57 * IP-FORWARD-MIB::ipCidrRouteTable is subid 4 of ipForward.
58 * Its status is Deprecated.
59 * OID: .1.3.6.1.2.1.4.24.4, length: 9
60 */
61 /*
62 *********************************************************************
63 * When you register your mib, you get to provide a generic
64 * pointer that will be passed back to you for most of the
65 * functions calls.
66 *
67 * TODO:100:r: Review all context structures
68 */
69 /*
70 * TODO:101:o: |-> Review ipCidrRouteTable registration context.
71 */
72 typedef netsnmp_data_list ipCidrRouteTable_registration;
73
74 /**********************************************************************/
75 /*
76 * TODO:110:r: |-> Review ipCidrRouteTable data context structure.
77 * This structure is used to represent the data for ipCidrRouteTable.
78 */
79 typedef netsnmp_route_entry ipCidrRouteTable_data;
80
81
82 /*
83 *********************************************************************
84 * TODO:115:o: |-> Review ipCidrRouteTable undo context.
85 * We're just going to use the same data structure for our
86 * undo_context. If you want to do something more efficent,
87 * define your typedef here.
88 */
89 typedef ipCidrRouteTable_data ipCidrRouteTable_undo_data;
90
91 /*
92 * TODO:120:r: |-> Review ipCidrRouteTable mib index.
93 * This structure is used to represent the index for ipCidrRouteTable.
94 */
95 typedef struct ipCidrRouteTable_mib_index_s {
96
97 /*
98 * ipCidrRouteDest(1)/IPADDR/ASN_IPADDRESS/u_long(u_long)//l/A/w/e/r/d/h
99 */
100 uint32_t ipCidrRouteDest;
101
102 /*
103 * ipCidrRouteMask(2)/IPADDR/ASN_IPADDRESS/u_long(u_long)//l/A/w/e/r/d/h
104 */
105 uint32_t ipCidrRouteMask;
106
107 /*
108 * ipCidrRouteTos(3)/INTEGER32/ASN_INTEGER/long(long)//l/A/w/e/R/d/h
109 */
110 long ipCidrRouteTos;
111
112 /*
113 * ipCidrRouteNextHop(4)/IPADDR/ASN_IPADDRESS/u_long(u_long)//l/A/w/e/r/d/h
114 */
115 uint32_t ipCidrRouteNextHop;
116
117
118 } ipCidrRouteTable_mib_index;
119
120 /*
121 * TODO:121:r: | |-> Review ipCidrRouteTable max index length.
122 * If you KNOW that your indexes will never exceed a certain
123 * length, update this macro to that length.
124 */
125 #define MAX_ipCidrRouteTable_IDX_LEN 13
126
127
128 /*
129 *********************************************************************
130 * TODO:130:o: |-> Review ipCidrRouteTable Row request (rowreq) context.
131 * When your functions are called, you will be passed a
132 * ipCidrRouteTable_rowreq_ctx pointer.
133 */
134 typedef struct ipCidrRouteTable_rowreq_ctx_s {
135
136 /** this must be first for container compare to work */
137 netsnmp_index oid_idx;
138 oid oid_tmp[MAX_ipCidrRouteTable_IDX_LEN];
139
140 ipCidrRouteTable_mib_index tbl_idx;
141
142 ipCidrRouteTable_data *data;
143 ipCidrRouteTable_undo_data *undo;
144 unsigned int column_set_flags; /* flags for set columns */
145
146
147 /*
148 * flags per row. Currently, the first (lower) 8 bits are reserved
149 * for the user. See mfd.h for other flags.
150 */
151 u_int rowreq_flags;
152
153 /*
154 * TODO:131:o: | |-> Add useful data to ipCidrRouteTable rowreq context.
155 */
156 u_char ipCidrRouteStatus;
157
158 /*
159 * storage for future expansion
160 */
161 netsnmp_data_list *ipCidrRouteTable_data_list;
162
163 } ipCidrRouteTable_rowreq_ctx;
164
165 typedef struct ipCidrRouteTable_ref_rowreq_ctx_s {
166 ipCidrRouteTable_rowreq_ctx *rowreq_ctx;
167 } ipCidrRouteTable_ref_rowreq_ctx;
168
169 /*
170 *********************************************************************
171 * function prototypes
172 */
173 int
174 ipCidrRouteTable_pre_request(ipCidrRouteTable_registration *
175 user_context);
176 int
177 ipCidrRouteTable_post_request(ipCidrRouteTable_registration *
178 user_context, int rc);
179
180 int
181 ipCidrRouteTable_rowreq_ctx_init(ipCidrRouteTable_rowreq_ctx *
182 rowreq_ctx, void *user_init_ctx);
183 void
184 ipCidrRouteTable_rowreq_ctx_cleanup(ipCidrRouteTable_rowreq_ctx *
185 rowreq_ctx);
186
187 ipCidrRouteTable_data *ipCidrRouteTable_allocate_data(void);
188 void ipCidrRouteTable_release_data(ipCidrRouteTable_data *
189 data);
190
191 ipCidrRouteTable_rowreq_ctx
192 * ipCidrRouteTable_row_find_by_mib_index(ipCidrRouteTable_mib_index
193 * mib_idx);
194
195 extern const oid ipCidrRouteTable_oid[];
196 extern const int ipCidrRouteTable_oid_size;
197
198
199 #include "ipCidrRouteTable_interface.h"
200 #include "ipCidrRouteTable_data_access.h"
201 /*
202 *********************************************************************
203 * GET function declarations
204 */
205
206 /*
207 *********************************************************************
208 * GET Table declarations
209 */
210 /**********************************************************************
211 **********************************************************************
212 ***
213 *** Table ipCidrRouteTable
214 ***
215 **********************************************************************
216 **********************************************************************/
217 /*
218 * IP-FORWARD-MIB::ipCidrRouteTable is subid 4 of ipForward.
219 * Its status is Deprecated.
220 * OID: .1.3.6.1.2.1.4.24.4, length: 9
221 */
222 /*
223 * indexes
224 */
225
226 int ipCidrRouteIfIndex_get(ipCidrRouteTable_rowreq_ctx *
227 rowreq_ctx, long
228 *ipCidrRouteIfIndex_val_ptr);
229 int ipCidrRouteType_get(ipCidrRouteTable_rowreq_ctx *
230 rowreq_ctx,
231 u_long * ipCidrRouteType_val_ptr);
232 int ipCidrRouteProto_get(ipCidrRouteTable_rowreq_ctx *
233 rowreq_ctx,
234 u_long *
235 ipCidrRouteProto_val_ptr);
236 int ipCidrRouteAge_get(ipCidrRouteTable_rowreq_ctx *
237 rowreq_ctx,
238 long *ipCidrRouteAge_val_ptr);
239 int ipCidrRouteInfo_get(ipCidrRouteTable_rowreq_ctx *
240 rowreq_ctx,
241 oid ** ipCidrRouteInfo_val_ptr_ptr,
242 size_t
243 * ipCidrRouteInfo_val_ptr_len_ptr);
244 int ipCidrRouteNextHopAS_get(ipCidrRouteTable_rowreq_ctx *
245 rowreq_ctx, long
246 *ipCidrRouteNextHopAS_val_ptr);
247 int ipCidrRouteMetric1_get(ipCidrRouteTable_rowreq_ctx *
248 rowreq_ctx, long
249 *ipCidrRouteMetric1_val_ptr);
250 int ipCidrRouteMetric2_get(ipCidrRouteTable_rowreq_ctx *
251 rowreq_ctx, long
252 *ipCidrRouteMetric2_val_ptr);
253 int ipCidrRouteMetric3_get(ipCidrRouteTable_rowreq_ctx *
254 rowreq_ctx, long
255 *ipCidrRouteMetric3_val_ptr);
256 int ipCidrRouteMetric4_get(ipCidrRouteTable_rowreq_ctx *
257 rowreq_ctx, long
258 *ipCidrRouteMetric4_val_ptr);
259 int ipCidrRouteMetric5_get(ipCidrRouteTable_rowreq_ctx *
260 rowreq_ctx, long
261 *ipCidrRouteMetric5_val_ptr);
262 int ipCidrRouteStatus_get(ipCidrRouteTable_rowreq_ctx *
263 rowreq_ctx,
264 u_long *
265 ipCidrRouteStatus_val_ptr);
266
267
268 int
269 ipCidrRouteTable_indexes_set_tbl_idx(ipCidrRouteTable_mib_index *
270 tbl_idx,
271 in_addr_t ipCidrRouteDest_val,
272 in_addr_t ipCidrRouteMask_val,
273 long ipCidrRouteTos_val,
274 in_addr_t
275 ipCidrRouteNextHop_val);
276 int
277 ipCidrRouteTable_indexes_set(ipCidrRouteTable_rowreq_ctx *
278 rowreq_ctx,
279 in_addr_t ipCidrRouteDest_val,
280 in_addr_t ipCidrRouteMask_val,
281 long ipCidrRouteTos_val,
282 in_addr_t ipCidrRouteNextHop_val);
283
284
285
286 /*
287 *********************************************************************
288 * SET function declarations
289 */
290
291 /*
292 *********************************************************************
293 * SET Table declarations
294 */
295 /**********************************************************************
296 **********************************************************************
297 ***
298 *** Table ipCidrRouteTable
299 ***
300 **********************************************************************
301 **********************************************************************/
302 /*
303 * IP-FORWARD-MIB::ipCidrRouteTable is subid 4 of ipForward.
304 * Its status is Deprecated.
305 * OID: .1.3.6.1.2.1.4.24.4, length: 9
306 */
307
308
309 int ipCidrRouteTable_undo_setup(ipCidrRouteTable_rowreq_ctx
310 * rowreq_ctx);
311 int
312 ipCidrRouteTable_undo_cleanup(ipCidrRouteTable_rowreq_ctx *
313 rowreq_ctx);
314 int ipCidrRouteTable_undo(ipCidrRouteTable_rowreq_ctx *
315 rowreq_ctx);
316 int ipCidrRouteTable_commit(ipCidrRouteTable_rowreq_ctx *
317 rowreq_ctx);
318 int
319 ipCidrRouteTable_undo_commit(ipCidrRouteTable_rowreq_ctx *
320 rowreq_ctx);
321
322
323 int
324 ipCidrRouteIfIndex_check_value(ipCidrRouteTable_rowreq_ctx *
325 rowreq_ctx,
326 long ipCidrRouteIfIndex_val);
327 int
328 ipCidrRouteIfIndex_undo_setup(ipCidrRouteTable_rowreq_ctx *
329 rowreq_ctx);
330 int ipCidrRouteIfIndex_set(ipCidrRouteTable_rowreq_ctx *
331 rowreq_ctx,
332 long ipCidrRouteIfIndex_val);
333 int ipCidrRouteIfIndex_undo(ipCidrRouteTable_rowreq_ctx *
334 rowreq_ctx);
335
336 int ipCidrRouteType_check_value(ipCidrRouteTable_rowreq_ctx
337 * rowreq_ctx,
338 u_long
339 ipCidrRouteType_val);
340 int ipCidrRouteType_undo_setup(ipCidrRouteTable_rowreq_ctx
341 * rowreq_ctx);
342 int ipCidrRouteType_set(ipCidrRouteTable_rowreq_ctx *
343 rowreq_ctx,
344 u_long ipCidrRouteType_val);
345 int ipCidrRouteType_undo(ipCidrRouteTable_rowreq_ctx *
346 rowreq_ctx);
347
348 int
349 ipCidrRouteProto_check_value(ipCidrRouteTable_rowreq_ctx *
350 rowreq_ctx,
351 u_long ipCidrRouteProto_val);
352 int ipCidrRouteProto_undo_setup(ipCidrRouteTable_rowreq_ctx
353 * rowreq_ctx);
354 int ipCidrRouteProto_set(ipCidrRouteTable_rowreq_ctx *
355 rowreq_ctx,
356 u_long ipCidrRouteProto_val);
357 int ipCidrRouteProto_undo(ipCidrRouteTable_rowreq_ctx *
358 rowreq_ctx);
359
360 int ipCidrRouteAge_check_value(ipCidrRouteTable_rowreq_ctx
361 * rowreq_ctx,
362 long ipCidrRouteAge_val);
363 int ipCidrRouteAge_undo_setup(ipCidrRouteTable_rowreq_ctx *
364 rowreq_ctx);
365 int ipCidrRouteAge_set(ipCidrRouteTable_rowreq_ctx *
366 rowreq_ctx,
367 long ipCidrRouteAge_val);
368 int ipCidrRouteAge_undo(ipCidrRouteTable_rowreq_ctx *
369 rowreq_ctx);
370
371 int ipCidrRouteInfo_check_value(ipCidrRouteTable_rowreq_ctx
372 * rowreq_ctx,
373 oid *
374 ipCidrRouteInfo_val_ptr,
375 size_t
376 ipCidrRouteInfo_val_ptr_len);
377 int ipCidrRouteInfo_undo_setup(ipCidrRouteTable_rowreq_ctx
378 * rowreq_ctx);
379 int ipCidrRouteInfo_set(ipCidrRouteTable_rowreq_ctx *
380 rowreq_ctx,
381 oid * ipCidrRouteInfo_val_ptr,
382 size_t
383 ipCidrRouteInfo_val_ptr_len);
384 int ipCidrRouteInfo_undo(ipCidrRouteTable_rowreq_ctx *
385 rowreq_ctx);
386
387 int
388 ipCidrRouteNextHopAS_check_value(ipCidrRouteTable_rowreq_ctx *
389 rowreq_ctx,
390 long ipCidrRouteNextHopAS_val);
391 int
392 ipCidrRouteNextHopAS_undo_setup(ipCidrRouteTable_rowreq_ctx *
393 rowreq_ctx);
394 int ipCidrRouteNextHopAS_set(ipCidrRouteTable_rowreq_ctx *
395 rowreq_ctx, long
396 ipCidrRouteNextHopAS_val);
397 int ipCidrRouteNextHopAS_undo(ipCidrRouteTable_rowreq_ctx *
398 rowreq_ctx);
399
400 int
401 ipCidrRouteMetric1_check_value(ipCidrRouteTable_rowreq_ctx *
402 rowreq_ctx,
403 long ipCidrRouteMetric1_val);
404 int
405 ipCidrRouteMetric1_undo_setup(ipCidrRouteTable_rowreq_ctx *
406 rowreq_ctx);
407 int ipCidrRouteMetric1_set(ipCidrRouteTable_rowreq_ctx *
408 rowreq_ctx,
409 long ipCidrRouteMetric1_val);
410 int ipCidrRouteMetric1_undo(ipCidrRouteTable_rowreq_ctx *
411 rowreq_ctx);
412
413 int
414 ipCidrRouteMetric2_check_value(ipCidrRouteTable_rowreq_ctx *
415 rowreq_ctx,
416 long ipCidrRouteMetric2_val);
417 int
418 ipCidrRouteMetric2_undo_setup(ipCidrRouteTable_rowreq_ctx *
419 rowreq_ctx);
420 int ipCidrRouteMetric2_set(ipCidrRouteTable_rowreq_ctx *
421 rowreq_ctx,
422 long ipCidrRouteMetric2_val);
423 int ipCidrRouteMetric2_undo(ipCidrRouteTable_rowreq_ctx *
424 rowreq_ctx);
425
426 int
427 ipCidrRouteMetric3_check_value(ipCidrRouteTable_rowreq_ctx *
428 rowreq_ctx,
429 long ipCidrRouteMetric3_val);
430 int
431 ipCidrRouteMetric3_undo_setup(ipCidrRouteTable_rowreq_ctx *
432 rowreq_ctx);
433 int ipCidrRouteMetric3_set(ipCidrRouteTable_rowreq_ctx *
434 rowreq_ctx,
435 long ipCidrRouteMetric3_val);
436 int ipCidrRouteMetric3_undo(ipCidrRouteTable_rowreq_ctx *
437 rowreq_ctx);
438
439 int
440 ipCidrRouteMetric4_check_value(ipCidrRouteTable_rowreq_ctx *
441 rowreq_ctx,
442 long ipCidrRouteMetric4_val);
443 int
444 ipCidrRouteMetric4_undo_setup(ipCidrRouteTable_rowreq_ctx *
445 rowreq_ctx);
446 int ipCidrRouteMetric4_set(ipCidrRouteTable_rowreq_ctx *
447 rowreq_ctx,
448 long ipCidrRouteMetric4_val);
449 int ipCidrRouteMetric4_undo(ipCidrRouteTable_rowreq_ctx *
450 rowreq_ctx);
451
452 int
453 ipCidrRouteMetric5_check_value(ipCidrRouteTable_rowreq_ctx *
454 rowreq_ctx,
455 long ipCidrRouteMetric5_val);
456 int
457 ipCidrRouteMetric5_undo_setup(ipCidrRouteTable_rowreq_ctx *
458 rowreq_ctx);
459 int ipCidrRouteMetric5_set(ipCidrRouteTable_rowreq_ctx *
460 rowreq_ctx,
461 long ipCidrRouteMetric5_val);
462 int ipCidrRouteMetric5_undo(ipCidrRouteTable_rowreq_ctx *
463 rowreq_ctx);
464
465 int
466 ipCidrRouteStatus_check_value(ipCidrRouteTable_rowreq_ctx *
467 rowreq_ctx,
468 u_long ipCidrRouteStatus_val);
469 int
470 ipCidrRouteStatus_undo_setup(ipCidrRouteTable_rowreq_ctx *
471 rowreq_ctx);
472 int ipCidrRouteStatus_set(ipCidrRouteTable_rowreq_ctx *
473 rowreq_ctx,
474 u_long ipCidrRouteStatus_val);
475 int ipCidrRouteStatus_undo(ipCidrRouteTable_rowreq_ctx *
476 rowreq_ctx);
477
478
479 int
480 ipCidrRouteTable_check_dependencies(ipCidrRouteTable_rowreq_ctx *
481 ctx);
482
483
484 /*
485 * DUMMY markers, ignore
486 *
487 * TODO:099:x: *************************************************************
488 * TODO:199:x: *************************************************************
489 * TODO:299:x: *************************************************************
490 * TODO:399:x: *************************************************************
491 * TODO:499:x: *************************************************************
492 */
493
494 #ifdef __cplusplus
495 }
496 #endif
497 #endif /* IPCIDRROUTETABLE_H */
498 /** @} */
499