webrtc_demux (webrtc v0.1.0)

View Source

Classify a datagram received on a WebRTC transport by its first byte (RFC 7983 §7 as updated by RFC 9443 §3).

           +----------------+
           |        [0..3] -+--> STUN
           |      [16..19] -+--> ZRTP (not used, dropped)
           |      [20..63] -+--> DTLS
           |      [64..79] -+--> TURN ChannelData
           |    [128..191] -+--> RTP/RTCP
           |  [80..127], other -+--> QUIC or unknown (dropped)
           +----------------+

Summary

Types

class/0

-type class() :: stun | dtls | turn_channel | rtp | unknown.

Functions

classify(_)

-spec classify(binary()) -> class().