assh/assh_transport.h header reference

Description [link] 

This header file contains declarations related to the transport layer component of the ssh2 protocol.

Header inclusion [link] 

Members [link] 

Types [link] 

Functions [link] 

Members detail [link] 

struct assh_event_transport_debug_s [link] 

This struct is declared in assh/assh_transport.h source file, line 164.

The ASSH_EVENT_DEBUG event is reported when the remote host transmitted an SSH_MSG_DEBUG message.

FieldDescription
const assh_bool_t display;Set when the debug message should be displayed. (ro)
const struct assh_cbuffer_s msg;The actual debug message. (ro)
const struct assh_cbuffer_s lang;Tha language tag. (ro)

struct assh_event_transport_disconnect_s [link] 

This struct is declared in assh/assh_transport.h source file, line 150.

The ASSH_EVENT_DISCONNECT event is reported when the remote host transmitted an SSH_MSG_DISCONNECT message. This may not occur if the connection is dropped or if we already sent such a message.

FieldDescription
const enum assh_ssh_disconnect_e reason;Disconnect reason as specified in rfc4250. (ro)
const struct assh_cbuffer_s desc;Human readable disconnect reason. (ro)
const struct assh_cbuffer_s lang;Tha language tag. (ro)

struct assh_event_transport_read_s [link] 

This struct is declared in assh/assh_transport.h source file, line 112.

The ASSH_EVENT_READ event is reported in order to gather incoming ssh stream data from the remote host.

The buf field have to be filled with incoming data stream. The assh_event_done function must be called once the data have been copied to the buffer and the transferred field have been set to the amount of available data.

If not enough data is available, it's ok to provide less than requested or even no data. The buffer will be provided again the next time this event is reported.

When the underlying communication channel is not able to provide more data, the ASSH_ERR_IO error has to be reported to the assh_event_done function.

FieldDescription
const struct assh_buffer_s buf;Must be filled with the incoming ssh2 stream. (rw)
size_t transferred;Must be set to the amount of data copied to the buffer. (rw)

union assh_event_transport_u [link] 

This union is declared in assh/assh_transport.h source file, line 177.

This union contains all transport related event structures.

struct assh_event_transport_write_s [link] 

This struct is declared in assh/assh_transport.h source file, line 137.

The ASSH_EVENT_WRITE event is reported when some ssh stream data is available for sending to the remote host. The buf field provides a buffer which contain the output data. The transferred field must be set to the amount of data sent. The assh_event_done function can then be called once the output data have been sent so that the packet buffer is released.

It's ok to set the transferred field to a value less than the buffer size. If no data at all can be sent, the default value of the field can be left untouched. The buffer will remain valid and will be provided again the next time this event is returned.

When the underlying communication channel is closed and it is not possible to send more data, the ASSH_ERR_IO error has to be reported to the assh_event_done function.

FieldDescription
const struct assh_cbuffer_s buf;Contains the outgoing ssh2 stream. (ro)
size_t transferred;Must be set to the amount of data copied from the buffer. (rw)

assh_status_t assh_transport_debug(struct assh_session_s *s, assh_bool_t display, const char *msg, const char *lang) [link] 

This function is declared in assh/assh_transport.h source file, line 229.

This function sends a SSH_MSG_DEBUG message.

assh_bool_t assh_transport_has_output(struct assh_session_s *s) [link] 

This function is declared in assh/assh_transport.h source file, line 223.

This function returns true if there is pending output ssh stream. When this is the case, an ASSH_EVENT_WRITE event will be reported.

enum assh_stream_in_state_e [link] 

This enum is for internal use only.

This enum is declared in assh/assh_transport.h source file, line 72.

This enum specifies state of the input stream parser

IdentifierValueDescription
ASSH_TR_IN_IDENT0
ASSH_TR_IN_IDENT_DONE1
ASSH_TR_IN_HEAD2
ASSH_TR_IN_HEAD_DONE3
ASSH_TR_IN_PAYLOAD4
ASSH_TR_IN_PAYLOAD_DONE5
ASSH_TR_IN_CLOSED6

enum assh_stream_out_state_e [link] 

This enum is for internal use only.

This enum is declared in assh/assh_transport.h source file, line 84.

This enum specifies state of the output stream generator

IdentifierValueDescription
ASSH_TR_OUT_IDENT0
ASSH_TR_OUT_IDENT_PAUSE1
ASSH_TR_OUT_IDENT_DONE2
ASSH_TR_OUT_PACKETS3
ASSH_TR_OUT_PACKETS_ENCIPHERED4
ASSH_TR_OUT_PACKETS_PAUSE5
ASSH_TR_OUT_PACKETS_DONE6
ASSH_TR_OUT_CLOSED7

assh_status_t assh_transport_dispatch(struct assh_session_s *s, struct assh_event_s *e) [link] 

This function is for internal use only.

This function is declared in assh/assh_transport.h source file, line 217.

This function dispatches an incoming packets to the appropriate state machine (tranport, kex or service). It is called from the assh_event_get function.

void assh_transport_push(struct assh_session_s *s, struct assh_packet_s *p) [link] 

This function is for internal use only.

This function is declared in assh/assh_transport.h source file, line 188.

This function puts a packet in the output queue. The packet will be released once it has been enciphered and sent.

assh_status_t assh_transport_read(struct assh_session_s *s, struct assh_event_s *e) [link] 

This function is for internal use only.

This function is declared in assh/assh_transport.h source file, line 210.

This function executes the transport input FSM code which extracts packets from the stream and decipher them. It may report the ASSH_EVENT_WRITE event. It is called from the assh_event_get function.

enum assh_transport_state_e [link] 

This enum is for internal use only.

This enum is declared in assh/assh_transport.h source file, line 45.

This enum specifies the transport status of an ssh session.

IdentifierValueDescription
ASSH_TR_INIT0Session just initilized, first call to assh_event_get expected.
ASSH_TR_IDENT1Wait for end of identification string exchange
ASSH_TR_KEX_INIT2send a SSH_MSG_KEXINIT packet then go to ASSH_TR_KEX_WAIT
ASSH_TR_KEX_WAIT3We wait for a SSH_MSG_KEXINIT packet.
ASSH_TR_KEX_SKIP4The next received SSH_MSG_KEXINIT packet must be ignored due to a bad guess.
ASSH_TR_KEX_RUNNING5Both SSH_MSG_KEXINIT packet were sent, the key exchange is taking place.
ASSH_TR_NEWKEY6The key exchange is over and a SSH_MSG_NEWKEYS packet is expected.
ASSH_TR_SERVICE7No key exchange is running, service packets are allowed.
ASSH_TR_SERVICE_KEX8Key re-exchange packet sent but not received, service packets are allowed.
ASSH_TR_DISCONNECT9Only outgoing packets are processed so that a disconnection packet can be sent.
ASSH_TR_CLOSED10Session closed, no more event will be reported.

assh_status_t assh_transport_unimp(struct assh_session_s *s, struct assh_packet_s *pin) [link] 

This function is for internal use only.

This function is declared in assh/assh_transport.h source file, line 194.

This function sends an SSH_MSG_UNIMPLEMENTED packet in response to the pin packet.

assh_status_t assh_transport_write(struct assh_session_s *s, struct assh_event_s *e) [link] 

This function is for internal use only.

This function is declared in assh/assh_transport.h source file, line 202.

This function executes the transport output FSM code which enciphers packets and builds the output stream. It may report the ASSH_EVENT_READ event. It is called from the assh_event_get function.

Valid XHTML 1.0 StrictGenerated by diaxen on Sun Oct 25 23:31:03 2020 using MkDoc