|
Zephyr Project API 4.4.99
A Scalable Open Source RTOS
|
Functions | |
| int | ssh_client_start (struct ssh_client *ssh, const char *user_name, const struct net_sockaddr *addr, int host_key_index, ssh_transport_event_callback_t callback, void *user_data) |
| Start an SSH client connection. | |
| int | ssh_client_stop (struct ssh_client *ssh) |
| Stop an SSH client connection. | |
| int | ssh_client_register_transport_callback (struct ssh_transport_conf *conf) |
| Register a callback function for getting the transport associated with a server connection. | |
| int | ssh_client_unregister_transport_callback (struct ssh_transport_conf *conf) |
| Unregister a callback function for getting the transport associated with a server connection. | |
| struct ssh_client * | ssh_transport_get_client (struct ssh_transport *transport) |
| Get the SSH client instance that owns a given transport. | |
| int ssh_client_register_transport_callback | ( | struct ssh_transport_conf * | conf | ) |
#include <client.h>
Register a callback function for getting the transport associated with a server connection.
The registered callback is invoked for client-side transport events. On the client role only the following event types are emitted:
The callback return value is ignored; the callback acts as an observer and cannot influence the transport flow.
| conf | Configuration data for the transport callback. The structure must remain valid until it is unregistered. |
| int ssh_client_start | ( | struct ssh_client * | ssh, |
| const char * | user_name, | ||
| const struct net_sockaddr * | addr, | ||
| int | host_key_index, | ||
| ssh_transport_event_callback_t | callback, | ||
| void * | user_data ) |
#include <client.h>
Start an SSH client connection.
| ssh | SSH client instance |
| user_name | Username to use for authentication |
| addr | Address of the SSH server to connect to |
| host_key_index | Index of the host key to use for verifying the server's identity |
| callback | Callback to be called on SSH transport events |
| user_data | User data to be passed to the callback |
| int ssh_client_stop | ( | struct ssh_client * | ssh | ) |
#include <client.h>
Stop an SSH client connection.
| ssh | SSH client instance |
| int ssh_client_unregister_transport_callback | ( | struct ssh_transport_conf * | conf | ) |
#include <client.h>
Unregister a callback function for getting the transport associated with a server connection.
| conf | Configuration data for the transport callback |
| struct ssh_client * ssh_transport_get_client | ( | struct ssh_transport * | transport | ) |
#include <client.h>
Get the SSH client instance that owns a given transport.
This is useful inside a registered transport callback, which is invoked globally for events from all client instances, to determine which client instance a transport belongs to. It must only be called for a transport obtained from a client transport callback.
| transport | Transport to get the owning client for. |