The terminal link is a byte stream carrying variable-length frames:
02 | type | termid | len | payload (0..250) | XOR | 03 STX 1..10 0x02 STX, 0x03 ETX, XOR covers type..payload
| type | meaning |
|---|---|
| 01 DATA | terminal input/output |
| 02 OPEN | claim a terminal; payload[0] = app id |
| 03 CLOSE | session finished |
| 04 BUSY | no free serial session |
| 05 ACK | OPEN accepted |
| 06 ERROR | protocol error |
Terminal id 0 is the guest console log; 1..10 are
serial sessions; 0xFE is the IP channel. Apps: 1 console/shell,
2 web, 3 upload. OPEN may carry a printable line (client address) that the
guest logs on the console.
Each session has a 256-byte receive ring and a 64-byte transmit buffer; a newline flushes the transmit buffer as a frame. The guest UART has no FIFO, so the bridge paces input: 64-byte chunks for web/upload, 8-byte frames with a 10 ms gap for console input. A full transmit buffer drops bytes, never overruns.
| bridge option | gives you |
|---|---|
--listen | raw TCP terminal sessions (app 1) |
--http-listen | web requests (app 2) to the guest web server |
--upload-listen | PUT uploads (app 3) |
--ip --tftp-listen | UDP relay and TFTP |
The kernel has IPv4, ICMP and UDP. It answers ping, carries the terminal
session over UDP, and runs an in-guest TFTP server on UDP 69. For TCP, the
guest loads TCP.SYS at 0x2900: a SLIP link at 9600
baud with a proto-6 mailbox, ARP, TCP and a small HTTP server. The host runs
slattach/ifconfig and points a browser at
192.168.99.1.
MUX and TCP are mutually exclusive: both use the 0x2900 window and the same serial link. The pages you are reading went through MUX, not TCP.SYS.