forked from vollero/openCAPWAP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWTPProtocol.h
More file actions
189 lines (174 loc) · 10.5 KB
/
WTPProtocol.h
File metadata and controls
189 lines (174 loc) · 10.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
/*******************************************************************************************
* Copyright (c) 2006-7 Laboratorio di Sistemi di Elaborazione e Bioingegneria Informatica *
* Universita' Campus BioMedico - Italy *
* *
* This program is free software; you can redistribute it and/or modify it under the terms *
* of the GNU General Public License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, but WITHOUT ANY *
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A *
* PARTICULAR PURPOSE. See the GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License along with this *
* program; if not, write to the: *
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, *
* MA 02111-1307, USA. *
* *
* In addition, as a special exception, the copyright holders give permission to link the *
* code of portions of this program with the OpenSSL library under certain conditions as *
* described in each individual source file, and distribute linked combinations including *
* the two. You must obey the GNU General Public License in all respects for all of the *
* code used other than OpenSSL. If you modify file(s) with this exception, you may *
* extend this exception to your version of the file(s), but you are not obligated to do *
* so. If you do not wish to do so, delete this exception statement from your version. *
* If you delete this exception statement from all source files in the program, then also *
* delete it here. *
*
* --------------------------------------------------------------------------------------- *
* Project: Capwap *
* *
* Author : Ludovico Rossi (ludo@bluepixysw.com) *
* Del Moro Andrea (andrea_delmoro@libero.it) *
* Giovannini Federica (giovannini.federica@gmail.com) *
* Massimo Vellucci (m.vellucci@unicampus.it) *
* Mauro Bisson (mauro.bis@gmail.com) *
*******************************************************************************************/
#ifndef __CAPWAP_WTPProtocol_HEADER__
#define __CAPWAP_WTPProtocol_HEADER__
/*_____________________________________________________*/
/* *******************___TYPES___******************* */
typedef struct {
int ACIPv4ListCount;
int *ACIPv4List;
}ACIPv4ListValues;
typedef struct {
int ACIPv6ListCount;
struct in6_addr *ACIPv6List;
}ACIPv6ListValues;
typedef struct {
int stations;
int limit;
int activeWTPs;
int maxWTPs;
CWAuthSecurity security;
int RMACField;
// int WirelessField;
int DTLSPolicy;
CWACVendorInfos vendorInfos;
char *name;
CWProtocolIPv4NetworkInterface *IPv4Addresses;
int IPv4AddressesCount;
CWProtocolIPv6NetworkInterface *IPv6Addresses;
int IPv6AddressesCount;
ACIPv4ListValues ACIPv4ListInfo;
ACIPv6ListValues ACIPv6ListInfo;
CWNetworkLev4Address preferredAddress;
CWNetworkLev4Address incomingAddress;
} CWACInfoValues;
typedef struct {
CWACInfoValues ACInfoPtr;
CWProtocolResultCode code;
ACIPv4ListValues ACIPv4ListInfo;
ACIPv6ListValues ACIPv6ListInfo;
/*
* Elena Agostini - 02/2014
*
* ECN Support Msg Elem MUST be included in Join Request/Response Messages
*/
int ECNSupport;
} CWProtocolJoinResponseValues;
typedef struct {
ACIPv4ListValues ACIPv4ListInfo;
ACIPv6ListValues ACIPv6ListInfo;
int discoveryTimer;
int echoRequestTimer;
int radioOperationalInfoCount;
CWRadioOperationalInfoValues *radioOperationalInfo;
WTPDecryptErrorReport radiosDecryptErrorPeriod;
int idleTimeout;
int fallback;
void * bindingValues;
} CWProtocolConfigureResponseValues;
typedef struct {
void * bindingValues;
/*Update 2009:
add new non-binding specific values*/
void * protocolValues;
} CWProtocolConfigurationUpdateRequestValues;
/*__________________________________________________________*/
/* *******************___PROTOTYPES___******************* */
CWBool CWAssembleMsgElemACName(CWProtocolMessage *msgPtr); // 4
CWBool CWAssembleMsgElemACNameWithIndex(CWProtocolMessage *msgPtr); // 5
CWBool CWAssembleMsgElemDataTransferData(CWProtocolMessage *msgPtr, int data_type); //13
CWBool CWAssembleMsgElemDiscoveryType(CWProtocolMessage *msgPtr); //20
CWBool CWAssembleMsgElemDuplicateIPv4Address(CWProtocolMessage *msgPtr); //21
CWBool CWAssembleMsgElemLocationData(CWProtocolMessage *msgPtr); //27
CWBool CWAssembleMsgElemStatisticsTimer(CWProtocolMessage *msgPtr); //33
CWBool CWAssembleMsgElemWTPBoardData(CWProtocolMessage *msgPtr); //35
CWBool CWAssembleMsgElemWTPDescriptor(CWProtocolMessage *msgPtr); //36
CWBool CWAssembleMsgElemWTPFrameTunnelMode(CWProtocolMessage *msgPtr); //38
CWBool CWAssembleMsgElemWTPIPv4Address(CWProtocolMessage *msgPtr); //39
CWBool CWAssembleMsgElemWTPMACType(CWProtocolMessage *msgPtr); //40
CWBool CWAssembleMsgElemWTPRadioInformation(CWProtocolMessage *msgPtr, int radioID, char radioType); //1048
CWBool CWAssembleMsgElemSupportedRates(CWProtocolMessage *msgPtr, int radioID,char * suppRates, int lenSuppRates); //1040
CWBool CWAssembleMsgElemMACOperation(CWProtocolMessage *msgPtr, int radioID, int fragmentationTreshold, int rtsThreshold, char shortRetry, char longRetry, int txMSDU, int rxMSDU); //1030
CWBool CWAssembleMsgElemMultiDomainCapability(CWProtocolMessage *msgPtr, int radioID, int firstChannel, int numChannels, int maxTxPower); //1032
CWBool CWAssembleMsgElemWTPName(CWProtocolMessage *msgPtr); //41
CWBool CWAssembleMsgElemWTPOperationalStatistics(CWProtocolMessage *msgPtr,int radio); //42
CWBool CWAssembleMsgElemWTPRadioStatistics(CWProtocolMessage *msgPtr,int radio); //43
CWBool CWAssembleMsgElemWTPRebootStatistics(CWProtocolMessage *msgPtr); //44
//Elena Agostini - 11/2014: Delete Station Msg Elem
CWBool CWAssembleMsgElemWTPDeleteStation(CWProtocolMessage *msgPtr, CWMsgElemDataDeleteStation * infoDeleteStation);
//Elena Agostini - 02/2014: ECN Support Msg Elem MUST be included in Join Request/Response Messages
CWBool CWAssembleMsgElemECNSupport(CWProtocolMessage *msgPtr);
//CWBool CWAssembleMsgElemWTPStaticIPInfo(CWProtocolMessage *msgPtr); //45
//CWBool CWAssembleMsgElemWTPRadioInformation(CWProtocolMessage *msgPtr);
//---------------------------------------------------------/
CWBool CWParseACDescriptor(CWProtocolMessage *msgPtr, int len, CWACInfoValues *valPtr); // 1
CWBool CWParseACIPv4List(CWProtocolMessage *msgPtr, int len, ACIPv4ListValues *valPtr); // 2
CWBool CWParseACIPv6List(CWProtocolMessage *msgPtr, int len, ACIPv6ListValues *valPtr); // 3
CWBool CWParseAddStation(CWProtocolMessage *msgPtr, int len, int * radioID, char ** address);
CWBool CWParse80211Station(CWProtocolMessage *msgPtr, int len, int * radioID, short int * assID, char * flags, char ** address, short int * capability, int * wlanID, int * supportedRatesLen, char ** supportedRates);
CWBool CWParseDeleteStation(CWProtocolMessage *msgPtr, int len, int * radioID, char ** address); // 18
CWBool CWParseCWControlIPv4Addresses(CWProtocolMessage *msgPtr, int len, CWProtocolIPv4NetworkInterface *valPtr); //10
CWBool CWParseCWControlIPv6Addresses(CWProtocolMessage *msgPtr, int len, CWProtocolIPv6NetworkInterface *valPtr); //11
CWBool CWParseCWTimers (CWProtocolMessage *msgPtr, int len, CWProtocolConfigureResponseValues *valPtr); //12
CWBool CWParseDecryptErrorReportPeriod (CWProtocolMessage *msgPtr, int len, WTPDecryptErrorReportValues *valPtr); //16
CWBool CWParseIdleTimeout (CWProtocolMessage *msgPtr, int len, CWProtocolConfigureResponseValues *valPtr); //26
CWBool CWParseWTPFallback (CWProtocolMessage *msgPtr, int len, CWProtocolConfigureResponseValues *valPtr); //37
CWBool CWParseWTPRadioInformation_FromAC(CWProtocolMessage *msgPtr, int len, char *valPtr); // 1048
/* Elena Agostini - 02/2014: ECN Support Msg Elem MUST be included in Join Request/Response Messages */
CWBool CWParseACECNSupport(CWProtocolMessage *msgPtr, int len, int *valPtr);
//Elena Agostini - 09/2014: IEEE Binding
CWBool CWAssembleMsgElemAssignedWTPSSID(CWProtocolMessage *msgPtr, int radioID, int wlanID, char * bssid);
CWBool CWParseACAddWlan(CWProtocolMessage *msgPtr, int len, ACInterfaceRequestInfo * valPtr);
CWBool CWParseACDelWlan(CWProtocolMessage *msgPtr, int len, ACInterfaceRequestInfo * valPtr);
CWBool CWParseACUpdateWlan(CWProtocolMessage *msgPtr, int len, ACInterfaceRequestInfo * valPtr);
//si trova in CWProtocol.h
//CWBool CWParseACName(CWProtocolMessage *msgPtr, int len, char **valPtr); // 4
//---------------------------------------------------------/
void CWWTPResetRebootStatistics(WTPRebootStatisticsInfo *rebootStatistics);
int CWWTPGetDiscoveryType(void);
int CWWTPGetMaxRadios(void);
int CWWTPGetRadiosInUse(void);
int CWWTPGetEncCapabilities(void);
CWBool CWWTPGetBoardData(CWWTPVendorInfos *valPtr);
CWBool CWWTPGetVendorInfos(CWWTPVendorInfos *valPtr);
int CWWTPGetMACType(void);
char *CWWTPGetLocation(void);
int CWWTPGetSessionID(void);
int CWWTPGetIPv4Address(void);
int CWWTPGetIPv4StatusDuplicate(void);
int CWWTPGetIPv6StatusDuplicate(void);
char *CWWTPGetName(void);
CWBool CWWTPGetRadiosInformation(CWRadiosInformation *valPtr);
int CWWTPGetACIndex();
char* CWWTPGetACName();
int CWWTPGetFrameTunnelMode();
CWBool CWGetWTPRadiosOperationalState(int radioID, CWRadiosOperationalInfo *valPtr);
CWBool CWAssembleMsgElemDecryptErrorReport(CWProtocolMessage *msgPtr, int radioID);
CWBool CWAssembleMsgElemDuplicateIPv6Address(CWProtocolMessage *msgPtr);
//---------------------------------------------------------/
void CWWTPDestroyVendorInfos(CWWTPVendorInfos *valPtr);
#endif