ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
ssh.h File Reference

Every byte the connections use, one span per slot. More...

#include "protocore_config.h"

Go to the source code of this file.

Classes

struct  SshNs
 Dispatch table. Addressed by offset, so the layout is asserted below. More...
 

Functions

 PROTOCORE_NS_LAYOUT (SshNs, conn_slot)
 
uint8_t * protocore_ssh_conn_slot (uint8_t *work, uint8_t i)
 The base of slot i's span, or NULL when i is out of range. Every .
 
uint8_t * protocore_ssh_span (void)
 The PROTOCORE_SSH_BORROW bytes this module's state lives in.
 

Variables

PROTOCORE_NS SshNs Ssh PROTOCORE_UNUSED = {.conn_slot = protocore_ssh_conn_slot}
 Module namespace.
 

Detailed Description

Every byte the connections use, one span per slot.

work is PROTOCORE_SSH_BORROW bytes the CALLER took, at an address it knows. It is not held past the call, so nothing here aliases it. How those bytes are carved is this module's and is never named here.

Definition in file ssh.h.

Function Documentation

◆ PROTOCORE_NS_LAYOUT()

PROTOCORE_NS_LAYOUT ( SshNs  ,
conn_slot   
)

◆ protocore_ssh_conn_slot()

uint8_t * protocore_ssh_conn_slot ( uint8_t *  work,
uint8_t  i 
)

The base of slot i's span, or NULL when i is out of range. Every .

Parameters
workPROTOCORE_SSH_BORROW bytes the caller took. Not held past the call.
iI
Returns
The uint8_t *.

◆ protocore_ssh_span()

uint8_t * protocore_ssh_span ( void  )

The PROTOCORE_SSH_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.

Returns
the span.

Variable Documentation

◆ PROTOCORE_UNUSED

PROTOCORE_NS SshNs Ssh PROTOCORE_UNUSED = {.conn_slot = protocore_ssh_conn_slot}

Module namespace.

Definition at line 46 of file ssh.h.