2 * Routines for SliMP3 protocol dissection
4 * Ashok Narayanan <ashokn@cisco.com>
6 * Adds support for the data packet protocol for the SliMP3
7 * See www.slimdevices.com for details.
11 * Wireshark - Network traffic analyzer
12 * By Gerald Combs <gerald@wireshark.org>
13 * Copyright 1998 Gerald Combs
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
37 #include <epan/packet.h>
41 static int proto_slimp3 = -1;
42 static int hf_slimp3_opcode = -1;
43 static int hf_slimp3_ir = -1;
44 static int hf_slimp3_display = -1;
45 static int hf_slimp3_control = -1;
46 static int hf_slimp3_hello = -1;
47 static int hf_slimp3_i2c = -1;
48 static int hf_slimp3_data_request = -1;
49 static int hf_slimp3_data = -1;
50 static int hf_slimp3_discover_request = -1;
51 static int hf_slimp3_discover_response = -1;
52 static int hf_slimp3_data_ack = -1;
54 static gint ett_slimp3 = -1;
56 #define UDP_PORT_SLIMP3_V1 1069
57 #define UDP_PORT_SLIMP3_V2 3483
60 #define SLIMP3_CONTROL 's'
61 #define SLIMP3_HELLO 'h'
62 #define SLIMP3_DATA 'm'
63 #define SLIMP3_DATA_REQ 'r'
64 #define SLIMP3_DISPLAY 'l'
65 #define SLIMP3_I2C '2'
66 #define SLIMP3_DISC_REQ 'd'
67 #define SLIMP3_DISC_RSP 'D'
68 #define SLIMP3_DATA_ACK 'a'
70 static const value_string slimp3_opcode_vals[] = {
71 { SLIMP3_IR, "Infrared Remote Code" },
72 { SLIMP3_CONTROL, "Stream Control" },
73 { SLIMP3_DATA, "MPEG Data" },
74 { SLIMP3_DATA_REQ, "Data Request" },
75 { SLIMP3_HELLO, "Hello" },
76 { SLIMP3_DISPLAY, "Display" },
77 { SLIMP3_I2C, "I2C" },
78 { SLIMP3_DISC_REQ, "Discovery Request" },
79 { SLIMP3_DISC_RSP, "Discovery Response" },
80 { SLIMP3_DATA_ACK, "Ack" },
84 /* IR remote control types */
85 static const value_string slimp3_ir_types[] = {
87 { 0xff, "JVC DVD Player" },
92 /* IR codes for the custom SLIMP3 remote control */
93 static const value_string slimp3_ir_codes_slimp3[] = {
104 { 0x7689b04f, "arrow_down" },
105 { 0x7689906f, "arrow_left" },
106 { 0x7689d02f, "arrow_right" },
107 { 0x7689e01f, "arrow_up" },
108 { 0x768900ff, "voldown" },
109 { 0x7689807f, "volup" },
110 { 0x768940bf, "power" },
111 { 0x7689c03f, "rew" },
112 { 0x768920df, "pause" },
113 { 0x7689a05f, "fwd" },
114 { 0x7689609f, "add" },
115 { 0x768910ef, "play" },
116 { 0x768958a7, "search" },
117 { 0x7689d827, "shuffle" },
118 { 0x768938c7, "repeat" },
119 { 0x7689b847, "sleep" },
120 { 0x76897887, "now_playing" },
121 { 0x7689f807, "size" },
122 { 0x768904fb, "brightness" },
127 /* IR codes for the JVC remote control */
128 static const value_string slimp3_ir_codes_jvc[] = {
140 { 0xf7f6, "Picture-In-Picture" },
141 /* { 0xf7XX, "Enter" }, */
144 { 0xf76e, "Forward" },
145 { 0xf743, "Record" },
148 /* { 0xf7XX, "TV/Video" }, */
149 { 0xf703, "Display" },
158 { 0xf778, "Volume Up" },
159 { 0xf7f8, "Volume Down" },
160 { 0xf70d, "Channel Up" },
161 { 0xf78d, "Channel Down" },
162 /* { 0xf7XX, "Mute" }, */
163 { 0xf7ab, "Recall" },
170 static const value_string slimp3_display_commands[] = {
171 { 0x1, "Clear Display"},
172 { 0x2, "Cursor to 1st Line Home"},
174 { 0x4, "Mode: Decrement Address, Shift Cursor"},
175 { 0x5, "Mode: Decrement Address, Shift Display"},
176 { 0x6, "Mode: Increment Address, Shift Cursor"},
177 { 0x7, "Mode: Increment Address, Shift Display"},
179 { 0x8, "Display Off"},
180 { 0xd, "Display On, With Blinking"},
181 { 0xe, "Display On, With Cursor"},
182 { 0xf, "Display On, With Cursor And Blinking"},
184 { 0x10, "Move Cursor Left"},
185 { 0x14, "Move Cursor Right"},
186 { 0x18, "Shift Display Left"},
187 { 0x1b, "Shift Display Right"},
189 { 0x30, "Set (8-bit)"},
190 { 0x20, "Set (4-bit)"},
192 { 0xa0, "Cursor to Top Right"},
193 { 0xc0, "Cursor to 2nd Line Home"},
198 static const value_string slimp3_display_fset8[] = {
199 { 0x0, "Brightness 100%"},
200 { 0x1, "Brightness 75%"},
201 { 0x2, "Brightness 50%"},
202 { 0x3, "Brightness 25%"},
207 static const value_string slimp3_stream_control[] = {
208 { 1, "Reset buffer, Start New Stream"},
209 { 2, "Pause Playback"},
210 { 4, "Resume Playback"},
215 static const value_string slimp3_mpg_control[] = {
216 { 0, "Go"}, /* Run the decoder */
217 { 1, "Stop"}, /* Halt decoder but don't reset rptr */
218 { 3, "Reset"}, /* Halt decoder and reset rptr */
223 #define MAX_LCD_STR_LEN 128
225 dissect_slimp3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
227 const char *opcode_str;
228 proto_tree *slimp3_tree = NULL;
229 proto_item *ti = NULL, *hidden_item;
234 char lcd_str[MAX_LCD_STR_LEN + 1];
235 int to_server = FALSE;
236 int old_protocol = FALSE;
242 * If it doesn't begin with a known opcode, reject it, so that
243 * traffic that happens to be do or from one of our ports
244 * doesn't get misidentified as SliMP3 traffic.
246 if (!tvb_bytes_exist(tvb, offset, 1))
247 return 0; /* not even an opcode */
248 opcode = tvb_get_guint8(tvb, offset);
249 opcode_str = match_strval(opcode, slimp3_opcode_vals);
250 if (opcode_str == NULL)
253 col_set_str(pinfo->cinfo, COL_PROTOCOL, "SliMP3");
255 if (check_col(pinfo->cinfo, COL_INFO)) {
257 col_add_str(pinfo->cinfo, COL_INFO, opcode_str);
263 ti = proto_tree_add_item(tree, proto_slimp3, tvb, offset, -1, FALSE);
264 slimp3_tree = proto_item_add_subtree(ti, ett_slimp3);
266 proto_tree_add_uint(slimp3_tree, hf_slimp3_opcode, tvb,
270 /* The new protocol (v1.3 and later) uses an IANA-assigned port number.
271 * It usually uses the same number for both sizes of the conversation, so
272 * the port numbers can't always be used to determine client and server.
273 * The new protocol places the clients MAC address in the packet, so that
274 * is used to identify packets originating at the client.
276 if ((pinfo->destport == UDP_PORT_SLIMP3_V2) && (pinfo->srcport == UDP_PORT_SLIMP3_V2)) {
277 SET_ADDRESS(&tmp_addr, AT_ETHER, 6, tvb_get_ptr(tvb, offset+12, 6));
278 to_server = ADDRESSES_EQUAL(&tmp_addr, &pinfo->dl_src);
280 else if (pinfo->destport == UDP_PORT_SLIMP3_V2) {
283 else if (pinfo->srcport == UDP_PORT_SLIMP3_V2) {
286 if (pinfo->destport == UDP_PORT_SLIMP3_V1) {
290 else if (pinfo->srcport == UDP_PORT_SLIMP3_V1) {
302 * [2..5] player's time since startup in ticks @625 KHz
303 * [6] IR code id, ff=JVC, 02=SLIMP3
304 * [7] number of meaningful bits - 16 for JVC, 32 for SLIMP3
305 * [8..11] the 32-bit IR code
309 hidden_item = proto_tree_add_item(slimp3_tree, hf_slimp3_ir, tvb, offset+8, 4, FALSE);
310 PROTO_ITEM_SET_HIDDEN(hidden_item);
312 i1 = tvb_get_ntohl(tvb, offset+2);
313 proto_tree_add_text(slimp3_tree, tvb, offset+2, 4, "Uptime: %u sec (%u ticks)",
315 i1 = tvb_get_guint8(tvb, offset+6);
316 proto_tree_add_text(slimp3_tree, tvb, offset+6, 1, "Code identifier: 0x%0x: %s",
317 i1, val_to_str(i1, slimp3_ir_types, "Unknown"));
318 proto_tree_add_text(slimp3_tree, tvb, offset+7, 1, "Code bits: %d",
319 tvb_get_guint8(tvb, offset+7));
321 i1 = tvb_get_ntohl(tvb, offset+8);
322 /* Check the code to figure out which remote is being used. */
323 if (tvb_get_guint8(tvb, offset+6) == 0x02 &&
324 tvb_get_guint8(tvb, offset+7) == 32) {
325 /* This is the custom SLIMP3 remote. */
326 proto_tree_add_text(slimp3_tree, tvb, offset+8, 4,
327 "Infrared Code: %s: 0x%0x",
328 val_to_str(i1, slimp3_ir_codes_slimp3, "Unknown"), i1);
330 else if (tvb_get_guint8(tvb, offset+6) == 0xff &&
331 tvb_get_guint8(tvb, offset+7) == 16) {
332 /* This is a JVC DVD player remote */
333 proto_tree_add_text(slimp3_tree, tvb, offset+8, 4,
334 "Infrared Code: %s: 0x%0x",
335 val_to_str(i1, slimp3_ir_codes_jvc, "Unknown"), i1);
337 /* Unknown code; just write it */
338 proto_tree_add_text(slimp3_tree, tvb, offset+8, 4, "Infrared Code: 0x%0x", i1);
341 if (check_col(pinfo->cinfo, COL_INFO)) {
342 i1 = tvb_get_ntohl(tvb, offset+8);
343 if (tvb_get_guint8(tvb, offset+6) == 0x02 &&
344 tvb_get_guint8(tvb, offset+7) == 32) {
345 col_append_fstr(pinfo->cinfo, COL_INFO, ", SLIMP3: %s",
346 val_to_str(i1, slimp3_ir_codes_slimp3, "Unknown (0x%0x)"));
348 else if (tvb_get_guint8(tvb, offset+6) == 0xff &&
349 tvb_get_guint8(tvb, offset+7) == 16) {
350 col_append_fstr(pinfo->cinfo, COL_INFO, ", JVC: %s",
351 val_to_str(i1, slimp3_ir_codes_jvc, "Unknown (0x%0x)"));
353 /* Unknown code; just write it */
354 col_append_fstr(pinfo->cinfo, COL_INFO, ", 0x%0x", i1);
362 hidden_item = proto_tree_add_item(slimp3_tree, hf_slimp3_display,
363 tvb, offset, 1, FALSE);
364 PROTO_ITEM_SET_HIDDEN(hidden_item);
366 /* Loop through the commands */
370 while (i1 < tvb_reported_length_remaining(tvb, offset)) {
371 switch(tvb_get_guint8(tvb, offset + i1)) {
375 proto_tree_add_text(slimp3_tree, tvb, offset + i1, 2,
376 "Delay (%d ms)", tvb_get_guint8(tvb, offset + i1 + 1));
380 lcd_char = tvb_get_guint8(tvb, offset + i1 + 1);
381 if (!isprint(lcd_char)) lcd_char = '.';
384 proto_item_append_text(ti, "%c", lcd_char);
385 proto_item_set_len(ti, lcd_strlen);
387 ti = proto_tree_add_text(slimp3_tree, tvb, offset + i1, 2,
388 "String: %c", lcd_char);
398 ti = proto_tree_add_text(slimp3_tree, tvb, offset + i1, 2,
400 val_to_str(tvb_get_guint8(tvb, offset + i1 + 1),
401 slimp3_display_commands,
403 if ((tvb_get_guint8(tvb, offset + i1 + 1) & 0xf0) == 0x30) {
404 proto_item_append_text(ti, ": %s",
405 val_to_str(tvb_get_guint8(tvb, offset + i1 + 2),
406 slimp3_display_fset8,
414 proto_tree_add_text(slimp3_tree, tvb, offset + i1, 2,
415 "Unknown 0x%0x, 0x%0x",
416 tvb_get_guint8(tvb, offset + i1),
417 tvb_get_guint8(tvb, offset + i1 + 1));
424 if (check_col(pinfo->cinfo, COL_INFO)) {
427 while (tvb_offset_exists(tvb, offset + i1) &&
428 lcd_strlen < MAX_LCD_STR_LEN) {
429 switch (tvb_get_guint8(tvb, offset + i1)) {
432 lcd_str[lcd_strlen++] = '.';
436 lcd_str[lcd_strlen++] = '|';
437 if (tvb_offset_exists(tvb, offset + i1 + 1) &&
438 (tvb_get_guint8(tvb, offset + i1 + 1) & 0xf0) == 0x30)
443 if (tvb_offset_exists(tvb, offset + i1 + 1)) {
444 if (lcd_strlen < 1 ||
445 lcd_str[lcd_strlen-1] != ' ' ||
446 tvb_get_guint8(tvb, offset + i1 + 1) != ' ') {
447 lcd_char = tvb_get_guint8(tvb, offset + i1 + 1);
448 lcd_str[lcd_strlen++] = isprint(lcd_char) ? lcd_char : '.';
454 lcd_str[lcd_strlen] = '\0';
456 col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", lcd_str);
463 hidden_item = proto_tree_add_item(slimp3_tree, hf_slimp3_control,
464 tvb, offset+1, 1, FALSE);
465 PROTO_ITEM_SET_HIDDEN(hidden_item);
466 proto_tree_add_text(slimp3_tree, tvb, offset+1, 1, "Command: %s",
467 val_to_str(tvb_get_guint8(tvb, offset+1),
468 slimp3_stream_control, "Unknown (0x%0x)"));
471 if (check_col(pinfo->cinfo, COL_INFO)) {
472 col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
473 val_to_str(tvb_get_guint8(tvb, offset+1),
474 slimp3_stream_control, "Unknown (0x%0x)"));
480 hidden_item = proto_tree_add_item(slimp3_tree, hf_slimp3_hello,
481 tvb, offset+1, 1, FALSE);
482 PROTO_ITEM_SET_HIDDEN(hidden_item);
485 /* Hello response; client->server */
486 proto_tree_add_text(slimp3_tree, tvb, offset, 1, "Hello Response (Client --> Server)");
487 proto_tree_add_text(slimp3_tree, tvb, offset+1, 1, "Device ID: %d",
488 tvb_get_guint8(tvb, offset+1));
489 fw_ver = tvb_get_guint8(tvb, offset+2);
490 proto_tree_add_text(slimp3_tree, tvb, offset+2, 1, "Firmware Revision: %d.%d (0x%0x)",
491 fw_ver>>4, fw_ver & 0xf, fw_ver);
493 /* Hello request; server->client */
494 proto_tree_add_text(slimp3_tree, tvb, offset, 1, "Hello Request (Server --> Client)");
501 hidden_item = proto_tree_add_item(slimp3_tree, hf_slimp3_i2c,
502 tvb, offset, 1, FALSE);
503 PROTO_ITEM_SET_HIDDEN(hidden_item);
505 /* Hello response; client->server */
506 proto_tree_add_text(slimp3_tree, tvb, offset, -1,
507 "I2C Response (Client --> Server)");
509 /* Hello request; server->client */
510 proto_tree_add_text(slimp3_tree, tvb, offset, -1,
511 "I2C Request (Server --> Client)");
515 if (check_col(pinfo->cinfo, COL_INFO)) {
517 col_append_str(pinfo->cinfo, COL_INFO, ", Response");
519 col_append_str(pinfo->cinfo, COL_INFO, ", Request");
524 case SLIMP3_DATA_REQ:
526 hidden_item = proto_tree_add_item(slimp3_tree, hf_slimp3_data_request,
527 tvb, offset, 1, FALSE);
528 PROTO_ITEM_SET_HIDDEN(hidden_item);
529 proto_tree_add_text(slimp3_tree, tvb, offset+2, 2,
530 "Requested offset: %d bytes.",
531 tvb_get_ntohs(tvb, offset+2)*2);
534 if (check_col(pinfo->cinfo, COL_INFO)) {
535 col_append_fstr(pinfo->cinfo, COL_INFO, ", Offset: %d bytes",
536 tvb_get_ntohs(tvb, offset+2)*2);
541 /* MPEG data (v1.3 and later)
545 * [6..7] Write pointer (in words)
547 * [10..11] Sequence number
552 hidden_item = proto_tree_add_item(slimp3_tree, hf_slimp3_data,
553 tvb, offset, 1, FALSE);
554 PROTO_ITEM_SET_HIDDEN(hidden_item);
556 proto_tree_add_text(slimp3_tree, tvb, offset, -1,
558 tvb_reported_length_remaining(tvb, offset+18));
559 proto_tree_add_text(slimp3_tree, tvb, offset+2, 2,
560 "Buffer offset: %d bytes.",
561 tvb_get_ntohs(tvb, offset+2) * 2);
564 proto_tree_add_text(slimp3_tree, tvb, offset+1, 1, "Command: %s",
565 val_to_str(tvb_get_guint8(tvb, offset+1),
566 slimp3_mpg_control, "Unknown (0x%0x)"));
567 proto_tree_add_text(slimp3_tree, tvb, offset, -1,
569 tvb_reported_length_remaining(tvb, offset+18));
570 proto_tree_add_text(slimp3_tree, tvb, offset+6, 2,
572 tvb_get_ntohs(tvb, offset+6) * 2);
573 proto_tree_add_text(slimp3_tree, tvb, offset+10, 2,
575 tvb_get_ntohs(tvb, offset+10));
579 if (check_col(pinfo->cinfo, COL_INFO)) {
581 col_append_fstr(pinfo->cinfo, COL_INFO,
582 ", Length: %d bytes, Offset: %d bytes.",
583 tvb_reported_length_remaining(tvb, offset+18),
584 tvb_get_ntohs(tvb, offset+2) * 2);
587 col_append_fstr(pinfo->cinfo, COL_INFO,
588 ", %s, %d bytes at %d, Sequence: %d",
589 val_to_str(tvb_get_guint8(tvb, offset+1),
590 slimp3_mpg_control, "Unknown (0x%0x)"),
591 tvb_reported_length_remaining(tvb, offset+18),
592 tvb_get_ntohs(tvb, offset+6) * 2,
593 tvb_get_ntohs(tvb, offset+10));
598 case SLIMP3_DISC_REQ:
601 hidden_item = proto_tree_add_item(slimp3_tree, hf_slimp3_discover_request,
602 tvb, offset, 1, FALSE);
603 PROTO_ITEM_SET_HIDDEN(hidden_item);
604 proto_tree_add_text(slimp3_tree, tvb, offset+1, 1,
605 "Device ID: %d.", tvb_get_guint8(tvb, offset+1));
606 fw_ver = tvb_get_guint8(tvb, offset+2);
607 proto_tree_add_text(slimp3_tree, tvb, offset+2, 1, "Firmware Revision: %d.%d (0x%0x)",
608 fw_ver>>4, fw_ver & 0xf, fw_ver);
611 if (check_col(pinfo->cinfo, COL_INFO)) {
612 guint8 fw_ver = tvb_get_guint8(tvb, offset+2);
613 col_append_fstr(pinfo->cinfo, COL_INFO, ", Device ID: %d. Firmware: %d.%d",
614 tvb_get_guint8(tvb, offset+1), fw_ver>>4, fw_ver & 0xf);
618 case SLIMP3_DISC_RSP:
620 hidden_item = proto_tree_add_item(slimp3_tree, hf_slimp3_discover_response,
621 tvb, offset, 1, FALSE);
622 PROTO_ITEM_SET_HIDDEN(hidden_item);
623 proto_tree_add_text(slimp3_tree, tvb, offset+2, 4,
624 "Server Address: %s.",
625 ip_to_str(tvb_get_ptr(tvb, offset+2, 4)));
626 proto_tree_add_text(slimp3_tree, tvb, offset+6, 2,
627 "Server Port: %d", tvb_get_ntohs(tvb, offset + 6));
630 if (check_col(pinfo->cinfo, COL_INFO)) {
631 col_append_fstr(pinfo->cinfo, COL_INFO, ", Server Address: %s. Server Port: %d",
632 ip_to_str(tvb_get_ptr(tvb, offset+2, 4)),
633 tvb_get_ntohs(tvb, offset + 6));
637 case SLIMP3_DATA_ACK:
638 /* Acknowledge MPEG data
642 * [6..7] Write pointer (in words)
643 * [8..9] Read pointer (in words)
644 * [10..11] Sequence number
645 * [12..17] client MAC address (v1.3 and later)
648 hidden_item = proto_tree_add_item(slimp3_tree, hf_slimp3_data_ack,
649 tvb, offset, 1, FALSE);
650 PROTO_ITEM_SET_HIDDEN(hidden_item);
651 proto_tree_add_text(slimp3_tree, tvb, offset+6, 2,
653 tvb_get_ntohs(tvb, offset+6) * 2);
654 proto_tree_add_text(slimp3_tree, tvb, offset+8, 2,
656 tvb_get_ntohs(tvb, offset+8) * 2);
657 proto_tree_add_text(slimp3_tree, tvb, offset+10, 2,
659 tvb_get_ntohs(tvb, offset+10));
661 if (check_col(pinfo->cinfo, COL_INFO)) {
662 col_append_fstr(pinfo->cinfo, COL_INFO, ", Sequence: %d",
663 tvb_get_ntohs(tvb, offset+10));
669 proto_tree_add_text(slimp3_tree, tvb, offset, -1,
670 "Data (%d bytes)", tvb_reported_length_remaining(tvb, offset));
675 return tvb_length(tvb);
679 proto_register_slimp3(void)
681 static hf_register_info hf[] = {
683 { "Opcode", "slimp3.opcode",
684 FT_UINT8, BASE_DEC, VALS(slimp3_opcode_vals), 0x0,
685 "SLIMP3 message type", HFILL }},
688 { "Infrared", "slimp3.ir",
689 FT_UINT32, BASE_HEX, NULL, 0x0,
690 "SLIMP3 Infrared command", HFILL }},
692 { &hf_slimp3_control,
693 { "Control Packet", "slimp3.control",
694 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
695 "SLIMP3 control", HFILL }},
697 { &hf_slimp3_display,
698 { "Display", "slimp3.display",
699 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
700 "SLIMP3 display", HFILL }},
703 { "Hello", "slimp3.hello",
704 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
705 "SLIMP3 hello", HFILL }},
708 { "I2C", "slimp3.i2c",
709 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
710 "SLIMP3 I2C", HFILL }},
713 { "Data", "slimp3.data",
714 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
715 "SLIMP3 Data", HFILL }},
717 { &hf_slimp3_data_request,
718 { "Data Request", "slimp3.data_req",
719 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
720 "SLIMP3 Data Request", HFILL }},
722 { &hf_slimp3_discover_request,
723 { "Discovery Request", "slimp3.discovery_req",
724 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
725 "SLIMP3 Discovery Request", HFILL }},
727 { &hf_slimp3_discover_response,
728 { "Discovery Response", "slimp3.discovery_response",
729 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
730 "SLIMP3 Discovery Response", HFILL }},
732 { &hf_slimp3_data_ack,
733 { "Data Ack", "slimp3.data_ack",
734 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
735 "SLIMP3 Data Ack", HFILL }},
738 static gint *ett[] = {
742 proto_slimp3 = proto_register_protocol("SliMP3 Communication Protocol",
744 proto_register_field_array(proto_slimp3, hf, array_length(hf));
745 proto_register_subtree_array(ett, array_length(ett));
749 proto_reg_handoff_slimp3(void)
751 dissector_handle_t slimp3_handle;
753 slimp3_handle = new_create_dissector_handle(dissect_slimp3, proto_slimp3);
754 dissector_add_uint("udp.port", UDP_PORT_SLIMP3_V1, slimp3_handle);
755 dissector_add_uint("udp.port", UDP_PORT_SLIMP3_V2, slimp3_handle);