Protocols

The crate gives a flow one of 60 labels, the variants of ApplicationProtocol::ALL. This page lists them all, with the route that leads to each one and the page that describes it. The protocols decoded below the application layer, which get no label, come after.

The 60 labels

The route is how the dispatch reaches the label. A port rule asks for a port and a content that agree; a blind rule asks for the content alone, on any port; a terminal port rule ends the dispatch when the content does not match. The Application chapter explains the three, and the Glossary defines each word. A tunnel label is given to the outer flow of an encapsulation.

A label written with "then" has a port rule and a blind rule: the port rule is tried first, and is often the more lenient of the two. One label, RTP, has no rule at all: it is given on a port the caller declares, and the RTP page says why.

LabelRouteTransport and portsDescribed intshark oracleSince
AMSportTCP 48898, UDP 48899rules 21, 22 of the Applicationnone5.0.0 or earlier
ASTERIXblindUDPASTERIX44 411 frames, record by record11.3.0
BACnet/IPport and blindUDP 47808 to 47823, then any UDP portBACnet/IP45 datagrams11.6.0
BitcoinblindTCPrule 54 of the Applicationnone5.0.0 or earlier
CAPWAPtunnel, then portUDP 5247 for the tunnel, then UDP 5246 and 5247 for what it does not peelTunnels341 datagrams5.0.0 or earlier
COTPportTCP 102rule 7 of the Applicationnone5.0.0 or earlier
DCE/RPCblindTCPDCE/RPC385 segments13.3.0
DHCPport and blindUDP 67, 68, then any UDP portrules 3, 68 of the Applicationnone5.0.0 or earlier
DHCPv6portUDP 546, 547rule 2 of the Applicationnone5.0.0 or earlier
DISport and blindUDP 3000, then any UDP portDIS393 frames11.6.0
DNP3blindTCP and UDPDNP3218 frames11.6.0
DNSport and blindTCP 53, UDP 53, then any UDP portDNS, mDNS and LLMNRcounts and digests5.0.0 or earlier
ESPportUDP 4500ESP323 packets, 315 of them in UDP11.6.0
EtherNet/IPblindTCP and UDPrules 56, 57 of the Applicationnone5.0.0 or earlier
FTPport and blindTCP 21, then any TCP port but 25, 587, 119rules 8, 11 of the Applicationnone9.0.0
GenevetunnelUDP 6081Tunnelsnone10.5.0
GIOPblindTCPGIOP135 messages5.0.0 or earlier
GREtunnelIP protocol 47Tunnelsnone10.4.0
GTP-UtunnelUDP 2152Tunnelsnone11.2.0
HTTPblindTCPHTTP298 frames5.0.0 or earlier
IEC 104portTCP 2404IEC 60870-5-104373 segments11.6.0
IKEportUDP 500, 4500IKE535 messages11.6.0
IP-in-IPtunnelIP protocols 4 and 41Tunnelsnone10.4.0
Java RMIport and blindTCP 1099, then any TCP portJava RMI236 segments13.0.0
LLMNRport, terminalUDP 5355DNS, mDNS and LLMNRnone10.4.0
mDNSport, terminalUDP 5353DNS, mDNS and LLMNRnone9.0.0
ModbusTCPport and blindTCP 502, then any TCP portModbus/TCP and UMAS601 segments, with UMAS5.0.0 or earlier
ModbusUDPportUDP 502Modbus over UDP38 datagrams12.0.0
MQTTblindTCPrule 78 of the Applicationnone5.0.0 or earlier
NAT-keepaliveportUDP 4500ESPnone11.6.0
NBNSportUDP 137rule 17 of the Applicationnone10.4.0
NBSSportTCP 139, 445rule 18 of the Applicationnone10.4.0
NMFblindTCPNMF23 segments13.3.0
NNTPport and blindTCP 119, then any TCP port but 21, 25, 587rules 10, 13 of the Applicationnone9.0.0
NTPport and blindUDP 123, then any UDP portNTP1 308 datagrams5.0.0 or earlier
OPC UAport and blindTCP 4840, 12001, then any TCP portrules 25, 55 of the Applicationnone5.0.0 or earlier
OpenVPNportUDP 1194, TCP 1194rules 19, 20 of the Applicationnone10.4.0
PostgreSQLport and blindTCP 5432, then any TCP portPostgreSQL276 segments5.0.0 or earlier
PTPportUDP 319, 320PTP3 328 messages, Ethernet and UDP11.5.0
QUICport and blindUDP 443 (short header, and the long header of any version), then any UDP port (long header of QUIC v1)rules 23, 24, 72 of the Applicationnone5.0.0 or earlier
RADIUSport and blindUDP 1812, 1813, 1645, 1646, 3799, then any UDP portRADIUS95 packets11.6.0
RDPportTCP 3389RDP861 segments11.6.0
RTCPblindUDPRTCP52 datagrams13.3.0
RTPdeclared port onlyUDP, on a port declared with Decode AsRTP15 011 frames13.3.0
RTPSblindUDPRTPS231 frames11.6.0
S7CommblindTCPrule 6 of the Applicationcounts and digests5.0.0 or earlier
SIPblindTCP and UDP, any portSIP201 frames13.2.0
SMTPport and blindTCP 25, 587, then any TCP port but 21, 119rules 9, 12 of the Applicationnone9.0.0
SNMPport and blindUDP 161, 162, then any TCP or UDP portrules 1, 60 of the Applicationnone5.0.0 or earlier
SRVLOCport and blindTCP 427, UDP 427, then any TCP or UDP portrules 4, 5, 69 of the Applicationnone5.0.0 or earlier
SSDPportUDP 1900rule 16 of the Applicationnone10.4.0
SSHblindTCPrules 62, 65 of the Applicationnone10.1.0
STANAG 5066portTCP 5066STANAG 5066 SIS34 segments11.6.0
STPlink layerno transportSTPnone10.4.0
TLSblindTCPTLScounts and digests5.0.0 or earlier
UMASport and blindTCP 502, then any TCP portModbus/TCP and UMAS601 segments, with ModbusTCP11.1.0
Unknownno rule matchedanyApplicationnot a protocol5.0.0 or earlier
Valmet DNAport and blindUDP 2517, 4516, 4517, then any UDP portValmet DNAnone: tshark has no dissector11.8.0
VXLANtunnelUDP 4789Tunnelsnone10.5.0
WireGuardport and blindUDP 51820, then any UDP portWireGuard128 messages11.6.0

