Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
openapi_ssh.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-2019 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 {
50 
52 typedef enum
53 {
54  OPEN_SSH_PROTO_VERSION_1 = 0, /* SSH Protocol Version 1 option not supported */
58 
59 
60 /*****************************************************************/
80  OPEN_SSH_KEY_TYPE_t sshKeyType);
81 
82 /*****************************************************************/
100  OPEN_SSH_KEY_TYPE_t sshKeyType);
101 
102 /*****************************************************************/
122  OPEN_CONTROL_t sshAdminMode);
123 
124 /*****************************************************************/
140  OPEN_CONTROL_t *sshAdminMode);
141 
142 /*****************************************************************/
162  OPEN_SSH_PROTO_VERSION_t protoVersion);
163 
164 /*****************************************************************/
177  OPEN_SSH_PROTO_VERSION_t *protoVersion);
178 
179 /*****************************************************************/
197  uint32_t sshSessionTimeout);
198 
199 /*****************************************************************/
213  uint32_t *sshSessionTimeout);
214 
215 /*****************************************************************/
233  uint32_t sshMaxSessions);
234 
235 /*****************************************************************/
250 
251 /*****************************************************************/
264  uint32_t *sshMaxSessions);
265 
266 /*****************************************************************/
280  uint32_t *sshActiveSessions);
281 
282 /*****************************************************************/
296  uint32_t sshClientID);
297 
298 /*****************************************************************/
316  OPEN_SSH_KEY_TYPE_t sshKeyType);
317 
318 /*****************************************************************/
337  open_buffdesc *userName, open_buffdesc *password,
338  open_buffdesc *ipAddr, uint32_t sshClientID);
339 
340 /*****************************************************************/
358  open_buffdesc *userName, open_buffdesc *ipAddr,
359  uint32_t sshClientID);
360 
361 /*****************************************************************/
377  OPEN_CONTROL_t *sshdPubKeyAuthMode);
378 
379 /*****************************************************************/
397  OPEN_SSH_KEY_TYPE_t sshKeyType,
398  open_buffdesc *userName,
399  open_buffdesc *pubKey);
400 
401 /*****************************************************************/
417  OPEN_LOG_SEVERITY_t severity, open_buffdesc *fileName,
418  uint32_t lineNum, open_buffdesc *msgBuf);
419 
420 
421 /*****************************************************************/
435  open_buffdesc *userName,
436  open_buffdesc *password);
437 
438 /*****************************************************************/
454  uint32_t clientSockID,
455  open_buffdesc *password);
456 
457 /*****************************************************************/
474  OPEN_CONTROL_t scpServerAdminMode);
475 
476 /*****************************************************************/
493  OPEN_CONTROL_t *scpServerAdminMode);
494 
495 /*****************************************************************/
531  int32_t scpClientPID,
532  open_buffdesc *fileParams);
533 
534 /*****************************************************************/
547 #endif
548 
open_error_t openapiSSHPubKeyAuthModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *sshdPubKeyAuthMode)
Get the admin mode of SSH public key.
open_error_t openapiSSHTransferRemotePasswordFromUserGet(openapiClientHandle_t *client_handle, open_buffdesc *userName, open_buffdesc *password)
Get the remote password for the matching remote username used for transfer.
SSH Protocol Version 2.
Definition: openapi_ssh.h:55
open_error_t openapiSSHActiveSessionsGet(openapiClientHandle_t *client_handle, uint32_t *sshActiveSessions)
Get the active number of SSH sessions.
open_error_t openapiSSHLogMessage(openapiClientHandle_t *client_handle, OPEN_LOG_SEVERITY_t severity, open_buffdesc *fileName, uint32_t lineNum, open_buffdesc *msgBuf)
Log an SSH message in the log server.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiScpServerAdminModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *scpServerAdminMode)
Get the SCP server admin mode.
open_error_t openapiSSHAdminModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t sshAdminMode)
Set the admin mode of SSH.
open_error_t openapiSSHMaxSessionsGet(openapiClientHandle_t *client_handle, uint32_t *sshMaxSessions)
Get the maximum number of SSH sessions allowed.
open_error_t openapiSSHUserAuthenticate(openapiClientHandle_t *client_handle, open_buffdesc *userName, open_buffdesc *password, open_buffdesc *ipAddr, uint32_t sshClientID)
Authenticate SSH User.
open_error_t openapiSSHKeyGenerate(openapiClientHandle_t *client_handle, OPEN_SSH_KEY_TYPE_t sshKeyType)
Generate SSH key pairs.
open_error_t openapiSSHSessionTimeoutGet(openapiClientHandle_t *client_handle, uint32_t *sshSessionTimeout)
Get the SSH session idle timeout value.
open_error_t openapiScpRemoteTransferStart(openapiClientHandle_t *client_handle, int32_t scpClientPID, open_buffdesc *fileParams)
To get the download file complete path and initiate transfer process.
SSH Key Type DSA.
Definition: openapi_ssh.h:48
OPEN_LOG_SEVERITY_t
OpEN uses this enumeration to define Logging Severity Levels.
SSH Key Type RSA.
Definition: openapi_ssh.h:47
open_error_t openapiSSHKeyStatusGet(openapiClientHandle_t *client_handle, OPEN_SSH_KEY_TYPE_t sshKeyType)
Check the status of SSH key.
open_error_t openapiSSHProtocolVersionGet(openapiClientHandle_t *client_handle, OPEN_SSH_PROTO_VERSION_t *protoVersion)
Get the SSH protocol version.
open_error_t openapiScpRemoteTransferComplete(openapiClientHandle_t *client_handle)
To update application about the completion of scp remote file transfer.
open_error_t openapiSSHSessionTimeoutSet(openapiClientHandle_t *client_handle, uint32_t sshSessionTimeout)
Set the SSH session idle timeout.
open_error_t openapiScpServerAdminModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t scpServerAdminMode)
Set the SCP server admin mode to initiate file transfer.
open_error_t openapiSSHAdminModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *sshAdminMode)
Get the admin mode of SSH.
open_error_t openapiSSHPublicUserAuthenticate(openapiClientHandle_t *client_handle, open_buffdesc *userName, open_buffdesc *ipAddr, uint32_t sshClientID)
Authenticate SSH User.
open_error_t openapiSSHMaxSessionsSet(openapiClientHandle_t *client_handle, uint32_t sshMaxSessions)
Set the maximum number of allowed SSH sessions.
open_error_t openapiSSHPubKeyGet(openapiClientHandle_t *client_handle, OPEN_SSH_KEY_TYPE_t sshKeyType, open_buffdesc *userName, open_buffdesc *pubKey)
Get the SSH public key for specified user.
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
open_error_t openapiSSHSocketInfoClear(openapiClientHandle_t *client_handle, uint32_t sshClientID)
Clear socket info entry.
open_error_t openapiSSHMaxSessionsDefaultSet(openapiClientHandle_t *client_handle)
Set the maximum number of allowed SSH sessions to the default.
open_error_t openapiSSHProtocolVersionSet(openapiClientHandle_t *client_handle, OPEN_SSH_PROTO_VERSION_t protoVersion)
Set the SSH protocol version.
open_error_t openapiSSHKeyDelete(openapiClientHandle_t *client_handle, OPEN_SSH_KEY_TYPE_t sshKeyType)
Delete the generated SSH key pairs.
OPEN_SSH_KEY_TYPE_t
OpEN uses this enumeration to define SSH key types.
Definition: openapi_ssh.h:45
open_error_t openapiSSHRemotePasswordGet(openapiClientHandle_t *client_handle, uint32_t clientSockID, open_buffdesc *password)
Get the remote password for the matching client Socket ID for outbound SSH .
OPEN_SSH_PROTO_VERSION_t
OpEN uses this enumeration to define SSH protocol versions.
Definition: openapi_ssh.h:52
SSH Protocol Version Both (1 and 2) option not supported.
Definition: openapi_ssh.h:56