mumble/docs/dev/network-protocol/protocol_stack_tcp.md
Jan Klass 37aa66b19b DOCS(dev): Improve wording and formatting of network protocol docs
Drop the 'unreliable' label from UDP. Delivery is not guaranteed, but delivery reliability largely depends on network context. Unreliable makes it sound more negative and error-prone than it is. We use UDP because and with the understanding that in most cases it is quite reliable, or reliable enough, rather than simply being unreliable. The point is that we use it for low-latency. Everything else is technical reasoning.

Prefer short statement sentences over long comma sentences.

'an TLSv1 encrypted connection' -> 'a TLSv1 encrypted connection'

Format message type name as inline code to indicate it being a "type" name.
2025-02-01 14:52:19 +01:00

1.7 KiB

Protocol stack (TCP)

Mumble has a shallow and easy to understand stack. Basically it uses Google's Protocol Buffers1 with simple prefixing to distinguish the different kinds of packets sent through a TLSv1 encrypted connection. This makes the protocol very easily expandable.

![resources/mumble_packet.png](Mumble packet)

The prefix consists out of the two bytes defining the type of the packet in the payload and 4 bytes stating the length of the payload in bytes followed by the payload itself. The following packet types are available in the current protocol and all but UDPTunnel are simple protobuf messages. If not mentioned otherwise all fields outside the protobuf encoding are big-endian.

Type Payload
0 Version
1 UDPTunnel
2 Authenticate
3 Ping
4 Reject
5 ServerSync
6 ChannelRemove
7 ChannelState
8 UserRemove
9 UserState
10 BanList
11 TextMessage
12 PermissionDenied
13 ACL
14 QueryUsers
15 CryptSetup
16 ContextActionModify
17 ContextAction
18 UserList
19 VoiceTarget
20 PermissionQuery
21 CodecVersion
22 UserStats
23 RequestBlob
24 ServerConfig
25 SuggestConfig

For raw representation of each packet type see the attached Mumble.proto 2 file.