This repository has been archived by the owner on Jan 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
mso_mgmt_hal.h
200 lines (170 loc) · 4.31 KB
/
mso_mgmt_hal.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
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
190
191
192
193
194
195
196
197
198
199
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:
*
* Copyright 2016 RDK Management
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file mso_mgmt_hal.h
* @brief MSO Management HAL
*
* @description This header file gives the function call prototypes and structure definitions used for the RDK-Broadband
* hardware abstraction layer for MSO Management.
*/
#ifndef __MSO_MGMT_HAL_H__
#define __MSO_MGMT_HAL_H__
/**********************************************************************
CONSTANT DEFINITIONS
**********************************************************************/
/**
* @defgroup msomgmt_hal MSO Management HAL
*
* This module provides the function call prototypes and structure definitions.
*
* @defgroup msomgmt_hal_types MSO Management HAL Data Types
* @ingroup msomgmt_hal
*
* @defgroup msomgmt_hal_apis MSO Management HAL APIs
* @ingroup msomgmt_hal
*
**/
/**
* @addtogroup msomgmt_hal_types
* @{
*/
#ifndef CHAR
#define CHAR char
#endif
#ifndef UCHAR
#define UCHAR unsigned char
#endif
#ifndef BOOLEAN
#define BOOLEAN unsigned char
#endif
#ifndef INT
#define INT int
#endif
#ifndef UINT
#define UINT unsigned int
#endif
#ifndef ULONG
#define ULONG unsigned long
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef ENABLE
#define ENABLE 1
#endif
#ifndef RETURN_OK
#define RETURN_OK 0
#endif
#ifndef RETURN_ERR
#define RETURN_ERR -1
#endif
typedef unsigned short uint16;
typedef unsigned long uint32;
typedef int boolean;
#ifndef SEC_PER_YEAR
#define SEC_PER_YEAR 31536000
#endif
#ifndef SIZE_arrisCmDevHttpClientSee
#define SIZE_arrisCmDevHttpClientSeed 8L
#endif
#ifndef ERROR
#define ERROR -1
#endif
/**********************************************************************
STRUCTURE DEFINITIONS
**********************************************************************/
typedef enum
{
Invalid_PWD,
Good_PWD,
Unique_PWD,
Expired_PWD,
TimeError
}
mso_pwd_ret_status;
/**
* @}
*/
/**
* @addtogroup msomgmt_hal_apis
* @{
*/
/* mso_validatepwd() function */
/**
* @description Validate whether the password passed in matches the password of the day for mso user.
*
* @param pwd - Pointer to a buffer that was preallocated by the caller.
*
* @return The status of the operation.
* @retval mso_pwd_ret_status
Invalid_PWD,
Good_PWD,
Unique_PWD,
Expired_PWD,
TimeError
*
* @execution Synchronous.
* @sideeffect None.
*/
mso_pwd_ret_status mso_validatepwd(char *pwd);
/* mso_set_pod_seed : */
/**
* @description Sets the PoD seed for mso password validation.
*
* @param
* CHAR* - PoD seed
*
* @return the status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected.
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function must not suspend and must not invoke any blocking system
* calls. It should probably just send a message to a driver event handler task.
* Newer Broadband Devices MUST decrypt the seed on demand when this HAL is called.
*/
INT mso_set_pod_seed(char *);
/* mso_get_pod_seed : */
/**
* @description Gets the PoD seed for mso password validation.
*
* @param
* CHAR* pSeed - a pointer to a buffer that was preallocated by the caller. This is where the output is written
*
* @return the status of the operation.
* @retval RETURN_OK if successful.
* @retval RETURN_ERR if any error is detected.
*
* @execution Synchronous.
* @sideeffect None.
*
* @note This function retrieves the decrypted seed set in the Config file
* and SNMP OID rdkbEncryptedClientSeed. pSeed for security reasons MUST be manually
* overwritten after use.
*/
INT mso_get_pod_seed(char* pSeed);
#endif
/**
* @}
*/