1 /*
2  * Note: this file originally auto-generated by mib2c using
3  *       version : 14170 $ of $
4  *
5  * $Id:$
6  */
7 #ifndef ETHERSTATSTABLE_H
8 #define ETHERSTATSTABLE_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 
21     /*
22      * OID and column number definitions for etherStatsTable
23      */
24 #include "etherStatsTable_oids.h"
25 
26     /*
27      * enum definions
28      */
29 #include "etherStatsTable_enums.h"
30 
31     /*
32      *********************************************************************
33      * function declarations
34      */
35     void            init_etherStatsTable(void);
36     void            shutdown_etherStatsTable(void);
37 
38     /*
39      *********************************************************************
40      * Table declarations
41      */
42 /**********************************************************************
43  **********************************************************************
44  ***
45  *** Table etherStatsTable
46  ***
47  **********************************************************************
48  **********************************************************************/
49     /*
50      * RMON-MIB::etherStatsTable is subid 1 of statistics.
51      * Its status is Current.
52      * OID: .1.3.6.1.2.1.16.1.1, length: 9
53      */
54     /*
55      *********************************************************************
56      * When you register your mib, you get to provide a generic
57      * pointer that will be passed back to you for most of the
58      * functions calls.
59      *
60      * TODO:100:r: Review all context structures
61      */
62     /*
63      * TODO:101:o: |-> Review etherStatsTable registration context.
64      */
65     typedef netsnmp_data_list etherStatsTable_registration;
66 
67 /**********************************************************************/
68     /*
69      * TODO:110:r: |-> Review etherStatsTable data context structure.
70      * This structure is used to represent the data for etherStatsTable.
71      */
72     /*
73      * This structure contains storage for all the columns defined in the
74      * etherStatsTable.
75      */
76     typedef struct etherStatsTable_data_s {
77 
78         /*
79          * etherStatsDataSource(2)/OBJECTID/ASN_OBJECT_ID/oid(oid)//L/A/W/e/r/d/h
80          */
81         oid             etherStatsDataSource[128];
82         size_t          etherStatsDataSource_len;       /* # of oid elements, not bytes */
83 
84         /*
85          * etherStatsDropEvents(3)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
86          */
87         u_long          etherStatsDropEvents;
88 
89         /*
90          * etherStatsOctets(4)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
91          */
92         u_long          etherStatsOctets;
93 
94         /*
95          * etherStatsPkts(5)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
96          */
97         u_long          etherStatsPkts;
98 
99         /*
100          * etherStatsBroadcastPkts(6)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
101          */
102         u_long          etherStatsBroadcastPkts;
103 
104         /*
105          * etherStatsMulticastPkts(7)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
106          */
107         u_long          etherStatsMulticastPkts;
108 
109         /*
110          * etherStatsCRCAlignErrors(8)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
111          */
112         u_long          etherStatsCRCAlignErrors;
113 
114         /*
115          * etherStatsUndersizePkts(9)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
116          */
117         u_long          etherStatsUndersizePkts;
118 
119         /*
120          * etherStatsOversizePkts(10)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
121          */
122         u_long          etherStatsOversizePkts;
123 
124         /*
125          * etherStatsFragments(11)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
126          */
127         u_long          etherStatsFragments;
128 
129         /*
130          * etherStatsJabbers(12)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
131          */
132         u_long          etherStatsJabbers;
133 
134         /*
135          * etherStatsCollisions(13)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
136          */
137         u_long          etherStatsCollisions;
138 
139         /*
140          * etherStatsPkts64Octets(14)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
141          */
142         u_long          etherStatsPkts64Octets;
143 
144         /*
145          * etherStatsPkts65to127Octets(15)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
146          */
147         u_long          etherStatsPkts65to127Octets;
148 
149         /*
150          * etherStatsPkts128to255Octets(16)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
151          */
152         u_long          etherStatsPkts128to255Octets;
153 
154         /*
155          * etherStatsPkts256to511Octets(17)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
156          */
157         u_long          etherStatsPkts256to511Octets;
158 
159         /*
160          * etherStatsPkts512to1023Octets(18)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
161          */
162         u_long          etherStatsPkts512to1023Octets;
163 
164         /*
165          * etherStatsPkts1024to1518Octets(19)/COUNTER/ASN_COUNTER/u_long(u_long)//l/A/w/e/r/d/h
166          */
167         u_long          etherStatsPkts1024to1518Octets;
168 
169         /*
170          * etherStatsOwner(20)/OwnerString/ASN_OCTET_STR/char(char)//L/A/W/e/R/d/h
171          */
172         char            etherStatsOwner[127];
173         size_t          etherStatsOwner_len;    /* # of char elements, not bytes */
174 
175         /*
176          * etherStatsStatus(21)/EntryStatus/ASN_INTEGER/long(u_long)//l/A/W/E/r/d/h
177          */
178         u_long          etherStatsStatus;
179 
180     } etherStatsTable_data;
181 
182 
183     /*
184      *********************************************************************
185      * TODO:115:o: |-> Review etherStatsTable undo context.
186      * We're just going to use the same data structure for our
187      * undo_context. If you want to do something more efficent,
188      * define your typedef here.
189      */
190     typedef etherStatsTable_data etherStatsTable_undo_data;
191 
192     /*
193      * TODO:120:r: |-> Review etherStatsTable mib index.
194      * This structure is used to represent the index for etherStatsTable.
195      */
196     typedef struct etherStatsTable_mib_index_s {
197 
198         /*
199          * etherStatsIndex(1)/INTEGER32/ASN_INTEGER/long(long)//l/A/w/e/R/d/h
200          */
201         long            etherStatsIndex;
202 
203 
204     } etherStatsTable_mib_index;
205 
206     /*
207      * TODO:121:r: |   |-> Review etherStatsTable max index length.
208      * If you KNOW that your indexes will never exceed a certain
209      * length, update this macro to that length.
210      */
211 #define MAX_etherStatsTable_IDX_LEN     1
212 
213 
214     /*
215      *********************************************************************
216      * TODO:130:o: |-> Review etherStatsTable Row request (rowreq) context.
217      * When your functions are called, you will be passed a
218      * etherStatsTable_rowreq_ctx pointer.
219      */
220     typedef struct etherStatsTable_rowreq_ctx_s {
221 
222     /** this must be first for container compare to work */
223         netsnmp_index   oid_idx;
224         oid             oid_tmp[MAX_etherStatsTable_IDX_LEN];
225 
226         etherStatsTable_mib_index tbl_idx;
227 
228         etherStatsTable_data data;
229         unsigned int    column_exists_flags;    /* flags for existence */
230         etherStatsTable_undo_data *undo;
231         unsigned int    column_set_flags;       /* flags for set columns */
232 
233 
234         /*
235          * flags per row. Currently, the first (lower) 8 bits are reserved
236          * for the user. See mfd.h for other flags.
237          */
238         u_int           rowreq_flags;
239 
240         /*
241          * TODO:131:o: |   |-> Add useful data to etherStatsTable rowreq context.
242          */
243 
244         /*
245          * storage for future expansion
246          */
247         netsnmp_data_list *etherStatsTable_data_list;
248 
249     } etherStatsTable_rowreq_ctx;
250 
251     typedef struct etherStatsTable_ref_rowreq_ctx_s {
252         etherStatsTable_rowreq_ctx *rowreq_ctx;
253     } etherStatsTable_ref_rowreq_ctx;
254 
255     /*
256      *********************************************************************
257      * function prototypes
258      */
259     int
260         etherStatsTable_pre_request(etherStatsTable_registration *
261                                     user_context);
262     int
263         etherStatsTable_post_request(etherStatsTable_registration *
264                                      user_context, int rc);
265 
266     int
267         etherStatsTable_rowreq_ctx_init(etherStatsTable_rowreq_ctx *
268                                         rowreq_ctx, void *user_init_ctx);
269     void
270         etherStatsTable_rowreq_ctx_cleanup(etherStatsTable_rowreq_ctx *
271                                            rowreq_ctx);
272 
273     int             etherStatsTable_commit(etherStatsTable_rowreq_ctx *
274                                            rowreq_ctx);
275 
276     etherStatsTable_rowreq_ctx
277         *etherStatsTable_row_find_by_mib_index(etherStatsTable_mib_index *
278                                                mib_idx);
279 
280     extern oid      etherStatsTable_oid[];
281     extern int      etherStatsTable_oid_size;
282 
283 
284 #include "etherStatsTable_interface.h"
285 #include "etherStatsTable_data_access.h"
286 #include "etherStatsTable_data_get.h"
287 #include "etherStatsTable_data_set.h"
288 
289     /*
290      * DUMMY markers, ignore
291      *
292      * TODO:099:x: *************************************************************
293      * TODO:199:x: *************************************************************
294      * TODO:299:x: *************************************************************
295      * TODO:399:x: *************************************************************
296      * TODO:499:x: *************************************************************
297      */
298 
299 #ifdef __cplusplus
300 }
301 #endif
302 #endif                          /* ETHERSTATSTABLE_H */
303 /** @} */
304