Debian Codegraph @

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

raw
1 /*
2 * Note: this file originally auto-generated by mib2c using
3 * version : 14170 $ of $
4 *
5 * $Id:$
6 */
7 #ifndef IPIFSTATSTABLE_H
8 #define IPIFSTATSTABLE_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/ipstats.h>
21 #include <net-snmp/data_access/systemstats.h>
22
23 /*
24 * other required module components
25 */
26 /* *INDENT-OFF* */
27 config_require(ip-mib/ipIfStatsTable/ipIfStatsTable_interface);
28 config_require(ip-mib/ipIfStatsTable/ipIfStatsTable_data_access);
29 config_require(ip-mib/ipIfStatsTable/ipIfStatsTable_data_get);
30 /* *INDENT-ON* */
31
32 /*
33 * OID and column number definitions for ipIfStatsTable
34 */
35 #include "ipIfStatsTable_oids.h"
36
37 /*
38 * enum definions
39 */
40 #include "ipIfStatsTable_enums.h"
41
42 /*
43 *********************************************************************
44 * function declarations
45 */
46 void init_ipIfStatsTable(void);
47 void shutdown_ipIfStatsTable(void);
48
49 /*
50 *********************************************************************
51 * Table declarations
52 */
53 /**********************************************************************
54 **********************************************************************
55 ***
56 *** Table ipIfStatsTable
57 ***
58 **********************************************************************
59 **********************************************************************/
60 /*
61 * IP-MIB::ipIfStatsTable is subid 3 of ipTrafficStats.
62 * Its status is Current.
63 * OID: .1.3.6.1.2.1.4.31.3, length: 9
64 */
65 /*
66 *********************************************************************
67 * When you register your mib, you get to provide a generic
68 * pointer that will be passed back to you for most of the
69 * functions calls.
70 *
71 * TODO:100:r: Review all context structures
72 */
73 /*
74 * TODO:101:o: |-> Review ipIfStatsTable registration context.
75 */
76 typedef netsnmp_data_list ipIfStatsTable_registration;
77
78 /**********************************************************************/
79 /*
80 * TODO:110:r: |-> Review ipIfStatsTable data context structure.
81 * This structure is used to represent the data for ipIfStatsTable.
82 */
83 typedef netsnmp_systemstats_entry ipIfStatsTable_data;
84
85
86 /*
87 * TODO:120:r: |-> Review ipIfStatsTable mib index.
88 * This structure is used to represent the index for ipIfStatsTable.
89 */
90 typedef struct ipIfStatsTable_mib_index_s {
91
92 /*
93 * ipIfStatsIPVersion(1)/InetVersion/ASN_INTEGER/long(u_long)//l/a/w/E/r/d/h
94 */
95 u_long ipIfStatsIPVersion;
96
97 /*
98 * ipIfStatsIfIndex(2)/InterfaceIndex/ASN_INTEGER/long(long)//l/a/w/e/R/d/H
99 */
100 long ipIfStatsIfIndex;
101
102
103 } ipIfStatsTable_mib_index;
104
105 /*
106 * TODO:121:r: | |-> Review ipIfStatsTable max index length.
107 * If you KNOW that your indexes will never exceed a certain
108 * length, update this macro to that length.
109 */
110 #define MAX_ipIfStatsTable_IDX_LEN 2
111
112
113 /*
114 *********************************************************************
115 * TODO:130:o: |-> Review ipIfStatsTable Row request (rowreq) context.
116 * When your functions are called, you will be passed a
117 * ipIfStatsTable_rowreq_ctx pointer.
118 */
119 typedef struct ipIfStatsTable_rowreq_ctx_s {
120
121 /** this must be first for container compare to work */
122 netsnmp_index oid_idx;
123 oid oid_tmp[MAX_ipIfStatsTable_IDX_LEN];
124
125 ipIfStatsTable_mib_index tbl_idx;
126
127 ipIfStatsTable_data *data;
128
129 /*
130 * flags per row. Currently, the first (lower) 8 bits are reserved
131 * for the user. See mfd.h for other flags.
132 */
133 u_int rowreq_flags;
134
135 /*
136 * TODO:131:o: | |-> Add useful data to ipIfStatsTable rowreq context.
137 */
138 char known_missing;
139 uint32_t ipIfStatsDiscontinuityTime;
140 uint32_t ipIfStatsRefreshRate;
141
142 /*
143 * storage for future expansion
144 */
145 netsnmp_data_list *ipIfStatsTable_data_list;
146
147 } ipIfStatsTable_rowreq_ctx;
148
149 typedef struct ipIfStatsTable_ref_rowreq_ctx_s {
150 ipIfStatsTable_rowreq_ctx *rowreq_ctx;
151 } ipIfStatsTable_ref_rowreq_ctx;
152
153 /*
154 *********************************************************************
155 * function prototypes
156 */
157 int ipIfStatsTable_pre_request(ipIfStatsTable_registration
158 * user_context);
159 int ipIfStatsTable_post_request(ipIfStatsTable_registration
160 * user_context, int rc);
161
162 int
163 ipIfStatsTable_rowreq_ctx_init(ipIfStatsTable_rowreq_ctx *
164 rowreq_ctx, void *user_init_ctx);
165 void
166 ipIfStatsTable_rowreq_ctx_cleanup(ipIfStatsTable_rowreq_ctx *
167 rowreq_ctx);
168
169 ipIfStatsTable_data *ipIfStatsTable_allocate_data(void);
170 void ipIfStatsTable_release_data(ipIfStatsTable_data *
171 data);
172
173
174 ipIfStatsTable_rowreq_ctx
175 *ipIfStatsTable_row_find_by_mib_index(ipIfStatsTable_mib_index *
176 mib_idx);
177
178 extern const oid ipIfStatsTable_oid[];
179 extern const int ipIfStatsTable_oid_size;
180
181
182 #include "ipIfStatsTable_interface.h"
183 #include "ipIfStatsTable_data_access.h"
184 #include "ipIfStatsTable_data_get.h"
185
186 /*
187 * DUMMY markers, ignore
188 *
189 * TODO:099:x: *************************************************************
190 * TODO:199:x: *************************************************************
191 * TODO:299:x: *************************************************************
192 * TODO:399:x: *************************************************************
193 * TODO:499:x: *************************************************************
194 */
195
196 #ifdef __cplusplus
197 }
198 #endif
199 #endif /* IPIFSTATSTABLE_H */
200 /** @} */