Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.9.0.2
openapi_ssh.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-2022 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 #include "openapi_transfer.h"
44 
46 typedef enum
47 {
52 
54 typedef enum
55 {
56  OPEN_SSH_PROTO_VERSION_1 = 0, /* SSH Protocol Version 1 option not supported */
60 
61 typedef enum
62 {
63  OPEN_SCP_OPER_NONE = 0,
64  OPEN_SCP_PUSH = 1,
65  OPEN_SCP_PULL = 2
66 } OPEN_SCP_OPER_t;
67 
68 /*****************************************************************/
88  OPEN_SSH_KEY_TYPE_t sshKeyType);
89 
90 /*****************************************************************/
108  OPEN_SSH_KEY_TYPE_t sshKeyType);
109 
110 /*****************************************************************/
130  OPEN_CONTROL_t sshAdminMode);
131 
132 /*****************************************************************/
148  OPEN_CONTROL_t *sshAdminMode);
149 
150 /*****************************************************************/
170  OPEN_SSH_PROTO_VERSION_t protoVersion);
171 
172 /*****************************************************************/
185  OPEN_SSH_PROTO_VERSION_t *protoVersion);
186 
187 /*****************************************************************/
205  uint32_t sshSessionTimeout);
206 
207 /*****************************************************************/
221  uint32_t *sshSessionTimeout);
222 
223 /*****************************************************************/
241  uint32_t sshMaxSessions);
242 
243 /*****************************************************************/
258 
259 /*****************************************************************/
272  uint32_t *sshMaxSessions);
273 
274 /*****************************************************************/
288  uint32_t *sshActiveSessions);
289 
290 /*****************************************************************/
304  uint32_t sshClientID);
305 
306 /*****************************************************************/
324  OPEN_SSH_KEY_TYPE_t sshKeyType);
325 
326 /*****************************************************************/
345  open_buffdesc *userName, open_buffdesc *password,
346  open_buffdesc *ipAddr, uint32_t sshClientID);
347 
348 /*****************************************************************/
366  open_buffdesc *userName, open_buffdesc *ipAddr,
367  uint32_t sshClientID);
368 
369 /*****************************************************************/
385  OPEN_CONTROL_t *sshdPubKeyAuthMode);
386 
387 /*****************************************************************/
405  OPEN_SSH_KEY_TYPE_t sshKeyType,
406  open_buffdesc *userName,
407  open_buffdesc *pubKey);
408 
409 /*****************************************************************/
425  OPEN_LOG_SEVERITY_t severity, open_buffdesc *fileName,
426  uint32_t lineNum, open_buffdesc *msgBuf);
427 
428 
429 /*****************************************************************/
443  open_buffdesc *userName,
444  open_buffdesc *password);
445 
446 /*****************************************************************/
463  uint32_t clientSockID,
464  open_buffdesc *password);
465 
466 /*****************************************************************/
483  OPEN_CONTROL_t scpServerAdminMode);
484 
485 /*****************************************************************/
502  OPEN_CONTROL_t *scpServerAdminMode);
503 
504 /*****************************************************************/
540  int32_t scpClientPID,
541  open_buffdesc *fileParams);
542 
543 /*****************************************************************/
562 
563 /*********************************************************************
564 * @purpose To get passphrase for SSH key decryption.
565 *
566 * @param[in] client_handle Client handle from registration API.
567 * @param[in] sshKeyType SSH host key type
568 * @param[out] bufPassphrase Buffer for passphrase
569 *
570 * @returns OPEN_E_NONE if successfully updated status.
571 * @returns OPEN_E_PARAM if invalid input parameters is passed.
572 * @returns OPEN_E_ERROR if failed to get passphrase.
573 *
574 * @note This OpEN API returns the passphrase used to decrypt the SSH host key
575 * in plain-text. Usage of this API is not recommended as this can
576 * be a security concern.
577 *
578 * @open-status-hidden
579 *
580 * @supportedinversion OpEN API Version: 1.21
581 *
582 * @end
583 *********************************************************************/
584 open_error_t openapiSSHKeyEncryptPassphraseGet(openapiClientHandle_t *client_handle,
585  OPEN_SSH_KEY_TYPE_t sshKeyType,
586  open_buffdesc *bufPassphrase);
587 /*****************************************************************/
624  int32_t scpClientPID,
625  open_buffdesc *fileParams);
626 
627 /*****************************************************************/
643  OPEN_TRANSFER_STATUS_t transferStatus,
644  OPEN_SCP_OPER_t transferType);
645 
646 /*****************************************************************/
660 
661 /*****************************************************************/
676 
677 #endif
678