24#include "libssh/wrapper.h"
26struct ssh_socket_struct;
29typedef struct packet_struct {
36enum ssh_packet_state_e {
40 PACKET_STATE_SIZEREAD,
43 PACKET_STATE_PROCESSING
46enum ssh_packet_filter_result_e {
52int ssh_packet_send(ssh_session session);
70int ssh_packet_send_newkeys(ssh_session session);
71int ssh_packet_send_unimplemented(ssh_session session, uint32_t seqnum);
72int ssh_packet_parse_type(ssh_session session);
75size_t ssh_packet_socket_callback(
const void *data,
size_t len,
void *user);
76void ssh_packet_register_socket_callback(ssh_session session,
struct ssh_socket_struct *s);
77void ssh_packet_set_callbacks(ssh_session session, ssh_packet_callbacks callbacks);
78void ssh_packet_remove_callbacks(ssh_session session, ssh_packet_callbacks callbacks);
79void ssh_packet_set_default_callbacks(ssh_session session);
80void ssh_packet_process(ssh_session session, uint8_t type);
83uint32_t ssh_packet_decrypt_len(ssh_session session, uint8_t *destination, uint8_t *source);
84int ssh_packet_decrypt(ssh_session session, uint8_t *destination, uint8_t *source,
85 size_t start,
size_t encrypted_size);
86unsigned char *ssh_packet_encrypt(ssh_session session,
89int ssh_packet_hmac_verify(ssh_session session,
const void *data,
size_t len,
90 unsigned char *mac,
enum ssh_hmac_e type);
91int ssh_packet_set_newkeys(ssh_session session,
92 enum ssh_crypto_direction_e direction);
93struct ssh_crypto_struct *ssh_packet_get_current_crypto(ssh_session session,
94 enum ssh_crypto_direction_e direction);
#define SSH_PACKET_CALLBACK(name)
This macro declares a packet callback handler.
Definition callbacks.h:560