Wireshark dissector for Pro DJ Link protocol
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

add "track host device" to status packet details

Stella 61a29281 10724dbe

+16 -9
+16 -9
pro_dj_link.lua
··· 34 34 -- ============================================================================ 35 35 local f_rb_id = ProtoField.uint32("pdjl.rekordbox_id", "Rekordbox ID", base.DEC) 36 36 local f_track_num = ProtoField.uint16("pdjl.track_number", "Track Number", base.DEC) 37 + local f_track_dev = ProtoField.uint8("pdjl.track_device", "Track Host Device", base.DEC) 37 38 local f_slot = ProtoField.uint8("pdjl.slot", "Slot", base.HEX) 38 39 local f_activity = ProtoField.uint8("pdjl.activity", "Activity", base.HEX) 39 40 local f_firmware = ProtoField.string("pdjl.firmware", "Firmware") ··· 68 69 f_header, f_type, f_device_name, f_dev_num, 69 70 f_mac, f_ip, f_sequence, 70 71 f_bpm_raw, f_pitch, f_beat_in_bar, f_next_beat, f_track_len, f_playhead, f_sync_cmd, 71 - f_rb_id, f_track_num, f_slot, f_activity, f_firmware, f_beat_count, 72 + f_rb_id, f_track_num, f_track_dev, f_slot, f_activity, f_firmware, f_beat_count, 72 73 f_flags, f_flag_playing, f_flag_master, f_flag_sync, f_flag_onair, 73 74 f_db_magic, f_db_tx_id, f_db_msg_type, f_db_arg_count, f_db_tag_blob, 74 75 f_db_field_u8, f_db_field_u16, f_db_field_u32, f_db_field_str, f_db_field_bin, ··· 190 191 191 192 local off = 5 192 193 if length - off >= 5 then 194 + local tx_off = off 193 195 off = dissect_db_field(buf, off, tree) -- Transaction ID 194 196 end 195 197 if length - off >= 3 then 196 198 local type_off = off 199 + local m_type = buf(type_off+1, 2):uint() 200 + local m_type_str = DB_MSG_TYPES[m_type] or string.format("Unknown(0x%04x)", m_type) 201 + 197 202 off = dissect_db_field(buf, off, tree) -- Message Type 198 - -- Try to append name to Message Type field if we found it 199 - if type_off + 3 <= off then 200 - local m_type = buf(type_off+1, 2):uint() 201 - if DB_MSG_TYPES[m_type] then 202 - pkt.cols.info = DB_MSG_TYPES[m_type] 203 - end 204 - end 203 + 204 + -- Set Info column and fence it 205 + pkt.cols.info:set("DB: " .. m_type_str) 206 + pkt.cols.info:fence() 205 207 end 206 208 if length - off >= 2 then 207 209 off = dissect_db_field(buf, off, tree) -- Arg Count ··· 237 239 tree:add(f_header, header_buf) 238 240 239 241 local p_type = buf(10, 1):uint() 240 - tree:add(f_type, buf(10, 1)):append_text(" (" .. (PACKET_TYPES[p_type] or "Unknown") .. ")") 242 + local p_type_str = PACKET_TYPES[p_type] or string.format("Unknown(0x%02x)", p_type) 243 + tree:add(f_type, buf(10, 1)):append_text(" (" .. p_type_str .. ")") 244 + 245 + pkt.cols.info:set(p_type_str) 246 + pkt.cols.info:fence() 241 247 242 248 local src_port = pkt.src_port 243 249 local dst_port = pkt.dst_port ··· 281 287 if p_type == 0x0a then -- CDJ Status 282 288 tree:add(f_dev_num, buf(0x21, 1)) 283 289 tree:add(f_activity, buf(0x27, 1)) 290 + tree:add(f_track_dev, buf(0x28, 1)) 284 291 tree:add(f_slot, buf(0x29, 1)) 285 292 tree:add(f_rb_id, buf(0x2c, 4)) 286 293 tree:add(f_track_num, buf(0x32, 2))