RDK Documentation (Open Sourced RDK Components)
Device_WiFi_AccessPoint_Security.h
1 /*
2  * If not stated otherwise in this file or this component's Licenses.txt file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2016 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18 */
19 
20 
21 /**
22  * @defgroup TR69_HOSTIF_WIFI_AP_SECURITY TR-069 Object (Device.WiFi.AccessPoint.{i}.Security.) Public APIs
23  * This module contains security related parameters that apply to a CPE acting as an Access Point [802.11-2007].
24  * @ingroup TR69_HOSTIF_WIFI
25  */
26 
27 /**
28 * @defgroup tr69hostif
29 * @{
30 * @defgroup hostif
31 * @{
32 **/
33 
34 
35 #ifndef DEVICE_WIFI_ACCESSPOINT_SECURITY_H_
36 #define DEVICE_WIFI_ACCESSPOINT_SECURITY_H_
37 
38 #include "hostIf_main.h"
39 #include "hostIf_utils.h"
40 #include "hostIf_tr69ReqHandler.h"
41 #include "hostIf_updateHandler.h"
42 
43 
45  static GHashTable *ifHash;
46  int dev_id;
49 
50 public:
51  static class hostIf_WiFi_AccessPoint_Security *getInstance(int dev_id);
52  static GList* getAllInstances();
53  static void closeInstance(hostIf_WiFi_AccessPoint_Security *);
54  static void closeAllInstances();
55 
56  char ModesSupported[20];
57  char ModeEnabled[20];
58  char WEPKey[64];
59  char PreSharedKey[64];
60  char KeyPassphrase[64];
61  unsigned int RekeyingInterval;
62  char RadiusServerIPAddr[45];
63  unsigned int RadiusServerPort;
64  char RadiusSecret[64];
65 
66  /**
67  * @ingroup TR69_HOSTIF_WIFI_AP_SECURITY
68  * @{
69  */
70  /**
71  * @brief Get the comma-separated list of strings, indicate which security modes this AccessPoint instance
72  * is capable of supporting. Each list item is an enumeration of.
73  * - None
74  * - WEP-64
75  * - WEP-128
76  * - WPA-Personal
77  * - WPA2-Personal
78  * - WPA-WPA2-Personal
79  * - WPA-Enterprise
80  * - WPA2-Enterprise
81  * - WPA-WPA2-Enterprise
82  *
83  * @param[out] stMsgData TR-069 Host interface message request.
84  *
85  * @return Returns 0 on success, otherwise will return the appropriate error code.
86  */
88 
89  /**
90  * @brief Get the security mode enabled for wifi device. The value must be a member of the list
91  * reported by the ModesSupported parameter, indicates which security mode is enabled.
92  *
93  * @param[out] stMsgData TR-069 Host interface message request.
94  *
95  * @return Returns 0 on success, otherwise will return the appropriate error code.
96  */
98 
99  /**
100  * @brief Provide A WEP key expressed as a hexadecimal string.
101  *
102  * WEPKey is used only if ModeEnabled is set to WEP-64 or WEP-128.
103  * A 5 byte WEPKey corresponds to security mode WEP-64 and a 13 byte WEPKey corresponds to security mode WEP-128.
104  *
105  * @param[out] stMsgData TR-069 Host interface message request.
106  *
107  * @return Returns 0 on success, otherwise will return the appropriate error code.
108  */
110 
111  /**
112  * @brief A literal PreSharedKey (PSK) expressed as a hexadecimal string.
113  *
114  * PreSharedKey is only used if ModeEnabled is set to WPA-Personal or WPA2-Personal or WPA-WPA2-Personal.
115  * If KeyPassphrase is written, then PreSharedKey is immediately generated.
116  * The ACS SHOULD NOT set both the KeyPassphrase and the PreSharedKey directly (the result of doing this is undefined).
117  * When read, this parameter returns an empty string, regardless of the actual value.
118  *
119  * @param[out] stMsgData TR-069 Host interface message request.
120  *
121  * @return Returns 0 on success, otherwise will return the appropriate error code.
122  */
124 
125  /**
126  * @brief Provide a passphrase from which the PreSharedKey is to be generated,
127  * for WPA-Personal or WPA2-Personal or WPA-WPA2-Personal security modes.
128  *
129  * If KeyPassphrase is written, then PreSharedKey is immediately generated.
130  * The ACS SHOULD NOT set both the KeyPassphrase and the PreSharedKey directly
131  * (the result of doing this is undefined). The key is generated as specified by WPA,
132  * which uses PBKDF2 from PKCS #5: Password-based Cryptography Specification Version 2.0 ([RFC2898]).
133  *
134  * When read, this parameter returns an empty string, regardless of the actual value.
135  *
136  * @param[out] stMsgData TR-069 Host interface message request.
137  *
138  * @return Returns 0 on success, otherwise will return the appropriate error code.
139  */
141 
142  /**
143  * @brief Get the interval (expressed in seconds) in which the keys are re-generated.
144  *
145  * This is applicable to WPA, WPA2 and Mixed (WPA-WPA2) modes in Personal or Enterprise mode
146  * (i.e. when ModeEnabled is set to a value other than None or WEP-64 or WEP-128.
147  *
148  * @param[out] stMsgData TR-069 Host interface message request.
149  *
150  * @return Returns 0 on success, otherwise will return the appropriate error code.
151  */
153 
154  /**
155  * @brief Get the IP Address of the RADIUS server used for WLAN security.
156  * RadiusServerIPAddr is only applicable when ModeEnabled is an Enterprise type
157  * (i.e. WPA-Enterprise, WPA2-Enterprise or WPA-WPA2-Enterprise).
158  *
159  * @param[out] stMsgData TR-069 Host interface message request.
160  *
161  * @return Returns 0 on success, otherwise will return the appropriate error code.
162  */
164 
165  /**
166  * @brief Get the port number of the RADIUS server used for WLAN security.
167  * RadiusServerPort is only applicable when ModeEnabled is an Enterprise type
168  * (i.e. WPA-Enterprise, WPA2-Enterprise or WPA-WPA2-Enterprise).
169  *
170  * @param[out] stMsgData TR-069 Host interface message request.
171  *
172  * @return Returns 0 on success, otherwise will return the appropriate error code.
173  */
175 
176  /**
177  * @brief The secret used for handshaking with the RADIUS server [RFC2865].
178  * When read, this parameter returns an empty string, regardless of the actual value.
179  *
180  * @param[out] stMsgData TR-069 Host interface message request.
181  *
182  * @return Returns 0 on success, otherwise will return the appropriate error code.
183  */
185 
186  /** @} */ // End of Doxygen Tag TR69_HOSTIF_WIFI_AP_SECURITY
187 };
188 
189 
190 
191 #endif /* DEVICE_WIFI_ACCESSPOINT_SECURITY_H_ */
192 
193 
194 /** @} */
195 /** @} */
hostIf_WiFi_AccessPoint_Security
Definition: Device_WiFi_AccessPoint_Security.h:44
_HostIf_MsgData_t
Definition: hostIf_tr69ReqHandler.h:170
hostIf_WiFi_AccessPoint_Security::get_hostIf_WiFi_AccessPoint_Security_PreSharedKey
int get_hostIf_WiFi_AccessPoint_Security_PreSharedKey(HOSTIF_MsgData_t *stMsgData)
A literal PreSharedKey (PSK) expressed as a hexadecimal string.
hostIf_main.h
hostIf_main API.
hostIf_WiFi_AccessPoint_Security::get_hostIf_WiFi_AccessPoint_Security_ModesSupported
int get_hostIf_WiFi_AccessPoint_Security_ModesSupported(HOSTIF_MsgData_t *stMsgData)
Get the comma-separated list of strings, indicate which security modes this AccessPoint instance is c...
hostIf_WiFi_AccessPoint_Security::get_hostIf_WiFi_AccessPoint_Security_WEPKey
int get_hostIf_WiFi_AccessPoint_Security_WEPKey(HOSTIF_MsgData_t *stMsgData)
Provide A WEP key expressed as a hexadecimal string.
hostIf_WiFi_AccessPoint_Security::get_hostIf_WiFi_AccessPoint_Security_ModeEnabled
int get_hostIf_WiFi_AccessPoint_Security_ModeEnabled(HOSTIF_MsgData_t *stMsgData)
Get the security mode enabled for wifi device. The value must be a member of the list reported by the...
hostIf_WiFi_AccessPoint_Security::get_hostIf_WiFi_AccessPoint_Security_KeyPassphrase
int get_hostIf_WiFi_AccessPoint_Security_KeyPassphrase(HOSTIF_MsgData_t *stMsgData)
Provide a passphrase from which the PreSharedKey is to be generated, for WPA-Personal or WPA2-Persona...
hostIf_WiFi_AccessPoint_Security::get_hostIf_WiFi_AccessPoint_Security_RadiusServerIPAddr
int get_hostIf_WiFi_AccessPoint_Security_RadiusServerIPAddr(HOSTIF_MsgData_t *stMsgData)
Get the IP Address of the RADIUS server used for WLAN security. RadiusServerIPAddr is only applicable...
hostIf_WiFi_AccessPoint_Security::get_hostIf_WiFi_AccessPoint_Security_RadiusServerPort
int get_hostIf_WiFi_AccessPoint_Security_RadiusServerPort(HOSTIF_MsgData_t *stMsgData)
Get the port number of the RADIUS server used for WLAN security. RadiusServerPort is only applicable ...
hostIf_WiFi_AccessPoint_Security::get_hostIf_WiFi_AccessPoint_Security_RekeyingInterval
int get_hostIf_WiFi_AccessPoint_Security_RekeyingInterval(HOSTIF_MsgData_t *stMsgData)
Get the interval (expressed in seconds) in which the keys are re-generated.
hostIf_WiFi_AccessPoint_Security::get_hostIf_WiFi_AccessPoint_Security_RadiusSecret
int get_hostIf_WiFi_AccessPoint_Security_RadiusSecret(HOSTIF_MsgData_t *stMsgData)
The secret used for handshaking with the RADIUS server [RFC2865]. When read, this parameter returns a...