Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.7.0.4
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 {
51 
53 typedef enum
54 {
55  OPEN_SSH_PROTO_VERSION_1 = 0, /* SSH Protocol Version 1 option not supported */
59 
60 
61 /*****************************************************************/
81  OPEN_SSH_KEY_TYPE_t sshKeyType);
82 
83 /*****************************************************************/
101  OPEN_SSH_KEY_TYPE_t sshKeyType);
102 
103 /*****************************************************************/
123  OPEN_CONTROL_t sshAdminMode);
124 
125 /*****************************************************************/
141  OPEN_CONTROL_t *sshAdminMode);
142 
143 /*****************************************************************/
163  OPEN_SSH_PROTO_VERSION_t protoVersion);
164 
165 /*****************************************************************/
178  OPEN_SSH_PROTO_VERSION_t *protoVersion);
179 
180 /*****************************************************************/
198  uint32_t sshSessionTimeout);
199 
200 /*****************************************************************/
214  uint32_t *sshSessionTimeout);
215 
216 /*****************************************************************/
234  uint32_t sshMaxSessions);
235 
236 /*****************************************************************/
251 
252 /*****************************************************************/
265  uint32_t *sshMaxSessions);
266 
267 /*****************************************************************/
281  uint32_t *sshActiveSessions);
282 
283 /*****************************************************************/
297  uint32_t sshClientID);
298 
299 /*****************************************************************/
317  OPEN_SSH_KEY_TYPE_t sshKeyType);
318 
319 /*****************************************************************/
338  open_buffdesc *userName, open_buffdesc *password,
339  open_buffdesc *ipAddr, uint32_t sshClientID);
340 
341 /*****************************************************************/
359  open_buffdesc *userName, open_buffdesc *ipAddr,
360  uint32_t sshClientID);
361 
362 /*****************************************************************/
378  OPEN_CONTROL_t *sshdPubKeyAuthMode);
379 
380 /*****************************************************************/
398  OPEN_SSH_KEY_TYPE_t sshKeyType,
399  open_buffdesc *userName,
400  open_buffdesc *pubKey);
401 
402 /*****************************************************************/
418  OPEN_LOG_SEVERITY_t severity, open_buffdesc *fileName,
419  uint32_t lineNum, open_buffdesc *msgBuf);
420 
421 
422 /*****************************************************************/
436  open_buffdesc *userName,
437  open_buffdesc *password);
438 
439 /*****************************************************************/
456  uint32_t clientSockID,
457  open_buffdesc *password);
458 
459 /*****************************************************************/
476  OPEN_CONTROL_t scpServerAdminMode);
477 
478 /*****************************************************************/
495  OPEN_CONTROL_t *scpServerAdminMode);
496 
497 /*****************************************************************/
533  int32_t scpClientPID,
534  open_buffdesc *fileParams);
535 
536 /*****************************************************************/
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