1 /* Do not modify this file. Changes will be overwritten. */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler */
3 /* packet-mpeg-audio.c */
4 /* ../../tools/asn2wrs.py -p mpeg-audio -c ./mpeg-audio.cnf -s ./packet-mpeg-audio-template -D . -O ../../epan/dissectors mpeg-audio.asn */
6 /* Input file: packet-mpeg-audio-template.c */
8 #line 1 "../../asn1/mpeg-audio/packet-mpeg-audio-template.c"
9 /* MPEG audio packet decoder.
10 * Written by Shaun Jackman <sjackman@gmail.com>.
11 * Copyright 2007 Shaun Jackman
15 * Wireshark - Network traffic analyzer
16 * By Gerald Combs <gerald@wireshark.org>
18 * This program is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU General Public License
20 * as published by the Free Software Foundation; either version 2
21 * of the License, or (at your option) any later version.
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
28 * You should have received a copy of the GNU General Public License
29 * along with this program; if not, write to the Free Software
30 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
37 #include <epan/packet.h>
38 #include <epan/asn1.h>
40 #include <wsutil/mpeg-audio.h>
42 #include "packet-per.h"
45 /*--- Included file: packet-mpeg-audio-hf.c ---*/
46 #line 1 "../../asn1/mpeg-audio/packet-mpeg-audio-hf.c"
47 static int hf_mpeg_audio_sync
= -1; /* BIT_STRING_SIZE_11 */
48 static int hf_mpeg_audio_version
= -1; /* T_version */
49 static int hf_mpeg_audio_layer
= -1; /* T_layer */
50 static int hf_mpeg_audio_protection
= -1; /* T_protection */
51 static int hf_mpeg_audio_bitrate
= -1; /* INTEGER_0_15 */
52 static int hf_mpeg_audio_frequency
= -1; /* INTEGER_0_3 */
53 static int hf_mpeg_audio_padding
= -1; /* BOOLEAN */
54 static int hf_mpeg_audio_private
= -1; /* BOOLEAN */
55 static int hf_mpeg_audio_channel_mode
= -1; /* T_channel_mode */
56 static int hf_mpeg_audio_mode_extension
= -1; /* INTEGER_0_3 */
57 static int hf_mpeg_audio_copyright
= -1; /* BOOLEAN */
58 static int hf_mpeg_audio_original
= -1; /* BOOLEAN */
59 static int hf_mpeg_audio_emphasis
= -1; /* T_emphasis */
60 static int hf_mpeg_audio_tag
= -1; /* OCTET_STRING_SIZE_3 */
61 static int hf_mpeg_audio_title
= -1; /* OCTET_STRING_SIZE_30 */
62 static int hf_mpeg_audio_artist
= -1; /* OCTET_STRING_SIZE_30 */
63 static int hf_mpeg_audio_album
= -1; /* OCTET_STRING_SIZE_30 */
64 static int hf_mpeg_audio_year
= -1; /* OCTET_STRING_SIZE_4 */
65 static int hf_mpeg_audio_comment
= -1; /* OCTET_STRING_SIZE_28 */
66 static int hf_mpeg_audio_must_be_zero
= -1; /* INTEGER_0_255 */
67 static int hf_mpeg_audio_track
= -1; /* INTEGER_0_255 */
68 static int hf_mpeg_audio_genre
= -1; /* T_genre */
70 /*--- End of included file: packet-mpeg-audio-hf.c ---*/
71 #line 37 "../../asn1/mpeg-audio/packet-mpeg-audio-template.c"
73 /*--- Included file: packet-mpeg-audio-ett.c ---*/
74 #line 1 "../../asn1/mpeg-audio/packet-mpeg-audio-ett.c"
75 static gint ett_mpeg_audio_Audio
= -1;
76 static gint ett_mpeg_audio_ID3v1
= -1;
78 /*--- End of included file: packet-mpeg-audio-ett.c ---*/
79 #line 38 "../../asn1/mpeg-audio/packet-mpeg-audio-template.c"
81 /*--- Included file: packet-mpeg-audio-fn.c ---*/
82 #line 1 "../../asn1/mpeg-audio/packet-mpeg-audio-fn.c"
86 dissect_mpeg_audio_BIT_STRING_SIZE_11(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
87 offset
= dissect_per_bit_string(tvb
, offset
, actx
, tree
, hf_index
,
94 static const value_string mpeg_audio_T_version_vals
[] = {
104 dissect_mpeg_audio_T_version(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
105 offset
= dissect_per_enumerated(tvb
, offset
, actx
, tree
, hf_index
,
106 4, NULL
, FALSE
, 0, NULL
);
112 static const value_string mpeg_audio_T_layer_vals
[] = {
122 dissect_mpeg_audio_T_layer(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
123 offset
= dissect_per_enumerated(tvb
, offset
, actx
, tree
, hf_index
,
124 4, NULL
, FALSE
, 0, NULL
);
130 static const value_string mpeg_audio_T_protection_vals
[] = {
138 dissect_mpeg_audio_T_protection(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
139 offset
= dissect_per_enumerated(tvb
, offset
, actx
, tree
, hf_index
,
140 2, NULL
, FALSE
, 0, NULL
);
148 dissect_mpeg_audio_INTEGER_0_15(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
149 offset
= dissect_per_constrained_integer(tvb
, offset
, actx
, tree
, hf_index
,
150 0U, 15U, NULL
, FALSE
);
158 dissect_mpeg_audio_INTEGER_0_3(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
159 offset
= dissect_per_constrained_integer(tvb
, offset
, actx
, tree
, hf_index
,
160 0U, 3U, NULL
, FALSE
);
168 dissect_mpeg_audio_BOOLEAN(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
169 offset
= dissect_per_boolean(tvb
, offset
, actx
, tree
, hf_index
, NULL
);
175 static const value_string mpeg_audio_T_channel_mode_vals
[] = {
177 { 1, "joint-stereo" },
178 { 2, "dual-channel" },
179 { 3, "single-channel" },
185 dissect_mpeg_audio_T_channel_mode(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
186 offset
= dissect_per_enumerated(tvb
, offset
, actx
, tree
, hf_index
,
187 4, NULL
, FALSE
, 0, NULL
);
193 static const value_string mpeg_audio_T_emphasis_vals
[] = {
195 { 1, "em-50-15-ms" },
203 dissect_mpeg_audio_T_emphasis(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
204 offset
= dissect_per_enumerated(tvb
, offset
, actx
, tree
, hf_index
,
205 4, NULL
, FALSE
, 0, NULL
);
211 static const per_sequence_t Audio_sequence
[] = {
212 { &hf_mpeg_audio_sync
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_mpeg_audio_BIT_STRING_SIZE_11
},
213 { &hf_mpeg_audio_version
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_mpeg_audio_T_version
},
214 { &hf_mpeg_audio_layer
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_mpeg_audio_T_layer
},
215 { &hf_mpeg_audio_protection
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_mpeg_audio_T_protection
},
216 { &hf_mpeg_audio_bitrate
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_mpeg_audio_INTEGER_0_15
},
217 { &hf_mpeg_audio_frequency
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_mpeg_audio_INTEGER_0_3
},
218 { &hf_mpeg_audio_padding
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_mpeg_audio_BOOLEAN
},
219 { &hf_mpeg_audio_private
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_mpeg_audio_BOOLEAN
},
220 { &hf_mpeg_audio_channel_mode
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_mpeg_audio_T_channel_mode
},
221 { &hf_mpeg_audio_mode_extension
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_mpeg_audio_INTEGER_0_3
},
222 { &hf_mpeg_audio_copyright
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_mpeg_audio_BOOLEAN
},
223 { &hf_mpeg_audio_original
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_mpeg_audio_BOOLEAN
},
224 { &hf_mpeg_audio_emphasis
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_mpeg_audio_T_emphasis
},
229 dissect_mpeg_audio_Audio(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
230 offset
= dissect_per_sequence(tvb
, offset
, actx
, tree
, hf_index
,
231 ett_mpeg_audio_Audio
, Audio_sequence
);
239 dissect_mpeg_audio_OCTET_STRING_SIZE_3(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
240 offset
= dissect_per_octet_string(tvb
, offset
, actx
, tree
, hf_index
,
249 dissect_mpeg_audio_OCTET_STRING_SIZE_30(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
250 offset
= dissect_per_octet_string(tvb
, offset
, actx
, tree
, hf_index
,
251 30, 30, FALSE
, NULL
);
259 dissect_mpeg_audio_OCTET_STRING_SIZE_4(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
260 offset
= dissect_per_octet_string(tvb
, offset
, actx
, tree
, hf_index
,
269 dissect_mpeg_audio_OCTET_STRING_SIZE_28(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
270 offset
= dissect_per_octet_string(tvb
, offset
, actx
, tree
, hf_index
,
271 28, 28, FALSE
, NULL
);
279 dissect_mpeg_audio_INTEGER_0_255(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
280 offset
= dissect_per_constrained_integer(tvb
, offset
, actx
, tree
, hf_index
,
281 0U, 255U, NULL
, FALSE
);
287 static const value_string mpeg_audio_T_genre_vals
[] = {
289 { 1, "classic-rock" },
307 { 19, "industrial" },
308 { 20, "alternative" },
310 { 22, "death-metal" },
312 { 24, "soundtrack" },
313 { 25, "euro-techno" },
317 { 29, "jazz-and-funk" },
321 { 33, "instrumental" },
325 { 37, "sound-clip" },
328 { 40, "alternative-rock" },
333 { 45, "meditative" },
334 { 46, "instrumental-pop" },
335 { 47, "instrumental-rock" },
339 { 51, "techno-industrial" },
340 { 52, "electronic" },
344 { 56, "southern-rock" },
349 { 61, "christian-rap" },
352 { 64, "native-american" },
355 { 67, "psychadelic" },
366 { 78, "rock-and-roll" },
370 { 82, "national-folk" },
372 { 84, "fast-fusion" },
378 { 90, "avantgarde" },
379 { 91, "gothic-rock" },
380 { 92, "progressive-rock" },
381 { 93, "psychedelic-rock" },
382 { 94, "symphonic-rock" },
386 { 98, "easy-listening" },
392 { 104, "chamber-music" },
395 { 107, "booty-bass" },
397 { 109, "porn-groove" },
405 { 117, "power-ballad" },
406 { 118, "rhythmic-soul" },
407 { 119, "freestyle" },
409 { 121, "punk-rock" },
410 { 122, "drum-solo" },
411 { 123, "a-cappella" },
412 { 124, "euro-house" },
413 { 125, "dance-hall" },
419 dissect_mpeg_audio_T_genre(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
420 offset
= dissect_per_constrained_integer(tvb
, offset
, actx
, tree
, hf_index
,
421 0U, 255U, NULL
, FALSE
);
427 static const per_sequence_t ID3v1_sequence
[] = {
428 { &hf_mpeg_audio_tag
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_mpeg_audio_OCTET_STRING_SIZE_3
},
429 { &hf_mpeg_audio_title
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_mpeg_audio_OCTET_STRING_SIZE_30
},
430 { &hf_mpeg_audio_artist
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_mpeg_audio_OCTET_STRING_SIZE_30
},
431 { &hf_mpeg_audio_album
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_mpeg_audio_OCTET_STRING_SIZE_30
},
432 { &hf_mpeg_audio_year
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_mpeg_audio_OCTET_STRING_SIZE_4
},
433 { &hf_mpeg_audio_comment
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_mpeg_audio_OCTET_STRING_SIZE_28
},
434 { &hf_mpeg_audio_must_be_zero
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_mpeg_audio_INTEGER_0_255
},
435 { &hf_mpeg_audio_track
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_mpeg_audio_INTEGER_0_255
},
436 { &hf_mpeg_audio_genre
, ASN1_NO_EXTENSIONS
, ASN1_NOT_OPTIONAL
, dissect_mpeg_audio_T_genre
},
441 dissect_mpeg_audio_ID3v1(tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
442 offset
= dissect_per_sequence(tvb
, offset
, actx
, tree
, hf_index
,
443 ett_mpeg_audio_ID3v1
, ID3v1_sequence
);
449 /*--- End of included file: packet-mpeg-audio-fn.c ---*/
450 #line 39 "../../asn1/mpeg-audio/packet-mpeg-audio-template.c"
452 static int proto_mpeg_audio
= -1;
454 static int hf_mpeg_audio_data
= -1;
455 static int hf_mpeg_audio_padbytes
= -1;
456 static int hf_id3v1
= -1;
457 static int hf_id3v2
= -1;
460 dissect_mpeg_audio_frame(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
467 static const char *version_names
[] = { "1", "2", "2.5" };
469 if (!tvb_bytes_exist(tvb
, 0, 4))
470 return FALSE
; /* not enough data for an MPEG audio frame */
472 h
= tvb_get_ntohl(tvb
, 0);
473 MPA_UNMARSHAL(&mpa
, h
);
474 if (!MPA_SYNC_VALID(&mpa
))
476 if (!MPA_VERSION_VALID(&mpa
))
478 if (!MPA_LAYER_VALID(&mpa
))
481 col_add_fstr(pinfo
->cinfo
, COL_PROTOCOL
,
482 "MPEG-%s", version_names
[mpa_version(&mpa
)]);
483 col_add_fstr(pinfo
->cinfo
, COL_INFO
,
484 "Audio Layer %d", mpa_layer(&mpa
) + 1);
485 if (MPA_BITRATE_VALID(&mpa
) && MPA_FREQUENCY_VALID(&mpa
)) {
486 data_size
= (int)(MPA_DATA_BYTES(&mpa
) - sizeof mpa
);
487 SET_ADDRESS(&pinfo
->src
, AT_NONE
, 0, NULL
);
488 col_add_fstr(pinfo
->cinfo
, COL_DEF_SRC
,
489 "%d kb/s", mpa_bitrate(&mpa
) / 1000);
490 SET_ADDRESS(&pinfo
->dst
, AT_NONE
, 0, NULL
);
491 col_add_fstr(pinfo
->cinfo
, COL_DEF_DST
,
492 "%g kHz", mpa_frequency(&mpa
) / (float)1000);
498 asn1_ctx_init(&asn1_ctx
, ASN1_ENC_PER
, TRUE
, pinfo
);
499 offset
= dissect_mpeg_audio_Audio(tvb
, offset
, &asn1_ctx
,
500 tree
, proto_mpeg_audio
);
502 unsigned int padding
;
504 proto_tree_add_item(tree
, hf_mpeg_audio_data
, tvb
,
505 offset
/ 8, data_size
, ENC_NA
);
506 offset
+= data_size
* 8;
507 padding
= mpa_padding(&mpa
);
509 proto_tree_add_item(tree
, hf_mpeg_audio_padbytes
, tvb
,
510 offset
/ 8, padding
, ENC_NA
);
517 dissect_id3v1(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
521 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "ID3v1");
522 col_clear(pinfo
->cinfo
, COL_INFO
);
525 asn1_ctx_init(&asn1_ctx
, ASN1_ENC_PER
, TRUE
, pinfo
);
526 dissect_mpeg_audio_ID3v1(tvb
, 0, &asn1_ctx
,
531 dissect_id3v2(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
533 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "ID3v2");
534 col_clear(pinfo
->cinfo
, COL_INFO
);
535 proto_tree_add_item(tree
, hf_id3v2
, tvb
,
540 dissect_mpeg_audio(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
)
544 if (!tvb_bytes_exist(tvb
, 0, 3))
545 return FALSE
; /* not enough data for an ID tag or audio frame */
546 magic
= tvb_get_ntoh24(tvb
, 0);
548 case 0x544147: /* TAG */
549 dissect_id3v1(tvb
, pinfo
, tree
);
551 case 0x494433: /* ID3 */
552 dissect_id3v2(tvb
, pinfo
, tree
);
555 return dissect_mpeg_audio_frame(tvb
, pinfo
, tree
);
560 proto_register_mpeg_audio(void)
562 static hf_register_info hf
[] = {
564 /*--- Included file: packet-mpeg-audio-hfarr.c ---*/
565 #line 1 "../../asn1/mpeg-audio/packet-mpeg-audio-hfarr.c"
566 { &hf_mpeg_audio_sync
,
567 { "sync", "mpeg-audio.sync",
568 FT_BYTES
, BASE_NONE
, NULL
, 0,
569 "BIT_STRING_SIZE_11", HFILL
}},
570 { &hf_mpeg_audio_version
,
571 { "version", "mpeg-audio.version",
572 FT_UINT32
, BASE_DEC
, VALS(mpeg_audio_T_version_vals
), 0,
574 { &hf_mpeg_audio_layer
,
575 { "layer", "mpeg-audio.layer",
576 FT_UINT32
, BASE_DEC
, VALS(mpeg_audio_T_layer_vals
), 0,
578 { &hf_mpeg_audio_protection
,
579 { "protection", "mpeg-audio.protection",
580 FT_UINT32
, BASE_DEC
, VALS(mpeg_audio_T_protection_vals
), 0,
582 { &hf_mpeg_audio_bitrate
,
583 { "bitrate", "mpeg-audio.bitrate",
584 FT_UINT32
, BASE_DEC
, NULL
, 0,
585 "INTEGER_0_15", HFILL
}},
586 { &hf_mpeg_audio_frequency
,
587 { "frequency", "mpeg-audio.frequency",
588 FT_UINT32
, BASE_DEC
, NULL
, 0,
589 "INTEGER_0_3", HFILL
}},
590 { &hf_mpeg_audio_padding
,
591 { "padding", "mpeg-audio.padding",
592 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
594 { &hf_mpeg_audio_private
,
595 { "private", "mpeg-audio.private",
596 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
598 { &hf_mpeg_audio_channel_mode
,
599 { "channel-mode", "mpeg-audio.channel_mode",
600 FT_UINT32
, BASE_DEC
, VALS(mpeg_audio_T_channel_mode_vals
), 0,
602 { &hf_mpeg_audio_mode_extension
,
603 { "mode-extension", "mpeg-audio.mode_extension",
604 FT_UINT32
, BASE_DEC
, NULL
, 0,
605 "INTEGER_0_3", HFILL
}},
606 { &hf_mpeg_audio_copyright
,
607 { "copyright", "mpeg-audio.copyright",
608 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
610 { &hf_mpeg_audio_original
,
611 { "original", "mpeg-audio.original",
612 FT_BOOLEAN
, BASE_NONE
, NULL
, 0,
614 { &hf_mpeg_audio_emphasis
,
615 { "emphasis", "mpeg-audio.emphasis",
616 FT_UINT32
, BASE_DEC
, VALS(mpeg_audio_T_emphasis_vals
), 0,
618 { &hf_mpeg_audio_tag
,
619 { "tag", "mpeg-audio.tag",
620 FT_STRING
, BASE_NONE
, NULL
, 0,
621 "OCTET_STRING_SIZE_3", HFILL
}},
622 { &hf_mpeg_audio_title
,
623 { "title", "mpeg-audio.title",
624 FT_STRING
, BASE_NONE
, NULL
, 0,
625 "OCTET_STRING_SIZE_30", HFILL
}},
626 { &hf_mpeg_audio_artist
,
627 { "artist", "mpeg-audio.artist",
628 FT_STRING
, BASE_NONE
, NULL
, 0,
629 "OCTET_STRING_SIZE_30", HFILL
}},
630 { &hf_mpeg_audio_album
,
631 { "album", "mpeg-audio.album",
632 FT_STRING
, BASE_NONE
, NULL
, 0,
633 "OCTET_STRING_SIZE_30", HFILL
}},
634 { &hf_mpeg_audio_year
,
635 { "year", "mpeg-audio.year",
636 FT_STRING
, BASE_NONE
, NULL
, 0,
637 "OCTET_STRING_SIZE_4", HFILL
}},
638 { &hf_mpeg_audio_comment
,
639 { "comment", "mpeg-audio.comment",
640 FT_STRING
, BASE_NONE
, NULL
, 0,
641 "OCTET_STRING_SIZE_28", HFILL
}},
642 { &hf_mpeg_audio_must_be_zero
,
643 { "must-be-zero", "mpeg-audio.must_be_zero",
644 FT_UINT32
, BASE_DEC
, NULL
, 0,
645 "INTEGER_0_255", HFILL
}},
646 { &hf_mpeg_audio_track
,
647 { "track", "mpeg-audio.track",
648 FT_UINT32
, BASE_DEC
, NULL
, 0,
649 "INTEGER_0_255", HFILL
}},
650 { &hf_mpeg_audio_genre
,
651 { "genre", "mpeg-audio.genre",
652 FT_UINT32
, BASE_DEC
, VALS(mpeg_audio_T_genre_vals
), 0,
655 /*--- End of included file: packet-mpeg-audio-hfarr.c ---*/
656 #line 152 "../../asn1/mpeg-audio/packet-mpeg-audio-template.c"
657 { &hf_mpeg_audio_data
,
658 { "Data", "mpeg-audio.data",
659 FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
660 { &hf_mpeg_audio_padbytes
,
661 { "Padding", "mpeg-audio.padbytes",
662 FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
665 { "ID3v1", "mpeg-audio.id3v1",
666 FT_NONE
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
668 { "ID3v2", "mpeg-audio.id3v2",
669 FT_NONE
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
672 static gint
*ett
[] = {
674 /*--- Included file: packet-mpeg-audio-ettarr.c ---*/
675 #line 1 "../../asn1/mpeg-audio/packet-mpeg-audio-ettarr.c"
676 &ett_mpeg_audio_Audio
,
677 &ett_mpeg_audio_ID3v1
,
679 /*--- End of included file: packet-mpeg-audio-ettarr.c ---*/
680 #line 169 "../../asn1/mpeg-audio/packet-mpeg-audio-template.c"
683 proto_mpeg_audio
= proto_register_protocol(
684 "Moving Picture Experts Group Audio", "MPEG Audio", "mpeg-audio");
685 proto_register_field_array(proto_mpeg_audio
, hf
, array_length(hf
));
686 proto_register_subtree_array(ett
, array_length(ett
));
690 proto_reg_handoff_mpeg_audio(void)
692 heur_dissector_add("mpeg", dissect_mpeg_audio
, proto_mpeg_audio
);