-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWTPProtocol.h
157 lines (140 loc) · 7.66 KB
/
WTPProtocol.h
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
/*******************************************************************************************
* 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. *
* *
* --------------------------------------------------------------------------------------- *
* Project: Capwap *
* *
* Author : Ludovico Rossi ([email protected]) *
* Del Moro Andrea ([email protected]) *
* Giovannini Federica ([email protected]) *
* Massimo Vellucci ([email protected]) *
* Mauro Bisson ([email protected]) *
*******************************************************************************************/
#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;
} 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 CWAssembleMsgElemWTPName(CWProtocolMessage *msgPtr); //41
CWBool CWAssembleMsgElemWTPOperationalStatistics(CWProtocolMessage *msgPtr,int radio); //42
CWBool CWAssembleMsgElemWTPRadioStatistics(CWProtocolMessage *msgPtr,int radio); //43
CWBool CWAssembleMsgElemWTPRebootStatistics(CWProtocolMessage *msgPtr); //44
//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); // 8
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
//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