Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.7.0.4
Welcome
ADK Documentation
API Reference
Files
File List
Globals
api
include
openapi_ssh.h
Go to the documentation of this file.
1
9
/*********************************************************************
10
*
11
* Copyright 2016-2020 Broadcom.
12
*
13
* Licensed under the Apache License, Version 2.0 (the "License");
14
* you may not use this file except in compliance with the License.
15
* You may obtain a copy of the License at
16
*
17
* http://www.apache.org/licenses/LICENSE-2.0
18
*
19
* Unless required by applicable law or agreed to in writing, software
20
* distributed under the License is distributed on an "AS IS" BASIS,
21
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
* See the License for the specific language governing permissions and
23
* limitations under the License.
24
*
25
**********************************************************************
26
*
27
* @filename openapi_ssh.h
28
*
29
* @purpose SSH Configuration and Status
30
*
31
* @component OpEN
32
*
33
* @create 30/01/2013
34
*
35
* @end
36
*
37
**********************************************************************/
38
#ifndef OPENAPI_SSH_H_INCLUDED
39
#define OPENAPI_SSH_H_INCLUDED
40
41
#include "
openapi_common.h
"
42
#include "
openapi_logging.h
"
43
45
typedef
enum
46
{
47
OPEN_SSH_KEY_TYPE_RSA
= 0,
48
OPEN_SSH_KEY_TYPE_DSA
= 1,
49
OPEN_SSH_KEY_TYPE_ECDSA
= 2
50
}
OPEN_SSH_KEY_TYPE_t
;
51
53
typedef
enum
54
{
55
OPEN_SSH_PROTO_VERSION_1 = 0,
/* SSH Protocol Version 1 option not supported */
56
OPEN_SSH_PROTO_VERSION_2
= 1,
57
OPEN_SSH_PROTO_VERSION_BOTH
= 2
58
}
OPEN_SSH_PROTO_VERSION_t
;
59
60
61
/*****************************************************************/
80
open_error_t
openapiSSHKeyGenerate
(
openapiClientHandle_t
*client_handle,
81
OPEN_SSH_KEY_TYPE_t
sshKeyType);
82
83
/*****************************************************************/
100
open_error_t
openapiSSHKeyDelete
(
openapiClientHandle_t
*client_handle,
101
OPEN_SSH_KEY_TYPE_t
sshKeyType);
102
103
/*****************************************************************/
122
open_error_t
openapiSSHAdminModeSet
(
openapiClientHandle_t
*client_handle,
123
OPEN_CONTROL_t
sshAdminMode);
124
125
/*****************************************************************/
140
open_error_t
openapiSSHAdminModeGet
(
openapiClientHandle_t
*client_handle,
141
OPEN_CONTROL_t
*sshAdminMode);
142
143
/*****************************************************************/
162
open_error_t
openapiSSHProtocolVersionSet
(
openapiClientHandle_t
*client_handle,
163
OPEN_SSH_PROTO_VERSION_t
protoVersion);
164
165
/*****************************************************************/
177
open_error_t
openapiSSHProtocolVersionGet
(
openapiClientHandle_t
*client_handle,
178
OPEN_SSH_PROTO_VERSION_t
*protoVersion);
179
180
/*****************************************************************/
197
open_error_t
openapiSSHSessionTimeoutSet
(
openapiClientHandle_t
*client_handle,
198
uint32_t sshSessionTimeout);
199
200
/*****************************************************************/
213
open_error_t
openapiSSHSessionTimeoutGet
(
openapiClientHandle_t
*client_handle,
214
uint32_t *sshSessionTimeout);
215
216
/*****************************************************************/
233
open_error_t
openapiSSHMaxSessionsSet
(
openapiClientHandle_t
*client_handle,
234
uint32_t sshMaxSessions);
235
236
/*****************************************************************/
250
open_error_t
openapiSSHMaxSessionsDefaultSet
(
openapiClientHandle_t
*client_handle);
251
252
/*****************************************************************/
264
open_error_t
openapiSSHMaxSessionsGet
(
openapiClientHandle_t
*client_handle,
265
uint32_t *sshMaxSessions);
266
267
/*****************************************************************/
280
open_error_t
openapiSSHActiveSessionsGet
(
openapiClientHandle_t
*client_handle,
281
uint32_t *sshActiveSessions);
282
283
/*****************************************************************/
296
open_error_t
openapiSSHSocketInfoClear
(
openapiClientHandle_t
*client_handle,
297
uint32_t sshClientID);
298
299
/*****************************************************************/
316
open_error_t
openapiSSHKeyStatusGet
(
openapiClientHandle_t
*client_handle,
317
OPEN_SSH_KEY_TYPE_t
sshKeyType);
318
319
/*****************************************************************/
337
open_error_t
openapiSSHUserAuthenticate
(
openapiClientHandle_t
*client_handle,
338
open_buffdesc
*userName,
open_buffdesc
*password,
339
open_buffdesc
*ipAddr, uint32_t sshClientID);
340
341
/*****************************************************************/
358
open_error_t
openapiSSHPublicUserAuthenticate
(
openapiClientHandle_t
*client_handle,
359
open_buffdesc
*userName,
open_buffdesc
*ipAddr,
360
uint32_t sshClientID);
361
362
/*****************************************************************/
377
open_error_t
openapiSSHPubKeyAuthModeGet
(
openapiClientHandle_t
*client_handle,
378
OPEN_CONTROL_t
*sshdPubKeyAuthMode);
379
380
/*****************************************************************/
397
open_error_t
openapiSSHPubKeyGet
(
openapiClientHandle_t
*client_handle,
398
OPEN_SSH_KEY_TYPE_t
sshKeyType,
399
open_buffdesc
*userName,
400
open_buffdesc
*pubKey);
401
402
/*****************************************************************/
417
open_error_t
openapiSSHLogMessage
(
openapiClientHandle_t
*client_handle,
418
OPEN_LOG_SEVERITY_t
severity,
open_buffdesc
*fileName,
419
uint32_t lineNum,
open_buffdesc
*msgBuf);
420
421
422
/*****************************************************************/
435
open_error_t
openapiSSHTransferRemotePasswordFromUserGet
(
openapiClientHandle_t
*client_handle,
436
open_buffdesc
*userName,
437
open_buffdesc
*password);
438
439
/*****************************************************************/
455
open_error_t
openapiSSHRemotePasswordGet
(
openapiClientHandle_t
*client_handle,
456
uint32_t clientSockID,
457
open_buffdesc
*password);
458
459
/*****************************************************************/
475
open_error_t
openapiScpServerAdminModeSet
(
openapiClientHandle_t
*client_handle,
476
OPEN_CONTROL_t
scpServerAdminMode);
477
478
/*****************************************************************/
494
open_error_t
openapiScpServerAdminModeGet
(
openapiClientHandle_t
*client_handle,
495
OPEN_CONTROL_t
*scpServerAdminMode);
496
497
/*****************************************************************/
532
open_error_t
openapiScpRemoteTransferStart
(
openapiClientHandle_t
*client_handle,
533
int32_t scpClientPID,
534
open_buffdesc
*fileParams);
535
536
/*****************************************************************/
548
open_error_t
openapiScpRemoteTransferComplete
(
openapiClientHandle_t
*client_handle);
549
550
/*********************************************************************
551
* @purpose To get passphrase for SSH key decryption.
552
*
553
* @param[in] client_handle Client handle from registration API.
554
* @param[in] sshKeyType SSH host key type
555
* @param[out] bufPassphrase Buffer for passphrase
556
*
557
* @returns OPEN_E_NONE if successfully updated status.
558
* @returns OPEN_E_PARAM if invalid input parameters is passed.
559
* @returns OPEN_E_ERROR if failed to get passphrase.
560
*
561
* @note This OpEN API returns the passphrase used to decrypt the SSH host key
562
* in plain-text. Usage of this API is not recommended as this can
563
* be a security concern.
564
*
565
* @open-status-hidden
566
*
567
* @supportedinversion OpEN API Version: 1.21
568
*
569
* @end
570
*********************************************************************/
571
open_error_t
openapiSSHKeyEncryptPassphraseGet(
openapiClientHandle_t
*client_handle,
572
OPEN_SSH_KEY_TYPE_t
sshKeyType,
573
open_buffdesc
*bufPassphrase);
574
#endif
575
© 2021 by Broadcom. All rights reserved.