User Tools

Site Tools


mosh:protocol:layers:transport:framing

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mosh:protocol:layers:transport:framing [2026/05/10 03:22] – [Context and Op Codes] moshmosh:protocol:layers:transport:framing [2026/05/15 04:27] (current) – [Domains, Operations Codes, and Context ID] mosh
Line 25: Line 25:
 All MOSH packets follow this structure: All MOSH packets follow this structure:
  
-| Header (12 Bytes) | +| Header (13 Bytes) | 
-| Payload |+| Payload (1,456 Bytes max) |
 | Footer (CRC16) (2 Bytes) | | Footer (CRC16) (2 Bytes) |
  
 +Note: All multi-byte fields are serialized little-endian.
 ===== Header Layout (12 Bytes) ===== ===== Header Layout (12 Bytes) =====
  
Line 39: Line 40:
 | Destination Address  | 2   | 6-bit Network ID + 10-bit Node ID | | Destination Address  | 2   | 6-bit Network ID + 10-bit Node ID |
 | Context              | 2   | 3-bit Domain, 5-bit Operations Code, 8-bit Context ID | | Context              | 2   | 3-bit Domain, 5-bit Operations Code, 8-bit Context ID |
-| Payload Length         | Length of payload in bytes |+| Payload Length         | Length of payload in bytes |
  
 ===== Footer (2 Bytes) ===== ===== Footer (2 Bytes) =====
Line 50: Line 51:
 ===== Version and Flags ===== ===== Version and Flags =====
  
-==== Version (Upper Nibble) ====+==== Version (Upper nibble) ====
 Protocol version (0–15). Protocol version (0–15).
  
Line 56: Line 57:
  
 ^ Bit ^ Name          ^ Description ^ ^ Bit ^ Name          ^ Description ^
-0   | ACK_REQUIRED  | Sender requests acknowledgment | +0x00 | NONE          | No flags are set               | 
-1   | ACK           | Frame is an acknowledgment     | +| 0x01 | ACK_REQUIRED  | Sender requests acknowledgment | 
-2   | IS_RETRY      | Frame is a retransmission      | +0x02 | ACK           | Frame is an acknowledgment     | 
-3   | IS_FRAGMENT   | Frame is part of a fragment    |+0x04 | IS_RETRY      | Frame is a retransmission      | 
 +0x08 | IS_FRAGMENT   | Frame is part of a fragment    |
  
 ----- -----
Line 83: Line 85:
 The Context byte determines which manager processes the payload. The Context byte determines which manager processes the payload.
  
-Context Value ^ Context  ^ Description ^ +===Domain (3-bits)=== 
-0     | [[mosh:protocol:op_codes:system_op_codes|Core]]   | Core/system messages (discovery, sync, error) | +Domain ^ Context  ^ Description ^ 
-1     | [[mosh:protocol:op_codes:node_op_codes|Node]]       | Node-level operations | +0x00  | Core/system messages (discovery, sync, error) | 
-| 2     [[mosh:protocol:op_codes:element_op_codes|Element]] | Element-level operations | +0x01  Node-level (hardware) operations              | 
-| 3     [[mosh:protocol:op_codes:vwire_op_codes|VWire]]     | Virtual wire messaging +| 0x02  | Element-level operations                      | 
-4–7   | RESERVED | Future expansion |+| 0x03  | Virtual wire messaging                        | 
 +| 0x04  | Transport-level operations                    | 
 +| 0x05  | Routing messages                              | 
 +| 0x06  | RESERVED1                                     | 
 +| 0x07  | RESERVED2                                     | 
 + 
 +===Operations Code (5-bits)=== 
 +Each domain has it's own operations code definitions. 
 +  * [[mosh:protocol:op_codes:system_op_codes|Core]] 
 +  * [[mosh:protocol:op_codes:node_op_codes|Node]] 
 +  [[mosh:protocol:op_codes:element_op_codes|Element]] 
 +  [[mosh:protocol:op_codes:vwire_op_codes|VWire]] 
 +  * [[mosh:protocol:op_codes:transport_op_codes|Transport]] 
 +  * [[mosh:protocol:op_codes:routing_op_codes|Routing]] 
 + 
 + 
 +===Context ID (8-bits)=== 
 +The Context ID byte is the ID of the element or virtual wire being targeted.
  
 ----- -----
/var/www/wiki.moshnetworks.com/data/attic/mosh/protocol/layers/transport/framing.1778383373.txt.gz · Last modified: by mosh

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki