Add initial dmshell

This commit is contained in:
Jonathan Bennett 2026-04-09 19:16:39 -05:00
parent 349c1d5c1e
commit 0e98462170
3 changed files with 82 additions and 0 deletions

View file

@ -74,6 +74,8 @@
*StoreForwardPlusPlus.root_hash max_size:32
*StoreForwardPlusPlus.message max_size:240
*DMShell.payload max_size:200
*StatusMessage.status max_size:80
# MyMessage.name max_size:40

View file

@ -1288,6 +1288,81 @@ message StoreForwardPlusPlus {
uint32 chain_count = 10;
}
/*
* The actual over-the-mesh message doing DMShell
*/
message DMShell {
/*
* Frame op code for PTY session control and stream transport.
*
* Values 1-63 are client->server requests.
* Values 64-127 are server->client responses/events.
*/
enum OpCode {
OP_UNSET = 0;
// Client -> server
OPEN = 1;
INPUT = 2;
RESIZE = 3;
CLOSE = 4;
PING = 5;
ACK = 6;
// Server -> client
OPEN_OK = 64;
OUTPUT = 65;
CLOSED = 66;
ERROR = 67;
PONG = 68;
}
/*
* Legacy bytes tunnel payload. New clients should prefer structured fields below.
*/
// bytes ShellBytes = 1;
/*
* Structured frame operation.
*/
OpCode op = 1;
/*
* Logical PTY session identifier.
*/
uint32 session_id = 2;
/*
* Monotonic sequence number for this frame.
*/
uint32 seq = 3;
/*
* Cumulative ack sequence number.
*/
uint32 ack_seq = 4;
/*
* Opaque bytes payload for INPUT/OUTPUT/ERROR and other frame bodies.
*/
bytes payload = 5;
/*
* Terminal size columns used for OPEN/RESIZE signaling.
*/
uint32 cols = 6;
/*
* Terminal size rows used for OPEN/RESIZE signaling.
*/
uint32 rows = 7;
/*
* Bit flags for protocol extensions.
*/
uint32 flags = 8;
}
/*
* Waypoint message, used to share arbitrary locations across the mesh
*/

View file

@ -115,6 +115,11 @@ enum PortNum {
*/
KEY_VERIFICATION_APP = 12;
/*
* Module/port for handling key verification requests.
*/
DM_SHELL_APP = 13;
/*
* Provides a 'ping' service that replies to any packet it receives.
* Also serves as a small example module.