The zCOM library is there to provide a composable stack of protocols, down from osi layer 1 (e.g. ethernet frames, IEEE_802.11) up to osi layer 7 (DNS, DHCP, Tiny TP, ...).
The library is designed in a way that you can stack each protocol onto a compatible protocol, for example serving Tiny TP over UDP instead of IrLMP or use PPP over a serial line.
- Provide a general purpose implementation of a lot of link protocols
- Protocol implementations should be configurable so they are suitable for both high end machines (desktop, server) and embedded devices
- This means that a protocol might require
comptime
configuration to restrict the number of allowed connections (for example, allow only up to 3 TCP connections to save RAM)
- This means that a protocol might require
- Allow the use of any physical layer
- Provide APIs that allows the use of
async
, but doesn't enforce it - Make the APIs be usable for byte-by-byte inputs and don't require any specified packet size. Feeding a recording of 1 MB of data should work the same way as feeding a single byte.
The whole project is just in planning phase, no concrete implementation done yet.
Each protocol with a tick is at least in a somewhat usable state
- Ethernet
- IEEE802.11 (WLAN)
A message is a sequence of octets a user wants to transmit/receive. Messages are application specific and don't contain any protocol headers.
Examples:
- A chat message formatted in JSON
A buffer is a sequence of octets that are stored for temporary/implementation reasons.
A packet is a delimited sequence of octets with known (but maybe dynamic) length. Packets have a protocol defined format and usually contain protocol headers.
Examples:
- UDP sockets transmit/receive packets called datagrams.
- IEEE 802.11 transmits/receives packets called frames.
A stream is a unlimited sequence of octets without a well defined length.
Examples:
- TCP sockets transmit/receive streams.
- Serial ports transmit/receive streams.