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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
35 #include <epan/packet.h>
36 #include <epan/to_str.h>
38 static int proto_slimp3
= -1;
39 static int hf_slimp3_opcode
= -1;
40 static int hf_slimp3_control
= -1;
41 static int hf_slimp3_uptime
= -1;
42 static int hf_slimp3_code_id
= -1;
43 static int hf_slimp3_code_bits
= -1;
44 static int hf_slimp3_infrared_slimp3
= -1;
45 static int hf_slimp3_infrared_jvc
= -1;
46 static int hf_slimp3_infrared
= -1;
47 static int hf_slimp3_device_id
= -1;
48 static int hf_slimp3_fw_rev
= -1;
49 static int hf_slimp3_data_offset
= -1;
50 static int hf_slimp3_data_command
= -1;
51 static int hf_slimp3_data_write_pointer
= -1;
52 static int hf_slimp3_data_sequence
= -1;
53 static int hf_slimp3_disc_rsp_server_ip
= -1;
54 static int hf_slimp3_disc_rsp_server_port
= -1;
55 static int hf_slimp3_data_ack_write_pointer
= -1;
56 static int hf_slimp3_data_ack_read_pointer
= -1;
57 static int hf_slimp3_data_ack_sequence
= -1;
58 static int hf_slimp3_data_req_offset
= -1;
60 static gint ett_slimp3
= -1;
62 #define UDP_PORT_SLIMP3_V1 1069
63 #define UDP_PORT_SLIMP3_V2 3483
66 #define SLIMP3_CONTROL 's'
67 #define SLIMP3_HELLO 'h'
68 #define SLIMP3_DATA 'm'
69 #define SLIMP3_DATA_REQ 'r'
70 #define SLIMP3_DISPLAY 'l'
71 #define SLIMP3_I2C '2'
72 #define SLIMP3_DISC_REQ 'd'
73 #define SLIMP3_DISC_RSP 'D'
74 #define SLIMP3_DATA_ACK 'a'
76 static const value_string slimp3_opcode_vals
[] = {
77 { SLIMP3_IR
, "Infrared Remote Code" },
78 { SLIMP3_CONTROL
, "Stream Control" },
79 { SLIMP3_DATA
, "MPEG Data" },
80 { SLIMP3_DATA_REQ
, "Data Request" },
81 { SLIMP3_HELLO
, "Hello" },
82 { SLIMP3_DISPLAY
, "Display" },
83 { SLIMP3_I2C
, "I2C" },
84 { SLIMP3_DISC_REQ
, "Discovery Request" },
85 { SLIMP3_DISC_RSP
, "Discovery Response" },
86 { SLIMP3_DATA_ACK
, "Ack" },
90 /* IR remote control types */
91 static const value_string slimp3_ir_types
[] = {
93 { 0xff, "JVC DVD Player" },
98 /* IR codes for the custom SLIMP3 remote control */
99 static const value_string slimp3_ir_codes_slimp3
[] = {
110 { 0x7689b04f, "arrow_down" },
111 { 0x7689906f, "arrow_left" },
112 { 0x7689d02f, "arrow_right" },
113 { 0x7689e01f, "arrow_up" },
114 { 0x768900ff, "voldown" },
115 { 0x7689807f, "volup" },
116 { 0x768940bf, "power" },
117 { 0x7689c03f, "rew" },
118 { 0x768920df, "pause" },
119 { 0x7689a05f, "fwd" },
120 { 0x7689609f, "add" },
121 { 0x768910ef, "play" },
122 { 0x768958a7, "search" },
123 { 0x7689d827, "shuffle" },
124 { 0x768938c7, "repeat" },
125 { 0x7689b847, "sleep" },
126 { 0x76897887, "now_playing" },
127 { 0x7689f807, "size" },
128 { 0x768904fb, "brightness" },
133 /* IR codes for the JVC remote control */
134 static const value_string slimp3_ir_codes_jvc
[] = {
146 { 0xf7f6, "Picture-In-Picture" },
147 /* { 0xf7XX, "Enter" }, */
150 { 0xf76e, "Forward" },
151 { 0xf743, "Record" },
154 /* { 0xf7XX, "TV/Video" }, */
155 { 0xf703, "Display" },
164 { 0xf778, "Volume Up" },
165 { 0xf7f8, "Volume Down" },
166 { 0xf70d, "Channel Up" },
167 { 0xf78d, "Channel Down" },
168 /* { 0xf7XX, "Mute" }, */
169 { 0xf7ab, "Recall" },
176 static const value_string slimp3_display_commands
[] = {
177 { 0x1, "Clear Display"},
178 { 0x2, "Cursor to 1st Line Home"},
180 { 0x4, "Mode: Decrement Address, Shift Cursor"},
181 { 0x5, "Mode: Decrement Address, Shift Display"},
182 { 0x6, "Mode: Increment Address, Shift Cursor"},
183 { 0x7, "Mode: Increment Address, Shift Display"},
185 { 0x8, "Display Off"},
186 { 0xd, "Display On, With Blinking"},
187 { 0xe, "Display On, With Cursor"},
188 { 0xf, "Display On, With Cursor And Blinking"},
190 { 0x10, "Move Cursor Left"},
191 { 0x14, "Move Cursor Right"},
192 { 0x18, "Shift Display Left"},
193 { 0x1b, "Shift Display Right"},
195 { 0x30, "Set (8-bit)"},
196 { 0x20, "Set (4-bit)"},
198 { 0xa0, "Cursor to Top Right"},
199 { 0xc0, "Cursor to 2nd Line Home"},
204 static const value_string slimp3_display_fset8
[] = {
205 { 0x0, "Brightness 100%"},
206 { 0x1, "Brightness 75%"},
207 { 0x2, "Brightness 50%"},
208 { 0x3, "Brightness 25%"},
213 static const value_string slimp3_stream_control
[] = {
214 { 1, "Reset buffer, Start New Stream"},
215 { 2, "Pause Playback"},
216 { 4, "Resume Playback"},
221 static const value_string slimp3_mpg_control
[] = {
222 { 0, "Go"}, /* Run the decoder */
223 { 1, "Stop"}, /* Halt decoder but don't reset rptr */
224 { 3, "Reset"}, /* Halt decoder and reset rptr */
229 #define MAX_LCD_STR_LEN 128
231 dissect_slimp3(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
)
233 const char *opcode_str
;
234 proto_tree
*slimp3_tree
;
240 char lcd_str
[MAX_LCD_STR_LEN
+ 1];
241 int to_server
= FALSE
;
242 int old_protocol
= FALSE
;
248 * If it doesn't begin with a known opcode, reject it, so that
249 * traffic that happens to be do or from one of our ports
250 * doesn't get misidentified as SliMP3 traffic.
252 if (!tvb_bytes_exist(tvb
, offset
, 1))
253 return 0; /* not even an opcode */
254 opcode
= tvb_get_guint8(tvb
, offset
);
255 opcode_str
= try_val_to_str(opcode
, slimp3_opcode_vals
);
256 if (opcode_str
== NULL
)
259 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "SliMP3");
260 col_add_str(pinfo
->cinfo
, COL_INFO
, opcode_str
);
262 ti
= proto_tree_add_item(tree
, proto_slimp3
, tvb
, offset
, -1, ENC_NA
);
263 slimp3_tree
= proto_item_add_subtree(ti
, ett_slimp3
);
265 proto_tree_add_uint(slimp3_tree
, hf_slimp3_opcode
, tvb
,
268 /* The new protocol (v1.3 and later) uses an IANA-assigned port number.
269 * It usually uses the same number for both sizes of the conversation, so
270 * the port numbers can't always be used to determine client and server.
271 * The new protocol places the clients MAC address in the packet, so that
272 * is used to identify packets originating at the client.
274 if ((pinfo
->destport
== UDP_PORT_SLIMP3_V2
) && (pinfo
->srcport
== UDP_PORT_SLIMP3_V2
)) {
275 TVB_SET_ADDRESS(&tmp_addr
, AT_ETHER
, tvb
, offset
+12, 6);
276 to_server
= ADDRESSES_EQUAL(&tmp_addr
, &pinfo
->dl_src
);
278 else if (pinfo
->destport
== UDP_PORT_SLIMP3_V2
) {
281 else if (pinfo
->srcport
== UDP_PORT_SLIMP3_V2
) {
284 if (pinfo
->destport
== UDP_PORT_SLIMP3_V1
) {
288 else if (pinfo
->srcport
== UDP_PORT_SLIMP3_V1
) {
300 * [2..5] player's time since startup in ticks @625 KHz
301 * [6] IR code id, ff=JVC, 02=SLIMP3
302 * [7] number of meaningful bits - 16 for JVC, 32 for SLIMP3
303 * [8..11] the 32-bit IR code
307 i1
= tvb_get_ntohl(tvb
, offset
+2);
308 proto_tree_add_uint_format_value(slimp3_tree
, hf_slimp3_uptime
, tvb
, offset
+2, 4, i1
,
309 "%u sec (%u ticks)", i1
/625000, i1
);
311 proto_tree_add_item(slimp3_tree
, hf_slimp3_code_id
, tvb
, offset
+6, 1, ENC_BIG_ENDIAN
);
312 proto_tree_add_item(slimp3_tree
, hf_slimp3_code_bits
, tvb
, offset
+7, 1, ENC_BIG_ENDIAN
);
314 i1
= tvb_get_ntohl(tvb
, offset
+8);
315 /* Check the code to figure out which remote is being used. */
316 if (tvb_get_guint8(tvb
, offset
+6) == 0x02 &&
317 tvb_get_guint8(tvb
, offset
+7) == 32) {
318 /* This is the custom SLIMP3 remote. */
319 proto_tree_add_item(slimp3_tree
, hf_slimp3_infrared_slimp3
, tvb
, offset
+8, 4, ENC_BIG_ENDIAN
);
320 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", SLIMP3: %s",
321 val_to_str(i1
, slimp3_ir_codes_slimp3
, "Unknown (0x%0x)"));
323 else if (tvb_get_guint8(tvb
, offset
+6) == 0xff &&
324 tvb_get_guint8(tvb
, offset
+7) == 16) {
325 /* This is a JVC DVD player remote */
326 proto_tree_add_item(slimp3_tree
, hf_slimp3_infrared_jvc
, tvb
, offset
+8, 4, ENC_BIG_ENDIAN
);
327 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", JVC: %s",
328 val_to_str(i1
, slimp3_ir_codes_jvc
, "Unknown (0x%0x)"));
330 /* Unknown code; just write it */
331 proto_tree_add_item(slimp3_tree
, hf_slimp3_infrared
, tvb
, offset
+8, 4, ENC_BIG_ENDIAN
);
332 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", 0x%0x", i1
);
339 /* Loop through the commands */
343 while (i1
< tvb_reported_length_remaining(tvb
, offset
)) {
344 switch(tvb_get_guint8(tvb
, offset
+ i1
)) {
348 proto_tree_add_text(slimp3_tree
, tvb
, offset
+ i1
, 2,
349 "Delay (%u ms)", tvb_get_guint8(tvb
, offset
+ i1
+ 1));
353 lcd_char
= tvb_get_guint8(tvb
, offset
+ i1
+ 1);
354 if (!isprint(lcd_char
))
358 proto_item_append_text(ti
, "%c", lcd_char
);
359 proto_item_set_len(ti
, lcd_strlen
);
361 ti
= proto_tree_add_text(slimp3_tree
, tvb
, offset
+ i1
, 2,
362 "String: %c", lcd_char
);
372 ti
= proto_tree_add_text(slimp3_tree
, tvb
, offset
+ i1
, 2,
374 val_to_str(tvb_get_guint8(tvb
, offset
+ i1
+ 1),
375 slimp3_display_commands
,
377 if ((tvb_get_guint8(tvb
, offset
+ i1
+ 1) & 0xf0) == 0x30) {
378 proto_item_append_text(ti
, ": %s",
379 val_to_str(tvb_get_guint8(tvb
, offset
+ i1
+ 2),
380 slimp3_display_fset8
,
388 proto_tree_add_text(slimp3_tree
, tvb
, offset
+ i1
, 2,
389 "Unknown 0x%0x, 0x%0x",
390 tvb_get_guint8(tvb
, offset
+ i1
),
391 tvb_get_guint8(tvb
, offset
+ i1
+ 1));
400 while (tvb_offset_exists(tvb
, offset
+ i1
) &&
401 lcd_strlen
< MAX_LCD_STR_LEN
) {
402 switch (tvb_get_guint8(tvb
, offset
+ i1
)) {
405 lcd_str
[lcd_strlen
++] = '.';
409 lcd_str
[lcd_strlen
++] = '|';
410 if (tvb_offset_exists(tvb
, offset
+ i1
+ 1) &&
411 (tvb_get_guint8(tvb
, offset
+ i1
+ 1) & 0xf0) == 0x30)
416 if (tvb_offset_exists(tvb
, offset
+ i1
+ 1)) {
417 if ((lcd_strlen
< 1) ||
418 (lcd_str
[lcd_strlen
-1] != ' ') ||
419 (tvb_get_guint8(tvb
, offset
+ i1
+ 1) != ' ')) {
420 lcd_char
= tvb_get_guint8(tvb
, offset
+ i1
+ 1);
421 lcd_str
[lcd_strlen
++] = isprint(lcd_char
) ? lcd_char
: '.';
428 lcd_str
[lcd_strlen
] = '\0';
430 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", %s", lcd_str
);
434 proto_tree_add_item(slimp3_tree
, hf_slimp3_control
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
435 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", %s",
436 val_to_str(tvb_get_guint8(tvb
, offset
+1),
437 slimp3_stream_control
, "Unknown (0x%0x)"));
444 /* Hello response; client->server */
445 proto_tree_add_text(slimp3_tree
, tvb
, offset
, 1, "Hello Response (Client --> Server)");
446 proto_tree_add_item(slimp3_tree
, hf_slimp3_device_id
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
447 fw_ver
= tvb_get_guint8(tvb
, offset
+2);
448 proto_tree_add_uint_format_value(slimp3_tree
, hf_slimp3_fw_rev
, tvb
, offset
+2, 1, fw_ver
,
449 "%u.%u (0x%0x)", fw_ver
>>4, fw_ver
& 0xf, fw_ver
);
451 /* Hello request; server->client */
452 proto_tree_add_text(slimp3_tree
, tvb
, offset
, 1, "Hello Request (Server --> Client)");
459 /* Hello response; client->server */
460 proto_tree_add_text(slimp3_tree
, tvb
, offset
, -1,
461 "I2C Response (Client --> Server)");
462 col_append_str(pinfo
->cinfo
, COL_INFO
, ", Response");
464 /* Hello request; server->client */
465 proto_tree_add_text(slimp3_tree
, tvb
, offset
, -1,
466 "I2C Request (Server --> Client)");
467 col_append_str(pinfo
->cinfo
, COL_INFO
, ", Request");
471 case SLIMP3_DATA_REQ
:
472 proto_tree_add_item(slimp3_tree
, hf_slimp3_data_req_offset
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
473 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Offset: %u bytes",
474 tvb_get_ntohs(tvb
, offset
+2)*2);
478 /* MPEG data (v1.3 and later)
482 * [6..7] Write pointer (in words)
484 * [10..11] Sequence number
490 proto_tree_add_text(slimp3_tree
, tvb
, offset
, -1,
492 tvb_reported_length_remaining(tvb
, offset
+18));
493 offset_buffer
= tvb_get_ntohs(tvb
, offset
+2) * 2;
494 proto_tree_add_uint(slimp3_tree
, hf_slimp3_data_offset
, tvb
, offset
+2, 2, offset_buffer
);
496 col_append_fstr(pinfo
->cinfo
, COL_INFO
,
497 ", Length: %d bytes, Offset: %u bytes.",
498 tvb_reported_length_remaining(tvb
, offset
+18),
503 proto_tree_add_item(slimp3_tree
, hf_slimp3_data_command
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
504 proto_tree_add_text(slimp3_tree
, tvb
, offset
, -1,
506 tvb_reported_length_remaining(tvb
, offset
+18));
507 write_pointer
= tvb_get_ntohs(tvb
, offset
+6) * 2;
508 proto_tree_add_uint(slimp3_tree
, hf_slimp3_data_write_pointer
, tvb
, offset
+6, 2, write_pointer
);
509 proto_tree_add_item(slimp3_tree
, hf_slimp3_data_sequence
, tvb
, offset
+10, 2, ENC_BIG_ENDIAN
);
511 col_append_fstr(pinfo
->cinfo
, COL_INFO
,
512 ", %s, %d bytes at %u, Sequence: %u",
513 val_to_str(tvb_get_guint8(tvb
, offset
+1),
514 slimp3_mpg_control
, "Unknown (0x%0x)"),
515 tvb_reported_length_remaining(tvb
, offset
+18),
517 tvb_get_ntohs(tvb
, offset
+10));
521 case SLIMP3_DISC_REQ
:
524 proto_tree_add_item(slimp3_tree
, hf_slimp3_device_id
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
525 fw_ver
= tvb_get_guint8(tvb
, offset
+2);
526 proto_tree_add_uint_format_value(slimp3_tree
, hf_slimp3_fw_rev
, tvb
, offset
+2, 1, fw_ver
,
527 "%u.%u (0x%0x)", fw_ver
>>4, fw_ver
& 0xf, fw_ver
);
528 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Device ID: %u. Firmware: %u.%u",
529 tvb_get_guint8(tvb
, offset
+1), fw_ver
>>4, fw_ver
& 0xf);
533 case SLIMP3_DISC_RSP
:
535 proto_tree_add_item(slimp3_tree
, hf_slimp3_disc_rsp_server_ip
, tvb
, offset
+2, 4, ENC_BIG_ENDIAN
);
536 proto_tree_add_item(slimp3_tree
, hf_slimp3_disc_rsp_server_port
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
539 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Server Address: %s. Server Port: %u",
540 tvb_ip_to_str(tvb
, offset
+2),
541 tvb_get_ntohs(tvb
, offset
+ 6));
544 case SLIMP3_DATA_ACK
:
545 /* Acknowledge MPEG data
549 * [6..7] Write pointer (in words)
550 * [8..9] Read pointer (in words)
551 * [10..11] Sequence number
552 * [12..17] client MAC address (v1.3 and later)
557 pointer
= tvb_get_ntohs(tvb
, offset
+6) * 2;
558 proto_tree_add_uint(slimp3_tree
, hf_slimp3_data_ack_write_pointer
, tvb
, offset
+6, 2, pointer
);
559 pointer
= tvb_get_ntohs(tvb
, offset
+8) * 2;
560 proto_tree_add_uint(slimp3_tree
, hf_slimp3_data_ack_read_pointer
, tvb
, offset
+8, 2, pointer
);
561 proto_tree_add_item(slimp3_tree
, hf_slimp3_data_ack_sequence
, tvb
, offset
+10, 2, ENC_BIG_ENDIAN
);
564 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Sequence: %u",
565 tvb_get_ntohs(tvb
, offset
+10));
570 proto_tree_add_text(slimp3_tree
, tvb
, offset
, -1,
571 "Data (%d bytes)", tvb_reported_length_remaining(tvb
, offset
));
576 return tvb_reported_length(tvb
);
580 proto_register_slimp3(void)
582 static hf_register_info hf
[] = {
584 { "Opcode", "slimp3.opcode",
585 FT_UINT8
, BASE_DEC
, VALS(slimp3_opcode_vals
), 0x0,
586 "SLIMP3 message type", HFILL
}},
588 { &hf_slimp3_control
,
589 { "Control Packet", "slimp3.control",
590 FT_UINT8
, BASE_DEC
, VALS(slimp3_stream_control
), 0x0,
591 "SLIMP3 control", HFILL
}},
594 { "Uptime", "slimp3.uptime",
595 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
598 { &hf_slimp3_code_id
,
599 { "Code identifier", "slimp3.code_id",
600 FT_UINT8
, BASE_DEC
, VALS(slimp3_ir_types
), 0x0,
603 { &hf_slimp3_code_bits
,
604 { "Code bits", "slimp3.code_bits",
605 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
608 { &hf_slimp3_infrared_slimp3
,
609 { "Infrared Code", "slimp3.infrared",
610 FT_UINT32
, BASE_HEX
, VALS(slimp3_ir_codes_slimp3
), 0x0,
613 { &hf_slimp3_infrared_jvc
,
614 { "Infrared Code", "slimp3.infrared",
615 FT_UINT32
, BASE_HEX
, VALS(slimp3_ir_codes_jvc
), 0x0,
618 { &hf_slimp3_infrared
,
619 { "Infrared Code", "slimp3.infrared",
620 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
623 { &hf_slimp3_device_id
,
624 { "Device ID", "slimp3.device_id",
625 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
629 { "Firmware Revision", "slimp3.fw_rev",
630 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
633 { &hf_slimp3_data_offset
,
634 { "Buffer offset", "slimp3.data.offset",
635 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
638 { &hf_slimp3_data_command
,
639 { "Command", "slimp3.data.command",
640 FT_UINT8
, BASE_HEX
, VALS(slimp3_mpg_control
), 0x0,
643 { &hf_slimp3_data_write_pointer
,
644 { "Write Pointer", "slimp3.data.write_pointer",
645 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
648 { &hf_slimp3_data_sequence
,
649 { "Sequence", "slimp3.data.sequence",
650 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
653 { &hf_slimp3_disc_rsp_server_ip
,
654 { "Server Address", "slimp3.disc_rsp.server_ip",
655 FT_IPv4
, BASE_NONE
, NULL
, 0x0,
658 { &hf_slimp3_disc_rsp_server_port
,
659 { "Server Port", "slimp3.disc_rsp.server_port",
660 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
663 { &hf_slimp3_data_ack_write_pointer
,
664 { "Write Pointer", "slimp3.data_ack.write_pointer",
665 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
668 { &hf_slimp3_data_ack_read_pointer
,
669 { "Read Pointer", "slimp3.data_ack.read_pointer",
670 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
673 { &hf_slimp3_data_ack_sequence
,
674 { "Sequence", "slimp3.data_ack.sequence",
675 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
678 { &hf_slimp3_data_req_offset
,
679 { "Requested offset", "slimp3.data_req.offset",
680 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
684 static gint
*ett
[] = {
688 proto_slimp3
= proto_register_protocol("SliMP3 Communication Protocol",
690 proto_register_field_array(proto_slimp3
, hf
, array_length(hf
));
691 proto_register_subtree_array(ett
, array_length(ett
));
695 proto_reg_handoff_slimp3(void)
697 dissector_handle_t slimp3_handle
;
699 slimp3_handle
= new_create_dissector_handle(dissect_slimp3
, proto_slimp3
);
700 dissector_add_uint("udp.port", UDP_PORT_SLIMP3_V1
, slimp3_handle
);
701 dissector_add_uint("udp.port", UDP_PORT_SLIMP3_V2
, slimp3_handle
);
710 * indent-tabs-mode: nil
713 * ex: set shiftwidth=4 tabstop=4 expandtab:
714 * :indentSize=4:tabSize=4:noTabs=true: