1 | /* |
---|
2 | * Note: this file originally auto-generated by mib2c using |
---|
3 | * version : 14170 $ of $ |
---|
4 | * |
---|
5 | * $Id:$ |
---|
6 | */ |
---|
7 | /** \page MFD helper for syn3StatisticsTable |
---|
8 | * |
---|
9 | * \section intro Introduction |
---|
10 | * Introductory text. |
---|
11 | * |
---|
12 | */ |
---|
13 | /* standard Net-SNMP includes */ |
---|
14 | #include <net-snmp/net-snmp-config.h> |
---|
15 | #include <net-snmp/net-snmp-includes.h> |
---|
16 | #include <net-snmp/agent/net-snmp-agent-includes.h> |
---|
17 | |
---|
18 | /* include our parent header */ |
---|
19 | #include "syn3StatisticsTable.h" |
---|
20 | |
---|
21 | #include <net-snmp/agent/mib_modules.h> |
---|
22 | |
---|
23 | #include "syn3StatisticsTable_interface.h" |
---|
24 | |
---|
25 | oid syn3StatisticsTable_oid[] = { SYN3STATISTICSTABLE_OID }; |
---|
26 | int syn3StatisticsTable_oid_size = OID_LENGTH(syn3StatisticsTable_oid); |
---|
27 | |
---|
28 | syn3StatisticsTable_registration syn3StatisticsTable_user_context; |
---|
29 | |
---|
30 | void initialize_table_syn3StatisticsTable(void); |
---|
31 | void shutdown_table_syn3StatisticsTable(void); |
---|
32 | |
---|
33 | |
---|
34 | /** |
---|
35 | * Initializes the syn3StatisticsTable module |
---|
36 | */ |
---|
37 | void |
---|
38 | init_syn3StatisticsTable(void) |
---|
39 | { |
---|
40 | DEBUGMSGTL(("verbose:syn3StatisticsTable:init_syn3StatisticsTable","called\n")); |
---|
41 | |
---|
42 | /* |
---|
43 | * TODO:300:o: Perform syn3StatisticsTable one-time module initialization. |
---|
44 | */ |
---|
45 | |
---|
46 | /* |
---|
47 | * here we initialize all the tables we're planning on supporting |
---|
48 | */ |
---|
49 | if (should_init("syn3StatisticsTable")) |
---|
50 | initialize_table_syn3StatisticsTable(); |
---|
51 | |
---|
52 | } /* init_syn3StatisticsTable */ |
---|
53 | |
---|
54 | /** |
---|
55 | * Shut-down the syn3StatisticsTable module (agent is exiting) |
---|
56 | */ |
---|
57 | void |
---|
58 | shutdown_syn3StatisticsTable(void) |
---|
59 | { |
---|
60 | if (should_init("syn3StatisticsTable")) |
---|
61 | shutdown_table_syn3StatisticsTable(); |
---|
62 | |
---|
63 | } |
---|
64 | |
---|
65 | /** |
---|
66 | * Initialize the table syn3StatisticsTable |
---|
67 | * (Define its contents and how it's structured) |
---|
68 | */ |
---|
69 | void |
---|
70 | initialize_table_syn3StatisticsTable(void) |
---|
71 | { |
---|
72 | syn3StatisticsTable_registration * user_context; |
---|
73 | u_long flags; |
---|
74 | |
---|
75 | DEBUGMSGTL(("verbose:syn3StatisticsTable:initialize_table_syn3StatisticsTable","called\n")); |
---|
76 | |
---|
77 | /* |
---|
78 | * TODO:301:o: Perform syn3StatisticsTable one-time table initialization. |
---|
79 | */ |
---|
80 | |
---|
81 | /* |
---|
82 | * TODO:302:o: |->Initialize syn3StatisticsTable user context |
---|
83 | * if you'd like to pass in a pointer to some data for this |
---|
84 | * table, allocate or set it up here. |
---|
85 | */ |
---|
86 | /* |
---|
87 | * a netsnmp_data_list is a simple way to store void pointers. A simple |
---|
88 | * string token is used to add, find or remove pointers. |
---|
89 | */ |
---|
90 | user_context = netsnmp_create_data_list("syn3StatisticsTable", NULL, NULL); |
---|
91 | |
---|
92 | /* |
---|
93 | * No support for any flags yet, but in the future you would |
---|
94 | * set any flags here. |
---|
95 | */ |
---|
96 | flags = 0; |
---|
97 | |
---|
98 | /* |
---|
99 | * call interface initialization code |
---|
100 | */ |
---|
101 | _syn3StatisticsTable_initialize_interface(user_context, flags); |
---|
102 | } /* initialize_table_syn3StatisticsTable */ |
---|
103 | |
---|
104 | /** |
---|
105 | * Shutdown the table syn3StatisticsTable |
---|
106 | */ |
---|
107 | void |
---|
108 | shutdown_table_syn3StatisticsTable(void) |
---|
109 | { |
---|
110 | /* |
---|
111 | * call interface shutdown code |
---|
112 | */ |
---|
113 | _syn3StatisticsTable_shutdown_interface(&syn3StatisticsTable_user_context); |
---|
114 | } |
---|
115 | |
---|
116 | /** |
---|
117 | * extra context initialization (eg default values) |
---|
118 | * |
---|
119 | * @param rowreq_ctx : row request context |
---|
120 | * @param user_init_ctx : void pointer for user (parameter to rowreq_ctx_allocate) |
---|
121 | * |
---|
122 | * @retval MFD_SUCCESS : no errors |
---|
123 | * @retval MFD_ERROR : error (context allocate will fail) |
---|
124 | */ |
---|
125 | int |
---|
126 | syn3StatisticsTable_rowreq_ctx_init(syn3StatisticsTable_rowreq_ctx *rowreq_ctx, |
---|
127 | void *user_init_ctx) |
---|
128 | { |
---|
129 | DEBUGMSGTL(("verbose:syn3StatisticsTable:syn3StatisticsTable_rowreq_ctx_init","called\n")); |
---|
130 | |
---|
131 | netsnmp_assert(NULL != rowreq_ctx); |
---|
132 | |
---|
133 | /* |
---|
134 | * TODO:210:o: |-> Perform extra syn3StatisticsTable rowreq initialization. (eg DEFVALS) |
---|
135 | */ |
---|
136 | |
---|
137 | return MFD_SUCCESS; |
---|
138 | } /* syn3StatisticsTable_rowreq_ctx_init */ |
---|
139 | |
---|
140 | /** |
---|
141 | * extra context cleanup |
---|
142 | * |
---|
143 | */ |
---|
144 | void syn3StatisticsTable_rowreq_ctx_cleanup(syn3StatisticsTable_rowreq_ctx *rowreq_ctx) |
---|
145 | { |
---|
146 | DEBUGMSGTL(("verbose:syn3StatisticsTable:syn3StatisticsTable_rowreq_ctx_cleanup","called\n")); |
---|
147 | |
---|
148 | netsnmp_assert(NULL != rowreq_ctx); |
---|
149 | |
---|
150 | /* |
---|
151 | * TODO:211:o: |-> Perform extra syn3StatisticsTable rowreq cleanup. |
---|
152 | */ |
---|
153 | } /* syn3StatisticsTable_rowreq_ctx_cleanup */ |
---|
154 | |
---|
155 | /** |
---|
156 | * pre-request callback |
---|
157 | * |
---|
158 | * |
---|
159 | * @retval MFD_SUCCESS : success. |
---|
160 | * @retval MFD_ERROR : other error |
---|
161 | */ |
---|
162 | int |
---|
163 | syn3StatisticsTable_pre_request(syn3StatisticsTable_registration * user_context) |
---|
164 | { |
---|
165 | DEBUGMSGTL(("verbose:syn3StatisticsTable:syn3StatisticsTable_pre_request","called\n")); |
---|
166 | |
---|
167 | /* |
---|
168 | * TODO:510:o: Perform syn3StatisticsTable pre-request actions. |
---|
169 | */ |
---|
170 | |
---|
171 | return MFD_SUCCESS; |
---|
172 | } /* syn3StatisticsTable_pre_request */ |
---|
173 | |
---|
174 | /** |
---|
175 | * post-request callback |
---|
176 | * |
---|
177 | * Note: |
---|
178 | * New rows have been inserted into the container, and |
---|
179 | * deleted rows have been removed from the container and |
---|
180 | * released. |
---|
181 | * |
---|
182 | * @param user_context |
---|
183 | * @param rc : MFD_SUCCESS if all requests succeeded |
---|
184 | * |
---|
185 | * @retval MFD_SUCCESS : success. |
---|
186 | * @retval MFD_ERROR : other error (ignored) |
---|
187 | */ |
---|
188 | int |
---|
189 | syn3StatisticsTable_post_request(syn3StatisticsTable_registration * user_context, int rc) |
---|
190 | { |
---|
191 | DEBUGMSGTL(("verbose:syn3StatisticsTable:syn3StatisticsTable_post_request","called\n")); |
---|
192 | |
---|
193 | /* |
---|
194 | * TODO:511:o: Perform syn3StatisticsTable post-request actions. |
---|
195 | */ |
---|
196 | |
---|
197 | return MFD_SUCCESS; |
---|
198 | } /* syn3StatisticsTable_post_request */ |
---|
199 | |
---|
200 | |
---|
201 | /** @{ */ |
---|