[packages] net-snmp: Refresh patches
[openwrt/svn-archive/archive.git] / libs / net-snmp / patches / 750-ieee802dot11.patch
1 --- /dev/null
2 +++ b/agent/mibgroup/ieee802dot11.c
3 @@ -0,0 +1,4915 @@
4 +/****************************************************************************
5 +* *
6 +* File Name: ieee802dot11.c *
7 +* Used By: *
8 +* *
9 +* Operating System: *
10 +* Purpose: *
11 +* *
12 +* Comments: *
13 +* *
14 +* Author: Larry Simmons *
15 +* lsimmons@avantcom.com *
16 +* www.avantcom.com *
17 +* *
18 +* Creation Date: 09/02/03 *
19 +* *
20 +* Ver Date Inits Modification *
21 +* ----- -------- ----- ------------ *
22 +* 0.0.1 09/02/03 LRS created *
23 +* 0.0.2 09/24/03 LRS wouldn't build after fresh ./configure *
24 +****************************************************************************/
25 +/****************************************************************************
26 +* Includes *
27 +****************************************************************************/
28 +#include <net-snmp/net-snmp-config.h>
29 +#include <net-snmp/net-snmp-includes.h>
30 +#include <net-snmp/agent/net-snmp-agent-includes.h>
31 +#include "ieee802dot11.h"
32 +#include "iwlib.h"
33 +
34 +/****************************************************************************
35 +* Defines *
36 +****************************************************************************/
37 +#define DISPLAYWIEXT // display wireless ext info
38 +#define TABLE_SIZE 1
39 +//#define MINLOADFREQ 15 // min reload frequency in seconds
40 +#define MINLOADFREQ 5 // min reload frequency in seconds // for testing
41 +#define PROC_NET_DEV "/proc/net/dev"
42 +#define PROC_NET_WIRELESS "/proc/net/wireless"
43 +
44 +#ifndef UCHAR
45 + typedef unsigned char UCHAR;
46 +#endif
47 +
48 +/****************************************************************************
49 +* Private Functions *
50 +****************************************************************************/
51 +static void loadTables();
52 +static void loadWiExt ( int, char *, struct wireless_info * );
53 +static void load80211Structs ( int, char *, struct wireless_info * );
54 +static void initStructs();
55 +
56 +// Wireless Extensions Specific Functions
57 +static void loadWiExtTo80211Structs ( int, char *, struct wireless_info * );
58 +static void displayWiExt ( struct wireless_info );
59 +
60 +// Linked List Functions
61 +static void addList ( char *, char *, int );
62 +static void initLists(); // initialize all the linked lists
63 +static void flushLists(); // flush all the linked lists
64 +static void flushList ( char * ); // flush a single linked list
65 +
66 +// Utility Functions
67 +static int openSocket ( void );
68 +static int mWatt2dbm ( int );
69 +static char *htob ( char * );
70 +static int hasChanged ( char *, int );
71 +
72 +/****************************************************************************
73 +* Private Variables *
74 +****************************************************************************/
75 +static unsigned long lastLoad = 0; // ET in secs at last table load
76 +
77 +static struct avNode *lastNode, *newNode, *np;
78 +
79 +/****************************************************************************
80 +* External Functions *
81 +****************************************************************************/
82 +
83 +/****************************************************************************
84 +* ieee802dot11_variables_oid: *
85 +* this is the top level oid that we want to register under. This *
86 +* is essentially a prefix, with the suffix appearing in the *
87 +* variable below. *
88 +****************************************************************************/
89 +oid ieee802dot11_variables_oid[] = { 1,2,840,10036 };
90 +
91 +/****************************************************************************
92 +* variable7 ieee802dot11_variables: *
93 +* this variable defines function callbacks and type return information *
94 +* for the ieee802dot11 mib section *
95 +****************************************************************************/
96 +struct variable7 ieee802dot11_variables[] = {
97 +/* magic number , variable type , ro/rw , callback fn , L, oidsuffix */
98 +#define DOT11STATIONID 3
99 + { DOT11STATIONID , ASN_OCTET_STR , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,1 } },
100 +#define DOT11MEDIUMOCCUPANCYLIMIT 4
101 + { DOT11MEDIUMOCCUPANCYLIMIT, ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,2 } },
102 +#define DOT11CFPOLLABLE 5
103 + { DOT11CFPOLLABLE , ASN_INTEGER , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,3 } },
104 +#define DOT11CFPPERIOD 6
105 + { DOT11CFPPERIOD , ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,4 } },
106 +#define DOT11CFPMAXDURATION 7
107 + { DOT11CFPMAXDURATION , ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,5 } },
108 +#define DOT11AUTHENTICATIONRESPONSETIMEOUT 8
109 + { DOT11AUTHENTICATIONRESPONSETIMEOUT, ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,6 } },
110 +#define DOT11PRIVACYOPTIONIMPLEMENTED 9
111 + { DOT11PRIVACYOPTIONIMPLEMENTED, ASN_INTEGER , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,7 } },
112 +#define DOT11POWERMANAGEMENTMODE 10
113 + { DOT11POWERMANAGEMENTMODE, ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,8 } },
114 +#define DOT11DESIREDSSID 11
115 + { DOT11DESIREDSSID , ASN_OCTET_STR , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,9 } },
116 +#define DOT11DESIREDBSSTYPE 12
117 + { DOT11DESIREDBSSTYPE , ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,10 } },
118 +#define DOT11OPERATIONALRATESET 13
119 + { DOT11OPERATIONALRATESET, ASN_OCTET_STR , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,11 } },
120 +#define DOT11BEACONPERIOD 14
121 + { DOT11BEACONPERIOD , ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,12 } },
122 +#define DOT11DTIMPERIOD 15
123 + { DOT11DTIMPERIOD , ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,13 } },
124 +#define DOT11ASSOCIATIONRESPONSETIMEOUT 16
125 + { DOT11ASSOCIATIONRESPONSETIMEOUT, ASN_INTEGER , RWRITE, var_dot11StationConfigTable, 4, { 1,1,1,14 } },
126 +#define DOT11DISASSOCIATEREASON 17
127 + { DOT11DISASSOCIATEREASON, ASN_INTEGER , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,15 } },
128 +#define DOT11DISASSOCIATESTATION 18
129 + { DOT11DISASSOCIATESTATION, ASN_OCTET_STR , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,16 } },
130 +#define DOT11DEAUTHENTICATEREASON 19
131 + { DOT11DEAUTHENTICATEREASON, ASN_INTEGER , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,17 } },
132 +#define DOT11DEAUTHENTICATESTATION 20
133 + { DOT11DEAUTHENTICATESTATION, ASN_OCTET_STR , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,18 } },
134 +#define DOT11AUTHENTICATEFAILSTATUS 21
135 + { DOT11AUTHENTICATEFAILSTATUS, ASN_INTEGER , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,19 } },
136 +#define DOT11AUTHENTICATEFAILSTATION 22
137 + { DOT11AUTHENTICATEFAILSTATION, ASN_OCTET_STR , RONLY , var_dot11StationConfigTable, 4, { 1,1,1,20 } },
138 +
139 +#define DOT11AUTHENTICATIONALGORITHM 26
140 + { DOT11AUTHENTICATIONALGORITHM, ASN_INTEGER , RONLY , var_dot11AuthenticationAlgorithmsTable, 4, { 1,2,1,2 } },
141 +#define DOT11AUTHENTICATIONALGORITHMSENABLE 27
142 + { DOT11AUTHENTICATIONALGORITHMSENABLE, ASN_INTEGER , RWRITE, var_dot11AuthenticationAlgorithmsTable, 4, { 1,2,1,3 } },
143 +
144 +#define DOT11WEPDEFAULTKEYVALUE 31
145 + { DOT11WEPDEFAULTKEYVALUE, ASN_OCTET_STR , RWRITE, var_dot11WEPDefaultKeysTable, 4, { 1,3,1,2 } },
146 +
147 +#define DOT11WEPKEYMAPPINGADDRESS 35
148 + { DOT11WEPKEYMAPPINGADDRESS, ASN_OCTET_STR , RWRITE, var_dot11WEPKeyMappingsTable, 4, { 1,4,1,2 } },
149 +#define DOT11WEPKEYMAPPINGWEPON 36
150 + { DOT11WEPKEYMAPPINGWEPON, ASN_INTEGER , RWRITE, var_dot11WEPKeyMappingsTable, 4, { 1,4,1,3 } },
151 +#define DOT11WEPKEYMAPPINGVALUE 37
152 + { DOT11WEPKEYMAPPINGVALUE, ASN_OCTET_STR , RWRITE, var_dot11WEPKeyMappingsTable, 4, { 1,4,1,4 } },
153 +#define DOT11WEPKEYMAPPINGSTATUS 38
154 + { DOT11WEPKEYMAPPINGSTATUS, ASN_INTEGER , RWRITE, var_dot11WEPKeyMappingsTable, 4, { 1,4,1,5 } },
155 +
156 +#define DOT11PRIVACYINVOKED 41
157 + { DOT11PRIVACYINVOKED , ASN_INTEGER , RWRITE, var_dot11PrivacyTable, 4, { 1,5,1,1 } },
158 +#define DOT11WEPDEFAULTKEYID 42
159 + { DOT11WEPDEFAULTKEYID, ASN_INTEGER , RWRITE, var_dot11PrivacyTable, 4, { 1,5,1,2 } },
160 +#define DOT11WEPKEYMAPPINGLENGTH 43
161 + { DOT11WEPKEYMAPPINGLENGTH, ASN_INTEGER , RWRITE, var_dot11PrivacyTable, 4, { 1,5,1,3 } },
162 +#define DOT11EXCLUDEUNENCRYPTED 44
163 + { DOT11EXCLUDEUNENCRYPTED, ASN_INTEGER , RWRITE, var_dot11PrivacyTable, 4, { 1,5,1,4 } },
164 +#define DOT11WEPICVERRORCOUNT 45
165 + { DOT11WEPICVERRORCOUNT, ASN_COUNTER , RONLY , var_dot11PrivacyTable, 4, { 1,5,1,5 } },
166 +#define DOT11WEPEXCLUDEDCOUNT 46
167 + { DOT11WEPEXCLUDEDCOUNT, ASN_COUNTER , RONLY , var_dot11PrivacyTable, 4, { 1,5,1,6 } },
168 +
169 +#define DOT11MACADDRESS 49
170 + { DOT11MACADDRESS , ASN_OCTET_STR , RONLY , var_dot11OperationTable, 4, { 2,1,1,1 } },
171 +#define DOT11RTSTHRESHOLD 50
172 + { DOT11RTSTHRESHOLD , ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,2 } },
173 +#define DOT11SHORTRETRYLIMIT 51
174 + { DOT11SHORTRETRYLIMIT, ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,3 } },
175 +#define DOT11LONGRETRYLIMIT 52
176 + { DOT11LONGRETRYLIMIT , ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,4 } },
177 +#define DOT11FRAGMENTATIONTHRESHOLD 53
178 + { DOT11FRAGMENTATIONTHRESHOLD, ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,5 } },
179 +#define DOT11MAXTRANSMITMSDULIFETIME 54
180 + { DOT11MAXTRANSMITMSDULIFETIME, ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,6 } },
181 +#define DOT11MAXRECEIVELIFETIME 55
182 + { DOT11MAXRECEIVELIFETIME, ASN_INTEGER , RWRITE, var_dot11OperationTable, 4, { 2,1,1,7 } },
183 +#define DOT11MANUFACTURERID 56
184 + { DOT11MANUFACTURERID , ASN_OCTET_STR , RONLY , var_dot11OperationTable, 4, { 2,1,1,8 } },
185 +#define DOT11PRODUCTID 57
186 + { DOT11PRODUCTID , ASN_OCTET_STR , RONLY , var_dot11OperationTable, 4, { 2,1,1,9 } },
187 +
188 +#define DOT11TRANSMITTEDFRAGMENTCOUNT 60
189 + { DOT11TRANSMITTEDFRAGMENTCOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,1 } },
190 +#define DOT11MULTICASTTRANSMITTEDFRAMECOUNT 61
191 + { DOT11MULTICASTTRANSMITTEDFRAMECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,2 } },
192 +#define DOT11FAILEDCOUNT 62
193 + { DOT11FAILEDCOUNT , ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,3 } },
194 +#define DOT11RETRYCOUNT 63
195 + { DOT11RETRYCOUNT , ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,4 } },
196 +#define DOT11MULTIPLERETRYCOUNT 64
197 + { DOT11MULTIPLERETRYCOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,5 } },
198 +#define DOT11FRAMEDUPLICATECOUNT 65
199 + { DOT11FRAMEDUPLICATECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,6 } },
200 +#define DOT11RTSSUCCESSCOUNT 66
201 + { DOT11RTSSUCCESSCOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,7 } },
202 +#define DOT11RTSFAILURECOUNT 67
203 + { DOT11RTSFAILURECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,8 } },
204 +#define DOT11ACKFAILURECOUNT 68
205 + { DOT11ACKFAILURECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,9 } },
206 +#define DOT11RECEIVEDFRAGMENTCOUNT 69
207 + { DOT11RECEIVEDFRAGMENTCOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,10 } },
208 +#define DOT11MULTICASTRECEIVEDFRAMECOUNT 70
209 + { DOT11MULTICASTRECEIVEDFRAMECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,11 } },
210 +#define DOT11FCSERRORCOUNT 71
211 + { DOT11FCSERRORCOUNT , ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,12 } },
212 +#define DOT11TRANSMITTEDFRAMECOUNT 72
213 + { DOT11TRANSMITTEDFRAMECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,13 } },
214 +#define DOT11WEPUNDECRYPTABLECOUNT 73
215 + { DOT11WEPUNDECRYPTABLECOUNT, ASN_COUNTER , RONLY , var_dot11CountersTable, 4, { 2,2,1,14 } },
216 +
217 +#define DOT11ADDRESS 77
218 + { DOT11ADDRESS , ASN_OCTET_STR , RWRITE, var_dot11GroupAddressesTable, 4, { 2,3,1,2 } },
219 +#define DOT11GROUPADDRESSESSTATUS 78
220 + { DOT11GROUPADDRESSESSTATUS, ASN_INTEGER , RWRITE, var_dot11GroupAddressesTable, 4, { 2,3,1,3 } },
221 +
222 +#define DOT11RESOURCETYPEIDNAME 79
223 + { DOT11RESOURCETYPEIDNAME, ASN_OCTET_STR , RONLY , var_ieee802dot11, 3, { 3,1,1 } },
224 +#define DOT11MANUFACTUREROUI 82
225 + { DOT11MANUFACTUREROUI, ASN_OCTET_STR , RONLY , var_dot11ResourceInfoTable, 5, { 3,1,2,1,1 } },
226 +#define DOT11MANUFACTURERNAME 83
227 + { DOT11MANUFACTURERNAME, ASN_OCTET_STR , RONLY , var_dot11ResourceInfoTable, 5, { 3,1,2,1,2 } },
228 +#define DOT11MANUFACTURERPRODUCTNAME 84
229 + { DOT11MANUFACTURERPRODUCTNAME, ASN_OCTET_STR , RONLY , var_dot11ResourceInfoTable, 5, { 3,1,2,1,3 } },
230 +#define DOT11MANUFACTURERPRODUCTVERSION 85
231 + { DOT11MANUFACTURERPRODUCTVERSION, ASN_OCTET_STR , RONLY , var_dot11ResourceInfoTable, 5, { 3,1,2,1,4 } },
232 +
233 +#define DOT11PHYTYPE 88
234 + { DOT11PHYTYPE , ASN_INTEGER , RONLY , var_dot11PhyOperationTable, 4, { 4,1,1,1 } },
235 +#define DOT11CURRENTREGDOMAIN 89
236 + { DOT11CURRENTREGDOMAIN, ASN_INTEGER , RWRITE, var_dot11PhyOperationTable, 4, { 4,1,1,2 } },
237 +#define DOT11TEMPTYPE 90
238 + { DOT11TEMPTYPE , ASN_INTEGER , RONLY , var_dot11PhyOperationTable, 4, { 4,1,1,3 } },
239 +#define DOT11CURRENTTXANTENNA 93
240 + { DOT11CURRENTTXANTENNA, ASN_INTEGER , RWRITE, var_dot11PhyAntennaTable, 4, { 4,2,1,1 } },
241 +#define DOT11DIVERSITYSUPPORT 94
242 + { DOT11DIVERSITYSUPPORT, ASN_INTEGER , RONLY , var_dot11PhyAntennaTable, 4, { 4,2,1,2 } },
243 +#define DOT11CURRENTRXANTENNA 95
244 + { DOT11CURRENTRXANTENNA, ASN_INTEGER , RWRITE, var_dot11PhyAntennaTable, 4, { 4,2,1,3 } },
245 +#define DOT11NUMBERSUPPORTEDPOWERLEVELS 98
246 + { DOT11NUMBERSUPPORTEDPOWERLEVELS, ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,1 } },
247 +#define DOT11TXPOWERLEVEL1 99
248 + { DOT11TXPOWERLEVEL1 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,2 } },
249 +#define DOT11TXPOWERLEVEL2 100
250 + { DOT11TXPOWERLEVEL2 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,3 } },
251 +#define DOT11TXPOWERLEVEL3 101
252 + { DOT11TXPOWERLEVEL3 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,4 } },
253 +#define DOT11TXPOWERLEVEL4 102
254 + { DOT11TXPOWERLEVEL4 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,5 } },
255 +#define DOT11TXPOWERLEVEL5 103
256 + { DOT11TXPOWERLEVEL5 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,6 } },
257 +#define DOT11TXPOWERLEVEL6 104
258 + { DOT11TXPOWERLEVEL6 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,7 } },
259 +#define DOT11TXPOWERLEVEL7 105
260 + { DOT11TXPOWERLEVEL7 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,8 } },
261 +#define DOT11TXPOWERLEVEL8 106
262 + { DOT11TXPOWERLEVEL8 , ASN_INTEGER , RONLY , var_dot11PhyTxPowerTable, 4, { 4,3,1,9 } },
263 +#define DOT11CURRENTTXPOWERLEVEL 107
264 + { DOT11CURRENTTXPOWERLEVEL, ASN_INTEGER , RWRITE, var_dot11PhyTxPowerTable, 4, { 4,3,1,10 } },
265 +
266 +#define DOT11HOPTIME 110
267 + { DOT11HOPTIME , ASN_INTEGER , RONLY , var_dot11PhyFHSSTable, 4, { 4,4,1,1 } },
268 +#define DOT11CURRENTCHANNELNUMBER 111
269 + { DOT11CURRENTCHANNELNUMBER, ASN_INTEGER , RWRITE, var_dot11PhyFHSSTable, 4, { 4,4,1,2 } },
270 +#define DOT11MAXDWELLTIME 112
271 + { DOT11MAXDWELLTIME , ASN_INTEGER , RONLY , var_dot11PhyFHSSTable, 4, { 4,4,1,3 } },
272 +#define DOT11CURRENTDWELLTIME 113
273 + { DOT11CURRENTDWELLTIME, ASN_INTEGER , RWRITE, var_dot11PhyFHSSTable, 4, { 4,4,1,4 } },
274 +#define DOT11CURRENTSET 114
275 + { DOT11CURRENTSET , ASN_INTEGER , RWRITE, var_dot11PhyFHSSTable, 4, { 4,4,1,5 } },
276 +#define DOT11CURRENTPATTERN 115
277 + { DOT11CURRENTPATTERN , ASN_INTEGER , RWRITE, var_dot11PhyFHSSTable, 4, { 4,4,1,6 } },
278 +#define DOT11CURRENTINDEX 116
279 + { DOT11CURRENTINDEX , ASN_INTEGER , RWRITE, var_dot11PhyFHSSTable, 4, { 4,4,1,7 } },
280 +
281 +#define DOT11CURRENTCHANNEL 119
282 + { DOT11CURRENTCHANNEL , ASN_INTEGER , RWRITE, var_dot11PhyDSSSTable, 4, { 4,5,1,1 } },
283 +#define DOT11CCAMODESUPPORTED 120
284 + { DOT11CCAMODESUPPORTED, ASN_INTEGER , RONLY , var_dot11PhyDSSSTable, 4, { 4,5,1,2 } },
285 +#define DOT11CURRENTCCAMODE 121
286 + { DOT11CURRENTCCAMODE , ASN_INTEGER , RWRITE, var_dot11PhyDSSSTable, 4, { 4,5,1,3 } },
287 +#define DOT11EDTHRESHOLD 122
288 + { DOT11EDTHRESHOLD , ASN_INTEGER , RWRITE, var_dot11PhyDSSSTable, 4, { 4,5,1,4 } },
289 +
290 +#define DOT11CCAWATCHDOGTIMERMAX 125
291 + { DOT11CCAWATCHDOGTIMERMAX, ASN_INTEGER , RWRITE, var_dot11PhyIRTable, 4, { 4,6,1,1 } },
292 +#define DOT11CCAWATCHDOGCOUNTMAX 126
293 + { DOT11CCAWATCHDOGCOUNTMAX, ASN_INTEGER , RWRITE, var_dot11PhyIRTable, 4, { 4,6,1,2 } },
294 +#define DOT11CCAWATCHDOGTIMERMIN 127
295 + { DOT11CCAWATCHDOGTIMERMIN, ASN_INTEGER , RWRITE, var_dot11PhyIRTable, 4, { 4,6,1,3 } },
296 +#define DOT11CCAWATCHDOGCOUNTMIN 128
297 + { DOT11CCAWATCHDOGCOUNTMIN, ASN_INTEGER , RWRITE, var_dot11PhyIRTable, 4, { 4,6,1,4 } },
298 +
299 +#define DOT11REGDOMAINSSUPPORTVALUE 132
300 + { DOT11REGDOMAINSSUPPORTVALUE, ASN_INTEGER , RONLY , var_dot11RegDomainsSupportedTable, 4, { 4,7,1,2 } },
301 +
302 +#define DOT11SUPPORTEDTXANTENNA 136
303 + { DOT11SUPPORTEDTXANTENNA, ASN_INTEGER , RWRITE, var_dot11AntennasListTable, 4, { 4,8,1,2 } },
304 +#define DOT11SUPPORTEDRXANTENNA 137
305 + { DOT11SUPPORTEDRXANTENNA, ASN_INTEGER , RWRITE, var_dot11AntennasListTable, 4, { 4,8,1,3 } },
306 +#define DOT11DIVERSITYSELECTIONRX 138
307 + { DOT11DIVERSITYSELECTIONRX, ASN_INTEGER , RWRITE, var_dot11AntennasListTable, 4, { 4,8,1,4 } },
308 +
309 +#define DOT11SUPPORTEDDATARATESTXVALUE 142
310 + { DOT11SUPPORTEDDATARATESTXVALUE, ASN_INTEGER , RONLY , var_dot11SupportedDataRatesTxTable, 4, { 4,9,1,2 } },
311 +
312 +#define DOT11SUPPORTEDDATARATESRXVALUE 146
313 + { DOT11SUPPORTEDDATARATESRXVALUE, ASN_INTEGER , RONLY , var_dot11SupportedDataRatesRxTable, 4, { 4,10,1,2 } },
314 +};
315 +// ( L = length of the oidsuffix )
316 +
317 +/****************************************************************************
318 +* *
319 +* init_ieee802dot11() - perform any required initialization *
320 +* *
321 +****************************************************************************/
322 +void init_ieee802dot11 ( void ) {
323 +
324 + /* register ourselves with the agent to handle our mib tree */
325 + REGISTER_MIB("ieee802dot11", ieee802dot11_variables, variable7,
326 + ieee802dot11_variables_oid);
327 +
328 + initLists();
329 +}
330 +
331 +/****************************************************************************
332 +* *
333 +* shutdown_ieee802dot11() - perform any required cleanup @ shutdown *
334 +* *
335 +****************************************************************************/
336 +void shutdown_ieee802dot11 ( void )
337 +{
338 + flushLists();
339 +}
340 +
341 +/****************************************************************************
342 +* *
343 +* var_ieee802dot11() - *
344 +* *
345 +****************************************************************************/
346 +unsigned char *
347 +var_ieee802dot11 ( struct variable *vp,
348 + oid *name,
349 + size_t *length,
350 + int exact,
351 + size_t *var_len,
352 + WriteMethod **write_method)
353 +{
354 + loadTables();
355 +
356 + if ( header_generic ( vp, name, length, exact,var_len,write_method )
357 + == MATCH_FAILED )
358 + return NULL;
359 +
360 + switch ( vp->magic ) {
361 +
362 + case DOT11RESOURCETYPEIDNAME:
363 + if ( !haveResourceTypeIDName )
364 + return NULL;
365 + *var_len = strlen ( resourceTypeIDName );
366 + return ( UCHAR * ) resourceTypeIDName;
367 +
368 + default:
369 + ERROR_MSG ( "" );
370 + }
371 +
372 + return NULL;
373 +}
374 +
375 +/****************************************************************************
376 +* *
377 +* var_dot11StationConfigTable() - return a variable value from the table *
378 +* *
379 +****************************************************************************/
380 +unsigned char *
381 +var_dot11StationConfigTable ( struct variable *vp,
382 + oid *name,
383 + size_t *length,
384 + int exact,
385 + size_t *var_len,
386 + WriteMethod **write_method )
387 +{
388 + int found = FALSE;
389 + oid rName [ MAX_OID_LEN ]; // OID to be returned
390 + static char MACWork[17];
391 +
392 + loadTables();
393 + memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid ));
394 + for ( np = LIST_FIRST ( &scList ); np != NULL; np = LIST_NEXT ( np, nodes )) {
395 + sc = ( struct scTbl_data * ) np->data;
396 + rName[vp->namelen] = sc->ifIndex;
397 + if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) ||
398 + ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) {
399 +
400 + switch ( vp->magic ) { // found requested OID, now check for requested variable
401 + case DOT11STATIONID:
402 + if ( sc->haveStationID ) found = TRUE; break;
403 + case DOT11MEDIUMOCCUPANCYLIMIT:
404 + if ( sc->haveMediumOccupancyLimit ) found = TRUE; break;
405 + case DOT11CFPOLLABLE:
406 + if ( sc->haveCFPPollable ) found = TRUE; break;
407 + case DOT11CFPPERIOD:
408 + if ( sc->haveCFPPeriod ) found = TRUE; break;
409 + case DOT11CFPMAXDURATION:
410 + if ( sc->haveMaxDuration ) found = TRUE; break;
411 + case DOT11AUTHENTICATIONRESPONSETIMEOUT:
412 + if ( sc->haveAuthenticationResponseTimeOut ) found = TRUE; break;
413 + case DOT11PRIVACYOPTIONIMPLEMENTED:
414 + if ( sc->havePrivacyOptionImplemented ) found = TRUE; break;
415 + case DOT11POWERMANAGEMENTMODE:
416 + if ( sc->havePowerManagementMode ) found = TRUE; break;
417 + case DOT11DESIREDSSID:
418 + if ( sc->haveDesiredSSID ) found = TRUE; break;
419 + case DOT11DESIREDBSSTYPE:
420 + if ( sc->haveDesiredBSSType ) found = TRUE; break;
421 + case DOT11OPERATIONALRATESET:
422 + if ( sc->haveOperationalRateSet ) found = TRUE; break;
423 + case DOT11BEACONPERIOD:
424 + if ( sc->haveBeaconPeriod ) found = TRUE; break;
425 + case DOT11DTIMPERIOD:
426 + if ( sc->haveDTIMPeriod ) found = TRUE; break;
427 + case DOT11ASSOCIATIONRESPONSETIMEOUT:
428 + if ( sc->haveAssociationResponseTimeOut ) found = TRUE; break;
429 + case DOT11DISASSOCIATEREASON:
430 + if ( sc->disAssociationReason ) found = TRUE; break;
431 + case DOT11DISASSOCIATESTATION:
432 + if ( sc->haveDisAssociationStation ) found = TRUE; break;
433 + case DOT11DEAUTHENTICATEREASON:
434 + if ( sc->deAuthenticationReason ) found = TRUE; break;
435 + case DOT11DEAUTHENTICATESTATION:
436 + if ( sc->haveDeAuthenticationStation ) found = TRUE; break;
437 + case DOT11AUTHENTICATEFAILSTATUS:
438 + if ( sc->authenticateFailStatus ) found = TRUE; break;
439 + case DOT11AUTHENTICATEFAILSTATION:
440 + if ( sc->haveAuthenticateFailStation ) found = TRUE; break;
441 + }
442 + }
443 + if ( found )
444 + break;
445 + }
446 +
447 + if ( !found )
448 + return NULL;
449 +
450 + memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid ));
451 + *length = vp->namelen + 1;
452 + *var_len = sizeof ( long );
453 + *write_method = NULL;
454 +
455 + switch ( vp->magic ) {
456 +
457 + case DOT11STATIONID:
458 +// *write_method = write_dot11StationID;
459 + MACWork[ 0] = sc->stationID [ 0];
460 + MACWork[ 1] = sc->stationID [ 1];
461 + MACWork[ 2] = sc->stationID [ 3];
462 + MACWork[ 3] = sc->stationID [ 4];
463 + MACWork[ 4] = sc->stationID [ 6];
464 + MACWork[ 5] = sc->stationID [ 7];
465 + MACWork[ 6] = sc->stationID [ 9];
466 + MACWork[ 7] = sc->stationID [10];
467 + MACWork[ 8] = sc->stationID [12];
468 + MACWork[ 9] = sc->stationID [13];
469 + MACWork[10] = sc->stationID [15];
470 + MACWork[11] = sc->stationID [16];
471 + MACWork[12] = '\0';
472 + *var_len = 6;
473 + return ( UCHAR * ) htob ( MACWork );
474 +
475 + case DOT11MEDIUMOCCUPANCYLIMIT:
476 +// *write_method = write_dot11MediumOccupancyLimit;
477 + sc->mediumOccupancyLimit = 5;
478 + return ( UCHAR * ) &sc->mediumOccupancyLimit;
479 +
480 + case DOT11CFPOLLABLE:
481 + return ( UCHAR * ) &sc->CFPPollable;
482 +
483 + case DOT11CFPPERIOD:
484 +// *write_method = write_dot11CFPPeriod;
485 + return ( UCHAR * ) &sc->CFPPeriod;
486 +
487 + case DOT11CFPMAXDURATION:
488 +// *write_method = write_dot11CFPMaxDuration;
489 + return ( UCHAR * ) &sc->maxDuration;
490 +
491 + case DOT11AUTHENTICATIONRESPONSETIMEOUT:
492 +// *write_method = write_dot11AuthenticationResponseTimeOut;
493 + return ( UCHAR * ) &sc->authenticationResponseTimeOut;
494 +
495 + case DOT11PRIVACYOPTIONIMPLEMENTED:
496 + return ( UCHAR * ) &sc->privacyOptionImplemented;
497 +
498 + case DOT11POWERMANAGEMENTMODE:
499 +// *write_method = write_dot11PowerManagementMode;
500 + return ( UCHAR * ) &sc->powerManagementMode;
501 +
502 + case DOT11DESIREDSSID:
503 +// *write_method = write_dot11DesiredSSID;
504 + *var_len = strlen ( sc->desiredSSID );
505 + return ( UCHAR * ) sc->desiredSSID;
506 +
507 + case DOT11DESIREDBSSTYPE:
508 +// *write_method = write_dot11DesiredBSSType;
509 + return ( UCHAR * ) &sc->desiredBSSType;
510 +
511 + case DOT11OPERATIONALRATESET:
512 +// *write_method = write_dot11OperationalRateSet;
513 + *var_len = strlen ( sc->operationalRateSet );
514 + return ( UCHAR * ) sc->operationalRateSet;
515 +
516 + case DOT11BEACONPERIOD:
517 +// *write_method = write_dot11BeaconPeriod;
518 + return ( UCHAR * ) &sc->beaconPeriod;
519 +
520 + case DOT11DTIMPERIOD:
521 +// *write_method = write_dot11DTIMPeriod;
522 + return ( UCHAR * ) &sc->DTIMPeriod;
523 +
524 + case DOT11ASSOCIATIONRESPONSETIMEOUT:
525 +// *write_method = write_dot11AssociationResponseTimeOut;
526 + return ( UCHAR * ) &sc->associationResponseTimeOut;
527 +
528 + case DOT11DISASSOCIATEREASON:
529 + return ( UCHAR * ) &sc->disAssociationReason;
530 +
531 + case DOT11DISASSOCIATESTATION:
532 + MACWork[ 0] = sc->disAssociationStation[ 0];
533 + MACWork[ 1] = sc->disAssociationStation[ 1];
534 + MACWork[ 2] = sc->disAssociationStation[ 3];
535 + MACWork[ 3] = sc->disAssociationStation[ 4];
536 + MACWork[ 4] = sc->disAssociationStation[ 6];
537 + MACWork[ 5] = sc->disAssociationStation[ 7];
538 + MACWork[ 6] = sc->disAssociationStation[ 9];
539 + MACWork[ 7] = sc->disAssociationStation[10];
540 + MACWork[ 8] = sc->disAssociationStation[12];
541 + MACWork[ 9] = sc->disAssociationStation[13];
542 + MACWork[10] = sc->disAssociationStation[15];
543 + MACWork[11] = sc->disAssociationStation[16];
544 + MACWork[12] = '\0';
545 + *var_len = 6;
546 + return ( UCHAR * ) htob ( MACWork );
547 +
548 + case DOT11DEAUTHENTICATEREASON:
549 + return ( UCHAR * ) &sc->deAuthenticationReason;
550 +
551 + case DOT11DEAUTHENTICATESTATION:
552 + MACWork[ 0] = sc->deAuthenticationStation[ 0];
553 + MACWork[ 1] = sc->deAuthenticationStation[ 1];
554 + MACWork[ 2] = sc->deAuthenticationStation[ 3];
555 + MACWork[ 3] = sc->deAuthenticationStation[ 4];
556 + MACWork[ 4] = sc->deAuthenticationStation[ 6];
557 + MACWork[ 5] = sc->deAuthenticationStation[ 7];
558 + MACWork[ 6] = sc->deAuthenticationStation[ 9];
559 + MACWork[ 7] = sc->deAuthenticationStation[10];
560 + MACWork[ 8] = sc->deAuthenticationStation[12];
561 + MACWork[ 9] = sc->deAuthenticationStation[13];
562 + MACWork[10] = sc->deAuthenticationStation[15];
563 + MACWork[11] = sc->deAuthenticationStation[16];
564 + MACWork[12] = '\0';
565 + *var_len = 6;
566 + return ( UCHAR * ) htob ( MACWork );
567 +
568 + case DOT11AUTHENTICATEFAILSTATUS:
569 + return ( UCHAR * ) &sc->authenticateFailStatus;
570 +
571 + case DOT11AUTHENTICATEFAILSTATION:
572 + MACWork[ 0] = sc->authenticateFailStation[ 0];
573 + MACWork[ 1] = sc->authenticateFailStation[ 1];
574 + MACWork[ 2] = sc->authenticateFailStation[ 3];
575 + MACWork[ 3] = sc->authenticateFailStation[ 4];
576 + MACWork[ 4] = sc->authenticateFailStation[ 6];
577 + MACWork[ 5] = sc->authenticateFailStation[ 7];
578 + MACWork[ 6] = sc->authenticateFailStation[ 9];
579 + MACWork[ 7] = sc->authenticateFailStation[10];
580 + MACWork[ 8] = sc->authenticateFailStation[12];
581 + MACWork[ 9] = sc->authenticateFailStation[13];
582 + MACWork[10] = sc->authenticateFailStation[15];
583 + MACWork[11] = sc->authenticateFailStation[16];
584 + MACWork[12] = '\0';
585 + *var_len = 6;
586 + return ( UCHAR * ) htob ( MACWork );
587 +
588 + default:
589 + ERROR_MSG ( "" );
590 + }
591 +
592 + return NULL;
593 +}
594 +
595 +/****************************************************************************
596 +* *
597 +* var_dot11AuthenticationAlgorithmsTable() - *
598 +* *
599 +****************************************************************************/
600 +unsigned char *
601 +var_dot11AuthenticationAlgorithmsTable ( struct variable *vp,
602 + oid *name,
603 + size_t *length,
604 + int exact,
605 + size_t *var_len,
606 + WriteMethod **write_method )
607 +{
608 + int found = FALSE;
609 + oid rName [ MAX_OID_LEN ]; // OID to be returned
610 +
611 + loadTables();
612 + memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid ));
613 + for ( np = LIST_FIRST ( &aaList ); np != NULL; np = LIST_NEXT ( np, nodes )) {
614 + aa = ( struct aaTbl_data * ) np->data;
615 + rName[vp->namelen + 0] = aa->ifIndex;
616 + rName[vp->namelen + 1] = aa->authenticationAlgorithmsIndex;
617 + if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) ||
618 + ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) {
619 + switch ( vp->magic ) {
620 + case DOT11AUTHENTICATIONALGORITHM:
621 + if ( aa->haveAuthenticationAlgorithm ) found = TRUE; break;
622 + case DOT11AUTHENTICATIONALGORITHMSENABLE:
623 + if ( aa->authenticationAlgorithmsEnable ) found = TRUE; break;
624 + }
625 + }
626 + if ( found )
627 + break;
628 + }
629 +
630 + if ( !found )
631 + return NULL;
632 +
633 + memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid ));
634 + *length = vp->namelen + 2;
635 + *var_len = sizeof ( long );
636 + *write_method = NULL;
637 +
638 + switch ( vp->magic ) {
639 +
640 + case DOT11AUTHENTICATIONALGORITHM:
641 + return ( UCHAR * ) &aa->authenticationAlgorithm;
642 +
643 + case DOT11AUTHENTICATIONALGORITHMSENABLE:
644 +// *write_method = write_dot11AuthenticationAlgorithmsEnable;
645 + return ( UCHAR * ) &aa->authenticationAlgorithmsEnable;
646 +
647 + default:
648 + ERROR_MSG ( "" );
649 + }
650 +
651 + return NULL;
652 +}
653 +
654 +/****************************************************************************
655 +* *
656 +* var_dot11WEPDefaultKeysTable() - *
657 +* *
658 +****************************************************************************/
659 +unsigned char *
660 +var_dot11WEPDefaultKeysTable ( struct variable *vp,
661 + oid *name,
662 + size_t *length,
663 + int exact,
664 + size_t *var_len,
665 + WriteMethod **write_method )
666 +{
667 + int found = FALSE;
668 + oid rName [ MAX_OID_LEN ]; // OID to be returned
669 +
670 + loadTables();
671 + memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid ));
672 + for ( np = LIST_FIRST ( &dfList ); np != NULL; np = LIST_NEXT ( np, nodes )) {
673 + df = ( struct dfTbl_data * ) np->data;
674 + rName[vp->namelen + 0] = df->ifIndex;
675 + rName[vp->namelen + 1] = df->WEPDefaultKeyIndex;
676 + if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) ||
677 + ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) {
678 + switch ( vp->magic ) {
679 + case DOT11WEPDEFAULTKEYVALUE:
680 + if ( df->haveWEPDefaultKeyValue ) found = TRUE; break;
681 + }
682 + }
683 + if ( found )
684 + break;
685 + }
686 +
687 + if ( !found )
688 + return NULL;
689 +
690 + memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid ));
691 + *length = vp->namelen + 2;
692 + *var_len = sizeof ( long );
693 + *write_method = NULL;
694 +
695 + switch ( vp->magic ) {
696 +
697 + case DOT11WEPDEFAULTKEYVALUE:
698 +// *write_method = write_dot11WEPDefaultKeyValue;
699 + *var_len = strlen ( df->WEPDefaultKeyValue );
700 + return ( UCHAR * ) df->WEPDefaultKeyValue;
701 +
702 + default:
703 + ERROR_MSG ( "" );
704 + }
705 +
706 + return NULL;
707 +}
708 +
709 +/****************************************************************************
710 +* *
711 +* var_dot11WEPKeyMappingsTable() - *
712 +* *
713 +****************************************************************************/
714 +unsigned char *
715 +var_dot11WEPKeyMappingsTable ( struct variable *vp,
716 + oid *name,
717 + size_t *length,
718 + int exact,
719 + size_t *var_len,
720 + WriteMethod **write_method)
721 +{
722 + static char MACWork[17];
723 + int found = FALSE;
724 + oid rName [ MAX_OID_LEN ]; // OID to be returned
725 +
726 + loadTables();
727 + memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid ));
728 + for ( np = LIST_FIRST ( &kmList ); np != NULL; np = LIST_NEXT ( np, nodes )) {
729 + km = ( struct kmTbl_data * ) np->data;
730 + rName[vp->namelen + 0] = km->ifIndex;
731 + rName[vp->namelen + 1] = km->WEPKeyMappingIndex;
732 + if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) ||
733 + ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) {
734 + switch ( vp->magic ) {
735 + case DOT11WEPKEYMAPPINGADDRESS:
736 + if ( km->haveWEPKeyMappingAddress ) found = TRUE; break;
737 + case DOT11WEPKEYMAPPINGWEPON:
738 + if ( km->haveWEPKeyMappingWEPOn ) found = TRUE; break;
739 + case DOT11WEPKEYMAPPINGVALUE:
740 + if ( km->haveWEPKeyMappingValue ) found = TRUE; break;
741 + case DOT11WEPKEYMAPPINGSTATUS:
742 + if ( km->haveWEPKeyMappingStatus ) found = TRUE; break;
743 + }
744 + }
745 + if ( found )
746 + break;
747 + }
748 +
749 + if ( !found )
750 + return NULL;
751 +
752 + memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid ));
753 + *length = vp->namelen + 2;
754 + *var_len = sizeof ( long );
755 + *write_method = NULL;
756 +
757 + switch ( vp->magic ) {
758 +
759 + case DOT11WEPKEYMAPPINGADDRESS:
760 +// *write_method = write_dot11WEPKeyMappingAddress;
761 + MACWork[ 0] = km->WEPKeyMappingAddress[ 0];
762 + MACWork[ 1] = km->WEPKeyMappingAddress[ 1];
763 + MACWork[ 2] = km->WEPKeyMappingAddress[ 3];
764 + MACWork[ 3] = km->WEPKeyMappingAddress[ 4];
765 + MACWork[ 4] = km->WEPKeyMappingAddress[ 6];
766 + MACWork[ 5] = km->WEPKeyMappingAddress[ 7];
767 + MACWork[ 6] = km->WEPKeyMappingAddress[ 9];
768 + MACWork[ 7] = km->WEPKeyMappingAddress[10];
769 + MACWork[ 8] = km->WEPKeyMappingAddress[12];
770 + MACWork[ 9] = km->WEPKeyMappingAddress[13];
771 + MACWork[10] = km->WEPKeyMappingAddress[15];
772 + MACWork[11] = km->WEPKeyMappingAddress[16];
773 + MACWork[12] = '\0';
774 + *var_len = 6;
775 + return ( UCHAR * ) htob ( MACWork );
776 +
777 + case DOT11WEPKEYMAPPINGWEPON:
778 +// *write_method = write_dot11WEPKeyMappingWEPOn;
779 + return ( UCHAR * ) &km->WEPKeyMappingWEPOn;
780 +
781 + case DOT11WEPKEYMAPPINGVALUE:
782 +// *write_method = write_dot11WEPKeyMappingValue;
783 + *var_len = strlen ( km->WEPKeyMappingValue );
784 + return ( UCHAR * ) km->WEPKeyMappingValue;
785 +
786 + case DOT11WEPKEYMAPPINGSTATUS:
787 +// *write_method = write_dot11WEPKeyMappingStatus;
788 + return ( UCHAR * ) &km->WEPKeyMappingStatus;
789 +
790 + default:
791 + ERROR_MSG ( "" );
792 + }
793 + return NULL;
794 +}
795 +
796 +/****************************************************************************
797 +* *
798 +* var_dot11PrivacyTable() - *
799 +* *
800 +****************************************************************************/
801 +unsigned char *
802 +var_dot11PrivacyTable ( struct variable *vp,
803 + oid *name,
804 + size_t *length,
805 + int exact,
806 + size_t *var_len,
807 + WriteMethod **write_method )
808 +{
809 + int found = FALSE;
810 + oid rName [ MAX_OID_LEN ]; // OID to be returned
811 +
812 + loadTables();
813 + memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid ));
814 + for ( np = LIST_FIRST ( &prList ); np != NULL; np = LIST_NEXT ( np, nodes )) {
815 + pr = ( struct prTbl_data * ) np->data;
816 + rName[vp->namelen] = pr->ifIndex;
817 + if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) ||
818 + ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) {
819 + switch ( vp->magic ) {
820 + case DOT11PRIVACYINVOKED:
821 + if ( pr->havePrivacyInvoked ) found = TRUE; break;
822 + case DOT11WEPDEFAULTKEYID:
823 + if ( pr->haveWEPDefaultKeyID ) found = TRUE; break;
824 + case DOT11WEPKEYMAPPINGLENGTH:
825 + if ( pr->haveWEPKeyMappingLength ) found = TRUE; break;
826 + case DOT11EXCLUDEUNENCRYPTED:
827 + if ( pr->haveExcludeUnencrypted ) found = TRUE; break;
828 + case DOT11WEPICVERRORCOUNT:
829 + if ( pr->haveWEPICVErrorCount ) found = TRUE; break;
830 + case DOT11WEPEXCLUDEDCOUNT:
831 + if ( pr->haveWEPExcludedCount ) found = TRUE; break;
832 + }
833 + }
834 + if ( found )
835 + break;
836 + }
837 +
838 + if ( !found )
839 + return NULL;
840 +
841 + memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid ));
842 + *length = vp->namelen + 1;
843 + *var_len = sizeof ( long );
844 + *write_method = NULL;
845 +
846 + switch ( vp->magic ) {
847 +
848 + case DOT11PRIVACYINVOKED:
849 +// *write_method = write_dot11PrivacyInvoked;
850 + return ( UCHAR * ) &pr->privacyInvoked;
851 +
852 + case DOT11WEPDEFAULTKEYID:
853 +// *write_method = write_dot11WEPDefaultKeyID;
854 + return ( UCHAR * ) &pr->WEPDefaultKeyID;
855 +
856 + case DOT11WEPKEYMAPPINGLENGTH:
857 +// *write_method = write_dot11WEPKeyMappingLength;
858 + return ( UCHAR * ) &pr->WEPKeyMappingLength;
859 +
860 + case DOT11EXCLUDEUNENCRYPTED:
861 +// *write_method = write_dot11ExcludeUnencrypted;
862 + return ( UCHAR * ) &pr->excludeUnencrypted;
863 +
864 + case DOT11WEPICVERRORCOUNT:
865 + return ( UCHAR * ) &pr->WEPICVErrorCount;
866 +
867 + case DOT11WEPEXCLUDEDCOUNT:
868 + return ( UCHAR * ) &pr->WEPExcludedCount;
869 +
870 + default:
871 + ERROR_MSG ( "" );
872 + }
873 +
874 + return NULL;
875 +}
876 +
877 +/****************************************************************************
878 +* *
879 +* var_dot11OperationTable() - *
880 +* *
881 +****************************************************************************/
882 +unsigned char *
883 +var_dot11OperationTable ( struct variable *vp,
884 + oid *name,
885 + size_t *length,
886 + int exact,
887 + size_t *var_len,
888 + WriteMethod **write_method )
889 +{
890 + int found = FALSE;
891 + oid rName [ MAX_OID_LEN ]; // OID to be returned
892 + static char MACWork[17];
893 +
894 + loadTables();
895 + memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid ));
896 + for ( np = LIST_FIRST ( &opList ); np != NULL; np = LIST_NEXT ( np, nodes )) {
897 + op = ( struct opTbl_data * ) np->data;
898 + rName[vp->namelen] = op->ifIndex;
899 + if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) ||
900 + ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) {
901 +
902 + switch ( vp->magic ) { // found requested OID, now check for requested variable
903 + case DOT11MACADDRESS:
904 + if ( op->haveMACAddress ) found = TRUE; break;
905 + case DOT11RTSTHRESHOLD:
906 + if ( op->haveRTSThreshold ) found = TRUE; break;
907 + case DOT11SHORTRETRYLIMIT:
908 + if ( op->haveShortRetryLimit ) found = TRUE; break;
909 + case DOT11LONGRETRYLIMIT:
910 + if ( op->haveLongRetryLimit ) found = TRUE; break;
911 + case DOT11FRAGMENTATIONTHRESHOLD:
912 + if ( op->haveFragmentationThreshold ) found = TRUE; break;
913 + case DOT11MAXTRANSMITMSDULIFETIME:
914 + if ( op->haveMaxTransmitMSDULifetime ) found = TRUE; break;
915 + case DOT11MAXRECEIVELIFETIME:
916 + if ( op->haveMaxReceiveLifetime ) found = TRUE; break;
917 + case DOT11MANUFACTURERID:
918 + if ( op->haveManufacturerID ) found = TRUE; break;
919 + case DOT11PRODUCTID:
920 + if ( op->haveProductID ) found = TRUE; break;
921 + }
922 + }
923 + if ( found )
924 + break;
925 + }
926 +
927 + if ( !found )
928 + return NULL;
929 +
930 + memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid ));
931 + *length = vp->namelen + 1;
932 + *var_len = sizeof ( long );
933 + *write_method = NULL;
934 +
935 + switch ( vp->magic ) {
936 +
937 + case DOT11MACADDRESS:
938 + MACWork[ 0] = op->MACAddress[ 0];
939 + MACWork[ 1] = op->MACAddress[ 1];
940 + MACWork[ 2] = op->MACAddress[ 3];
941 + MACWork[ 3] = op->MACAddress[ 4];
942 + MACWork[ 4] = op->MACAddress[ 6];
943 + MACWork[ 5] = op->MACAddress[ 7];
944 + MACWork[ 6] = op->MACAddress[ 9];
945 + MACWork[ 7] = op->MACAddress[10];
946 + MACWork[ 8] = op->MACAddress[12];
947 + MACWork[ 9] = op->MACAddress[13];
948 + MACWork[10] = op->MACAddress[15];
949 + MACWork[11] = op->MACAddress[16];
950 + MACWork[12] = '\0';
951 + *var_len = 6;
952 + return ( UCHAR * ) htob ( MACWork );
953 +
954 + case DOT11RTSTHRESHOLD:
955 +// *write_method = write_dot11RTSThreshold;
956 + return ( UCHAR * ) &op->RTSThreshold;
957 +
958 + case DOT11SHORTRETRYLIMIT:
959 +// *write_method = write_dot11ShortRetryLimit;
960 + return ( UCHAR * ) &op->shortRetryLimit;
961 +
962 + case DOT11LONGRETRYLIMIT:
963 +// *write_method = write_dot11LongRetryLimit;
964 + return ( UCHAR * ) &op->longRetryLimit;
965 +
966 + case DOT11FRAGMENTATIONTHRESHOLD:
967 +// *write_method = write_dot11FragmentationThreshold;
968 + return ( UCHAR * ) &op->fragmentationThreshold;
969 +
970 + case DOT11MAXTRANSMITMSDULIFETIME:
971 +// *write_method = write_dot11MaxTransmitMSDULifetime;
972 + return ( UCHAR * ) &op->maxTransmitMSDULifetime;
973 +
974 + case DOT11MAXRECEIVELIFETIME:
975 +// *write_method = write_dot11MaxReceiveLifetime;
976 + return ( UCHAR * ) &op->maxReceiveLifetime;
977 +
978 + case DOT11MANUFACTURERID:
979 + *var_len = strlen ( op->manufacturerID );
980 + return ( UCHAR * ) op->manufacturerID;
981 +
982 + case DOT11PRODUCTID:
983 + *var_len = strlen ( op->productID );
984 + return ( UCHAR * ) op->productID;
985 +
986 + default:
987 + ERROR_MSG ( "" );
988 + }
989 +
990 + return NULL;
991 +}
992 +
993 +/****************************************************************************
994 +* *
995 +* var_dot11CountersTable() - *
996 +* *
997 +****************************************************************************/
998 +unsigned char *
999 +var_dot11CountersTable(struct variable *vp,
1000 + oid *name,
1001 + size_t *length,
1002 + int exact,
1003 + size_t *var_len,
1004 + WriteMethod **write_method)
1005 +{
1006 + int found = FALSE;
1007 + oid rName [ MAX_OID_LEN ]; // OID to be returned
1008 +
1009 + loadTables();
1010 + memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid ));
1011 + for ( np = LIST_FIRST ( &coList ); np != NULL; np = LIST_NEXT ( np, nodes )) {
1012 + co = ( struct coTbl_data * ) np->data;
1013 + rName[vp->namelen] = co->ifIndex;
1014 + if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) ||
1015 + ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) {
1016 + switch ( vp->magic ) {
1017 + case DOT11TRANSMITTEDFRAGMENTCOUNT:
1018 + if ( co->haveTransmittedFragmentCount ) found = TRUE; break;
1019 + case DOT11MULTICASTTRANSMITTEDFRAMECOUNT:
1020 + if ( co->haveTransmittedFrameCount ) found = TRUE; break;
1021 + case DOT11FAILEDCOUNT:
1022 + if ( co->haveFailedCount ) found = TRUE; break;
1023 + case DOT11RETRYCOUNT:
1024 + if ( co->haveRetryCount ) found = TRUE; break;
1025 + case DOT11MULTIPLERETRYCOUNT:
1026 + if ( co->haveMultipleRetryCount ) found = TRUE; break;
1027 + case DOT11FRAMEDUPLICATECOUNT:
1028 + if ( co->haveFrameDuplicateCount ) found = TRUE; break;
1029 + case DOT11RTSSUCCESSCOUNT:
1030 + if ( co->haveRTSSuccessCount ) found = TRUE; break;
1031 + case DOT11RTSFAILURECOUNT:
1032 + if ( co->haveRTSFailureCount ) found = TRUE; break;
1033 + case DOT11ACKFAILURECOUNT:
1034 + if ( co->haveACKFailureCount ) found = TRUE; break;
1035 + case DOT11RECEIVEDFRAGMENTCOUNT:
1036 + if ( co->haveReceivedFragmentCount ) found = TRUE; break;
1037 + case DOT11MULTICASTRECEIVEDFRAMECOUNT:
1038 + if ( co->haveMulticastReceivedFrameCount ) found = TRUE; break;
1039 + case DOT11FCSERRORCOUNT:
1040 + if ( co->haveFCSErrorCount ) found = TRUE; break;
1041 + case DOT11TRANSMITTEDFRAMECOUNT:
1042 + if ( co->haveTransmittedFrameCount ) found = TRUE; break;
1043 + case DOT11WEPUNDECRYPTABLECOUNT:
1044 + if ( co->haveWEPUndecryptableCount ) found = TRUE; break;
1045 + }
1046 + }
1047 + if ( found )
1048 + break;
1049 + }
1050 +
1051 + if ( !found )
1052 + return NULL;
1053 +
1054 + memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid ));
1055 + *length = vp->namelen + 1;
1056 + *var_len = sizeof ( long );
1057 + *write_method = NULL;
1058 +
1059 + switch ( vp->magic ) {
1060 +
1061 + case DOT11TRANSMITTEDFRAGMENTCOUNT: return ( UCHAR * ) &co->transmittedFragmentCount;
1062 + case DOT11MULTICASTTRANSMITTEDFRAMECOUNT: return ( UCHAR * ) &co->transmittedFrameCount;
1063 + case DOT11FAILEDCOUNT: return ( UCHAR * ) &co->failedCount;
1064 + case DOT11RETRYCOUNT: return ( UCHAR * ) &co->retryCount;
1065 + case DOT11MULTIPLERETRYCOUNT: return ( UCHAR * ) &co->multipleRetryCount;
1066 + case DOT11FRAMEDUPLICATECOUNT: return ( UCHAR * ) &co->frameDuplicateCount;
1067 + case DOT11RTSSUCCESSCOUNT: return ( UCHAR * ) &co->RTSSuccessCount;
1068 + case DOT11RTSFAILURECOUNT: return ( UCHAR * ) &co->RTSFailureCount;
1069 + case DOT11ACKFAILURECOUNT: return ( UCHAR * ) &co->ACKFailureCount;
1070 + case DOT11RECEIVEDFRAGMENTCOUNT: return ( UCHAR * ) &co->receivedFragmentCount;
1071 + case DOT11MULTICASTRECEIVEDFRAMECOUNT: return ( UCHAR * ) &co->multicastReceivedFrameCount;
1072 + case DOT11FCSERRORCOUNT: return ( UCHAR * ) &co->FCSErrorCount;
1073 + case DOT11TRANSMITTEDFRAMECOUNT: return ( UCHAR * ) &co->transmittedFrameCount;
1074 + case DOT11WEPUNDECRYPTABLECOUNT: return ( UCHAR * ) &co->WEPUndecryptableCount;
1075 +
1076 + default:
1077 + ERROR_MSG ( "" );
1078 + }
1079 +
1080 + return NULL;
1081 +}
1082 +
1083 +/****************************************************************************
1084 +* *
1085 +* var_dot11GroupAddressesTable() - *
1086 +* *
1087 +****************************************************************************/
1088 +unsigned char *
1089 +var_dot11GroupAddressesTable(struct variable *vp,
1090 + oid *name,
1091 + size_t *length,
1092 + int exact,
1093 + size_t *var_len,
1094 + WriteMethod **write_method)
1095 +{
1096 + static char MACWork[17];
1097 + int found = FALSE;
1098 + oid rName [ MAX_OID_LEN ]; // OID to be returned
1099 +
1100 + loadTables();
1101 + memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid ));
1102 + for ( np = LIST_FIRST ( &gaList ); np != NULL; np = LIST_NEXT ( np, nodes )) {
1103 + ga = ( struct gaTbl_data * ) np->data;
1104 + rName[vp->namelen + 0] = ga->ifIndex;
1105 + rName[vp->namelen + 1] = ga->groupAddressesIndex;
1106 + if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) ||
1107 + ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) {
1108 + switch ( vp->magic ) {
1109 + case DOT11ADDRESS:
1110 + if ( ga->haveAddress ) found = TRUE; break;
1111 + case DOT11GROUPADDRESSESSTATUS:
1112 + if ( ga->haveGroupAddressesStatus ) found = TRUE; break;
1113 + }
1114 + }
1115 + if ( found )
1116 + break;
1117 + }
1118 +
1119 + if ( !found )
1120 + return NULL;
1121 +
1122 + memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid ));
1123 + *length = vp->namelen + 2;
1124 + *var_len = sizeof ( long );
1125 + *write_method = NULL;
1126 +
1127 + switch ( vp->magic ) {
1128 +
1129 + case DOT11ADDRESS:
1130 +// *write_method = write_dot11Address;
1131 + MACWork[ 0] = ga->address[ 0];
1132 + MACWork[ 1] = ga->address[ 1];
1133 + MACWork[ 2] = ga->address[ 3];
1134 + MACWork[ 3] = ga->address[ 4];
1135 + MACWork[ 4] = ga->address[ 6];
1136 + MACWork[ 5] = ga->address[ 7];
1137 + MACWork[ 6] = ga->address[ 9];
1138 + MACWork[ 7] = ga->address[10];
1139 + MACWork[ 8] = ga->address[12];
1140 + MACWork[ 9] = ga->address[13];
1141 + MACWork[10] = ga->address[15];
1142 + MACWork[11] = ga->address[16];
1143 + MACWork[12] = '\0';
1144 + *var_len = 6;
1145 + return ( UCHAR * ) htob ( MACWork );
1146 +
1147 + case DOT11GROUPADDRESSESSTATUS:
1148 +// *write_method = write_dot11GroupAddressesStatus;
1149 + return ( UCHAR * ) &ga->groupAddressesStatus;
1150 +
1151 + default:
1152 + ERROR_MSG ( "" );
1153 + }
1154 + return NULL;
1155 +}
1156 +
1157 +/****************************************************************************
1158 +* *
1159 +* var_dot11ResourceInfoTable() - *
1160 +* *
1161 +****************************************************************************/
1162 +unsigned char *
1163 +var_dot11ResourceInfoTable ( struct variable *vp,
1164 + oid *name,
1165 + size_t *length,
1166 + int exact,
1167 + size_t *var_len,
1168 + WriteMethod **write_method )
1169 +{
1170 + int found = FALSE;
1171 + oid rName [ MAX_OID_LEN ]; // OID to be returned
1172 +
1173 + loadTables();
1174 + memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid ));
1175 + for ( np = LIST_FIRST ( &riList ); np != NULL; np = LIST_NEXT ( np, nodes )) {
1176 + ri = ( struct riTbl_data * ) np->data;
1177 + rName[vp->namelen] = ri->ifIndex;
1178 + if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) ||
1179 + ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) {
1180 + switch ( vp->magic ) {
1181 + case DOT11MANUFACTUREROUI:
1182 + if ( ri->haveManufacturerOUI ) found = TRUE; break;
1183 + case DOT11MANUFACTURERNAME:
1184 + if ( ri->haveManufacturerName ) found = TRUE; break;
1185 + case DOT11MANUFACTURERPRODUCTNAME:
1186 + if ( ri->haveManufacturerProductName ) found = TRUE; break;
1187 + case DOT11MANUFACTURERPRODUCTVERSION:
1188 + if ( ri->haveManufacturerProductVersion ) found = TRUE; break;
1189 + }
1190 + }
1191 + if ( found )
1192 + break;
1193 + }
1194 +
1195 + if ( !found )
1196 + return NULL;
1197 +
1198 + memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid ));
1199 + *length = vp->namelen + 1;
1200 + *var_len = sizeof ( long );
1201 + *write_method = NULL;
1202 +
1203 + switch ( vp->magic ) {
1204 +
1205 + case DOT11MANUFACTUREROUI:
1206 + *var_len = strlen ( ri->manufacturerOUI );
1207 + return ( UCHAR * ) ri->manufacturerOUI;
1208 +
1209 + case DOT11MANUFACTURERNAME:
1210 + *var_len = strlen ( ri->manufacturerName );
1211 + return ( UCHAR * ) ri->manufacturerName;
1212 +
1213 + case DOT11MANUFACTURERPRODUCTNAME:
1214 + *var_len = strlen ( ri->manufacturerProductName );
1215 + return ( UCHAR * ) ri->manufacturerProductName;
1216 +
1217 + case DOT11MANUFACTURERPRODUCTVERSION:
1218 + *var_len = strlen ( ri->manufacturerProductVersion );
1219 + return ( UCHAR * ) ri->manufacturerProductVersion;
1220 +
1221 + default:
1222 + ERROR_MSG ( "" );
1223 + }
1224 +
1225 + return NULL;
1226 +}
1227 +
1228 +/****************************************************************************
1229 +* *
1230 +* var_dot11PhyOperationTable() - *
1231 +* *
1232 +****************************************************************************/
1233 +unsigned char *
1234 +var_dot11PhyOperationTable ( struct variable *vp,
1235 + oid *name,
1236 + size_t *length,
1237 + int exact,
1238 + size_t *var_len,
1239 + WriteMethod **write_method )
1240 +{
1241 + int found = FALSE;
1242 + oid rName [ MAX_OID_LEN ]; // OID to be returned
1243 +
1244 + loadTables();
1245 + memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid ));
1246 + for ( np = LIST_FIRST ( &poList ); np != NULL; np = LIST_NEXT ( np, nodes )) {
1247 + po = ( struct poTbl_data * ) np->data;
1248 + rName[vp->namelen] = po->ifIndex;
1249 + if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) ||
1250 + ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) {
1251 + switch ( vp->magic ) {
1252 + case DOT11PHYTYPE:
1253 + if ( po->havePHYType ) found = TRUE; break;
1254 + case DOT11CURRENTREGDOMAIN:
1255 + if ( po->haveCurrentRegDomain ) found = TRUE; break;
1256 + case DOT11TEMPTYPE:
1257 + if ( po->haveTempType ) found = TRUE; break;
1258 + }
1259 + }
1260 + if ( found )
1261 + break;
1262 + }
1263 +
1264 + if ( !found )
1265 + return NULL;
1266 +
1267 + memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid ));
1268 + *length = vp->namelen + 1;
1269 + *var_len = sizeof ( long );
1270 + *write_method = NULL;
1271 +
1272 + switch ( vp->magic ) {
1273 +
1274 + case DOT11PHYTYPE:
1275 + return ( UCHAR * ) &po->PHYType;
1276 +
1277 + case DOT11CURRENTREGDOMAIN:
1278 +// *write_method = write_dot11CurrentRegDomain;
1279 + return ( UCHAR * ) &po->currentRegDomain;
1280 +
1281 + case DOT11TEMPTYPE:
1282 + return ( UCHAR * ) &po->tempType;
1283 +
1284 + default:
1285 + ERROR_MSG ( "" );
1286 + }
1287 +
1288 + return NULL;
1289 +}
1290 +
1291 +/****************************************************************************
1292 +* *
1293 +* var_dot11PhyAntennaTable() - *
1294 +* *
1295 +****************************************************************************/
1296 +unsigned char *
1297 +var_dot11PhyAntennaTable ( struct variable *vp,
1298 + oid *name,
1299 + size_t *length,
1300 + int exact,
1301 + size_t *var_len,
1302 + WriteMethod **write_method )
1303 +{
1304 + int found = FALSE;
1305 + oid rName [ MAX_OID_LEN ]; // OID to be returned
1306 +
1307 + loadTables();
1308 + memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid ));
1309 + for ( np = LIST_FIRST ( &paList ); np != NULL; np = LIST_NEXT ( np, nodes )) {
1310 + pa = ( struct paTbl_data * ) np->data;
1311 + rName[vp->namelen] = pa->ifIndex;
1312 + if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) ||
1313 + ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) {
1314 + switch ( vp->magic ) {
1315 + case DOT11CURRENTTXANTENNA:
1316 + if ( pa->haveCurrentTxAntenna ) found = TRUE; break;
1317 + case DOT11DIVERSITYSUPPORT:
1318 + if ( pa->haveDiversitySupport ) found = TRUE; break;
1319 + case DOT11CURRENTRXANTENNA:
1320 + if ( pa->haveCurrentRxAntenna ) found = TRUE; break;
1321 + }
1322 + }
1323 + if ( found )
1324 + break;
1325 + }
1326 +
1327 + if ( !found )
1328 + return NULL;
1329 +
1330 + memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid ));
1331 + *length = vp->namelen + 1;
1332 + *var_len = sizeof ( long );
1333 + *write_method = NULL;
1334 +
1335 + switch ( vp->magic ) {
1336 +
1337 + case DOT11CURRENTTXANTENNA:
1338 +// *write_method = write_dot11CurrentTxAntenna;
1339 + return ( UCHAR * ) &pa->currentTxAntenna;
1340 +
1341 + case DOT11DIVERSITYSUPPORT:
1342 + return ( UCHAR * ) &pa->diversitySupport;
1343 +
1344 + case DOT11CURRENTRXANTENNA:
1345 +// *write_method = write_dot11CurrentRxAntenna;
1346 + return ( UCHAR * ) &pa->currentRxAntenna;
1347 +
1348 + default:
1349 + ERROR_MSG ( "" );
1350 + }
1351 + return NULL;
1352 +}
1353 +
1354 +/****************************************************************************
1355 +* *
1356 +* var_dot11PhyTxPowerTable() - *
1357 +* *
1358 +****************************************************************************/
1359 +unsigned char *
1360 +var_dot11PhyTxPowerTable ( struct variable *vp,
1361 + oid *name,
1362 + size_t *length,
1363 + int exact,
1364 + size_t *var_len,
1365 + WriteMethod **write_method )
1366 +{
1367 + int found = FALSE;
1368 + oid rName [ MAX_OID_LEN ]; // OID to be returned
1369 +
1370 + loadTables();
1371 + memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid ));
1372 + for ( np = LIST_FIRST ( &ptList ); np != NULL; np = LIST_NEXT ( np, nodes )) {
1373 + pt = ( struct ptTbl_data * ) np->data;
1374 + rName[vp->namelen] = pt->ifIndex;
1375 + if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) ||
1376 + ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) {
1377 + switch ( vp->magic ) {
1378 + case DOT11NUMBERSUPPORTEDPOWERLEVELS:
1379 + if ( pt->haveNumberSupportedPowerLevels ) found = TRUE; break;
1380 + case DOT11TXPOWERLEVEL1:
1381 + if ( pt->haveTxPowerLevel1 ) found = TRUE; break;
1382 + case DOT11TXPOWERLEVEL2:
1383 + if ( pt->haveTxPowerLevel2 ) found = TRUE; break;
1384 + case DOT11TXPOWERLEVEL3:
1385 + if ( pt->haveTxPowerLevel3 ) found = TRUE; break;
1386 + case DOT11TXPOWERLEVEL4:
1387 + if ( pt->haveTxPowerLevel4 ) found = TRUE; break;
1388 + case DOT11TXPOWERLEVEL5:
1389 + if ( pt->haveTxPowerLevel5 ) found = TRUE; break;
1390 + case DOT11TXPOWERLEVEL6:
1391 + if ( pt->haveTxPowerLevel6 ) found = TRUE; break;
1392 + case DOT11TXPOWERLEVEL7:
1393 + if ( pt->haveTxPowerLevel7 ) found = TRUE; break;
1394 + case DOT11TXPOWERLEVEL8:
1395 + if ( pt->haveTxPowerLevel8 ) found = TRUE; break;
1396 + case DOT11CURRENTTXPOWERLEVEL:
1397 + if ( pt->currentTxPowerLevel ) found = TRUE; break;
1398 + }
1399 + }
1400 + if ( found )
1401 + break;
1402 + }
1403 +
1404 + if ( !found )
1405 + return NULL;
1406 +
1407 + memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid ));
1408 + *length = vp->namelen + 1;
1409 + *var_len = sizeof ( long );
1410 + *write_method = NULL;
1411 +
1412 + switch ( vp->magic ) {
1413 +
1414 + case DOT11NUMBERSUPPORTEDPOWERLEVELS:
1415 + return ( UCHAR * ) &pt->numberSupportedPowerLevels;
1416 +
1417 + case DOT11TXPOWERLEVEL1: return ( UCHAR * ) &pt->TxPowerLevel1;
1418 + case DOT11TXPOWERLEVEL2: return ( UCHAR * ) &pt->TxPowerLevel2;
1419 + case DOT11TXPOWERLEVEL3: return ( UCHAR * ) &pt->TxPowerLevel3;
1420 + case DOT11TXPOWERLEVEL4: return ( UCHAR * ) &pt->TxPowerLevel4;
1421 + case DOT11TXPOWERLEVEL5: return ( UCHAR * ) &pt->TxPowerLevel5;
1422 + case DOT11TXPOWERLEVEL6: return ( UCHAR * ) &pt->TxPowerLevel6;
1423 + case DOT11TXPOWERLEVEL7: return ( UCHAR * ) &pt->TxPowerLevel7;
1424 + case DOT11TXPOWERLEVEL8: return ( UCHAR * ) &pt->TxPowerLevel8;
1425 +
1426 + case DOT11CURRENTTXPOWERLEVEL:
1427 +// *write_method = write_dot11CurrentTxPowerLevel;
1428 + return ( UCHAR * ) &pt->currentTxPowerLevel;
1429 +
1430 + default:
1431 + ERROR_MSG ( "" );
1432 + }
1433 +
1434 + return NULL;
1435 +}
1436 +
1437 +/****************************************************************************
1438 +* *
1439 +* var_dot11PhyFHSSTable() - *
1440 +* *
1441 +****************************************************************************/
1442 +unsigned char *
1443 +var_dot11PhyFHSSTable ( struct variable *vp,
1444 + oid *name,
1445 + size_t *length,
1446 + int exact,
1447 + size_t *var_len,
1448 + WriteMethod **write_method )
1449 +{
1450 + int found = FALSE;
1451 + oid rName [ MAX_OID_LEN ]; // OID to be returned
1452 +
1453 + loadTables();
1454 + memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid ));
1455 + for ( np = LIST_FIRST ( &pfList ); np != NULL; np = LIST_NEXT ( np, nodes )) {
1456 + pf = ( struct pfTbl_data * ) np->data;
1457 + rName[vp->namelen] = pf->ifIndex;
1458 + if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) ||
1459 + ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) {
1460 + switch ( vp->magic ) {
1461 + case DOT11HOPTIME:
1462 + if ( pf->haveHopTime ) found = TRUE; break;
1463 + case DOT11CURRENTCHANNELNUMBER:
1464 + if ( pf->haveCurrentChannelNumber ) found = TRUE; break;
1465 + case DOT11MAXDWELLTIME:
1466 + if ( pf->haveMaxDwellTime ) found = TRUE; break;
1467 + case DOT11CURRENTDWELLTIME:
1468 + if ( pf->haveCurrentDwellTime ) found = TRUE; break;
1469 + case DOT11CURRENTSET:
1470 + if ( pf->haveCurrentSet ) found = TRUE; break;
1471 + case DOT11CURRENTPATTERN:
1472 + if ( pf->haveCurrentPattern ) found = TRUE; break;
1473 + case DOT11CURRENTINDEX:
1474 + if ( pf->haveCurrentIndex ) found = TRUE; break;
1475 + }
1476 + }
1477 + if ( found )
1478 + break;
1479 + }
1480 +
1481 + if ( !found )
1482 + return NULL;
1483 +
1484 + memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid ));
1485 + *length = vp->namelen + 1;
1486 + *var_len = sizeof ( long );
1487 + *write_method = NULL;
1488 +
1489 + switch ( vp->magic ) {
1490 +
1491 + case DOT11HOPTIME:
1492 + return ( UCHAR * ) &pf->hopTime;
1493 +
1494 + case DOT11CURRENTCHANNELNUMBER:
1495 +// *write_method = write_dot11CurrentChannelNumber;
1496 + return ( UCHAR * ) &pf->currentChannelNumber;
1497 +
1498 + case DOT11MAXDWELLTIME:
1499 + return ( UCHAR * ) &pf->maxDwellTime;
1500 +
1501 + case DOT11CURRENTDWELLTIME:
1502 +// *write_method = write_dot11CurrentDwellTime;
1503 + return ( UCHAR * ) &pf->currentDwellTime;
1504 +
1505 + case DOT11CURRENTSET:
1506 +// *write_method = write_dot11CurrentSet;
1507 + return ( UCHAR * ) &pf->currentSet;
1508 +
1509 + case DOT11CURRENTPATTERN:
1510 +// *write_method = write_dot11CurrentPattern;
1511 + return ( UCHAR * ) &pf->currentPattern;
1512 +
1513 + case DOT11CURRENTINDEX:
1514 +// *write_method = write_dot11CurrentIndex;
1515 + return ( UCHAR * ) &pf->currentIndex;
1516 +
1517 + default:
1518 + ERROR_MSG ( "" );
1519 + }
1520 +
1521 + return NULL;
1522 +}
1523 +
1524 +/****************************************************************************
1525 +* *
1526 +* var_dot11PhyDSSSTable() - *
1527 +* *
1528 +****************************************************************************/
1529 +unsigned char *
1530 +var_dot11PhyDSSSTable ( struct variable *vp,
1531 + oid *name,
1532 + size_t *length,
1533 + int exact,
1534 + size_t *var_len,
1535 + WriteMethod **write_method )
1536 +{
1537 + int found = FALSE;
1538 + oid rName [ MAX_OID_LEN ]; // OID to be returned
1539 +
1540 + loadTables();
1541 + memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid ));
1542 + for ( np = LIST_FIRST ( &pdList ); np != NULL; np = LIST_NEXT ( np, nodes )) {
1543 + pd = ( struct pdTbl_data * ) np->data;
1544 + rName[vp->namelen] = pd->ifIndex;
1545 + if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) ||
1546 + ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) {
1547 + switch ( vp->magic ) {
1548 + case DOT11CURRENTCHANNEL:
1549 + if ( pd->haveCurrentChannel ) found = TRUE; break;
1550 + case DOT11CCAMODESUPPORTED:
1551 + if ( pd->haveCCAModeSupported ) found = TRUE; break;
1552 + case DOT11CURRENTCCAMODE:
1553 + if ( pd->haveCurrentCCAMode ) found = TRUE; break;
1554 + case DOT11EDTHRESHOLD:
1555 + if ( pd->haveEDThreshold ) found = TRUE; break;
1556 + }
1557 + }
1558 + if ( found )
1559 + break;
1560 + }
1561 +
1562 + if ( !found )
1563 + return NULL;
1564 +
1565 + memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid ));
1566 + *length = vp->namelen + 1;
1567 + *var_len = sizeof ( long );
1568 + *write_method = NULL;
1569 +
1570 + switch ( vp->magic ) {
1571 +
1572 + case DOT11CURRENTCHANNEL:
1573 +// *write_method = write_dot11CurrentChannel;
1574 + return ( UCHAR * ) &pd->currentChannel;
1575 +
1576 + case DOT11CCAMODESUPPORTED:
1577 + return ( UCHAR * ) &pd->CCAModeSupported;
1578 +
1579 + case DOT11CURRENTCCAMODE:
1580 +// *write_method = write_dot11CurrentCCAMode;
1581 + return ( UCHAR * ) &pd->currentCCAMode;
1582 +
1583 + case DOT11EDTHRESHOLD:
1584 +// *write_method = write_dot11EDThreshold;
1585 + return ( UCHAR * ) &pd->EDThreshold;
1586 +
1587 + default:
1588 + ERROR_MSG ( "" );
1589 + }
1590 +
1591 + return NULL;
1592 +}
1593 +
1594 +/****************************************************************************
1595 +* *
1596 +* var_dot11PhyIRTable() - *
1597 +* *
1598 +****************************************************************************/
1599 +unsigned char *
1600 +var_dot11PhyIRTable ( struct variable *vp,
1601 + oid *name,
1602 + size_t *length,
1603 + int exact,
1604 + size_t *var_len,
1605 + WriteMethod **write_method)
1606 +{
1607 +
1608 + int found = FALSE;
1609 + oid rName [ MAX_OID_LEN ]; // OID to be returned
1610 +
1611 + loadTables();
1612 + memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid ));
1613 + for ( np = LIST_FIRST ( &piList ); np != NULL; np = LIST_NEXT ( np, nodes )) {
1614 + pi = ( struct piTbl_data * ) np->data;
1615 + rName[vp->namelen] = pi->ifIndex;
1616 + if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) == 0 )) ||
1617 + ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 1, name, *length ) > 0 ))) {
1618 + switch ( vp->magic ) {
1619 + case DOT11CCAWATCHDOGTIMERMAX:
1620 + if ( pi->CCAWatchdogTimerMax ) found = TRUE; break;
1621 + case DOT11CCAWATCHDOGCOUNTMAX:
1622 + if ( pi->CCAWatchdogCountMax ) found = TRUE; break;
1623 + case DOT11CCAWATCHDOGTIMERMIN:
1624 + if ( pi->CCAWatchdogTimerMin ) found = TRUE; break;
1625 + case DOT11CCAWATCHDOGCOUNTMIN:
1626 + if ( pi->CCAWatchdogCountMin ) found = TRUE; break;
1627 + }
1628 + }
1629 + if ( found )
1630 + break;
1631 + }
1632 +
1633 + if ( !found )
1634 + return NULL;
1635 +
1636 + memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 1 ) * sizeof ( oid ));
1637 + *length = vp->namelen + 1;
1638 + *var_len = sizeof ( long );
1639 + *write_method = NULL;
1640 +
1641 + switch ( vp->magic ) {
1642 +
1643 + case DOT11CCAWATCHDOGTIMERMAX:
1644 +// *write_method = write_dot11CCAWatchdogTimerMax;
1645 + return ( UCHAR * ) &pi->CCAWatchdogTimerMax;
1646 +
1647 + case DOT11CCAWATCHDOGCOUNTMAX:
1648 +// *write_method = write_dot11CCAWatchdogCountMax;
1649 + return ( UCHAR * ) &pi->CCAWatchdogCountMax;
1650 +
1651 + case DOT11CCAWATCHDOGTIMERMIN:
1652 +// *write_method = write_dot11CCAWatchdogTimerMin;
1653 + return ( UCHAR * ) &pi->CCAWatchdogTimerMin;
1654 +
1655 + case DOT11CCAWATCHDOGCOUNTMIN:
1656 +// *write_method = write_dot11CCAWatchdogCountMin;
1657 + return ( UCHAR * ) &pi->CCAWatchdogCountMin;
1658 +
1659 + default:
1660 + ERROR_MSG ( "" );
1661 + }
1662 +
1663 + return NULL;
1664 +}
1665 +
1666 +/****************************************************************************
1667 +* *
1668 +* var_dot11RegDomainsSupportedTable() - *
1669 +* *
1670 +****************************************************************************/
1671 +unsigned char *
1672 +var_dot11RegDomainsSupportedTable ( struct variable *vp,
1673 + oid *name,
1674 + size_t *length,
1675 + int exact,
1676 + size_t *var_len,
1677 + WriteMethod **write_method)
1678 +{
1679 + int found = FALSE;
1680 + oid rName [ MAX_OID_LEN ]; // OID to be returned
1681 +
1682 + loadTables();
1683 + memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid ));
1684 + for ( np = LIST_FIRST ( &rdList ); np != NULL; np = LIST_NEXT ( np, nodes )) {
1685 + rd = ( struct rdTbl_data * ) np->data;
1686 + rName[vp->namelen + 0] = rd->ifIndex;
1687 + rName[vp->namelen + 1] = rd->regDomainsSupportIndex;
1688 + if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) ||
1689 + ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) {
1690 + switch ( vp->magic ) {
1691 + case DOT11REGDOMAINSSUPPORTVALUE:
1692 + if ( rd->haveRegDomainsSupportValue ) found = TRUE; break;
1693 + }
1694 + }
1695 + if ( found )
1696 + break;
1697 + }
1698 +
1699 + if ( !found )
1700 + return NULL;
1701 +
1702 + memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid ));
1703 + *length = vp->namelen + 2;
1704 + *var_len = sizeof ( long );
1705 + *write_method = NULL;
1706 +
1707 + switch ( vp->magic ) {
1708 +
1709 + case DOT11REGDOMAINSSUPPORTVALUE:
1710 + return ( UCHAR * ) &rd->regDomainsSupportValue;
1711 +
1712 + default:
1713 + ERROR_MSG ( "" );
1714 + }
1715 +
1716 + return NULL;
1717 +}
1718 +
1719 +/****************************************************************************
1720 +* *
1721 +* var_dot11AntennasListTable() - *
1722 +* *
1723 +****************************************************************************/
1724 +unsigned char *
1725 +var_dot11AntennasListTable(struct variable *vp,
1726 + oid *name,
1727 + size_t *length,
1728 + int exact,
1729 + size_t *var_len,
1730 + WriteMethod **write_method)
1731 +{
1732 + int found = FALSE;
1733 + oid rName [ MAX_OID_LEN ]; // OID to be returned
1734 +
1735 + loadTables();
1736 + memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid ));
1737 + for ( np = LIST_FIRST ( &alList ); np != NULL; np = LIST_NEXT ( np, nodes )) {
1738 + al = ( struct alTbl_data * ) np->data;
1739 + rName[vp->namelen + 0] = al->ifIndex;
1740 + rName[vp->namelen + 1] = al->antennaListIndex;
1741 + if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) ||
1742 + ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) {
1743 + switch ( vp->magic ) {
1744 + case DOT11SUPPORTEDTXANTENNA:
1745 + if ( al->haveSupportedTxAntenna ) found = TRUE; break;
1746 + case DOT11SUPPORTEDRXANTENNA:
1747 + if ( al->haveSupportedRxAntenna ) found = TRUE; break;
1748 + case DOT11DIVERSITYSELECTIONRX:
1749 + if ( al->haveDiversitySelectionRx ) found = TRUE; break;
1750 + }
1751 + }
1752 + if ( found )
1753 + break;
1754 + }
1755 +
1756 + if ( !found )
1757 + return NULL;
1758 +
1759 + memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid ));
1760 + *length = vp->namelen + 2;
1761 + *var_len = sizeof ( long );
1762 + *write_method = NULL;
1763 +
1764 + switch ( vp->magic ) {
1765 +
1766 + case DOT11SUPPORTEDTXANTENNA:
1767 +// *write_method = write_dot11SupportedTxAntenna;
1768 + return ( UCHAR * ) &al->supportedTxAntenna;
1769 +
1770 + case DOT11SUPPORTEDRXANTENNA:
1771 +// *write_method = write_dot11SupportedRxAntenna;
1772 + return ( UCHAR * ) &al->supportedRxAntenna;
1773 +
1774 + case DOT11DIVERSITYSELECTIONRX:
1775 +// *write_method = write_dot11DiversitySelectionRx;
1776 + return ( UCHAR * ) &al->diversitySelectionRx;
1777 +
1778 + default:
1779 + ERROR_MSG ( "" );
1780 + }
1781 +
1782 + return NULL;
1783 +}
1784 +
1785 +/****************************************************************************
1786 +* *
1787 +* var_dot11SupportedDataRatesTxTable() - *
1788 +* *
1789 +****************************************************************************/
1790 +unsigned char *
1791 +var_dot11SupportedDataRatesTxTable ( struct variable *vp,
1792 + oid *name,
1793 + size_t *length,
1794 + int exact,
1795 + size_t *var_len,
1796 + WriteMethod **write_method )
1797 +{
1798 + int found = FALSE;
1799 + oid rName [ MAX_OID_LEN ]; // OID to be returned
1800 +
1801 + loadTables();
1802 + memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid ));
1803 + for ( np = LIST_FIRST ( &rtList ); np != NULL; np = LIST_NEXT ( np, nodes )) {
1804 + rt = ( struct rtTbl_data * ) np->data;
1805 + rName[vp->namelen + 0] = rt->ifIndex;
1806 + rName[vp->namelen + 1] = rt->supportedDataRatesTxIndex;
1807 + if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) ||
1808 + ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) {
1809 + switch ( vp->magic ) {
1810 + case DOT11SUPPORTEDDATARATESTXVALUE:
1811 + if ( rt->haveSupportedDataRatesTxValue ) found = TRUE; break;
1812 + }
1813 + }
1814 + if ( found )
1815 + break;
1816 + }
1817 +
1818 + if ( !found )
1819 + return NULL;
1820 +
1821 + memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid ));
1822 + *length = vp->namelen + 2;
1823 + *var_len = sizeof ( long );
1824 + *write_method = NULL;
1825 +
1826 + switch ( vp->magic ) {
1827 +
1828 + case DOT11SUPPORTEDDATARATESTXVALUE:
1829 + return ( UCHAR * ) &rt->supportedDataRatesTxValue;
1830 +
1831 + default:
1832 + ERROR_MSG ( "" );
1833 + }
1834 +
1835 + return NULL;
1836 +}
1837 +
1838 +/****************************************************************************
1839 +* *
1840 +* var_dot11SupportedDataRatesRxTable() - *
1841 +* *
1842 +****************************************************************************/
1843 +unsigned char *
1844 +var_dot11SupportedDataRatesRxTable ( struct variable *vp,
1845 + oid *name,
1846 + size_t *length,
1847 + int exact,
1848 + size_t *var_len,
1849 + WriteMethod **write_method )
1850 +{
1851 + int found = FALSE;
1852 + oid rName [ MAX_OID_LEN ]; // OID to be returned
1853 +
1854 + loadTables();
1855 + memcpy (( char * ) rName, ( char * ) vp->name, ( int ) vp->namelen * sizeof ( oid ));
1856 + for ( np = LIST_FIRST ( &rrList ); np != NULL; np = LIST_NEXT ( np, nodes )) {
1857 + rr = ( struct rrTbl_data * ) np->data;
1858 + rName[vp->namelen + 0] = rr->ifIndex;
1859 + rName[vp->namelen + 1] = rr->supportedDataRatesRxIndex;
1860 + if (( exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) == 0 )) ||
1861 + ( !exact && ( snmp_oid_compare ( rName, vp->namelen + 2, name, *length ) > 0 ))) {
1862 + switch ( vp->magic ) {
1863 + case DOT11SUPPORTEDDATARATESRXVALUE:
1864 + if ( rr->haveSupportedDataRatesRxValue ) found = TRUE; break;
1865 + }
1866 + }
1867 + if ( found )
1868 + break;
1869 + }
1870 +
1871 + if ( !found )
1872 + return NULL;
1873 +
1874 + memcpy (( char * ) name, ( char * ) rName, ( vp->namelen + 2 ) * sizeof ( oid ));
1875 + *length = vp->namelen + 2;
1876 + *var_len = sizeof ( long );
1877 + *write_method = NULL;
1878 +
1879 + switch ( vp->magic ) {
1880 +
1881 + case DOT11SUPPORTEDDATARATESRXVALUE:
1882 + return ( UCHAR * ) &rr->supportedDataRatesRxValue;
1883 +
1884 + default:
1885 + ERROR_MSG ( "" );
1886 + }
1887 +
1888 + return NULL;
1889 +}
1890 +
1891 +/****************************************************************************
1892 +* *
1893 +****************************************************************************/
1894 +int
1895 +write_dot11StationID(int action,
1896 + u_char *var_val,
1897 + u_char var_val_type,
1898 + size_t var_val_len,
1899 + u_char *statP,
1900 + oid *name,
1901 + size_t name_len)
1902 +{
1903 + static unsigned char string[SPRINT_MAX_LEN];
1904 + int size;
1905 +
1906 + switch ( action ) {
1907 +
1908 + case RESERVE1:
1909 + if ( var_val_type != ASN_OCTET_STR ) {
1910 + fprintf ( stderr, "write to dot11StationID not ASN_OCTET_STR\n" );
1911 + return SNMP_ERR_WRONGTYPE;
1912 + }
1913 + if ( var_val_len > sizeof ( string )) {
1914 + fprintf ( stderr,"write to dot11StationID: bad length\n" );
1915 + return SNMP_ERR_WRONGLENGTH;
1916 + }
1917 + break;
1918 +
1919 + case RESERVE2:
1920 + case FREE:
1921 + case ACTION:
1922 + case UNDO:
1923 + break;
1924 +
1925 + case COMMIT:
1926 + break;
1927 + }
1928 +
1929 + return SNMP_ERR_NOERROR;
1930 +}
1931 +
1932 +/****************************************************************************
1933 +* *
1934 +****************************************************************************/
1935 +int
1936 +write_dot11MediumOccupancyLimit(int action,
1937 + u_char *var_val,
1938 + u_char var_val_type,
1939 + size_t var_val_len,
1940 + u_char *statP,
1941 + oid *name,
1942 + size_t name_len)
1943 +{
1944 + static long *long_ret;
1945 + int size;
1946 +
1947 + switch ( action ) {
1948 +
1949 + case RESERVE1:
1950 + if ( var_val_type != ASN_INTEGER ) {
1951 + fprintf ( stderr, "write to dot11MediumOccupancyLimit not ASN_INTEGER\n" );
1952 + return SNMP_ERR_WRONGTYPE;
1953 + }
1954 + if ( var_val_len > sizeof ( long_ret )){
1955 + fprintf ( stderr,"write to dot11MediumOccupancyLimit: bad length\n" );
1956 + return SNMP_ERR_WRONGLENGTH;
1957 + }
1958 + break;
1959 +
1960 + case RESERVE2:
1961 + case FREE:
1962 + case ACTION:
1963 + case UNDO:
1964 + break;
1965 +
1966 + case COMMIT:
1967 + break;
1968 + }
1969 +
1970 + return SNMP_ERR_NOERROR;
1971 +}
1972 +
1973 +/****************************************************************************
1974 +* *
1975 +****************************************************************************/
1976 +int
1977 +write_dot11CFPPeriod(int action,
1978 + u_char *var_val,
1979 + u_char var_val_type,
1980 + size_t var_val_len,
1981 + u_char *statP,
1982 + oid *name,
1983 + size_t name_len)
1984 +{
1985 + static long *long_ret;
1986 + int size;
1987 +
1988 + switch ( action ) {
1989 +
1990 + case RESERVE1:
1991 + if ( var_val_type != ASN_INTEGER ) {
1992 + fprintf ( stderr, "write to dot11CFPPeriod not ASN_INTEGER\n" );
1993 + return SNMP_ERR_WRONGTYPE;
1994 + }
1995 + if ( var_val_len > sizeof ( long_ret )){
1996 + fprintf ( stderr, "write to dot11CFPPeriod: bad length\n" );
1997 + return SNMP_ERR_WRONGLENGTH;
1998 + }
1999 + break;
2000 +
2001 + case RESERVE2:
2002 + case FREE:
2003 + case ACTION:
2004 + case UNDO:
2005 + break;
2006 +
2007 + case COMMIT:
2008 + break;
2009 + }
2010 +
2011 + return SNMP_ERR_NOERROR;
2012 +}
2013 +
2014 +/****************************************************************************
2015 +* *
2016 +****************************************************************************/
2017 +int
2018 +write_dot11CFPMaxDuration(int action,
2019 + u_char *var_val,
2020 + u_char var_val_type,
2021 + size_t var_val_len,
2022 + u_char *statP,
2023 + oid *name,
2024 + size_t name_len)
2025 +{
2026 + static long *long_ret;
2027 + int size;
2028 +
2029 + switch ( action ) {
2030 +
2031 + case RESERVE1:
2032 + if ( var_val_type != ASN_INTEGER ) {
2033 + fprintf ( stderr, "write to dot11CFPMaxDuration not ASN_INTEGER\n" );
2034 + return SNMP_ERR_WRONGTYPE;
2035 + }
2036 + if ( var_val_len > sizeof ( long_ret )){
2037 + fprintf ( stderr, "write to dot11CFPMaxDuration: bad length\n" );
2038 + return SNMP_ERR_WRONGLENGTH;
2039 + }
2040 + break;
2041 +
2042 + case RESERVE2:
2043 + case FREE:
2044 + case ACTION:
2045 + case UNDO:
2046 + break;
2047 +
2048 + case COMMIT:
2049 + break;
2050 + }
2051 +
2052 + return SNMP_ERR_NOERROR;
2053 +}
2054 +
2055 +/****************************************************************************
2056 +* *
2057 +****************************************************************************/
2058 +int
2059 +write_dot11AuthenticationResponseTimeOut(int action,
2060 + u_char *var_val,
2061 + u_char var_val_type,
2062 + size_t var_val_len,
2063 + u_char *statP,
2064 + oid *name,
2065 + size_t name_len)
2066 +{
2067 + static long *long_ret;
2068 + int size;
2069 +
2070 + switch ( action ) {
2071 +
2072 + case RESERVE1:
2073 + if ( var_val_type != ASN_INTEGER ) {
2074 + fprintf ( stderr, "write to dot11AuthenticationResponseTimeOut not ASN_INTEGER\n" );
2075 + return SNMP_ERR_WRONGTYPE;
2076 + }
2077 + if ( var_val_len > sizeof ( long_ret )){
2078 + fprintf ( stderr, "write to dot11AuthenticationResponseTimeOut: bad length\n" );
2079 + return SNMP_ERR_WRONGLENGTH;
2080 + }
2081 + break;
2082 +
2083 + case RESERVE2:
2084 + case FREE:
2085 + case ACTION:
2086 + case UNDO:
2087 + break;
2088 +
2089 + case COMMIT:
2090 + break;
2091 + }
2092 +
2093 + return SNMP_ERR_NOERROR;
2094 +}
2095 +
2096 +/****************************************************************************
2097 +* *
2098 +****************************************************************************/
2099 +int
2100 +write_dot11PowerManagementMode(int action,
2101 + u_char *var_val,
2102 + u_char var_val_type,
2103 + size_t var_val_len,
2104 + u_char *statP,
2105 + oid *name,
2106 + size_t name_len)
2107 +{
2108 + static long *long_ret;
2109 + int size;
2110 +
2111 + switch ( action ) {
2112 +
2113 + case RESERVE1:
2114 + if ( var_val_type != ASN_INTEGER ) {
2115 + fprintf ( stderr, "write to dot11PowerManagementMode not ASN_INTEGER\n" );
2116 + return SNMP_ERR_WRONGTYPE;
2117 + }
2118 + if ( var_val_len > sizeof ( long_ret )) {
2119 + fprintf ( stderr, "write to dot11PowerManagementMode: bad length\n" );
2120 + return SNMP_ERR_WRONGLENGTH;
2121 + }
2122 + break;
2123 +
2124 + case RESERVE2:
2125 + case FREE:
2126 + case ACTION:
2127 + case UNDO:
2128 + break;
2129 +
2130 + case COMMIT:
2131 + break;
2132 + }
2133 +
2134 + return SNMP_ERR_NOERROR;
2135 +}
2136 +
2137 +/****************************************************************************
2138 +* *
2139 +****************************************************************************/
2140 +int
2141 +write_dot11DesiredSSID(int action,
2142 + u_char *var_val,
2143 + u_char var_val_type,
2144 + size_t var_val_len,
2145 + u_char *statP,
2146 + oid *name,
2147 + size_t name_len)
2148 +{
2149 + static unsigned char string[SPRINT_MAX_LEN];
2150 + int size;
2151 +
2152 + switch ( action ) {
2153 +
2154 + case RESERVE1:
2155 + if ( var_val_type != ASN_OCTET_STR ) {
2156 + fprintf ( stderr, "write to dot11DesiredSSID not ASN_OCTET_STR\n" );
2157 + return SNMP_ERR_WRONGTYPE;
2158 + }
2159 + if ( var_val_len > sizeof ( string )){
2160 + fprintf ( stderr, "write to dot11DesiredSSID: bad length\n" );
2161 + return SNMP_ERR_WRONGLENGTH;
2162 + }
2163 + break;
2164 +
2165 + case RESERVE2:
2166 + case FREE:
2167 + case ACTION:
2168 + case UNDO:
2169 + break;
2170 +
2171 + case COMMIT:
2172 + break;
2173 + }
2174 +
2175 + return SNMP_ERR_NOERROR;
2176 +}
2177 +
2178 +/****************************************************************************
2179 +* *
2180 +****************************************************************************/
2181 +int
2182 +write_dot11DesiredBSSType(int action,
2183 + u_char *var_val,
2184 + u_char var_val_type,
2185 + size_t var_val_len,
2186 + u_char *statP,
2187 + oid *name,
2188 + size_t name_len)
2189 +{
2190 + static long *long_ret;
2191 + int size;
2192 +
2193 + switch ( action ) {
2194 +
2195 + case RESERVE1:
2196 + if ( var_val_type != ASN_INTEGER ) {
2197 + fprintf ( stderr, "write to dot11DesiredBSSType not ASN_INTEGER\n" );
2198 + return SNMP_ERR_WRONGTYPE;
2199 + }
2200 + if ( var_val_len > sizeof ( long_ret )){
2201 + fprintf ( stderr, "write to dot11DesiredBSSType: bad length\n" );
2202 + return SNMP_ERR_WRONGLENGTH;
2203 + }
2204 + break;
2205 +
2206 + case RESERVE2:
2207 + case FREE:
2208 + case ACTION:
2209 + case UNDO:
2210 + break;
2211 +
2212 + case COMMIT:
2213 + break;
2214 + }
2215 +
2216 + return SNMP_ERR_NOERROR;
2217 +}
2218 +
2219 +/****************************************************************************
2220 +* *
2221 +****************************************************************************/
2222 +int
2223 +write_dot11OperationalRateSet(int action,
2224 + u_char *var_val,
2225 + u_char var_val_type,
2226 + size_t var_val_len,
2227 + u_char *statP,
2228 + oid *name,
2229 + size_t name_len)
2230 +{
2231 + static unsigned char string[SPRINT_MAX_LEN];
2232 + int size;
2233 +
2234 + switch ( action ) {
2235 +
2236 + case RESERVE1:
2237 + if ( var_val_type != ASN_OCTET_STR ) {
2238 + fprintf ( stderr, "write to dot11OperationalRateSet not ASN_OCTET_STR\n" );
2239 + return SNMP_ERR_WRONGTYPE;
2240 + }
2241 + if ( var_val_len > sizeof ( string )){
2242 + fprintf ( stderr, "write to dot11OperationalRateSet: bad length\n" );
2243 + return SNMP_ERR_WRONGLENGTH;
2244 + }
2245 + break;
2246 +
2247 + case RESERVE2:
2248 + case FREE:
2249 + case ACTION:
2250 + case UNDO:
2251 + break;
2252 +
2253 + case COMMIT:
2254 + break;
2255 + }
2256 +
2257 + return SNMP_ERR_NOERROR;
2258 +}
2259 +
2260 +/****************************************************************************
2261 +* *
2262 +****************************************************************************/
2263 +int
2264 +write_dot11BeaconPeriod(int action,
2265 + u_char *var_val,
2266 + u_char var_val_type,
2267 + size_t var_val_len,
2268 + u_char *statP,
2269 + oid *name,
2270 + size_t name_len)
2271 +{
2272 + static long *long_ret;
2273 + int size;
2274 +
2275 + switch ( action ) {
2276 +
2277 + case RESERVE1:
2278 + if ( var_val_type != ASN_INTEGER ) {
2279 + fprintf ( stderr, "write to dot11BeaconPeriod not ASN_INTEGER\n" );
2280 + return SNMP_ERR_WRONGTYPE;
2281 + }
2282 + if ( var_val_len > sizeof ( long_ret )){
2283 + fprintf ( stderr,"write to dot11BeaconPeriod: bad length\n" );
2284 + return SNMP_ERR_WRONGLENGTH;
2285 + }
2286 + break;
2287 +
2288 + case RESERVE2:
2289 + case FREE:
2290 + case ACTION:
2291 + case UNDO:
2292 + break;
2293 +
2294 + case COMMIT:
2295 + break;
2296 + }
2297 +
2298 + return SNMP_ERR_NOERROR;
2299 +}
2300 +
2301 +/****************************************************************************
2302 +* *
2303 +****************************************************************************/
2304 +int
2305 +write_dot11DTIMPeriod(int action,
2306 + u_char *var_val,
2307 + u_char var_val_type,
2308 + size_t var_val_len,
2309 + u_char *statP,
2310 + oid *name,
2311 + size_t name_len)
2312 +{
2313 + static long *long_ret;
2314 + int size;
2315 +
2316 + switch ( action ) {
2317 +
2318 + case RESERVE1:
2319 + if ( var_val_type != ASN_INTEGER ) {
2320 + fprintf ( stderr, "write to dot11DTIMPeriod not ASN_INTEGER\n" );
2321 + return SNMP_ERR_WRONGTYPE;
2322 + }
2323 + if ( var_val_len > sizeof ( long_ret )){
2324 + fprintf ( stderr,"write to dot11DTIMPeriod: bad length\n" );
2325 + return SNMP_ERR_WRONGLENGTH;
2326 + }
2327 + break;
2328 +
2329 + case RESERVE2:
2330 + case FREE:
2331 + case ACTION:
2332 + case UNDO:
2333 + break;
2334 +
2335 + case COMMIT:
2336 + break;
2337 + }
2338 +
2339 + return SNMP_ERR_NOERROR;
2340 +}
2341 +
2342 +/****************************************************************************
2343 +* *
2344 +****************************************************************************/
2345 +int
2346 +write_dot11AssociationResponseTimeOut(int action,
2347 + u_char *var_val,
2348 + u_char var_val_type,
2349 + size_t var_val_len,
2350 + u_char *statP,
2351 + oid *name,
2352 + size_t name_len)
2353 +{
2354 + static long *long_ret;
2355 + int size;
2356 +
2357 + switch ( action ) {
2358 +
2359 + case RESERVE1:
2360 + if ( var_val_type != ASN_INTEGER ) {
2361 + fprintf ( stderr, "write to dot11AssociationResponseTimeOut not ASN_INTEGER\n" );
2362 + return SNMP_ERR_WRONGTYPE;
2363 + }
2364 + if ( var_val_len > sizeof ( long_ret )) {
2365 + fprintf ( stderr,"write to dot11AssociationResponseTimeOut: bad length\n" );
2366 + return SNMP_ERR_WRONGLENGTH;
2367 + }
2368 + break;
2369 +
2370 + case RESERVE2:
2371 + case FREE:
2372 + case ACTION:
2373 + case UNDO:
2374 + break;
2375 +
2376 + case COMMIT:
2377 + break;
2378 + }
2379 +
2380 + return SNMP_ERR_NOERROR;
2381 +}
2382 +
2383 +/****************************************************************************
2384 +* *
2385 +****************************************************************************/
2386 +int
2387 +write_dot11AuthenticationAlgorithmsEnable(int action,
2388 + u_char *var_val,
2389 + u_char var_val_type,
2390 + size_t var_val_len,
2391 + u_char *statP,
2392 + oid *name,
2393 + size_t name_len)
2394 +{
2395 + static long *long_ret;
2396 + int size;
2397 +
2398 + switch ( action ) {
2399 +
2400 + case RESERVE1:
2401 + if ( var_val_type != ASN_INTEGER ) {
2402 + fprintf ( stderr, "write to dot11AuthenticationAlgorithmsEnable not ASN_INTEGER\n" );
2403 + return SNMP_ERR_WRONGTYPE;
2404 + }
2405 + if ( var_val_len > sizeof ( long_ret )){
2406 + fprintf ( stderr,"write to dot11AuthenticationAlgorithmsEnable: bad length\n" );
2407 + return SNMP_ERR_WRONGLENGTH;
2408 + }
2409 + break;
2410 +
2411 + case RESERVE2:
2412 + case FREE:
2413 + case ACTION:
2414 + case UNDO:
2415 + break;
2416 +
2417 + case COMMIT:
2418 + break;
2419 + }
2420 +
2421 + return SNMP_ERR_NOERROR;
2422 +}
2423 +
2424 +/****************************************************************************
2425 +* *
2426 +****************************************************************************/
2427 +int
2428 +write_dot11WEPDefaultKeyValue(int action,
2429 + u_char *var_val,
2430 + u_char var_val_type,
2431 + size_t var_val_len,
2432 + u_char *statP,
2433 + oid *name,
2434 + size_t name_len)
2435 +{
2436 + static unsigned char string[SPRINT_MAX_LEN];
2437 + int size;
2438 +
2439 + switch ( action ) {
2440 +
2441 + case RESERVE1:
2442 + if ( var_val_type != ASN_OCTET_STR ) {
2443 + fprintf ( stderr, "write to dot11WEPDefaultKeyValue not ASN_OCTET_STR\n" );
2444 + return SNMP_ERR_WRONGTYPE;
2445 + }
2446 + if ( var_val_len > sizeof ( string )){
2447 + fprintf ( stderr,"write to dot11WEPDefaultKeyValue: bad length\n" );
2448 + return SNMP_ERR_WRONGLENGTH;
2449 + }
2450 + break;
2451 +
2452 + case RESERVE2:
2453 + case FREE:
2454 + case ACTION:
2455 + case UNDO:
2456 + break;
2457 +
2458 + case COMMIT:
2459 + break;
2460 + }
2461 +
2462 + return SNMP_ERR_NOERROR;
2463 +}
2464 +
2465 +/****************************************************************************
2466 +* *
2467 +****************************************************************************/
2468 +int
2469 +write_dot11WEPKeyMappingAddress(int action,
2470 + u_char *var_val,
2471 + u_char var_val_type,
2472 + size_t var_val_len,
2473 + u_char *statP,
2474 + oid *name,
2475 + size_t name_len)
2476 +{
2477 + static unsigned char string[SPRINT_MAX_LEN];
2478 + int size;
2479 +
2480 + switch ( action ) {
2481 +
2482 + case RESERVE1:
2483 + if ( var_val_type != ASN_OCTET_STR ) {
2484 + fprintf ( stderr, "write to dot11WEPKeyMappingAddress not ASN_OCTET_STR\n" );
2485 + return SNMP_ERR_WRONGTYPE;
2486 + }
2487 + if ( var_val_len > sizeof ( string )) {
2488 + fprintf ( stderr,"write to dot11WEPKeyMappingAddress: bad length\n" );
2489 + return SNMP_ERR_WRONGLENGTH;
2490 + }
2491 + break;
2492 +
2493 + case RESERVE2:
2494 + case FREE:
2495 + case ACTION:
2496 + case UNDO:
2497 + break;
2498 +
2499 + case COMMIT:
2500 + break;
2501 + }
2502 +
2503 + return SNMP_ERR_NOERROR;
2504 +}
2505 +
2506 +/****************************************************************************
2507 +* *
2508 +****************************************************************************/
2509 +int
2510 +write_dot11WEPKeyMappingWEPOn(int action,
2511 + u_char *var_val,
2512 + u_char var_val_type,
2513 + size_t var_val_len,
2514 + u_char *statP,
2515 + oid *name,
2516 + size_t name_len)
2517 +{
2518 + static long *long_ret;
2519 + int size;
2520 +
2521 + switch ( action ) {
2522 +
2523 + case RESERVE1:
2524 + if ( var_val_type != ASN_INTEGER ) {
2525 + fprintf ( stderr, "write to dot11WEPKeyMappingWEPOn not ASN_INTEGER\n" );
2526 + return SNMP_ERR_WRONGTYPE;
2527 + }
2528 + if ( var_val_len > sizeof ( long_ret )){
2529 + fprintf ( stderr, "write to dot11WEPKeyMappingWEPOn: bad length\n" );
2530 + return SNMP_ERR_WRONGLENGTH;
2531 + }
2532 + break;
2533 +
2534 + case RESERVE2:
2535 + case FREE:
2536 + case ACTION:
2537 + case UNDO:
2538 + break;
2539 +
2540 + case COMMIT:
2541 + break;
2542 + }
2543 +
2544 + return SNMP_ERR_NOERROR;
2545 +}
2546 +
2547 +/****************************************************************************
2548 +* *
2549 +****************************************************************************/
2550 +int
2551 +write_dot11WEPKeyMappingValue(int action,
2552 + u_char *var_val,
2553 + u_char var_val_type,
2554 + size_t var_val_len,
2555 + u_char *statP,
2556 + oid *name,
2557 + size_t name_len)
2558 +{
2559 + static unsigned char string[SPRINT_MAX_LEN];
2560 + int size;
2561 +
2562 + switch ( action ) {
2563 +
2564 + case RESERVE1:
2565 + if ( var_val_type != ASN_OCTET_STR ) {
2566 + fprintf ( stderr, "write to dot11WEPKeyMappingValue not ASN_OCTET_STR\n" );
2567 + return SNMP_ERR_WRONGTYPE;
2568 + }
2569 + if ( var_val_len > sizeof ( string )) {
2570 + fprintf ( stderr, "write to dot11WEPKeyMappingValue: bad length\n" );
2571 + return SNMP_ERR_WRONGLENGTH;
2572 + }
2573 + break;
2574 +
2575 + case RESERVE2:
2576 + case FREE:
2577 + case ACTION:
2578 + case UNDO:
2579 + break;
2580 +
2581 + case COMMIT:
2582 + break;
2583 + }
2584 +
2585 + return SNMP_ERR_NOERROR;
2586 +}
2587 +
2588 +/****************************************************************************
2589 +* *
2590 +****************************************************************************/
2591 +int
2592 +write_dot11WEPKeyMappingStatus(int action,
2593 + u_char *var_val,
2594 + u_char var_val_type,
2595 + size_t var_val_len,
2596 + u_char *statP,
2597 + oid *name,
2598 + size_t name_len)
2599 +{
2600 + static long *long_ret;
2601 + int size;
2602 +
2603 + switch ( action ) {
2604 + case RESERVE1:
2605 + if ( var_val_type != ASN_INTEGER ) {
2606 + fprintf ( stderr, "write to dot11WEPKeyMappingStatus not ASN_INTEGER\n" );
2607 + return SNMP_ERR_WRONGTYPE;
2608 + }
2609 + if ( var_val_len > sizeof ( long_ret )){
2610 + fprintf ( stderr, "write to dot11WEPKeyMappingStatus: bad length\n" );
2611 + return SNMP_ERR_WRONGLENGTH;
2612 + }
2613 + break;
2614 +
2615 + case RESERVE2:
2616 + case FREE:
2617 + case ACTION:
2618 + case UNDO:
2619 + break;
2620 +
2621 + case COMMIT:
2622 + break;
2623 + }
2624 +
2625 + return SNMP_ERR_NOERROR;
2626 +}
2627 +
2628 +/****************************************************************************
2629 +* *
2630 +****************************************************************************/
2631 +int
2632 +write_dot11PrivacyInvoked(int action,
2633 + u_char *var_val,
2634 + u_char var_val_type,
2635 + size_t var_val_len,
2636 + u_char *statP,
2637 + oid *name,
2638 + size_t name_len)
2639 +{
2640 + static long *long_ret;
2641 + int size;
2642 +
2643 + switch ( action ) {
2644 +
2645 + case RESERVE1:
2646 + if ( var_val_type != ASN_INTEGER ) {
2647 + fprintf ( stderr, "write to dot11PrivacyInvoked not ASN_INTEGER\n" );
2648 + return SNMP_ERR_WRONGTYPE;
2649 + }
2650 + if ( var_val_len > sizeof ( long_ret )){
2651 + fprintf ( stderr, "write to dot11PrivacyInvoked: bad length\n" );
2652 + return SNMP_ERR_WRONGLENGTH;
2653 + }
2654 + break;
2655 +
2656 + case RESERVE2:
2657 + case FREE:
2658 + case ACTION:
2659 + case UNDO:
2660 + break;
2661 +
2662 + case COMMIT:
2663 + break;
2664 + }
2665 +
2666 + return SNMP_ERR_NOERROR;
2667 +}
2668 +
2669 +/****************************************************************************
2670 +* *
2671 +****************************************************************************/
2672 +int
2673 +write_dot11WEPDefaultKeyID(int action,
2674 + u_char *var_val,
2675 + u_char var_val_type,
2676 + size_t var_val_len,
2677 + u_char *statP,
2678 + oid *name,
2679 + size_t name_len)
2680 +{
2681 + static long *long_ret;
2682 + int size;
2683 +
2684 + switch ( action ) {
2685 +
2686 + case RESERVE1:
2687 + if ( var_val_type != ASN_INTEGER ) {
2688 + fprintf ( stderr, "write to dot11WEPDefaultKeyID not ASN_INTEGER\n" );
2689 + return SNMP_ERR_WRONGTYPE;
2690 + }
2691 + if ( var_val_len > sizeof ( long_ret )){
2692 + fprintf ( stderr, "write to dot11WEPDefaultKeyID: bad length\n" );
2693 + return SNMP_ERR_WRONGLENGTH;
2694 + }
2695 + break;
2696 +
2697 + case RESERVE2:
2698 + case FREE:
2699 + case ACTION:
2700 + case UNDO:
2701 + break;
2702 +
2703 + case COMMIT:
2704 + break;
2705 + }
2706 +
2707 + return SNMP_ERR_NOERROR;
2708 +}
2709 +
2710 +/****************************************************************************
2711 +* *
2712 +****************************************************************************/
2713 +int
2714 +write_dot11WEPKeyMappingLength(int action,
2715 + u_char *var_val,
2716 + u_char var_val_type,
2717 + size_t var_val_len,
2718 + u_char *statP,
2719 + oid *name,
2720 + size_t name_len)
2721 +{
2722 + static long *long_ret;
2723 + int size;
2724 +
2725 + switch ( action ) {
2726 +
2727 + case RESERVE1:
2728 + if ( var_val_type != ASN_INTEGER ) {
2729 + fprintf ( stderr, "write to dot11WEPKeyMappingLength not ASN_INTEGER\n" );
2730 + return SNMP_ERR_WRONGTYPE;
2731 + }
2732 + if ( var_val_len > sizeof ( long_ret )){
2733 + fprintf ( stderr, "write to dot11WEPKeyMappingLength: bad length\n" );
2734 + return SNMP_ERR_WRONGLENGTH;
2735 + }
2736 + break;
2737 +
2738 + case RESERVE2:
2739 + case FREE:
2740 + case ACTION:
2741 + case UNDO:
2742 + break;
2743 +
2744 + case COMMIT:
2745 + break;
2746 + }
2747 +
2748 + return SNMP_ERR_NOERROR;
2749 +}
2750 +
2751 +/****************************************************************************
2752 +* *
2753 +****************************************************************************/
2754 +int
2755 +write_dot11ExcludeUnencrypted(int action,
2756 + u_char *var_val,
2757 + u_char var_val_type,
2758 + size_t var_val_len,
2759 + u_char *statP,
2760 + oid *name,
2761 + size_t name_len)
2762 +{
2763 + static long *long_ret;
2764 + int size;
2765 +
2766 + switch ( action ) {
2767 +
2768 + case RESERVE1:
2769 + if ( var_val_type != ASN_INTEGER ) {
2770 + fprintf ( stderr, "write to dot11ExcludeUnencrypted not ASN_INTEGER\n" );
2771 + return SNMP_ERR_WRONGTYPE;
2772 + }
2773 + if ( var_val_len > sizeof ( long_ret )){
2774 + fprintf ( stderr,"write to dot11ExcludeUnencrypted: bad length\n" );
2775 + return SNMP_ERR_WRONGLENGTH;
2776 + }
2777 + break;
2778 +
2779 + case RESERVE2:
2780 + case FREE:
2781 + case ACTION:
2782 + case UNDO:
2783 + break;
2784 +
2785 + case COMMIT:
2786 + break;
2787 + }
2788 +
2789 + return SNMP_ERR_NOERROR;
2790 +}
2791 +
2792 +/****************************************************************************
2793 +* *
2794 +****************************************************************************/
2795 +int
2796 +write_dot11RTSThreshold(int action,
2797 + u_char *var_val,
2798 + u_char var_val_type,
2799 + size_t var_val_len,
2800 + u_char *statP,
2801 + oid *name,
2802 + size_t name_len)
2803 +{
2804 + static long *long_ret;
2805 + int size;
2806 +
2807 + switch ( action ) {
2808 +
2809 + case RESERVE1:
2810 + if ( var_val_type != ASN_INTEGER ){
2811 + fprintf ( stderr, "write to dot11RTSThreshold not ASN_INTEGER\n" );
2812 + return SNMP_ERR_WRONGTYPE;
2813 + }
2814 + if ( var_val_len > sizeof ( long_ret )){
2815 + fprintf ( stderr, "write to dot11RTSThreshold: bad length\n" );
2816 + return SNMP_ERR_WRONGLENGTH;
2817 + }
2818 + break;
2819 +
2820 + case RESERVE2:
2821 + case FREE:
2822 + case ACTION:
2823 + case UNDO:
2824 + break;
2825 +
2826 + case COMMIT:
2827 + break;
2828 + }
2829 +
2830 + return SNMP_ERR_NOERROR;
2831 +}
2832 +
2833 +/****************************************************************************
2834 +* *
2835 +****************************************************************************/
2836 +int
2837 +write_dot11ShortRetryLimit(int action,
2838 + u_char *var_val,
2839 + u_char var_val_type,
2840 + size_t var_val_len,
2841 + u_char *statP,
2842 + oid *name,
2843 + size_t name_len)
2844 +{
2845 + static long *long_ret;
2846 + int size;
2847 +
2848 + switch ( action ) {
2849 +
2850 + case RESERVE1:
2851 + if ( var_val_type != ASN_INTEGER ) {
2852 + fprintf ( stderr, "write to dot11ShortRetryLimit not ASN_INTEGER\n" );
2853 + return SNMP_ERR_WRONGTYPE;
2854 + }
2855 + if ( var_val_len > sizeof ( long_ret )){
2856 + fprintf ( stderr, "write to dot11ShortRetryLimit: bad length\n" );
2857 + return SNMP_ERR_WRONGLENGTH;
2858 + }
2859 + break;
2860 +
2861 + case RESERVE2:
2862 + case FREE:
2863 + case ACTION:
2864 + case UNDO:
2865 + break;
2866 +
2867 + case COMMIT:
2868 + break;
2869 + }
2870 +
2871 + return SNMP_ERR_NOERROR;
2872 +}
2873 +
2874 +/****************************************************************************
2875 +* *
2876 +****************************************************************************/
2877 +int
2878 +write_dot11LongRetryLimit(int action,
2879 + u_char *var_val,
2880 + u_char var_val_type,
2881 + size_t var_val_len,
2882 + u_char *statP,
2883 + oid *name,
2884 + size_t name_len)
2885 +{
2886 + static long *long_ret;
2887 + int size;
2888 +
2889 + switch ( action ) {
2890 +
2891 + case RESERVE1:
2892 + if ( var_val_type != ASN_INTEGER ) {
2893 + fprintf ( stderr, "write to dot11LongRetryLimit not ASN_INTEGER\n" );
2894 + return SNMP_ERR_WRONGTYPE;
2895 + }
2896 + if ( var_val_len > sizeof ( long_ret )){
2897 + fprintf ( stderr,"write to dot11LongRetryLimit: bad length\n" );
2898 + return SNMP_ERR_WRONGLENGTH;
2899 + }
2900 + break;
2901 +
2902 + case RESERVE2:
2903 + case FREE:
2904 + case ACTION:
2905 + case UNDO:
2906 + break;
2907 +
2908 + case COMMIT:
2909 + break;
2910 + }
2911 +
2912 + return SNMP_ERR_NOERROR;
2913 +}
2914 +
2915 +/****************************************************************************
2916 +* *
2917 +****************************************************************************/
2918 +int
2919 +write_dot11FragmentationThreshold(int action,
2920 + u_char *var_val,
2921 + u_char var_val_type,
2922 + size_t var_val_len,
2923 + u_char *statP,
2924 + oid *name,
2925 + size_t name_len)
2926 +{
2927 + static long *long_ret;
2928 + int size;
2929 +
2930 + switch ( action ) {
2931 +
2932 + case RESERVE1:
2933 + if ( var_val_type != ASN_INTEGER ) {
2934 + fprintf ( stderr, "write to dot11FragmentationThreshold not ASN_INTEGER\n" );
2935 + return SNMP_ERR_WRONGTYPE;
2936 + }
2937 + if ( var_val_len > sizeof ( long_ret )){
2938 + fprintf ( stderr,"write to dot11FragmentationThreshold: bad length\n" );
2939 + return SNMP_ERR_WRONGLENGTH;
2940 + }
2941 + break;
2942 +
2943 + case RESERVE2:
2944 + case FREE:
2945 + case ACTION:
2946 + case UNDO:
2947 + break;
2948 +
2949 + case COMMIT:
2950 + break;
2951 + }
2952 +
2953 + return SNMP_ERR_NOERROR;
2954 +}
2955 +
2956 +/****************************************************************************
2957 +* *
2958 +****************************************************************************/
2959 +int
2960 +write_dot11MaxTransmitMSDULifetime(int action,
2961 + u_char *var_val,
2962 + u_char var_val_type,
2963 + size_t var_val_len,
2964 + u_char *statP,
2965 + oid *name,
2966 + size_t name_len)
2967 +{
2968 + static long *long_ret;
2969 + int size;
2970 +
2971 + switch ( action ) {
2972 +
2973 + case RESERVE1:
2974 + if ( var_val_type != ASN_INTEGER ) {
2975 + fprintf ( stderr, "write to dot11MaxTransmitMSDULifetime not ASN_INTEGER\n" );
2976 + return SNMP_ERR_WRONGTYPE;
2977 + }
2978 + if ( var_val_len > sizeof ( long_ret )){
2979 + fprintf ( stderr, "write to dot11MaxTransmitMSDULifetime: bad length\n" );
2980 + return SNMP_ERR_WRONGLENGTH;
2981 + }
2982 + break;
2983 +
2984 + case RESERVE2:
2985 + case FREE:
2986 + case ACTION:
2987 + case UNDO:
2988 + break;
2989 +
2990 + case COMMIT:
2991 +
2992 + break;
2993 + }
2994 +
2995 + return SNMP_ERR_NOERROR;
2996 +}
2997 +
2998 +/****************************************************************************
2999 +* *
3000 +****************************************************************************/
3001 +int
3002 +write_dot11MaxReceiveLifetime(int action,
3003 + u_char *var_val,
3004 + u_char var_val_type,
3005 + size_t var_val_len,
3006 + u_char *statP,
3007 + oid *name,
3008 + size_t name_len)
3009 +{
3010 + static long *long_ret;
3011 + int size;
3012 +
3013 + switch ( action ) {
3014 +
3015 + case RESERVE1:
3016 + if ( var_val_type != ASN_INTEGER ) {
3017 + fprintf ( stderr, "write to dot11MaxReceiveLifetime not ASN_INTEGER\n" );
3018 + return SNMP_ERR_WRONGTYPE;
3019 + }
3020 + if ( var_val_len > sizeof ( long_ret )){
3021 + fprintf ( stderr, "write to dot11MaxReceiveLifetime: bad length\n" );
3022 + return SNMP_ERR_WRONGLENGTH;
3023 + }
3024 + break;
3025 +
3026 + case RESERVE2:
3027 + case FREE:
3028 + case ACTION:
3029 + case UNDO:
3030 + break;
3031 +
3032 + case COMMIT:
3033 + break;
3034 + }
3035 +
3036 + return SNMP_ERR_NOERROR;
3037 +}
3038 +
3039 +/****************************************************************************
3040 +* *
3041 +****************************************************************************/
3042 +int
3043 +write_dot11Address(int action,
3044 + u_char *var_val,
3045 + u_char var_val_type,
3046 + size_t var_val_len,
3047 + u_char *statP,
3048 + oid *name,
3049 + size_t name_len)
3050 +{
3051 + static unsigned char string[SPRINT_MAX_LEN];
3052 + int size;
3053 +
3054 + switch ( action ) {
3055 +
3056 + case RESERVE1:
3057 + if ( var_val_type != ASN_OCTET_STR ) {
3058 + fprintf ( stderr, "write to dot11Address not ASN_OCTET_STR\n" );
3059 + return SNMP_ERR_WRONGTYPE;
3060 + }
3061 + if ( var_val_len > sizeof ( string )){
3062 + fprintf ( stderr, "write to dot11Address: bad length\n" );
3063 + return SNMP_ERR_WRONGLENGTH;
3064 + }
3065 + break;
3066 +
3067 + case RESERVE2:
3068 + case FREE:
3069 + case ACTION:
3070 + case UNDO:
3071 + break;
3072 +
3073 + case COMMIT:
3074 + break;
3075 + }
3076 +
3077 + return SNMP_ERR_NOERROR;
3078 +}
3079 +
3080 +/****************************************************************************
3081 +* *
3082 +****************************************************************************/
3083 +int
3084 +write_dot11GroupAddressesStatus(int action,
3085 + u_char *var_val,
3086 + u_char var_val_type,
3087 + size_t var_val_len,
3088 + u_char *statP,
3089 + oid *name,
3090 + size_t name_len)
3091 +{
3092 + static long *long_ret;
3093 + int size;
3094 +
3095 + switch ( action ) {
3096 +
3097 + case RESERVE1:
3098 + if ( var_val_type != ASN_INTEGER ) {
3099 + fprintf ( stderr, "write to dot11GroupAddressesStatus not ASN_INTEGER\n" );
3100 + return SNMP_ERR_WRONGTYPE;
3101 + }
3102 + if ( var_val_len > sizeof ( long_ret )){
3103 + fprintf ( stderr,"write to dot11GroupAddressesStatus: bad length\n" );
3104 + return SNMP_ERR_WRONGLENGTH;
3105 + }
3106 + break;
3107 +
3108 + case RESERVE2:
3109 + case FREE:
3110 + case ACTION:
3111 + case UNDO:
3112 + break;
3113 +
3114 + case COMMIT:
3115 + break;
3116 + }
3117 +
3118 + return SNMP_ERR_NOERROR;
3119 +}
3120 +
3121 +/****************************************************************************
3122 +* *
3123 +****************************************************************************/
3124 +int
3125 +write_dot11CurrentRegDomain(int action,
3126 + u_char *var_val,
3127 + u_char var_val_type,
3128 + size_t var_val_len,
3129 + u_char *statP,
3130 + oid *name,
3131 + size_t name_len)
3132 +{
3133 + static long *long_ret;
3134 + int size;
3135 +
3136 + switch ( action ) {
3137 +
3138 + case RESERVE1:
3139 + if ( var_val_type != ASN_INTEGER ) {
3140 + fprintf ( stderr, "write to dot11CurrentRegDomain not ASN_INTEGER\n" );
3141 + return SNMP_ERR_WRONGTYPE;
3142 + }
3143 + if ( var_val_len > sizeof ( long_ret )){
3144 + fprintf ( stderr, "write to dot11CurrentRegDomain: bad length\n" );
3145 + return SNMP_ERR_WRONGLENGTH;
3146 + }
3147 + break;
3148 +
3149 + case RESERVE2:
3150 + case FREE:
3151 + case ACTION:
3152 + case UNDO:
3153 + break;
3154 +
3155 + case COMMIT:
3156 + break;
3157 + }
3158 +
3159 + return SNMP_ERR_NOERROR;
3160 +}
3161 +
3162 +/****************************************************************************
3163 +* *
3164 +****************************************************************************/
3165 +int
3166 +write_dot11CurrentTxAntenna(int action,
3167 + u_char *var_val,
3168 + u_char var_val_type,
3169 + size_t var_val_len,
3170 + u_char *statP,
3171 + oid *name,
3172 + size_t name_len)
3173 +{
3174 + static long *long_ret;
3175 + int size;
3176 +
3177 + switch ( action ) {
3178 +
3179 + case RESERVE1:
3180 + if ( var_val_type != ASN_INTEGER ) {
3181 + fprintf ( stderr, "write to dot11CurrentTxAntenna not ASN_INTEGER\n" );
3182 + return SNMP_ERR_WRONGTYPE;
3183 + }
3184 + if ( var_val_len > sizeof ( long_ret )){
3185 + fprintf ( stderr, "write to dot11CurrentTxAntenna: bad length\n" );
3186 + return SNMP_ERR_WRONGLENGTH;
3187 + }
3188 + break;
3189 +
3190 + case RESERVE2:
3191 + case FREE:
3192 + case ACTION:
3193 + case UNDO:
3194 + break;
3195 +
3196 + case COMMIT:
3197 + break;
3198 + }
3199 +
3200 + return SNMP_ERR_NOERROR;
3201 +}
3202 +
3203 +/****************************************************************************
3204 +* *
3205 +****************************************************************************/
3206 +int
3207 +write_dot11CurrentRxAntenna(int action,
3208 + u_char *var_val,
3209 + u_char var_val_type,
3210 + size_t var_val_len,
3211 + u_char *statP,
3212 + oid *name,
3213 + size_t name_len)
3214 +{
3215 + static long *long_ret;
3216 + int size;
3217 +
3218 + switch ( action ) {
3219 +
3220 + case RESERVE1:
3221 + if ( var_val_type != ASN_INTEGER ) {
3222 + fprintf ( stderr, "write to dot11CurrentRxAntenna not ASN_INTEGER\n" );
3223 + return SNMP_ERR_WRONGTYPE;
3224 + }
3225 + if ( var_val_len > sizeof ( long_ret )){
3226 + fprintf ( stderr,"write to dot11CurrentRxAntenna: bad length\n" );
3227 + return SNMP_ERR_WRONGLENGTH;
3228 + }
3229 + break;
3230 +
3231 + case RESERVE2:
3232 + case FREE:
3233 + case ACTION:
3234 + case UNDO:
3235 + break;
3236 +
3237 + case COMMIT:
3238 + break;
3239 +
3240 + }
3241 +
3242 + return SNMP_ERR_NOERROR;
3243 +}
3244 +
3245 +/****************************************************************************
3246 +* *
3247 +****************************************************************************/
3248 +int
3249 +write_dot11CurrentTxPowerLevel(int action,
3250 + u_char *var_val,
3251 + u_char var_val_type,
3252 + size_t var_val_len,
3253 + u_char *statP,
3254 + oid *name,
3255 + size_t name_len)
3256 +{
3257 + static long *long_ret;
3258 + int size;
3259 +
3260 + switch ( action ) {
3261 +
3262 + case RESERVE1:
3263 + if ( var_val_type != ASN_INTEGER ) {
3264 + fprintf ( stderr, "write to dot11CurrentTxPowerLevel not ASN_INTEGER\n" );
3265 + return SNMP_ERR_WRONGTYPE;
3266 + }
3267 + if ( var_val_len > sizeof ( long_ret )){
3268 + fprintf ( stderr, "write to dot11CurrentTxPowerLevel: bad length\n" );
3269 + return SNMP_ERR_WRONGLENGTH;
3270 + }
3271 + break;
3272 +
3273 + case RESERVE2:
3274 + case FREE:
3275 + case ACTION:
3276 + case UNDO:
3277 + break;
3278 +
3279 + case COMMIT:
3280 + break;
3281 + }
3282 +
3283 + return SNMP_ERR_NOERROR;
3284 +}
3285 +
3286 +/****************************************************************************
3287 +* *
3288 +****************************************************************************/
3289 +int
3290 +write_dot11CurrentChannelNumber(int action,
3291 + u_char *var_val,
3292 + u_char var_val_type,
3293 + size_t var_val_len,
3294 + u_char *statP,
3295 + oid *name,
3296 + size_t name_len)
3297 +{
3298 + static long *long_ret;
3299 + int size;
3300 +
3301 + switch ( action ) {
3302 +
3303 + case RESERVE1:
3304 + if ( var_val_type != ASN_INTEGER ) {
3305 + fprintf ( stderr, "write to dot11CurrentChannelNumber not ASN_INTEGER\n" );
3306 + return SNMP_ERR_WRONGTYPE;
3307 + }
3308 + if ( var_val_len > sizeof ( long_ret )){
3309 + fprintf ( stderr,"write to dot11CurrentChannelNumber: bad length\n" );
3310 + return SNMP_ERR_WRONGLENGTH;
3311 + }
3312 + break;
3313 +
3314 + case RESERVE2:
3315 + case FREE:
3316 + case ACTION:
3317 + case UNDO:
3318 + break;
3319 +
3320 + case COMMIT:
3321 + break;
3322 + }
3323 +
3324 + return SNMP_ERR_NOERROR;
3325 +}
3326 +
3327 +/****************************************************************************
3328 +* *
3329 +****************************************************************************/
3330 +int
3331 +write_dot11CurrentDwellTime(int action,
3332 + u_char *var_val,
3333 + u_char var_val_type,
3334 + size_t var_val_len,
3335 + u_char *statP,
3336 + oid *name,
3337 + size_t name_len)
3338 +{
3339 + static long *long_ret;
3340 + int size;
3341 +
3342 + switch ( action ) {
3343 +
3344 + case RESERVE1:
3345 + if ( var_val_type != ASN_INTEGER ) {
3346 + fprintf ( stderr, "write to dot11CurrentDwellTime not ASN_INTEGER\n" );
3347 + return SNMP_ERR_WRONGTYPE;
3348 + }
3349 + if ( var_val_len > sizeof ( long_ret )){
3350 + fprintf ( stderr, "write to dot11CurrentDwellTime: bad length\n" );
3351 + return SNMP_ERR_WRONGLENGTH;
3352 + }
3353 + break;
3354 +
3355 + case RESERVE2:
3356 + case FREE:
3357 + case ACTION:
3358 + case UNDO:
3359 + break;
3360 +
3361 + case COMMIT:
3362 + break;
3363 + }
3364 +
3365 + return SNMP_ERR_NOERROR;
3366 +}
3367 +
3368 +/****************************************************************************
3369 +* *
3370 +****************************************************************************/
3371 +int
3372 +write_dot11CurrentSet(int action,
3373 + u_char *var_val,
3374 + u_char var_val_type,
3375 + size_t var_val_len,
3376 + u_char *statP,
3377 + oid *name,
3378 + size_t name_len)
3379 +{
3380 + static long *long_ret;
3381 + int size;
3382 +
3383 + switch ( action ) {
3384 +
3385 + case RESERVE1:
3386 + if ( var_val_type != ASN_INTEGER ) {
3387 + fprintf ( stderr, "write to dot11CurrentSet not ASN_INTEGER\n" );
3388 + return SNMP_ERR_WRONGTYPE;
3389 + }
3390 + if ( var_val_len > sizeof ( long_ret )){
3391 + fprintf ( stderr, "write to dot11CurrentSet: bad length\n" );
3392 + return SNMP_ERR_WRONGLENGTH;
3393 + }
3394 + break;
3395 +
3396 + case RESERVE2:
3397 + case FREE:
3398 + case ACTION:
3399 + case UNDO:
3400 + break;
3401 +
3402 + case COMMIT:
3403 + break;
3404 + }
3405 +
3406 + return SNMP_ERR_NOERROR;
3407 +}
3408 +
3409 +/****************************************************************************
3410 +* *
3411 +****************************************************************************/
3412 +int
3413 +write_dot11CurrentPattern(int action,
3414 + u_char *var_val,
3415 + u_char var_val_type,
3416 + size_t var_val_len,
3417 + u_char *statP,
3418 + oid *name,
3419 + size_t name_len)
3420 +{
3421 + static long *long_ret;
3422 + int size;
3423 +
3424 + switch ( action ) {
3425 +
3426 + case RESERVE1:
3427 + if ( var_val_type != ASN_INTEGER ) {
3428 + fprintf ( stderr, "write to dot11CurrentPattern not ASN_INTEGER\n" );
3429 + return SNMP_ERR_WRONGTYPE;
3430 + }
3431 + if ( var_val_len > sizeof ( long_ret )){
3432 + fprintf ( stderr, "write to dot11CurrentPattern: bad length\n" );
3433 + return SNMP_ERR_WRONGLENGTH;
3434 + }
3435 + break;
3436 +
3437 + case RESERVE2:
3438 + case FREE:
3439 + case ACTION:
3440 + case UNDO:
3441 + break;
3442 +
3443 + case COMMIT:
3444 + break;
3445 + }
3446 +
3447 + return SNMP_ERR_NOERROR;
3448 +}
3449 +
3450 +/****************************************************************************
3451 +* *
3452 +****************************************************************************/
3453 +int
3454 +write_dot11CurrentIndex(int action,
3455 + u_char *var_val,
3456 + u_char var_val_type,
3457 + size_t var_val_len,
3458 + u_char *statP,
3459 + oid *name,
3460 + size_t name_len)
3461 +{
3462 + static long *long_ret;
3463 + int size;
3464 +
3465 + switch ( action ) {
3466 +
3467 + case RESERVE1:
3468 + if ( var_val_type != ASN_INTEGER ) {
3469 + fprintf ( stderr, "write to dot11CurrentIndex not ASN_INTEGER\n" );
3470 + return SNMP_ERR_WRONGTYPE;
3471 + }
3472 + if ( var_val_len > sizeof ( long_ret )){
3473 + fprintf ( stderr, "write to dot11CurrentIndex: bad length\n" );
3474 + return SNMP_ERR_WRONGLENGTH;
3475 + }
3476 + break;
3477 +
3478 + case RESERVE2:
3479 + case FREE:
3480 + case ACTION:
3481 + case UNDO:
3482 + break;
3483 +
3484 + case COMMIT:
3485 + break;
3486 + }
3487 +
3488 + return SNMP_ERR_NOERROR;
3489 +}
3490 +
3491 +/****************************************************************************
3492 +* *
3493 +****************************************************************************/
3494 +int
3495 +write_dot11CurrentChannel(int action,
3496 + u_char *var_val,
3497 + u_char var_val_type,
3498 + size_t var_val_len,
3499 + u_char *statP,
3500 + oid *name,
3501 + size_t name_len)
3502 +{
3503 + static long *long_ret;
3504 + int size;
3505 +
3506 + switch ( action ) {
3507 +
3508 + case RESERVE1:
3509 + if ( var_val_type != ASN_INTEGER ) {
3510 + fprintf ( stderr, "write to dot11CurrentChannel not ASN_INTEGER\n" );
3511 + return SNMP_ERR_WRONGTYPE;
3512 + }
3513 + if ( var_val_len > sizeof ( long_ret )){
3514 + fprintf ( stderr, "write to dot11CurrentChannel: bad length\n" );
3515 + return SNMP_ERR_WRONGLENGTH;
3516 + }
3517 + break;
3518 +
3519 + case RESERVE2:
3520 + case FREE:
3521 + case ACTION:
3522 + case UNDO:
3523 + break;
3524 +
3525 + case COMMIT:
3526 + break;
3527 + }
3528 +
3529 + return SNMP_ERR_NOERROR;
3530 +}
3531 +
3532 +/****************************************************************************
3533 +* *
3534 +****************************************************************************/
3535 +int
3536 +write_dot11CurrentCCAMode(int action,
3537 + u_char *var_val,
3538 + u_char var_val_type,
3539 + size_t var_val_len,
3540 + u_char *statP,
3541 + oid *name,
3542 + size_t name_len)
3543 +{
3544 + static long *long_ret;
3545 + int size;
3546 +
3547 + switch ( action ) {
3548 +
3549 + case RESERVE1:
3550 + if ( var_val_type != ASN_INTEGER ) {
3551 + fprintf ( stderr, "write to dot11CurrentCCAMode not ASN_INTEGER\n" );
3552 + return SNMP_ERR_WRONGTYPE;
3553 + }
3554 + if ( var_val_len > sizeof ( long_ret )){
3555 + fprintf ( stderr,"write to dot11CurrentCCAMode: bad length\n" );
3556 + return SNMP_ERR_WRONGLENGTH;
3557 + }
3558 + break;
3559 +
3560 + case RESERVE2:
3561 + case FREE:
3562 + case ACTION:
3563 + case UNDO:
3564 + break;
3565 +
3566 + case COMMIT:
3567 + break;
3568 + }
3569 +
3570 + return SNMP_ERR_NOERROR;
3571 +}
3572 +
3573 +/****************************************************************************
3574 +* *
3575 +****************************************************************************/
3576 +int
3577 +write_dot11EDThreshold(int action,
3578 + u_char *var_val,
3579 + u_char var_val_type,
3580 + size_t var_val_len,
3581 + u_char *statP,
3582 + oid *name,
3583 + size_t name_len)
3584 +{
3585 + static long *long_ret;
3586 + int size;
3587 +
3588 + switch ( action ) {
3589 +
3590 + case RESERVE1:
3591 + if ( var_val_type != ASN_INTEGER ) {
3592 + fprintf ( stderr, "write to dot11EDThreshold not ASN_INTEGER\n" );
3593 + return SNMP_ERR_WRONGTYPE;
3594 + }
3595 + if ( var_val_len > sizeof ( long_ret )){
3596 + fprintf ( stderr, "write to dot11EDThreshold: bad length\n" );
3597 + return SNMP_ERR_WRONGLENGTH;
3598 + }
3599 + break;
3600 +
3601 + case RESERVE2:
3602 + case FREE:
3603 + case ACTION:
3604 + case UNDO:
3605 + break;
3606 +
3607 + case COMMIT:
3608 + break;
3609 + }
3610 +
3611 + return SNMP_ERR_NOERROR;
3612 +}
3613 +
3614 +/****************************************************************************
3615 +* *
3616 +****************************************************************************/
3617 +int
3618 +write_dot11CCAWatchdogTimerMax(int action,
3619 + u_char *var_val,
3620 + u_char var_val_type,
3621 + size_t var_val_len,
3622 + u_char *statP,
3623 + oid *name,
3624 + size_t name_len)
3625 +{
3626 + static long *long_ret;
3627 + int size;
3628 +
3629 + switch ( action ) {
3630 +
3631 + case RESERVE1:
3632 + if ( var_val_type != ASN_INTEGER ) {
3633 + fprintf ( stderr, "write to dot11CCAWatchdogTimerMax not ASN_INTEGER\n" );
3634 + return SNMP_ERR_WRONGTYPE;
3635 + }
3636 + if ( var_val_len > sizeof ( long_ret )){
3637 + fprintf ( stderr, "write to dot11CCAWatchdogTimerMax: bad length\n" );
3638 + return SNMP_ERR_WRONGLENGTH;
3639 + }
3640 + break;
3641 +
3642 + case RESERVE2:
3643 + case FREE:
3644 + case ACTION:
3645 + case UNDO:
3646 + break;
3647 +
3648 + case COMMIT:
3649 + break;
3650 + }
3651 +
3652 + return SNMP_ERR_NOERROR;
3653 +}
3654 +
3655 +/****************************************************************************
3656 +* *