Three columns need a word.

  • Described in. A label without a page of its own points to its rows in the dispatch table.
  • tshark oracle. The number of frames, segments or messages that a golden test of the crate compares with tshark field by field. "Counts and digests" is weaker: tests/tshark_regression.rs and tests/s7comm_regression.rs compare the set of frames that carry the label, not their fields. "None" means no comparison with tshark; the label is still counted, over the whole corpus, by the golden histogram of tests/golden_pcaps.rs.
  • Since. The first tagged release whose dispatch gives the label. The tags of the repository start at 5.0.0, so "5.0.0 or earlier" is as far back as they tell.

The caller can declare extra ports for the protocols of Decode As.

Decoded without a label

These protocols sit below the application layer. The crate decodes them into a link, internet or transport layer, and PacketFlow::application stays None.

ProtocolWhere it is foundLayerDescribed intshark oracle
PTP over EthernetEtherType 0x88F7internetPTP3 328 messages, Ethernet and UDP
GOOSEEtherType 0x88B8internetGOOSE494 frames
LLDPEtherType 0x88CCinternetLLDP276 frames
ProfinetEtherType 0x8892internetProfinet232 frames
ARPEtherType 0x0806internetARPnone
ESP, nativeIP protocol 50transportESP323 packets, 8 of them native
ICMPv4 and ICMPv6IP protocols 1 and 58transportICMPv4 and ICMPv6none

STP is the exception: it has no internet layer either, and the pipeline labels it "STP" from the link layer (STP).

Tunnels

A tunnel is decoded twice: the outer flow takes the tunnel's label, and the conversation it carries is a second PacketFlow in inner. The Tunnels chapter has the details.

LabelDetected fromCarries
GREIP protocol 47IPv4, IPv6 or Ethernet
IP-in-IPIP protocols 4 and 41a bare IP packet
CAPWAPUDP 5247IEEE 802.11, then LLC/SNAP; since 13.3.0 the label without inner for the rest, on UDP 5246 and 5247
VXLANUDP 4789a full Ethernet frame
GeneveUDP 6081Ethernet or bare IP
GTP-UUDP 2152a bare IP packet

The link layer is chosen by the caller, from the link type of the capture. Each format has its page: Ethernet, with PPPoE session (6 795 session frames against tshark) and IEEE 802.3br inside it, Linux cooked capture, RAW IP and BSD loopback.