|
Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.12.0.1
|
Macros | |
| #define | OPEN_SSHD_KEY_DATA_SIZE_MAX 8192 /* L7_SSHD_KEY_DATA_SIZE_MAX */ |
Enumerations | |
| enum | OPEN_SCP_OPER_t { OPEN_SCP_OPER_NONE = 0, OPEN_SCP_PUSH = 1, OPEN_SCP_PULL = 2 } |
| enum | OPEN_SSH_KEY_TYPE_t { OPEN_SSH_KEY_TYPE_RSA = 0, OPEN_SSH_KEY_TYPE_DSA = 1, OPEN_SSH_KEY_TYPE_ECDSA = 2 } |
| OpEN uses this enumeration to define SSH key types. More... | |
| enum | OPEN_SSH_PROTO_VERSION_t { OPEN_SSH_PROTO_VERSION_1 = 0, OPEN_SSH_PROTO_VERSION_2 = 1, OPEN_SSH_PROTO_VERSION_BOTH = 2 } |
| OpEN uses this enumeration to define SSH protocol versions. More... | |
Functions | |
| open_error_t | openapiScpServerAdminModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *scpServerAdminMode) |
| Get the SCP server admin mode. More... | |
| open_error_t | openapiScpServerAdminModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t scpServerAdminMode) |
| Set the SCP server admin mode to initiate file transfer. More... | |
| open_error_t | openapiSSHActiveSessionsGet (openapiClientHandle_t *client_handle, uint32_t *sshActiveSessions) |
| Get the active number of SSH sessions. More... | |
| open_error_t | openapiSSHAdminModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *sshAdminMode) |
| Get the admin mode of SSH. More... | |
| open_error_t | openapiSSHAdminModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t sshAdminMode) |
| Set the admin mode of SSH. More... | |
| open_error_t | openapiSshdCfgKeyLenGet (openapiClientHandle_t *client_handle, OPEN_SSH_KEY_TYPE_t type, uint32_t *pLength) |
| Gets the configured key length of SSH key. More... | |
| open_error_t | openapiSshdKeyDataGet (openapiClientHandle_t *client_handle, OPEN_SSH_KEY_TYPE_t type, open_buffdesc *pkeyData) |
| Gets key data for a specific key type. More... | |
| open_error_t | openapiSshdKeyLenGet (openapiClientHandle_t *client_handle, OPEN_SSH_KEY_TYPE_t type, uint32_t *pLength) |
| Gets the length of the existing SSH key. More... | |
| open_error_t | openapiSshdKeyLenSet (openapiClientHandle_t *client_handle, OPEN_SSH_KEY_TYPE_t type, uint32_t length) |
| Set the length for SSH Key to be generated. More... | |
| open_error_t | openapiSshdPortNumGet (openapiClientHandle_t *client_handle, uint32_t *pPort) |
| Gets ssh server port number. More... | |
| open_error_t | openapiSshdPortNumSet (openapiClientHandle_t *client_handle, uint32_t portNum) |
| Sets the port number to be used for SSH Server. More... | |
| open_error_t | openapiSshdProtoLevelFlagsGet (openapiClientHandle_t *client_handle, OPEN_BOOL_t *pSshV1Flag, OPEN_BOOL_t *pSshV2Flag) |
| Gets ssh version flags. More... | |
| open_error_t | openapiSSHKeyDelete (openapiClientHandle_t *client_handle, OPEN_SSH_KEY_TYPE_t sshKeyType) |
| Delete the generated SSH key pairs. More... | |
| open_error_t | openapiSSHKeyGenerate (openapiClientHandle_t *client_handle, OPEN_SSH_KEY_TYPE_t sshKeyType) |
| Generate SSH key pairs. More... | |
| open_error_t | openapiSSHKeyStatusGet (openapiClientHandle_t *client_handle, OPEN_SSH_KEY_TYPE_t sshKeyType) |
| Check the status of SSH key. More... | |
| open_error_t | openapiSSHMaxSessionsDefaultSet (openapiClientHandle_t *client_handle) |
| Set the maximum number of allowed SSH sessions to the default. More... | |
| open_error_t | openapiSSHMaxSessionsGet (openapiClientHandle_t *client_handle, uint32_t *sshMaxSessions) |
| Get the maximum number of SSH sessions allowed. More... | |
| open_error_t | openapiSSHMaxSessionsSet (openapiClientHandle_t *client_handle, uint32_t sshMaxSessions) |
| Set the maximum number of allowed SSH sessions. More... | |
| open_error_t | openapiSSHProtocolVersionGet (openapiClientHandle_t *client_handle, OPEN_SSH_PROTO_VERSION_t *protoVersion) |
| Get the SSH protocol version. More... | |
| open_error_t | openapiSSHProtocolVersionSet (openapiClientHandle_t *client_handle, OPEN_SSH_PROTO_VERSION_t protoVersion) |
| Set the SSH protocol version. More... | |
| open_error_t | openapiSSHPubKeyAuthModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *sshdPubKeyAuthMode) |
| Get the admin mode of SSH public key. More... | |
| 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. More... | |
| open_error_t | openapiSSHSessionTimeoutGet (openapiClientHandle_t *client_handle, uint32_t *sshSessionTimeout) |
| Get the SSH session idle timeout value. More... | |
| open_error_t | openapiSSHSessionTimeoutSet (openapiClientHandle_t *client_handle, uint32_t sshSessionTimeout) |
| Set the SSH session idle timeout. More... | |
| enum OPEN_SSH_KEY_TYPE_t |
OpEN uses this enumeration to define SSH key types.
| Enumerator | |
|---|---|
| OPEN_SSH_KEY_TYPE_RSA |
SSH Key Type RSA. |
| OPEN_SSH_KEY_TYPE_DSA |
SSH Key Type DSA. |
| OPEN_SSH_KEY_TYPE_ECDSA |
SSH Key Type ECDSA. |
Definition at line 46 of file openapi_ssh.h.
OpEN uses this enumeration to define SSH protocol versions.
| Enumerator | |
|---|---|
| OPEN_SSH_PROTO_VERSION_2 |
SSH Protocol Version 2. |
| OPEN_SSH_PROTO_VERSION_BOTH |
SSH Protocol Version Both (1 and 2) option not supported. |
Definition at line 54 of file openapi_ssh.h.
| open_error_t openapiScpServerAdminModeGet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_CONTROL_t * | scpServerAdminMode | ||
| ) |
Get the SCP server admin mode.
| [in] | client_handle | Client handle from registration API |
| [out] | scpServerAdminMode | SCP Remote server mode enabled or disabled. Must be one of the following: OPEN_DISABLE or OPEN_ENABLE |
| OPEN_E_NONE | if get SCP remote server admin mode status. |
| OPEN_E_FAIL | if failed to get SCP server admin mode. |
| OPEN_E_PARAM | if invalid input parameters is passed. |
OpEN API Version: 1.14
| open_error_t openapiScpServerAdminModeSet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_CONTROL_t | scpServerAdminMode | ||
| ) |
Set the SCP server admin mode to initiate file transfer.
| [in] | client_handle | Client handle from registration API |
| [in] | scpServerAdminMode | SCP Remote server mode enabled or disabled. Must be one of the following: OPEN_DISABLE or OPEN_ENABLE |
| OPEN_E_NONE | if SCP remote server mode status set. |
| OPEN_E_FAIL | if failed to get SCP server admin mode. |
| OPEN_E_PARAM | if invalid input parameters is passed. |
OpEN API Version: 1.14
| open_error_t openapiSSHActiveSessionsGet | ( | openapiClientHandle_t * | client_handle, |
| uint32_t * | sshActiveSessions | ||
| ) |
Get the active number of SSH sessions.
| [in] | client_handle | Client handle from registration API |
| [out] | sshActiveSessions | Active SSH sessions |
| OPEN_E_NONE | if the number of active SSH sessions is returned. |
| OPEN_E_FAIL | if failed to get number of active SSH sessions. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiSSHAdminModeGet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_CONTROL_t * | sshAdminMode | ||
| ) |
Get the admin mode of SSH.
| [in] | client_handle | Client handle from registration API |
| [out] | sshAdminMode | SSH admin mode. Must be one of the following: OPEN_DISABLE or OPEN_ENABLE |
| OPEN_E_NONE | if SSH admin mode is returned. |
| OPEN_E_FAIL | if failed to return SSH admin mode. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiSSHAdminModeSet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_CONTROL_t | sshAdminMode | ||
| ) |
Set the admin mode of SSH.
| [in] | client_handle | Client handle from registration API |
| [in] | sshAdminMode | SSH admin mode. Must be one of the following: OPEN_DISABLE or OPEN_ENABLE |
| OPEN_E_NONE | if SSH admin mode is set. |
| OPEN_E_FAIL | if the RSA and DSA keys are not present. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiSshdCfgKeyLenGet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_SSH_KEY_TYPE_t | type, | ||
| uint32_t * | pLength | ||
| ) |
Gets the configured key length of SSH key.
| [in] | client_handle | client handle from registration API |
| [in] | type | SSH key type |
| [out] | pLength | key length |
| OPEN_E_NONE | On success. |
| OPEN_E_FAIL | On failure. |
| OPEN_E_PARAM | Invalid argument. |
OpEN API Version: 1.25
| open_error_t openapiSshdKeyDataGet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_SSH_KEY_TYPE_t | type, | ||
| open_buffdesc * | pkeyData | ||
| ) |
Gets key data for a specific key type.
| [in] | client_handle | client handle from registration API |
| [in] | type | SSH key type RSA or DSA. |
| [out] | pkeyData | key data in hex format |
| OPEN_E_NONE | On success. |
| OPEN_E_FAIL | On failure. |
| OPEN_E_PARAM | Invalid argument. |
OpEN API Version: 1.25
| open_error_t openapiSshdKeyLenGet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_SSH_KEY_TYPE_t | type, | ||
| uint32_t * | pLength | ||
| ) |
Gets the length of the existing SSH key.
| [in] | client_handle | client handle from registration API |
| [in] | type | SSH key type |
| [out] | pLength | key length |
| OPEN_E_NONE | On success. |
| OPEN_E_FAIL | On failure. |
| OPEN_E_PARAM | Invalid argument. |
OpEN API Version: 1.25
| open_error_t openapiSshdKeyLenSet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_SSH_KEY_TYPE_t | type, | ||
| uint32_t | length | ||
| ) |
Set the length for SSH Key to be generated.
| [in] | client_handle | client handle from registration API |
| [in] | type | SSH key type |
| [in] | length | key length |
| OPEN_E_UNAVAIL | parameter not supported. |
| OPEN_E_NONE | On success. |
| OPEN_E_FAIL | On failure. |
| OPEN_E_PARAM | Invalid argument. |
OpEN API Version: 1.25
| open_error_t openapiSshdPortNumGet | ( | openapiClientHandle_t * | client_handle, |
| uint32_t * | pPort | ||
| ) |
Gets ssh server port number.
| [in] | client_handle | client handle from registration API |
| [out] | pPort | telnet access port number |
| OPEN_E_NONE | On success. |
| OPEN_E_FAIL | On failure. |
| OPEN_E_PARAM | Invalid argument. |
OpEN API Version: 1.25
| open_error_t openapiSshdPortNumSet | ( | openapiClientHandle_t * | client_handle, |
| uint32_t | portNum | ||
| ) |
Sets the port number to be used for SSH Server.
| [in] | client_handle | client handle from registration API |
| [in] | portNum | SSH server port-number |
| OPEN_E_NONE | On success. |
| OPEN_E_FAIL | On failure. |
| OPEN_E_PARAM | Invalid argument. |
OpEN API Version: 1.25
| open_error_t openapiSshdProtoLevelFlagsGet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_BOOL_t * | pSshV1Flag, | ||
| OPEN_BOOL_t * | pSshV2Flag | ||
| ) |
Gets ssh version flags.
| [in] | client_handle | client handle from registration API |
| [out] | pSshV1Flag | ssh version 1 flag |
| [out] | pSshV2Flag | ssh version 2 flag |
| OPEN_E_NONE | On success. |
| OPEN_E_FAIL | On failure. |
| OPEN_E_PARAM | Invalid argument. |
OpEN API Version: 1.25
| open_error_t openapiSSHKeyDelete | ( | openapiClientHandle_t * | client_handle, |
| OPEN_SSH_KEY_TYPE_t | sshKeyType | ||
| ) |
Delete the generated SSH key pairs.
| [in] | client_handle | Client handle from registration API |
| [in] | sshKeyType | SSH key type. Must be one of the following: OPEN_SSH_KEY_TYPE_RSA or OPEN_SSH_KEY_TYPE_DSA |
| OPEN_E_NONE | if the generated key is deleted. |
| OPEN_E_FAIL | if SSH admin mode is enabled. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiSSHKeyGenerate | ( | openapiClientHandle_t * | client_handle, |
| OPEN_SSH_KEY_TYPE_t | sshKeyType | ||
| ) |
Generate SSH key pairs.
| [in] | client_handle | Client handle from registration API |
| [in] | sshKeyType | SSH key type. Must be one of the following: OPEN_SSH_KEY_TYPE_RSA or OPEN_SSH_KEY_TYPE_DSA |
| OPEN_E_NONE | if SSH key is generated. |
| OPEN_E_FAIL | if SSH admin mode is enabled or if key generation is in progress or if failed to generate SSH key. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiSSHKeyStatusGet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_SSH_KEY_TYPE_t | sshKeyType | ||
| ) |
Check the status of SSH key.
| [in] | client_handle | Client handle from registration API |
| [in] | sshKeyType | SSH key type. Must be one of the following: OPEN_SSH_KEY_TYPE_RSA or OPEN_SSH_KEY_TYPE_DSA |
| OPEN_E_NONE | if SSH key exists. |
| OPEN_E_FAIL | if SSH key generation is in progress. |
| OPEN_E_NOT_FOUND | if SSH key does not exist. |
| OPEN_E_INTERNAL | if internal error has occurred. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiSSHMaxSessionsDefaultSet | ( | openapiClientHandle_t * | client_handle | ) |
Set the maximum number of allowed SSH sessions to the default.
| [in] | client_handle | Client handle from registration API |
| OPEN_E_NONE | if maximum number SSH sessions is set to default. |
| OPEN_E_FAIL | if failed to set maximum SSH sessions to default. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiSSHMaxSessionsGet | ( | openapiClientHandle_t * | client_handle, |
| uint32_t * | sshMaxSessions | ||
| ) |
Get the maximum number of SSH sessions allowed.
| [in] | client_handle | Client handle from registration API |
| [out] | sshMaxSessions | Maximum number of SSH sessions |
| OPEN_E_NONE | if maximum number of SSH sessions is returned. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiSSHMaxSessionsSet | ( | openapiClientHandle_t * | client_handle, |
| uint32_t | sshMaxSessions | ||
| ) |
Set the maximum number of allowed SSH sessions.
| [in] | client_handle | Client handle from registration API |
| [in] | sshMaxSessions | Maximum number of SSH sessions |
| OPEN_E_NONE | if maximum number of SSH sessions is set. |
| OPEN_E_FAIL | if failed to set maximum SSH sessions. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiSSHProtocolVersionGet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_SSH_PROTO_VERSION_t * | protoVersion | ||
| ) |
Get the SSH protocol version.
| [in] | client_handle | Client handle from registration API |
| [out] | protoVersion | SSH protocol version |
| OPEN_E_NONE | if SSH protocol version is returned successfully. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiSSHProtocolVersionSet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_SSH_PROTO_VERSION_t | protoVersion | ||
| ) |
Set the SSH protocol version.
| [in] | client_handle | Client handle from registration API |
| [in] | protoVersion | SSH protocol version. Must be set to OPEN_SSH_PROTO_VERSION_2 |
| OPEN_E_NONE | if SSH protocol version is set. |
| OPEN_E_FAIL | if failed to set SSH protocol version. |
| OPEN_E_UNAVAIL | SSH protocol version 1 not supported. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiSSHPubKeyAuthModeGet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_CONTROL_t * | sshdPubKeyAuthMode | ||
| ) |
Get the admin mode of SSH public key.
| [in] | client_handle | Client handle from registration API |
| [out] | sshdPubKeyAuthMode | SSH public key auth mode. Must be one of the following: OPEN_DISABLE or OPEN_ENABLE |
| OPEN_E_NONE | if SSH public key mode is returned. |
| OPEN_E_FAIL | if failed to return SSH public key mode. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| 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.
| [in] | client_handle | Client handle from registration API |
| [in] | sshKeyType | SSH key type. Must be one of the following: OPEN_SSH_KEY_TYPE_RSA or OPEN_SSH_KEY_TYPE_DSA |
| [in] | userName | SSH user name supplied by SSH client |
| [out] | pubKey | SSH public key |
| OPEN_E_NONE | if SSH public key is returned. |
| OPEN_E_FAIL | if failed to return SSH public key. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiSSHSessionTimeoutGet | ( | openapiClientHandle_t * | client_handle, |
| uint32_t * | sshSessionTimeout | ||
| ) |
Get the SSH session idle timeout value.
| [in] | client_handle | Client handle from registration API |
| [out] | sshSessionTimeout | SSH session idle timeout |
| OPEN_E_NONE | if SSH idle session timeout is returned successfully. |
| OPEN_E_FAIL | if failed to get SSH session idle timeout value. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiSSHSessionTimeoutSet | ( | openapiClientHandle_t * | client_handle, |
| uint32_t | sshSessionTimeout | ||
| ) |
Set the SSH session idle timeout.
| [in] | client_handle | Client handle from registration API |
| [in] | sshSessionTimeout | SSH session idle timeout |
| - | Maximum value OPENAPI_SSHD_MAX_TIMEOUT |
| OPEN_E_NONE | if SSH session idle timeout is set. |
| OPEN_E_FAIL | if failed to set SSH session idle timeout value. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1