Decoupled stream I/O: ring buffer in, framed bytes out, one SSH slot per socket. More...
Go to the source code of this file.
Classes | |
| struct | SshStreamRef |
| RFC 4254 sec 5: which pool a handle indexes, and the channel it carries. More... | |
| struct | SshNetMsgArgs |
| The message bytes an emit or a write carries. More... | |
| struct | SshChanDialArgs |
| RFC 4254 sec 7.2: where a bridged channel dials, and the client slot it takes. More... | |
| struct | SshChanReadArgs |
| Where a channel read writes. More... | |
| struct | SshNetworkVars |
| struct | SshNetworkNs |
| The entries. More... | |
Functions | |
| EMBED_ENUM_BYTE (SshStreamKind, SSH_STREAM_ACCEPTED=0, SSH_STREAM_DIALED) | |
| Which transport a slot's byte stream belongs to. | |
| void | protocore_ssh_network_claim (const uint8_t *work) |
| void | protocore_ssh_network_release (const uint8_t *work) |
| void | protocore_ssh_network_slot_free (const uint8_t *work) |
| void | protocore_ssh_network_owns (const uint8_t *work) |
| void | protocore_ssh_network_tx_drain (const uint8_t *work) |
| void | protocore_ssh_network_emit (const uint8_t *work) |
| void | protocore_ssh_network_write_msg (const uint8_t *work) |
| void | protocore_ssh_network_payload_region (const uint8_t *work) |
| void | protocore_ssh_network_write_msg_at (const uint8_t *work) |
| void | protocore_ssh_network_chan_open (uint8_t *work) |
| void | protocore_ssh_network_chan_adopt (uint8_t *work) |
| void | protocore_ssh_network_chan_by_cid (uint8_t *work) |
| void | protocore_ssh_network_chan_write (uint8_t *work) |
| void | protocore_ssh_network_chan_read (uint8_t *work) |
| void | protocore_ssh_network_chan_avail (uint8_t *work) |
| void | protocore_ssh_network_chan_drained (uint8_t *work) |
| void | protocore_ssh_network_chan_close (uint8_t *work) |
| void | protocore_ssh_network_chan_close_all (uint8_t *work) |
| uint8_t * | protocore_ssh_network_span (void) |
| The PROTOCORE_SSH_NETWORK_BORROW bytes this module's state lives in. | |
| void | ssh_net_version_exchange_send (uint8_t i, uint8_t conn_slot) |
| Put the server identification string on the wire, raw, before any binary packet. | |
Variables | |
| SshNetworkVars | SshNetworkV |
| The operands and the outcome. | |
Decoupled stream I/O: ring buffer in, framed bytes out, one SSH slot per socket.
Definition in file network.h.
| EMBED_ENUM_BYTE | ( | SshStreamKind | , |
| SSH_STREAM_ACCEPTED | = 0, | ||
| SSH_STREAM_DIALED | ) |
Which transport a slot's byte stream belongs to.
RFC 4253 sec 4: "SSH works over any 8-bit clean, binary-transparent transport", and sec 4 gives the two ends different ones - the listening role's stream is a socket this end accepted, the initiating role's is one it dialled. They are separate pools with separate handle spaces, so the handle alone does not say which array it indexes.
| void protocore_ssh_network_claim | ( | const uint8_t * | work | ) |
Referenced by protocore_ssh_network_chan_close_all().
| void protocore_ssh_network_release | ( | const uint8_t * | work | ) |
Referenced by protocore_ssh_network_chan_close_all().
| void protocore_ssh_network_slot_free | ( | const uint8_t * | work | ) |
Referenced by protocore_ssh_network_chan_close_all().
| void protocore_ssh_network_owns | ( | const uint8_t * | work | ) |
Referenced by protocore_ssh_network_chan_close_all().
| void protocore_ssh_network_tx_drain | ( | const uint8_t * | work | ) |
Referenced by protocore_ssh_network_chan_close_all().
| void protocore_ssh_network_emit | ( | const uint8_t * | work | ) |
Referenced by protocore_ssh_network_chan_close_all().
| void protocore_ssh_network_write_msg | ( | const uint8_t * | work | ) |
Referenced by protocore_ssh_network_chan_close_all().
| void protocore_ssh_network_payload_region | ( | const uint8_t * | work | ) |
Referenced by protocore_ssh_network_chan_close_all().
| void protocore_ssh_network_write_msg_at | ( | const uint8_t * | work | ) |
Referenced by protocore_ssh_network_chan_close_all().
| void protocore_ssh_network_chan_open | ( | uint8_t * | work | ) |
Referenced by protocore_ssh_network_chan_close_all().
| void protocore_ssh_network_chan_adopt | ( | uint8_t * | work | ) |
Referenced by protocore_ssh_network_chan_close_all().
| void protocore_ssh_network_chan_by_cid | ( | uint8_t * | work | ) |
Referenced by protocore_ssh_network_chan_close_all().
| void protocore_ssh_network_chan_write | ( | uint8_t * | work | ) |
Referenced by protocore_ssh_network_chan_close_all().
| void protocore_ssh_network_chan_read | ( | uint8_t * | work | ) |
Referenced by protocore_ssh_network_chan_close_all().
| void protocore_ssh_network_chan_avail | ( | uint8_t * | work | ) |
Referenced by protocore_ssh_network_chan_close_all().
| void protocore_ssh_network_chan_drained | ( | uint8_t * | work | ) |
Referenced by protocore_ssh_network_chan_close_all().
| void protocore_ssh_network_chan_close | ( | uint8_t * | work | ) |
Referenced by protocore_ssh_network_chan_close_all().
| void protocore_ssh_network_chan_close_all | ( | uint8_t * | work | ) |
References protocore_ssh_network_chan_adopt(), protocore_ssh_network_chan_avail(), protocore_ssh_network_chan_by_cid(), protocore_ssh_network_chan_close(), protocore_ssh_network_chan_close_all(), protocore_ssh_network_chan_drained(), protocore_ssh_network_chan_open(), protocore_ssh_network_chan_read(), protocore_ssh_network_chan_write(), protocore_ssh_network_claim(), protocore_ssh_network_emit(), protocore_ssh_network_owns(), protocore_ssh_network_payload_region(), protocore_ssh_network_release(), protocore_ssh_network_slot_free(), protocore_ssh_network_tx_drain(), protocore_ssh_network_write_msg(), and protocore_ssh_network_write_msg_at().
Referenced by protocore_ssh_network_chan_close_all().
| uint8_t * protocore_ssh_network_span | ( | void | ) |
The PROTOCORE_SSH_NETWORK_BORROW bytes this module's state lives in.
Stated beside the namespace rather than on it: an entry takes a borrow, and this is where that borrow comes from. Taken once from the end of the pool, which no mark and no release walks, so the state lasts the life of the program.
| void ssh_net_version_exchange_send | ( | uint8_t | i, |
| uint8_t | conn_slot ) |
Put the server identification string on the wire, raw, before any binary packet.
|
extern |
The operands and the outcome.