Wireshark dissector for Pro DJ Link protocol
3
fork

Configure Feed

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

fix device type parsing

Stella 3d0a5b4b f7113a7b

+20 -10
+20 -10
pro_dj_link.lua
··· 167 167 } 168 168 169 169 local DEV_TYPES = { 170 - [0x01] = "CDJ/Player", 171 - [0x02] = "Mixer", 172 - [0x03] = "Rekordbox/PC", 170 + [0x01] = "Player (CDJ)", 171 + [0x02] = "Player (XDJ)", 172 + [0x03] = "Mixer", 173 + [0x04] = "PC/Rekordbox", 173 174 } 174 175 175 176 local MENU_ITEM_TYPES = { ··· 446 447 447 448 if dst_port == 50000 or src_port == 50000 then 448 449 tree:add(f_device_name, buf(0x0C, 20)) 449 - if p_type == 0x06 then 450 + if p_type == 0x06 then -- Keep-Alive 450 451 tree:add(f_dev_num, buf(0x24, 1)) 451 452 local dtype = buf(0x25, 1):uint() 452 453 tree:add(f_dev_type, buf(0x25, 1)):append_text(" (" .. (DEV_TYPES[dtype] or "Unknown") .. ")") 453 454 tree:add(f_mac, buf(0x26, 6)) 454 455 tree:add(f_ip, buf(0x2C, 4)) 455 456 tree:add(f_peer_count, buf(0x30, 1)) 456 - elseif p_type == 0x00 or p_type == 0x02 or p_type == 0x04 then 457 + elseif p_type == 0x0a then -- Announcement 458 + local dtype = buf(0x24, 1):uint() 459 + tree:add(f_dev_type, buf(0x24, 1)):append_text(" (" .. (DEV_TYPES[dtype] or "Unknown") .. ")") 460 + elseif p_type == 0x00 then -- Claim Stage 1 457 461 tree:add(f_sequence, buf(0x24, 1)) 458 - if p_type == 0x02 then 459 - tree:add(f_dev_num, buf(0x2E, 1)) 460 - elseif p_type == 0x04 then 461 - tree:add(f_dev_num, buf(0x24, 1)) 462 - end 462 + local dtype = buf(0x25, 1):uint() 463 + tree:add(f_dev_type, buf(0x25, 1)):append_text(" (" .. (DEV_TYPES[dtype] or "Unknown") .. ")") 464 + tree:add(f_mac, buf(0x26, 6)) 465 + elseif p_type == 0x02 then -- Claim Stage 2 466 + tree:add(f_ip, buf(0x24, 4)) 467 + tree:add(f_mac, buf(0x28, 6)) 468 + tree:add(f_dev_num, buf(0x2E, 1)) 469 + tree:add(f_sequence, buf(0x2F, 1)) 470 + elseif p_type == 0x04 then -- Claim Final 471 + tree:add(f_dev_num, buf(0x24, 1)) 472 + tree:add(f_sequence, buf(0x25, 1)) 463 473 end 464 474 elseif dst_port == 50001 or src_port == 50001 then 465 475 if p_type == 0x28 then -- Beat