Wireshark dissector for Pro DJ Link protocol
3
fork

Configure Feed

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

add total & available space parsing

Stella 1b9c9262 37d4ef66

+14 -5
+14 -5
pro_dj_link.lua
··· 52 52 local f_countdown = ProtoField.uint16("pdjl.cue_countdown", "Cue Countdown", base.DEC) 53 53 local f_pitch_3 = ProtoField.uint32("pdjl.pitch_3", "Pitch 3", base.HEX) 54 54 55 - local f_queried_ip = ProtoField.ipv4("pdjl.queried_ip", "Queried IP") 56 - local f_queried_dev = ProtoField.uint32("pdjl.queried_device", "Queried Device", base.DEC) 57 - local f_queried_slot= ProtoField.uint32("pdjl.queried_slot", "Queried Slot", base.HEX) 55 + local f_queried_ip = ProtoField.ipv4("pdjl.queried_ip", "Querying IP") 56 + local f_queried_dev = ProtoField.uint32("pdjl.queried_device", "Querying Device", base.DEC) 57 + local f_queried_slot= ProtoField.uint32("pdjl.queried_slot", "Querying Slot", base.HEX) 58 58 local f_slot_owner = ProtoField.uint8("pdjl.slot_owner", "Slot Owner Device", base.DEC) 59 + local f_total_media_space = ProtoField.uint64("pdjl.total_media_space", "Total Space", base.DEC) 60 + local f_avail_media_space = ProtoField.uint64("pdjl.avail_media_space", "Available Space", base.DEC) 61 + 59 62 60 63 local f_media_type = ProtoField.uint8("pdjl.media_type", "Media Type", base.HEX) 61 64 local f_media_status = ProtoField.uint8("pdjl.media_status", "Media Status", base.HEX) ··· 79 82 local f_db_field_u8 = ProtoField.uint8("pdjl.db.field.u8", "Field (U8)", base.DEC) 80 83 local f_db_field_u16= ProtoField.uint16("pdjl.db.field.u16", "Field (U16)", base.DEC) 81 84 local f_db_field_u32= ProtoField.uint32("pdjl.db.field.u32", "Field (U32)", base.HEX) 85 + local f_db_field_u64= ProtoField.uint64("pdjl.db.field.u64", "Field (U64)", base.DEC) 82 86 local f_db_field_str= ProtoField.string("pdjl.db.field.str", "Field (String)") 83 87 local f_db_field_bin= ProtoField.bytes("pdjl.db.field.bin", "Field (Blob)") 84 88 ··· 99 103 f_track_len, f_playhead, f_pitch_abs, f_bpm_abs, f_sync_cmd, 100 104 f_rb_id, f_track_num, f_track_dev, f_slot, f_track_type, f_activity, f_firmware, f_beat_count, 101 105 f_play_mode_1, f_play_mode_2, f_pitch_1, f_pitch_2, f_master_info, f_handoff, f_countdown, f_pitch_3, 102 - f_queried_ip, f_queried_dev, f_queried_slot, f_slot_owner, f_media_type, f_media_status, f_media_tracks, f_media_name, f_media_db_date, 106 + f_queried_ip, f_queried_dev, f_queried_slot, f_slot_owner, f_total_media_space, f_avail_media_space, f_media_type, f_media_status, f_media_tracks, f_media_name, f_media_db_date, 103 107 f_flags, f_flag_playing, f_flag_master, f_flag_sync, f_flag_onair, 104 108 f_db_magic, f_db_tx_id, f_db_msg_type, f_db_arg_count, f_db_tag_blob, 105 - f_db_field_u8, f_db_field_u16, f_db_field_u32, f_db_field_str, f_db_field_bin, 109 + f_db_field_u8, f_db_field_u16, f_db_field_u32, f_db_field_u64, f_db_field_str, f_db_field_bin, 106 110 f_dmst, f_dmst_dev, f_dmst_menu, f_dmst_slot, f_dmst_type, 107 111 f_db_port, f_raw_payload 108 112 } ··· 530 534 local enc = (ENC_UTF_16 or 2) + (ENC_BIG_ENDIAN or 0) 531 535 tree:add(f_media_type, buf(0x26, 1)) 532 536 tree:add(f_media_status, buf(0x27, 1)) 537 + tree:add(f_media_tracks, buf(0xa6, 2)) 533 538 -- Slot is at 0x28 in the newer format 534 539 tree:add(f_queried_slot, buf(0x28, 4)) 535 540 ··· 540 545 -- DB Creation Date starts at 0x6C (UTF-16, up to 24 bytes) 541 546 local date_str = buf(0x6C, 24):string(enc):gsub("%z", "") 542 547 tree:add(f_media_db_date, buf(0x6C, 24), date_str) 548 + 549 + -- add total_space @ offset 0xb0 (8 bytes) and free_space @ offset 0xb8 (4 bytes) 550 + tree:add(f_total_media_space, buf(0xb0, 8)) 551 + tree:add(f_avail_media_space, buf(0xb8, 8)) 543 552 elseif length >= 0x2C + 32 then 544 553 -- Fallback to old format (e.g. CDJ-2000) 545 554 local enc = (ENC_ASCII or 0)