Debian Codegraph @

agent/mibgroup/tcp-mib/tcpConnectionTable/tcpConnectionTable.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 TCPCONNECTIONTABLE_H
8 #define TCPCONNECTIONTABLE_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/tcpConn.h>
21
22 /*
23 * other required module components
24 */
25 /* *INDENT-OFF* */
26 config_require(tcp-mib/data_access/tcpConn);
27 config_require(tcp-mib/tcpConnectionTable/tcpConnectionTable_interface);
28 config_require(tcp-mib/tcpConnectionTable/tcpConnectionTable_data_access);
29 /* *INDENT-ON* */
30
31 /*
32 * OID, column number and enum definions for tcpConnectionTable
33 */
34 #include "tcpConnectionTable_constants.h"
35
36 /*
37 *********************************************************************
38 * function declarations
39 */
40 void init_tcpConnectionTable(void);
41 void shutdown_tcpConnectionTable(void);
42
43 /*
44 *********************************************************************
45 * Table declarations
46 */
47 /**********************************************************************
48 **********************************************************************
49 ***
50 *** Table tcpConnectionTable
51 ***
52 **********************************************************************
53 **********************************************************************/
54 /*
55 * TCP-MIB::tcpConnectionTable is subid 19 of tcp.
56 * Its status is Current.
57 * OID: .1.3.6.1.2.1.6.19, length: 8
58 */
59 /*
60 *********************************************************************
61 * When you register your mib, you get to provide a generic
62 * pointer that will be passed back to you for most of the
63 * functions calls.
64 *
65 * TODO:100:r: Review all context structures
66 */
67 /*
68 * TODO:101:o: |-> Review tcpConnectionTable registration context.
69 */
70 typedef struct tConnectionT_user_ctx {
71
72 void *dummy;
73
74 } tcpConnectionTable_registration;
75
76 /**********************************************************************/
77 /*
78 * TODO:110:r: |-> Review tcpConnectionTable data context structure.
79 * This structure is used to represent the data for tcpConnectionTable.
80 */
81 typedef netsnmp_tcpconn_entry tcpConnectionTable_data;
82
83
84 /*
85 *********************************************************************
86 * TODO:115:o: |-> Review tcpConnectionTable undo context.
87 * We're just going to use the same data structure for our
88 * undo_context. If you want to do something more efficent,
89 * define your typedef here.
90 */
91 typedef tcpConnectionTable_data tcpConnectionTable_undo_data;
92
93 /*
94 * TODO:120:r: |-> Review tcpConnectionTable mib index.
95 * This structure is used to represent the index for tcpConnectionTable.
96 */
97 typedef struct tcpConnectionTable_mib_index_s {
98
99 /*
100 * tcpConnectionLocalAddressType(1)/InetAddressType/ASN_INTEGER/long(u_long)//l/a/w/E/r/d/h
101 */
102 u_long tcpConnectionLocalAddressType;
103
104 /*
105 * tcpConnectionLocalAddress(2)/InetAddress/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/h
106 */
107 /** 128 - 5(other indexes) - oid length(10) = 112 */
108 /** but 20 = size of ipv6z address, longest supported type */
109 char tcpConnectionLocalAddress[20];
110 size_t tcpConnectionLocalAddress_len;
111
112 /*
113 * tcpConnectionLocalPort(3)/InetPortNumber/ASN_UNSIGNED/u_long(u_long)//l/a/w/e/R/d/H
114 */
115 u_long tcpConnectionLocalPort;
116
117 /*
118 * tcpConnectionRemAddressType(4)/InetAddressType/ASN_INTEGER/long(u_long)//l/a/w/E/r/d/h
119 */
120 u_long tcpConnectionRemAddressType;
121
122 /*
123 * tcpConnectionRemAddress(5)/InetAddress/ASN_OCTET_STR/char(char)//L/a/w/e/R/d/h
124 */
125 /** 128 - 5(other indexes) - oid length(10) = 112 */
126 /** but 20 = size of ipv6z address, longest supported type */
127 char tcpConnectionRemAddress[20];
128 size_t tcpConnectionRemAddress_len;
129
130 /*
131 * tcpConnectionRemPort(6)/InetPortNumber/ASN_UNSIGNED/u_long(u_long)//l/a/w/e/R/d/H
132 */
133 u_long tcpConnectionRemPort;
134
135
136 } tcpConnectionTable_mib_index;
137
138 /*
139 * TODO:121:r: | |-> Review tcpConnectionTable max index length.
140 * If you KNOW that your indexes will never exceed a certain
141 * length, update this macro to that length.
142 *
143 * BE VERY CAREFUL TO TAKE INTO ACCOUNT THE MAXIMUM
144 * POSSIBLE LENGHT FOR EVERY VARIABLE LENGTH INDEX!
145 * Guessing 128 - col/entry(2) - oid len(8)
146 */
147 #define MAX_tcpConnectionTable_IDX_LEN 44
148
149
150 /*
151 *********************************************************************
152 * TODO:130:o: |-> Review tcpConnectionTable Row request (rowreq) context.
153 * When your functions are called, you will be passed a
154 * tcpConnectionTable_rowreq_ctx pointer.
155 */
156 typedef struct tcpConnectionTable_rowreq_ctx_s {
157
158 /** this must be first for container compare to work */
159 netsnmp_index oid_idx;
160 oid oid_tmp[MAX_tcpConnectionTable_IDX_LEN];
161
162 tcpConnectionTable_mib_index tbl_idx;
163
164 tcpConnectionTable_data *data;
165 tcpConnectionTable_undo_data *undo;
166 unsigned int column_set_flags; /* flags for set columns */
167
168
169 /*
170 * flags per row. Currently, the first (lower) 8 bits are reserved
171 * for the user. See mfd.h for other flags.
172 */
173 u_int rowreq_flags;
174
175 /*
176 * TODO:131:o: | |-> Add useful data to tcpConnectionTable rowreq context.
177 */
178
179 /*
180 * storage for future expansion
181 */
182 netsnmp_data_list *tcpConnectionTable_data_list;
183
184 } tcpConnectionTable_rowreq_ctx;
185
186 typedef struct tcpConnectionTable_ref_rowreq_ctx_s {
187 tcpConnectionTable_rowreq_ctx *rowreq_ctx;
188 } tcpConnectionTable_ref_rowreq_ctx;
189
190 /*
191 *********************************************************************
192 * function prototypes
193 */
194 int
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210 tcpConnectionTable_pre_request(tcpConnectionTable_registration *
211 user_context);
212 int
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228 tcpConnectionTable_post_request(tcpConnectionTable_registration *
229 user_context, int rc);
230
231 int
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247 tcpConnectionTable_rowreq_ctx_init(tcpConnectionTable_rowreq_ctx *
248 rowreq_ctx,
249 void *user_init_ctx);
250 void
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266 tcpConnectionTable_rowreq_ctx_cleanup(tcpConnectionTable_rowreq_ctx
267 * rowreq_ctx);
268
269 tcpConnectionTable_data *tcpConnectionTable_allocate_data(void);
270 void tcpConnectionTable_release_data(tcpConnectionTable_data
271 * data);
272 tcpConnectionTable_rowreq_ctx
273 * tcpConnectionTable_row_find_by_mib_index
274 (tcpConnectionTable_mib_index * mib_idx);
275
276 extern const oid tcpConnectionTable_oid[];
277 extern const int tcpConnectionTable_oid_size;
278
279
280 #include "tcpConnectionTable_interface.h"
281 #include "tcpConnectionTable_data_access.h"
282 /*
283 *********************************************************************
284 * GET function declarations
285 */
286
287 /*
288 *********************************************************************
289 * GET Table declarations
290 */
291 /**********************************************************************
292 **********************************************************************
293 ***
294 *** Table tcpConnectionTable
295 ***
296 **********************************************************************
297 **********************************************************************/
298 /*
299 * TCP-MIB::tcpConnectionTable is subid 19 of tcp.
300 * Its status is Current.
301 * OID: .1.3.6.1.2.1.6.19, length: 8
302 */
303 /*
304 * indexes
305 */
306
307 int tcpConnectionState_get(tcpConnectionTable_rowreq_ctx *
308 rowreq_ctx,
309 u_long *
310 tcpConnectionState_val_ptr);
311 int tcpConnectionProcess_get(tcpConnectionTable_rowreq_ctx
312 * rowreq_ctx,
313 u_long *
314 tcpConnectionProcess_val_ptr);
315
316
317 int
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333 tcpConnectionTable_indexes_set_tbl_idx(tcpConnectionTable_mib_index
334 * tbl_idx,
335 u_long
336 tcpConnectionLocalAddressType_val,
337 const void
338 *tcpConnectionLocalAddress_val_ptr,
339 size_t
340 tcpConnectionLocalAddress_val_ptr_len,
341 u_long
342 tcpConnectionLocalPort_val,
343 u_long
344 tcpConnectionRemAddressType_val,
345 const void
346 *tcpConnectionRemAddress_val_ptr,
347 size_t
348 tcpConnectionRemAddress_val_ptr_len,
349 u_long
350 tcpConnectionRemPort_val);
351 int
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367 tcpConnectionTable_indexes_set(tcpConnectionTable_rowreq_ctx *
368 rowreq_ctx,
369 u_long
370 tcpConnectionLocalAddressType_val,
371 const void
372 *tcpConnectionLocalAddress_val_ptr,
373 size_t
374 tcpConnectionLocalAddress_val_ptr_len,
375 u_long tcpConnectionLocalPort_val,
376 u_long
377 tcpConnectionRemAddressType_val,
378 const void
379 *tcpConnectionRemAddress_val_ptr,
380 size_t
381 tcpConnectionRemAddress_val_ptr_len,
382 u_long tcpConnectionRemPort_val);
383
384
385
386 /*
387 *********************************************************************
388 * SET function declarations
389 */
390
391 /*
392 *********************************************************************
393 * SET Table declarations
394 */
395 /**********************************************************************
396 **********************************************************************
397 ***
398 *** Table tcpConnectionTable
399 ***
400 **********************************************************************
401 **********************************************************************/
402 /*
403 * TCP-MIB::tcpConnectionTable is subid 19 of tcp.
404 * Its status is Current.
405 * OID: .1.3.6.1.2.1.6.19, length: 8
406 */
407
408
409 int
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425 tcpConnectionTable_undo_setup(tcpConnectionTable_rowreq_ctx *
426 rowreq_ctx);
427 int
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443 tcpConnectionTable_undo_cleanup(tcpConnectionTable_rowreq_ctx *
444 rowreq_ctx);
445 int tcpConnectionTable_undo(tcpConnectionTable_rowreq_ctx *
446 rowreq_ctx);
447 int tcpConnectionTable_commit(tcpConnectionTable_rowreq_ctx
448 * rowreq_ctx);
449 int
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465 tcpConnectionTable_undo_commit(tcpConnectionTable_rowreq_ctx *
466 rowreq_ctx);
467
468
469 int
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485 tcpConnectionState_check_value(tcpConnectionTable_rowreq_ctx *
486 rowreq_ctx,
487 u_long tcpConnectionState_val);
488 int
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504 tcpConnectionState_undo_setup(tcpConnectionTable_rowreq_ctx *
505 rowreq_ctx);
506 int tcpConnectionState_set(tcpConnectionTable_rowreq_ctx *
507 rowreq_ctx,
508 u_long tcpConnectionState_val);
509 int tcpConnectionState_undo(tcpConnectionTable_rowreq_ctx *
510 rowreq_ctx);
511
512 int
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528 tcpConnectionProcess_check_value(tcpConnectionTable_rowreq_ctx *
529 rowreq_ctx,
530 u_long tcpConnectionProcess_val);
531 int
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547 tcpConnectionProcess_undo_setup(tcpConnectionTable_rowreq_ctx *
548 rowreq_ctx);
549 int tcpConnectionProcess_set(tcpConnectionTable_rowreq_ctx
550 * rowreq_ctx,
551 u_long
552 tcpConnectionProcess_val);
553 int tcpConnectionProcess_undo(tcpConnectionTable_rowreq_ctx
554 * rowreq_ctx);
555
556
557 int
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573 tcpConnectionTable_check_dependencies(tcpConnectionTable_rowreq_ctx
574 * ctx);
575
576
577 /*
578 * DUMMY markers, ignore
579 *
580 * TODO:099:x: *************************************************************
581 * TODO:199:x: *************************************************************
582 * TODO:299:x: *************************************************************
583 * TODO:399:x: *************************************************************
584 * TODO:499:x: *************************************************************
585 */
586
587 #ifdef __cplusplus
588 }
589 #endif
590 #endif /* TCPCONNECTIONTABLE_H */
591 /** @} */
592