ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
ssh.h
Go to the documentation of this file.
1// ProtoCore v1.0.16 - Copyright (C) 2026 Douglas Quigg (dstroy0) <dquigg123@gmail.com>
2// SPDX-License-Identifier: AGPL-3.0-or-later
3
4#ifndef PROTOCORE_SSH_SSH_H
5#define PROTOCORE_SSH_SSH_H
6
7#include "protocore_config.h" // the entry point: protocore_types.h for the widths
8
10
11/**
12 * @file ssh.h
13 * @brief Every byte the connections use, one span per slot.
14 *
15 * @c work is PROTOCORE_SSH_BORROW bytes the CALLER took, at an address it knows. It is not held past the call, so
16 * nothing here aliases it. How those bytes are carved is this module's and is never named here.
17 */
18
19/** @brief Dispatch table. Addressed by offset, so the layout is asserted below. */
20typedef struct
21{
22 uint8_t *(*conn_slot)(uint8_t *, uint8_t);
23} SshNs;
25
26/**
27 * @brief The base of slot i's span, or NULL when i is out of range. Every .
28 * @param work PROTOCORE_SSH_BORROW bytes the caller took. Not held past the call.
29 * @param i I
30 * @return The uint8_t *.
31 */
32uint8_t *protocore_ssh_conn_slot(uint8_t *work, uint8_t i);
33
34/**
35 * @brief The PROTOCORE_SSH_BORROW bytes this module's state lives in.
36 *
37 * Stated beside the namespace rather than on it: an entry takes a borrow, and this is where
38 * that borrow comes from. Taken once from the end of the pool, which no mark and no release
39 * walks, so the state lasts the life of the program.
40 *
41 * @return the span.
42 */
43uint8_t *protocore_ssh_span(void);
44
45/** @brief Module namespace. */
47
49
50#endif // PROTOCORE_SSH_SSH_H
#define PROTOCORE_NS_LAYOUT(T,...)
Pin every dispatch slot of a table that is nothing but function pointers.
#define PROTOCORE_NS
Storage for a dispatch table. The const is load bearing.
uint8_t * protocore_ssh_span(void)
The PROTOCORE_SSH_BORROW bytes this module's state lives in.
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 .
PROTOCORE_NS SshNs Ssh PROTOCORE_UNUSED
Module namespace.
Definition ssh.h:46
Dispatch table. Addressed by offset, so the layout is asserted below.
Definition ssh.h:21
uint8_t *(* conn_slot)(uint8_t *, uint8_t)
Definition ssh.h:22
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
Definition types.h:96
#define PROTOCORE_END_DECLS
Definition types.h:97