|
ProtoCore v0.0.1
Deterministic, zero-heap network stack for embedded targets
|
SSH message dispatcher implementation. More...
#include "network_drivers/presentation/ssh/connection/ssh_server.h"#include "network_drivers/presentation/ssh/auth/ssh_auth.h"#include "network_drivers/presentation/ssh/connection/ssh_channel.h"#include "network_drivers/presentation/ssh/transport/ssh_dh.h"#include "network_drivers/presentation/ssh/transport/ssh_packet.h"#include "network_drivers/presentation/ssh/transport/ssh_transport.h"#include "server/mmgr/scratch.h"#include <string.h>Go to the source code of this file.
Classes | |
| struct | SshServerCtx |
Functions | |
| void | pc_ssh_server_set_emit_cb (SshEmitCb cb) |
| Install the outbound-message callback. | |
| int | pc_ssh_server_dispatch (uint8_t i, uint8_t msg_type, const uint8_t *payload, size_t len) |
Dispatch one decrypted inbound SSH message for slot i. | |
SSH message dispatcher implementation.
Definition in file ssh_server.cpp.
| void pc_ssh_server_set_emit_cb | ( | SshEmitCb | cb | ) |
Install the outbound-message callback.
Definition at line 29 of file ssh_server.cpp.
References SshServerCtx::emit_cb.
Referenced by pc_ssh_conn_setup().
| int pc_ssh_server_dispatch | ( | uint8_t | i, |
| uint8_t | msg_type, | ||
| const uint8_t * | payload, | ||
| size_t | len | ||
| ) |
Dispatch one decrypted inbound SSH message for slot i.
Routes by message type and handshake phase, driving the handshake and, once open, the channel protocol. Responses are produced via the emit callback.
| [in] | i | SSH slot. |
| [in] | msg_type | First payload byte (SSH message number). |
| [in] | payload | Full message payload (including msg_type at [0]). |
| [in] | len | Payload length. |
Definition at line 73 of file ssh_server.cpp.
References SshSession::auth_failures, SshSession::authed, pc_span::buf, pc_span::cap, SshSession::ext_info_c, MAX_SSH_CONNS, pc_span_ok(), pc_ssh_auth_handle_request(), pc_ssh_auth_handle_service_request(), pc_ssh_channel_handle_close(), pc_ssh_channel_handle_data(), pc_ssh_channel_handle_open(), pc_ssh_channel_handle_open_confirm(), pc_ssh_channel_handle_open_failure(), pc_ssh_channel_handle_request(), pc_ssh_channel_handle_window_adjust(), SshSession::phase, SshPacketState::seq_no_recv, ScratchBorrow::span(), ssh_extinfo_build(), ssh_global_request_handle(), ssh_kex_generate(), ssh_kexdh_handle(), ssh_kexinit_build(), ssh_kexinit_parse(), SSH_MAX_AUTH_ATTEMPTS, SSH_MSG_CHANNEL_CLOSE, SSH_MSG_CHANNEL_DATA, SSH_MSG_CHANNEL_EOF, SSH_MSG_CHANNEL_OPEN, SSH_MSG_CHANNEL_OPEN_CONFIRM, SSH_MSG_CHANNEL_OPEN_FAILURE, SSH_MSG_CHANNEL_REQUEST, SSH_MSG_CHANNEL_WINDOW_ADJUST, SSH_MSG_DISCONNECT, SSH_MSG_EXT_INFO, SSH_MSG_GLOBAL_REQUEST, SSH_MSG_IGNORE, SSH_MSG_KEXDH_INIT, SSH_MSG_KEXINIT, SSH_MSG_NEWKEYS, SSH_MSG_SERVICE_REQUEST, SSH_MSG_UNIMPLEMENTED, SSH_MSG_USERAUTH_FAILURE, SSH_MSG_USERAUTH_INFO_RESPONSE, SSH_MSG_USERAUTH_REQUEST, SSH_MSG_USERAUTH_SUCCESS, ssh_newkeys_complete(), ssh_newkeys_sent(), SSH_PHASE_AUTH, SSH_PHASE_DH_INIT, SSH_PHASE_SERVICE, ssh_pkt, SSH_PKT_BUF_SIZE, and ssh_sess.