MSWSP: add two more Property Sets
[wireshark-wip.git] / epan / dissectors / packet-eiss.c
blob0073b8528ec4d4f3035fc4231a4260357747103f
1 /* packet-eiss.c
3 * Routines for ETV-AM EISS (OC-SP-ETV-AM1.0-I05)
4 * Copyright 2012, Weston Schmidt <weston_schmidt@alumni.purdue.edu>
6 * $Id$
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 #include "config.h"
29 #include <glib.h>
31 #include <epan/packet.h>
32 #include <epan/expert.h>
33 #include <epan/dissectors/packet-mpeg-sect.h>
35 void proto_register_eiss(void);
36 void proto_reg_handoff_eiss(void);
38 static int proto_eiss = -1;
39 static dissector_handle_t data_handle;
41 static int hf_eiss_reserved2 = -1;
42 static int hf_eiss_section_number = -1;
43 static int hf_eiss_last_section_number = -1;
44 static int hf_eiss_protocol_version_major = -1;
45 static int hf_eiss_protocol_version_minor = -1;
46 static int hf_eiss_application_type = -1;
48 /* application_identifier() */
49 static int hf_eiss_organisation_id = -1;
50 static int hf_eiss_application_id = -1;
52 static int hf_eiss_platform_id_length = -1;
54 /* platform id information */
55 static int hf_pdtHWManufacturer = -1;
56 static int hf_pdtHWModel = -1;
57 static int hf_pdtHWVersionMajor = -1;
58 static int hf_pdtHWVersionMinor = -1;
59 static int hf_pdtSWManufacturer = -1;
60 static int hf_pdtSWModel = -1;
61 static int hf_pdtSWVersionMajor = -1;
62 static int hf_pdtSWVersionMinor = -1;
63 static int hf_pdtProfile = -1;
65 /* common to all eiss descriptors */
66 static int hf_eiss_descriptor_tag = -1;
67 static int hf_eiss_descriptor_length = -1;
69 /* application info descriptor */
70 static int hf_eiss_aid_app_control_code = -1;
71 static int hf_eiss_aid_app_version_major = -1;
72 static int hf_eiss_aid_app_version_minor = -1;
73 static int hf_eiss_aid_max_proto_version_major = -1;
74 static int hf_eiss_aid_max_proto_version_minor = -1;
75 static int hf_eiss_aid_test_flag = -1;
76 static int hf_eiss_aid_reserved = -1;
77 static int hf_eiss_aid_priority = -1;
78 static int hf_eiss_irl_type = -1;
79 static int hf_eiss_irl_length = -1;
80 static int hf_eiss_irl_string = -1;
82 /* media time descriptor */
83 static int hf_eiss_mtd_time_value = -1;
85 /* stream event descriptor */
86 static int hf_eiss_sed_time_value = -1;
87 static int hf_eiss_sed_reserved = -1;
88 static int hf_eiss_sed_descriptor_length = -1;
90 static gint ett_eiss = -1;
91 static gint ett_eiss_platform_id = -1;
92 static gint ett_eiss_desc = -1;
94 static expert_field ei_eiss_platform_id_length = EI_INIT;
95 static expert_field ei_eiss_invalid_section_length = EI_INIT;
96 static expert_field ei_eiss_invalid_section_syntax_indicator = EI_INIT;
97 static expert_field ei_eiss_unknown_descriptor = EI_INIT;
98 static expert_field ei_eiss_section_number = EI_INIT;
99 static expert_field ei_eiss_application_type = EI_INIT;
100 static expert_field ei_eiss_invalid_reserved_bits = EI_INIT;
102 #define EISS_SECTION_TID 0xe0
104 #define MPEG_SECT_SYNTAX_INDICATOR_MASK 0x8000
105 #define MPEG_SECT_RESERVED_MASK 0x7000
106 #define MPEG_SECT_LENGTH_MASK 0x0FFF
108 static const value_string eiss_descriptor_values[] = {
109 { 0xe0, "ETV Application Information Descriptor" },
110 { 0xe1, "ETV Media Time Descriptor" },
111 { 0xe2, "ETV Stream Event Descriptor" },
112 { 0, NULL }
115 static const range_string application_id_values[] = {
116 { 0x0000, 0x3fff, "Unsigned Application" },
117 { 0x4000, 0x3fff, "Signed Application" },
118 { 0x8000, 0xfffd, "Reserved by DVB" },
119 { 0xfffe, 0xfffe, "Wildcard for signed applications of an organisation" },
120 { 0xffff, 0xffff, "Wildcard for all applications of an organisation" },
121 { 0, 0, NULL }
124 static const range_string aid_control_code_values[] = {
125 { 0x00, 0x00, "Reserved" },
126 { 0x01, 0x01, "AUTOSTART" },
127 { 0x02, 0x02, "PRESENT" },
128 { 0x03, 0x03, "DESTROY" },
129 { 0x04, 0xff, "Reserved" },
130 { 0, 0, NULL }
133 static guint
134 dissect_etv_bif_platform_ids(tvbuff_t *tvb, proto_tree *tree, guint offset)
136 proto_tree *platform_tree;
137 proto_item *pi;
139 pi = proto_tree_add_text(tree, tvb, offset, 15, "Platform Id");
140 platform_tree = proto_item_add_subtree(pi, ett_eiss_platform_id);
141 proto_tree_add_item(platform_tree, hf_pdtHWManufacturer, tvb, offset, 3, ENC_BIG_ENDIAN);
142 offset += 3;
143 proto_tree_add_item(platform_tree, hf_pdtHWModel, tvb, offset, 2, ENC_BIG_ENDIAN);
144 offset += 2;
145 proto_tree_add_item(platform_tree, hf_pdtHWVersionMajor, tvb, offset, 1, ENC_BIG_ENDIAN);
146 offset++;
147 proto_tree_add_item(platform_tree, hf_pdtHWVersionMinor, tvb, offset, 1, ENC_BIG_ENDIAN);
148 offset++;
149 proto_tree_add_item(platform_tree, hf_pdtSWManufacturer, tvb, offset, 3, ENC_BIG_ENDIAN);
150 offset += 3;
151 proto_tree_add_item(platform_tree, hf_pdtSWModel, tvb, offset, 2, ENC_BIG_ENDIAN);
152 offset += 2;
153 proto_tree_add_item(platform_tree, hf_pdtSWVersionMajor, tvb, offset, 1, ENC_BIG_ENDIAN);
154 offset++;
155 proto_tree_add_item(platform_tree, hf_pdtSWVersionMinor, tvb, offset, 1, ENC_BIG_ENDIAN);
156 offset++;
157 proto_tree_add_item(platform_tree, hf_pdtProfile, tvb, offset, 1, ENC_BIG_ENDIAN);
158 offset++;
160 return 15;
163 static guint
164 dissect_eiss_descriptors(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
166 proto_item *pi;
167 proto_tree *sub_tree;
168 guint tag;
170 tag = tvb_get_guint8(tvb, offset);
172 if (0xe0 == tag) {
173 guint total_length;
175 total_length = tvb_get_guint8(tvb, offset+1);
176 pi = proto_tree_add_text(tree, tvb, offset, (2+total_length),
177 "ETV Application Information Descriptor");
178 sub_tree = proto_item_add_subtree(pi, ett_eiss_desc);
179 proto_tree_add_item(sub_tree, hf_eiss_descriptor_tag,
180 tvb, offset, 1, ENC_BIG_ENDIAN);
181 offset++;
182 proto_tree_add_item(sub_tree, hf_eiss_descriptor_length, tvb,
183 offset, 1, ENC_BIG_ENDIAN);
184 offset++;
185 proto_tree_add_item(sub_tree, hf_eiss_aid_app_control_code, tvb,
186 offset, 1, ENC_BIG_ENDIAN);
187 offset++;
188 proto_tree_add_item(sub_tree, hf_eiss_aid_app_version_major, tvb,
189 offset, 1, ENC_BIG_ENDIAN);
190 offset++;
191 proto_tree_add_item(sub_tree, hf_eiss_aid_app_version_minor, tvb,
192 offset, 1, ENC_BIG_ENDIAN);
193 offset++;
194 proto_tree_add_item(sub_tree, hf_eiss_aid_max_proto_version_major,
195 tvb, offset, 1, ENC_BIG_ENDIAN);
196 offset++;
197 proto_tree_add_item(sub_tree, hf_eiss_aid_max_proto_version_minor,
198 tvb, offset, 1, ENC_BIG_ENDIAN);
199 offset++;
200 proto_tree_add_item(sub_tree, hf_eiss_aid_test_flag, tvb, offset,
201 1, ENC_BIG_ENDIAN);
202 offset++;
203 proto_tree_add_item(sub_tree, hf_eiss_aid_reserved, tvb, offset,
204 3, ENC_BIG_ENDIAN);
205 offset += 3;
206 proto_tree_add_item(sub_tree, hf_eiss_aid_priority, tvb, offset,
207 1, ENC_BIG_ENDIAN);
208 offset++;
209 proto_tree_add_item(sub_tree, hf_eiss_irl_type, tvb, offset, 2,
210 ENC_BIG_ENDIAN);
211 proto_tree_add_item(sub_tree, hf_eiss_irl_length, tvb, offset,
212 2, ENC_BIG_ENDIAN);
213 offset += 2;
214 proto_tree_add_item(sub_tree, hf_eiss_irl_string, tvb, offset, 2,
215 ENC_ASCII|ENC_NA);
216 return (2+total_length);
217 } else if (0xe1 == tag) {
218 pi = proto_tree_add_text(tree, tvb, offset, 6,
219 "ETV Media Time Descriptor");
220 sub_tree = proto_item_add_subtree(pi, ett_eiss_desc);
221 proto_tree_add_item(sub_tree, hf_eiss_descriptor_tag,
222 tvb, offset, 1, ENC_BIG_ENDIAN);
223 offset++;
224 proto_tree_add_item(sub_tree, hf_eiss_descriptor_length, tvb,
225 offset, 1, ENC_BIG_ENDIAN);
226 offset++;
227 proto_tree_add_item(sub_tree, hf_eiss_mtd_time_value, tvb,
228 offset, 4, ENC_BIG_ENDIAN);
229 return 6;
230 } else if (0xe2 == tag) {
231 guint tmp;
232 tvbuff_t *payload;
234 tmp = tvb_get_ntohs(tvb, offset+1);
235 pi = proto_tree_add_text(tree, tvb, offset, (3+tmp),
236 "ETV Stream Event Descriptor");
237 sub_tree = proto_item_add_subtree(pi, ett_eiss_desc);
238 proto_tree_add_item(sub_tree, hf_eiss_descriptor_tag,
239 tvb, offset, 1, ENC_BIG_ENDIAN);
240 offset++;
241 proto_tree_add_item(sub_tree, hf_eiss_sed_reserved, tvb,
242 offset, 2, ENC_BIG_ENDIAN);
243 proto_tree_add_item(sub_tree, hf_eiss_sed_descriptor_length, tvb,
244 offset, 2, ENC_BIG_ENDIAN);
245 offset += 2;
246 proto_tree_add_item(sub_tree, hf_eiss_sed_time_value, tvb,
247 offset, 4, ENC_BIG_ENDIAN);
248 offset += 4;
250 payload = tvb_new_subset(tvb, offset, tmp-4, tmp-4);
251 call_dissector(data_handle, payload, pinfo, sub_tree);
253 return (3+tmp);
254 } else {
255 proto_tree_add_expert(tree, pinfo, &ei_eiss_unknown_descriptor, tvb, offset, -1);
257 /* skip the rest of the section... for now */
258 return 1000;
262 static void
263 dissect_eiss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
265 guint offset = 0, packet_length, sect_len;
266 proto_item *ti;
267 proto_item *pi;
268 proto_tree *eiss_tree;
269 proto_item *items[PACKET_MPEG_SECT_PI__SIZE];
270 gboolean ssi;
271 guint reserved;
272 guint8 reserved2;
273 guint8 sect_num, last_sect_num;
275 guint16 eiss_application_type;
276 guint8 platform_id_length;
278 col_set_str(pinfo->cinfo, COL_PROTOCOL, "EISS");
280 ti = proto_tree_add_item(tree, proto_eiss, tvb, offset, -1, ENC_NA);
281 eiss_tree = proto_item_add_subtree(ti, ett_eiss);
283 offset += packet_mpeg_sect_header_extra(tvb, offset, eiss_tree, &sect_len,
284 &reserved, &ssi, items);
286 packet_length = sect_len + 3 - 4; /* + for the header, - for the crc */
288 if (FALSE != ssi) {
289 proto_item *msg_error;
290 msg_error = items[PACKET_MPEG_SECT_PI__SSI];
292 PROTO_ITEM_SET_GENERATED(msg_error);
293 expert_add_info(pinfo, msg_error, &ei_eiss_invalid_section_syntax_indicator);
296 if (0 != reserved) {
297 proto_item *msg_error;
298 msg_error = items[PACKET_MPEG_SECT_PI__RESERVED];
300 PROTO_ITEM_SET_GENERATED(msg_error);
301 expert_add_info_format(pinfo, msg_error, &ei_eiss_invalid_reserved_bits, "Invalid reserved1 bits (should all be 0)");
304 if (1021 < sect_len) {
305 proto_item *msg_error;
306 msg_error = items[PACKET_MPEG_SECT_PI__LENGTH];
308 PROTO_ITEM_SET_GENERATED(msg_error);
309 expert_add_info(pinfo, msg_error, &ei_eiss_invalid_section_length);
312 reserved2 = tvb_get_guint8(tvb, offset);
313 pi = proto_tree_add_item(eiss_tree, hf_eiss_reserved2, tvb, offset, 1, ENC_BIG_ENDIAN);
314 if (0 != reserved2) {
315 expert_add_info_format(pinfo, pi, &ei_eiss_invalid_reserved_bits, "Invalid reserved2 bits (should all be 0)");
317 offset++;
319 sect_num = tvb_get_guint8(tvb, offset);
320 last_sect_num = tvb_get_guint8(tvb, offset + 1);
321 pi = proto_tree_add_item(eiss_tree, hf_eiss_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
322 if (last_sect_num < sect_num) {
323 expert_add_info(pinfo, pi, &ei_eiss_section_number);
325 offset++;
326 proto_tree_add_item(eiss_tree, hf_eiss_last_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
327 offset++;
328 proto_tree_add_item(eiss_tree, hf_eiss_protocol_version_major, tvb, offset, 1, ENC_BIG_ENDIAN);
329 offset++;
330 proto_tree_add_item(eiss_tree, hf_eiss_protocol_version_minor, tvb, offset, 1, ENC_BIG_ENDIAN);
331 offset++;
333 eiss_application_type = tvb_get_ntohs(tvb, offset);
334 pi = proto_tree_add_item(eiss_tree, hf_eiss_application_type, tvb, offset, 2, ENC_BIG_ENDIAN);
335 if (8 != eiss_application_type) {
336 expert_add_info(pinfo, pi, &ei_eiss_application_type);
338 offset += 2;
339 proto_tree_add_item(eiss_tree, hf_eiss_organisation_id, tvb, offset, 4, ENC_BIG_ENDIAN);
340 offset += 4;
341 proto_tree_add_item(eiss_tree, hf_eiss_application_id, tvb, offset, 2, ENC_BIG_ENDIAN);
342 offset += 2;
344 platform_id_length = tvb_get_guint8(tvb, offset);
345 pi = proto_tree_add_item(eiss_tree, hf_eiss_platform_id_length, tvb, offset, 1, ENC_BIG_ENDIAN);
346 if (0 != platform_id_length % 15) {
347 expert_add_info(pinfo, pi, &ei_eiss_platform_id_length);
349 offset++;
351 while (0 < platform_id_length) {
352 guint tmp;
354 tmp = dissect_etv_bif_platform_ids(tvb, eiss_tree, offset);
355 offset += tmp;
356 if (platform_id_length < tmp) {
357 platform_id_length = 0;
358 /* error */
359 } else {
360 platform_id_length -= tmp;
364 if (0 < packet_length) {
365 proto_tree *eiss_desc_tree;
366 pi = proto_tree_add_text(eiss_tree, tvb, offset,
367 packet_length-offset,
368 "%s", "EISS Descriptor(s)");
369 eiss_desc_tree = proto_item_add_subtree(pi, ett_eiss_desc);
370 while (offset < packet_length) {
371 offset += dissect_eiss_descriptors(tvb, pinfo,
372 eiss_desc_tree, offset);
376 packet_mpeg_sect_crc(tvb, pinfo, eiss_tree, 0, sect_len - 1);
380 void
381 proto_register_eiss(void)
384 static hf_register_info hf[] = {
385 { &hf_eiss_reserved2, {
386 "Reserved", "eiss.reserved",
387 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
388 } },
390 { &hf_eiss_section_number, {
391 "Section Number", "eiss.sect_num",
392 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
393 } },
395 { &hf_eiss_last_section_number, {
396 "Last Section Number", "eiss.last_sect_num",
397 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
398 } },
400 { &hf_eiss_protocol_version_major, {
401 "Major Version Number", "eiss.version_major",
402 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
403 } },
405 { &hf_eiss_protocol_version_minor, {
406 "Minor Version Number", "eiss.version_minor",
407 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
408 } },
410 { &hf_eiss_application_type, {
411 "Application Type", "eiss.app_type",
412 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
413 } },
415 { &hf_eiss_organisation_id, {
416 "Organisation Id", "eiss.org_id",
417 FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
418 } },
420 { &hf_eiss_application_id, {
421 "Application Id", "eiss.app_id",
422 FT_UINT16, BASE_HEX|BASE_RANGE_STRING, RVALS(application_id_values), 0, NULL, HFILL
423 } },
425 { &hf_eiss_platform_id_length, {
426 "Platform Id Length", "eiss.platform_id_length",
427 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
428 } },
430 { &hf_pdtHWManufacturer, {
431 "Platform Hardware Manufacturer", "eiss.plat_hw_man",
432 FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL
433 } },
435 { &hf_pdtHWModel, {
436 "Platform Hardware Model", "eiss.plat_hw_model",
437 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
438 } },
440 { &hf_pdtHWVersionMajor, {
441 "Platform Hardware Major Version", "eiss.plat_hw_major",
442 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
443 } },
445 { &hf_pdtHWVersionMinor, {
446 "Platform Hardware Minor Version", "eiss.plat_hw_minor",
447 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
448 } },
450 { &hf_pdtSWManufacturer, {
451 "Platform Software Manufacturer", "eiss.plat_sw_man",
452 FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL
453 } },
455 { &hf_pdtSWModel, {
456 "Platform Software Model", "eiss.plat_sw_model",
457 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
458 } },
460 { &hf_pdtSWVersionMajor, {
461 "Platform Software Major Version", "eiss.plat_sw_major",
462 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
463 } },
465 { &hf_pdtSWVersionMinor, {
466 "Platform Software Minor Version", "eiss.plat_sw_minor",
467 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
468 } },
470 { &hf_pdtProfile, {
471 "Platform Profile", "eiss.plat_profile",
472 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
473 } },
475 { &hf_eiss_descriptor_tag, {
476 "EISS Descriptor Tag", "eiss.desc.tag",
477 FT_UINT8, BASE_HEX, VALS(eiss_descriptor_values), 0, NULL, HFILL
478 } },
480 { &hf_eiss_descriptor_length, {
481 "Descriptor Length", "eiss.desc.length",
482 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
483 } },
485 { &hf_eiss_aid_app_control_code, {
486 "Application Control Code", "eiss.aid.app_control_code",
487 FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(aid_control_code_values), 0, NULL, HFILL
488 } },
490 { &hf_eiss_aid_app_version_major, {
491 "Application Version Major", "eiss.aid.app_version_major",
492 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
493 } },
495 { &hf_eiss_aid_app_version_minor, {
496 "Application Version Minor", "eiss.aid.app_version_minor",
497 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
498 } },
500 { &hf_eiss_aid_max_proto_version_major, {
501 "Max Protocol Version Major", "eiss.aid.max_proto_version_major",
502 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
503 } },
505 { &hf_eiss_aid_max_proto_version_minor, {
506 "Max Protocol Version Minor", "eiss.aid.max_proto_version_minor",
507 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
508 } },
510 { &hf_eiss_aid_test_flag, {
511 "Application Test Flag", "eiss.aid.test_flag",
512 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
513 } },
515 { &hf_eiss_aid_reserved, {
516 "Reserved", "eiss.aid.reserved",
517 FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL
518 } },
520 { &hf_eiss_aid_priority, {
521 "Application Priority", "eiss.aid.priority",
522 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
523 } },
525 { &hf_eiss_irl_type, {
526 "Initial Resource Locator Type", "eiss.aid.irl.type",
527 FT_UINT16, BASE_HEX, NULL, 0xfc00, NULL, HFILL
528 } },
530 { &hf_eiss_irl_length, {
531 "Initial Resource Locator Length", "eiss.aid.irl.length",
532 FT_UINT16, BASE_DEC, NULL, 0x03ff, NULL, HFILL
533 } },
535 { &hf_eiss_irl_string, {
536 "Initial Resource Locator String", "eiss.aid.irl.string",
537 FT_UINT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
538 } },
540 { &hf_eiss_mtd_time_value, {
541 "Time Value (ms)", "eiss.mtd.time_value",
542 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL
543 } },
545 { &hf_eiss_sed_reserved, {
546 "Reserved", "eiss.sed.reserved",
547 FT_UINT16, BASE_DEC, NULL, 0xf000, NULL, HFILL
548 } },
550 { &hf_eiss_sed_descriptor_length, {
551 "Descriptor Length", "eiss.desc.length",
552 FT_UINT16, BASE_DEC, NULL, 0x0fff, NULL, HFILL
553 } },
555 { &hf_eiss_sed_time_value, {
556 "Time Value (ms)", "eiss.sed.time_value",
557 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL
561 static gint *ett[] = {
562 &ett_eiss,
563 &ett_eiss_platform_id,
564 &ett_eiss_desc,
567 static ei_register_info ei[] = {
568 { &ei_eiss_unknown_descriptor, { "eiss.unknown_descriptor", PI_MALFORMED, PI_ERROR, "Unknown Descriptor", EXPFILL }},
569 { &ei_eiss_invalid_section_syntax_indicator, { "eiss.invalid_section_syntax_indicator", PI_MALFORMED, PI_ERROR, "Invalid section_syntax_indicator (should be 0)", EXPFILL }},
570 { &ei_eiss_invalid_reserved_bits, { "eiss.invalid_reserved_bits", PI_MALFORMED, PI_ERROR, "Invalid reserved bits", EXPFILL }},
571 { &ei_eiss_invalid_section_length, { "eiss.invalid_section_length", PI_MALFORMED, PI_ERROR, "Invalid section_length (must not exceed 1021)", EXPFILL }},
572 { &ei_eiss_section_number, { "eiss.sect_num.invalid", PI_MALFORMED, PI_ERROR, "Invalid section_number (must be <= last_section_number)", EXPFILL }},
573 { &ei_eiss_application_type, { "eiss.app_type.invalid", PI_MALFORMED, PI_ERROR, "Invalid application_type (must be 0x0008)", EXPFILL }},
574 { &ei_eiss_platform_id_length, { "eiss.platform_id_length.invalid", PI_MALFORMED, PI_ERROR, "Invalid platform_id_length (must be a multiple of sizeof(etv_bif_platform_ids) == 15)", EXPFILL }},
577 expert_module_t* expert_eiss;
579 proto_eiss = proto_register_protocol("ETV-AM EISS Section", "ETV-AM EISS", "eiss");
581 proto_register_field_array(proto_eiss, hf, array_length(hf));
582 proto_register_subtree_array(ett, array_length(ett));
583 expert_eiss = expert_register_protocol(proto_eiss);
584 expert_register_field_array(expert_eiss, ei, array_length(ei));
588 void
589 proto_reg_handoff_eiss(void)
591 dissector_handle_t eiss_handle;
593 eiss_handle = create_dissector_handle(dissect_eiss, proto_eiss);
594 dissector_add_uint("mpeg_sect.tid", EISS_SECTION_TID, eiss_handle);
595 data_handle = find_dissector("data");