Skip to main content

Crate prolink_proto

Crate prolink_proto 

Source
Expand description

Wire codecs for the Pioneer Pro DJ Link protocol.

Pure encoding and decoding: no sockets, no filesystem, no clock. Everything here is a function from bytes to values and back, so the whole protocol surface is testable against captured traffic without a network — which is how it is tested, against 33 pcapng captures of two CDJ-2000NXS running firmware 1.44.

§The four wire formats

ModuleTransportCarries
djlUDP 50000, broadcastDiscovery, device-number claiming, keep-alive
statusUDP 50002, unicastPlayer status, media queries, device settings
dbserverTCP 1051The metadata protocol the LINK button drives
rpcUDP 111 / 2049 / 48276ONC RPC v2, the portmapper, MOUNT and NFSv2

analysis is not a wire format but a set of transforms: rekordbox writes a track’s analysis one way and dbserver puts it on the wire another, and three of the five blobs change layout in between.

§Endianness is not uniform, and that is the point

Two conventions coexist and they are opposites:

  • dbserver strings are UTF-16 big-endian, length-prefixed in characters including the terminating NUL.
  • NFS paths and names are UTF-16 little-endian, length-prefixed in bytes.

They must never share a helper. dbserver::encode_string and rpc::xdr::Writer::utf16le_string are deliberately separate.

§Provenance

Every constant here was observed on the wire. Where a value is reproduced without being understood, the doc comment says so and cites the finding number (F<n>, C<n>, O<n>) in the research record that establishes it. Several fields are copied verbatim precisely because substituting a plausible zero has broken playback (F33, F35).

Re-exports§

pub use device::BrowsableDeviceNumber;
pub use device::DeviceKind;
pub use device::DeviceName;
pub use device::DeviceNumber;
pub use device::MacAddress;

Modules§

analysis
Turning ANLZ tag payloads into the blobs dbserver puts on the wire.
beat
Beats, tempo and mixer control — UDP 50001, broadcast.
dbserver
The metadata protocol the LINK button drives — TCP 1051, “remotedb”.
device
Device identity: numbers, names, hardware addresses and kinds.
djl
Discovery, device numbering and keep-alive — UDP 50000, broadcast.
rpc
ONC RPC v2, the portmapper, MOUNT and NFSv2 — UDP 111, 48276 and 2049.
status
Player status, media queries and device settings — UDP 50002, unicast.

Structs§

Slot
A media slot, numbered as the status packets number them.

Enums§

Error
What went wrong decoding or encoding a Pro DJ Link message.

Constants§

BEAT_PORT
UDP port carrying beat and sync packets.
DISCOVERY_PORT
UDP port carrying discovery, device-number claiming and keep-alive.
MAGIC
The 10-byte magic every Pro DJ Link datagram starts with, on all three UDP ports.
STATUS_PORT
UDP port carrying player status, media queries and device settings.

Type Aliases§

Result
Result alias for this crate.