RDK Documentation (Open Sourced RDK Components)
Device_WiFi_EndPoint_Profile_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_ENDPOINT_PROFILE_SECURITY TR-069 Object (Device.WiFi.EndPoint.{i}.Profile.{i}.Security.) Public APIs
23  * This object contains security related parameters that apply to a WiFi End Point profile [802.11-2007].
24  * @ingroup TR69_HOSTIF_WIFI
25  */
26 
27 
28 /**
29 * @defgroup tr69hostif
30 * @{
31 * @defgroup hostif
32 * @{
33 **/
34 
35 
36 #ifndef DEVICE_WIFI_ENDPOINT_PROFILE_SECURITY_H_
37 #define DEVICE_WIFI_ENDPOINT_PROFILE_SECURITY_H_
38 
39 #include "hostIf_main.h"
40 #include "hostIf_utils.h"
41 #include "hostIf_tr69ReqHandler.h"
42 #include "hostIf_updateHandler.h"
43 
45 
46  static GHashTable *ifHash;
47  static GMutex* m_mutex;
48  int dev_id;
51 
52 public:
53  static class hostIf_WiFi_EndPoint_Profile_Security *getInstance(int dev_id);
54  static GList* getAllInstances();
55  static void closeInstance(hostIf_WiFi_EndPoint_Profile_Security *);
56  static void closeAllInstances();
57 
58  char ModeEnabled[64];
59  char WEPKey[64];
60  char PreSharedKey[64];
61  char KeyPassphrase[64];
62 
63  /**
64  * @ingroup TR69_HOSTIF_WIFI_ENDPOINT_PROFILE_SECURITY
65  * @{
66  */
67 
68  /**
69  * @brief This function is used to get which security mode is enabled for wireless end point.
70  * The value MUST be a member of the list reported by the Security.ModesSupported parameter.
71  *
72  * @param[out] stMsgData TR-069 Host interface message request.
73  *
74  * @return Returns 0 on success, otherwise will return the appropriate error code.
75  */
77 
78  /**
79  * @brief Get a WEP key expressed as a hexadecimal string.
80  *
81  * WEPKey is used only if ModeEnabled is set to WEP-64 or WEP-128.
82  * @n A 5 byte WEPKey corresponds to security mode WEP-64 and a 13 byte WEPKey corresponds to security mode WEP-128.
83  * @n When read, this parameter returns an empty string, regardless of the actual value.
84  *
85  * @param[out] stMsgData TR-069 Host interface message request.
86  *
87  * @return Returns 0 on success, otherwise will return the appropriate error code.
88  */
90 
91  /**
92  * @brief Get a literal PreSharedKey (PSK) expressed as a hexadecimal string.
93  *
94  * PreSharedKey is only used if ModeEnabled is set to WPA-Personal or WPA2-Personal or WPA-WPA2-Personal.
95  * @n If KeyPassphrase is written, then PreSharedKey is immediately generated. The ACS SHOULD NOT set both
96  * the KeyPassphrase and the PreSharedKey directly (the result of doing this is undefined).
97  * @n When read, this parameter returns an empty string, regardless of the actual value.
98  *
99  * @return Returns 0 on success, otherwise will return the appropriate error code.
100  *
101  * @param[out] stMsgData TR-069 Host interface message request.
102  */
104 
105  /**
106  * @brief Get a passphrase from which the PreSharedKey is to be generated, for WPA-Personal or WPA2-Personal
107  * or WPA-WPA2-Personal security modes.
108  *
109  * If KeyPassphrase is written, then PreSharedKey is immediately generated. The ACS SHOULD NOT set both the
110  * KeyPassphrase and the PreSharedKey directly (the result of doing this is undefined). The key is generated
111  * as specified by WPA, which uses PBKDF2 from PKCS #5: Password-based Cryptography Specification Version 2.0 [RFC2898].
112  * @n When read, this parameter returns an empty string, regardless of the actual value.
113  *
114  * @param[out] stMsgData TR-069 Host interface message request.
115  *
116  * @return Returns 0 on success, otherwise will return the appropriate error code.
117  */
119 
120  /** @} */ // End of Doxygen tag TR69_HOSTIF_WIFI_ENDPOINT_PROFILE_SECURITY
121 };
122 
123 
124 #endif /* DEVICE_WIFI_ENDPOINT_PROFILE_SECURITY_H_ */
125 
126 
127 /** @} */
128 /** @} */
hostIf_WiFi_EndPoint_Profile_Security::get_hostIf_WiFi_EndPoint_Profile_Security_PreSharedKey
int get_hostIf_WiFi_EndPoint_Profile_Security_PreSharedKey(HOSTIF_MsgData_t *stMsgData)
Get a literal PreSharedKey (PSK) expressed as a hexadecimal string.
_HostIf_MsgData_t
Definition: hostIf_tr69ReqHandler.h:170
hostIf_main.h
hostIf_main API.
hostIf_WiFi_EndPoint_Profile_Security::get_hostIf_WiFi_EndPoint_Profile_Security_ModeEnabled
int get_hostIf_WiFi_EndPoint_Profile_Security_ModeEnabled(HOSTIF_MsgData_t *stMsgData)
This function is used to get which security mode is enabled for wireless end point....
hostIf_WiFi_EndPoint_Profile_Security::get_hostIf_WiFi_EndPoint_Profile_Security_WEPKey
int get_hostIf_WiFi_EndPoint_Profile_Security_WEPKey(HOSTIF_MsgData_t *stMsgData)
Get a WEP key expressed as a hexadecimal string.
hostIf_WiFi_EndPoint_Profile_Security::get_hostIf_WiFi_EndPoint_Profile_Security_KeyPassphrase
int get_hostIf_WiFi_EndPoint_Profile_Security_KeyPassphrase(HOSTIF_MsgData_t *stMsgData)
Get a passphrase from which the PreSharedKey is to be generated, for WPA-Personal or WPA2-Personal or...
hostIf_WiFi_EndPoint_Profile_Security
Definition: Device_WiFi_EndPoint_Profile_Security.h:44