Coverage Report

Created: 2026-03-30 07:00

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/wireshark/epan/dissectors/packet-eiss.c
Line
Count
Source
1
/* packet-eiss.c
2
 *
3
 * Routines for ETV-AM EISS (OC-SP-ETV-AM1.0-I05)
4
 * Copyright 2012, Weston Schmidt <weston_schmidt@alumni.purdue.edu>
5
 *
6
 * Wireshark - Network traffic analyzer
7
 * By Gerald Combs <gerald@wireshark.org>
8
 * Copyright 1998 Gerald Combs
9
 *
10
 * SPDX-License-Identifier: GPL-2.0-or-later
11
 */
12
13
#include "config.h"
14
15
#include <epan/packet.h>
16
#include <epan/expert.h>
17
#include "packet-mpeg-sect.h"
18
19
void proto_register_eiss(void);
20
void proto_reg_handoff_eiss(void);
21
22
static dissector_handle_t eiss_handle;
23
24
static int proto_eiss;
25
26
static int hf_eiss_reserved2;
27
static int hf_eiss_section_number;
28
static int hf_eiss_last_section_number;
29
static int hf_eiss_protocol_version_major;
30
static int hf_eiss_protocol_version_minor;
31
static int hf_eiss_application_type;
32
33
/* application_identifier() */
34
static int hf_eiss_organisation_id;
35
static int hf_eiss_application_id;
36
37
static int hf_eiss_platform_id_length;
38
39
/* platform id information */
40
static int hf_pdtHWManufacturer;
41
static int hf_pdtHWModel;
42
static int hf_pdtHWVersionMajor;
43
static int hf_pdtHWVersionMinor;
44
static int hf_pdtSWManufacturer;
45
static int hf_pdtSWModel;
46
static int hf_pdtSWVersionMajor;
47
static int hf_pdtSWVersionMinor;
48
static int hf_pdtProfile;
49
50
/* common to all eiss descriptors */
51
static int hf_eiss_descriptor_tag;
52
static int hf_eiss_descriptor_length;
53
54
/* application info descriptor */
55
static int hf_eiss_aid_app_control_code;
56
static int hf_eiss_aid_app_version_major;
57
static int hf_eiss_aid_app_version_minor;
58
static int hf_eiss_aid_max_proto_version_major;
59
static int hf_eiss_aid_max_proto_version_minor;
60
static int hf_eiss_aid_test_flag;
61
static int hf_eiss_aid_reserved;
62
static int hf_eiss_aid_priority;
63
static int hf_eiss_irl_type;
64
static int hf_eiss_irl_length;
65
static int hf_eiss_irl_string;
66
67
/* media time descriptor */
68
static int hf_eiss_mtd_time_value;
69
70
/* stream event descriptor */
71
static int hf_eiss_sed_time_value;
72
static int hf_eiss_sed_reserved;
73
static int hf_eiss_sed_descriptor_length;
74
75
static int ett_eiss;
76
static int ett_eiss_platform_id;
77
static int ett_eiss_desc;
78
79
static expert_field ei_eiss_platform_id_length;
80
static expert_field ei_eiss_invalid_section_length;
81
static expert_field ei_eiss_invalid_section_syntax_indicator;
82
static expert_field ei_eiss_unknown_descriptor;
83
static expert_field ei_eiss_section_number;
84
static expert_field ei_eiss_application_type;
85
static expert_field ei_eiss_invalid_reserved_bits;
86
87
#define MPEG_SECT_SYNTAX_INDICATOR_MASK 0x8000
88
#define MPEG_SECT_RESERVED_MASK   0x7000
89
#define MPEG_SECT_LENGTH_MASK   0x0FFF
90
91
static const value_string eiss_descriptor_values[] = {
92
  { 0xe0, "ETV Application Information Descriptor" },
93
  { 0xe1, "ETV Media Time Descriptor" },
94
  { 0xe2, "ETV Stream Event Descriptor" },
95
  {    0, NULL }
96
};
97
98
/* ETSI TS 101 812 - DVB-MHP Specification section 10.5 */
99
static const range_string application_id_values[] = {
100
  { 0x0000, 0x3fff, "Unsigned Application" },
101
  { 0x4000, 0x7fff, "Signed Application" },
102
  { 0x8000, 0xfffd, "Reserved by DVB" },
103
  { 0xfffe, 0xfffe, "Wildcard for signed applications of an organisation" },
104
  { 0xffff, 0xffff, "Wildcard for all applications of an organisation" },
105
  {      0,      0, NULL }
106
};
107
108
static const range_string aid_control_code_values[] = {
109
  { 0x00, 0x00, "Reserved" },
110
  { 0x01, 0x01, "AUTOSTART" },
111
  { 0x02, 0x02, "PRESENT" },
112
  { 0x03, 0x03, "DESTROY" },
113
  { 0x04, 0xff, "Reserved" },
114
  {    0,    0, NULL }
115
};
116
117
static unsigned
118
dissect_etv_bif_platform_ids(tvbuff_t *tvb, proto_tree *tree, unsigned offset)
119
3
{
120
3
  proto_tree *platform_tree;
121
122
3
  platform_tree = proto_tree_add_subtree(tree, tvb, offset, 15, ett_eiss_platform_id, NULL, "Platform Id");
123
3
  proto_tree_add_item(platform_tree, hf_pdtHWManufacturer, tvb, offset, 3, ENC_BIG_ENDIAN);
124
3
  offset += 3;
125
3
  proto_tree_add_item(platform_tree, hf_pdtHWModel,  tvb, offset, 2, ENC_BIG_ENDIAN);
126
3
  offset += 2;
127
3
  proto_tree_add_item(platform_tree, hf_pdtHWVersionMajor, tvb, offset, 1, ENC_BIG_ENDIAN);
128
3
  offset++;
129
3
  proto_tree_add_item(platform_tree, hf_pdtHWVersionMinor, tvb, offset, 1, ENC_BIG_ENDIAN);
130
3
  offset++;
131
3
  proto_tree_add_item(platform_tree, hf_pdtSWManufacturer, tvb, offset, 3, ENC_BIG_ENDIAN);
132
3
  offset += 3;
133
3
  proto_tree_add_item(platform_tree, hf_pdtSWModel,  tvb, offset, 2, ENC_BIG_ENDIAN);
134
3
  offset += 2;
135
3
  proto_tree_add_item(platform_tree, hf_pdtSWVersionMajor, tvb, offset, 1, ENC_BIG_ENDIAN);
136
3
  offset++;
137
3
  proto_tree_add_item(platform_tree, hf_pdtSWVersionMinor, tvb, offset, 1, ENC_BIG_ENDIAN);
138
3
  offset++;
139
3
  proto_tree_add_item(platform_tree, hf_pdtProfile,  tvb, offset, 1, ENC_BIG_ENDIAN);
140
3
  offset++;
141
142
3
  return 15;
143
3
}
144
145
static unsigned
146
dissect_eiss_descriptors(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
147
1
{
148
1
  proto_tree *sub_tree;
149
1
  unsigned    tag;
150
151
1
  tag = tvb_get_uint8(tvb, offset);
152
153
1
  if (0xe0 == tag) {
154
0
    unsigned total_length;
155
156
0
    total_length = tvb_get_uint8(tvb, offset+1);
157
0
    sub_tree = proto_tree_add_subtree(tree, tvb, offset, (2+total_length),
158
0
          ett_eiss_desc, NULL, "ETV Application Information Descriptor");
159
0
    proto_tree_add_item(sub_tree, hf_eiss_descriptor_tag,
160
0
          tvb, offset, 1, ENC_BIG_ENDIAN);
161
0
    offset++;
162
0
    proto_tree_add_item(sub_tree, hf_eiss_descriptor_length, tvb,
163
0
          offset, 1, ENC_BIG_ENDIAN);
164
0
    offset++;
165
0
    proto_tree_add_item(sub_tree, hf_eiss_aid_app_control_code, tvb,
166
0
          offset, 1, ENC_BIG_ENDIAN);
167
0
    offset++;
168
0
    proto_tree_add_item(sub_tree, hf_eiss_aid_app_version_major, tvb,
169
0
          offset, 1, ENC_BIG_ENDIAN);
170
0
    offset++;
171
0
    proto_tree_add_item(sub_tree, hf_eiss_aid_app_version_minor, tvb,
172
0
          offset, 1, ENC_BIG_ENDIAN);
173
0
    offset++;
174
0
    proto_tree_add_item(sub_tree, hf_eiss_aid_max_proto_version_major,
175
0
          tvb, offset, 1, ENC_BIG_ENDIAN);
176
0
    offset++;
177
0
    proto_tree_add_item(sub_tree, hf_eiss_aid_max_proto_version_minor,
178
0
          tvb, offset, 1, ENC_BIG_ENDIAN);
179
0
    offset++;
180
0
    proto_tree_add_item(sub_tree, hf_eiss_aid_test_flag, tvb, offset,
181
0
          1, ENC_BIG_ENDIAN);
182
0
    offset++;
183
0
    proto_tree_add_item(sub_tree, hf_eiss_aid_reserved, tvb, offset,
184
0
          3, ENC_BIG_ENDIAN);
185
0
    offset += 3;
186
0
    proto_tree_add_item(sub_tree, hf_eiss_aid_priority, tvb, offset,
187
0
          1, ENC_BIG_ENDIAN);
188
0
    offset++;
189
0
    proto_tree_add_item(sub_tree, hf_eiss_irl_type, tvb, offset, 2,
190
0
          ENC_BIG_ENDIAN);
191
0
    proto_tree_add_item(sub_tree, hf_eiss_irl_length, tvb, offset,
192
0
          2, ENC_BIG_ENDIAN);
193
0
    offset += 2;
194
0
    proto_tree_add_item(sub_tree, hf_eiss_irl_string, tvb, offset, 2,
195
0
          ENC_ASCII|ENC_BIG_ENDIAN);
196
0
    return (2+total_length);
197
1
  } else if (0xe1 == tag) {
198
0
    sub_tree = proto_tree_add_subtree(tree, tvb, offset, 6,
199
0
          ett_eiss_desc, NULL, "ETV Media Time Descriptor");
200
0
    proto_tree_add_item(sub_tree, hf_eiss_descriptor_tag,
201
0
          tvb, offset, 1, ENC_BIG_ENDIAN);
202
0
    offset++;
203
0
    proto_tree_add_item(sub_tree, hf_eiss_descriptor_length, tvb,
204
0
          offset, 1, ENC_BIG_ENDIAN);
205
0
    offset++;
206
0
    proto_tree_add_item(sub_tree, hf_eiss_mtd_time_value, tvb,
207
0
          offset, 4, ENC_BIG_ENDIAN);
208
0
    return 6;
209
1
  } else if (0xe2 == tag) {
210
0
    unsigned  tmp;
211
0
    tvbuff_t *payload;
212
213
0
    tmp = tvb_get_ntohs(tvb, offset+1);
214
0
    sub_tree = proto_tree_add_subtree(tree, tvb, offset, (3+tmp),
215
0
          ett_eiss_desc, NULL, "ETV Stream Event Descriptor");
216
0
    proto_tree_add_item(sub_tree, hf_eiss_descriptor_tag,
217
0
          tvb, offset, 1, ENC_BIG_ENDIAN);
218
0
    offset++;
219
0
    proto_tree_add_item(sub_tree, hf_eiss_sed_reserved, tvb,
220
0
          offset, 2, ENC_BIG_ENDIAN);
221
0
    proto_tree_add_item(sub_tree, hf_eiss_sed_descriptor_length, tvb,
222
0
          offset, 2, ENC_BIG_ENDIAN);
223
0
    offset += 2;
224
0
    proto_tree_add_item(sub_tree, hf_eiss_sed_time_value, tvb,
225
0
          offset, 4, ENC_BIG_ENDIAN);
226
0
    offset += 4;
227
228
0
    payload = tvb_new_subset_length(tvb, offset, tmp-4);
229
0
    call_data_dissector(payload, pinfo, sub_tree);
230
231
0
    return (3+tmp);
232
1
  } else {
233
1
    proto_tree_add_expert_remaining(tree, pinfo, &ei_eiss_unknown_descriptor, tvb, offset);
234
235
    /* skip the rest of the section... for now */
236
1
    return 1000;
237
1
  }
238
1
}
239
240
static int
241
dissect_eiss(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
242
1
{
243
1
  unsigned    offset = 0, packet_length, sect_len;
244
1
  proto_item *ti;
245
1
  proto_item *pi;
246
1
  proto_tree *eiss_tree;
247
1
  proto_item *items[PACKET_MPEG_SECT_PI__SIZE];
248
1
  bool        ssi;
249
1
  unsigned    reserved;
250
1
  uint8_t     reserved2;
251
1
  uint8_t     sect_num, last_sect_num;
252
253
1
  uint16_t eiss_application_type;
254
1
  uint8_t platform_id_length;
255
256
1
  col_set_str(pinfo->cinfo, COL_PROTOCOL, "EISS");
257
258
1
  ti = proto_tree_add_item(tree, proto_eiss, tvb, offset, -1, ENC_NA);
259
1
  eiss_tree = proto_item_add_subtree(ti, ett_eiss);
260
261
1
  offset += packet_mpeg_sect_header_extra(tvb, offset, eiss_tree, &sect_len,
262
1
            &reserved, &ssi, items);
263
264
1
  packet_length = sect_len + 3 - 4; /* + for the header, - for the crc */
265
266
1
  if (false != ssi) {
267
0
    proto_item *msg_error;
268
0
    msg_error = items[PACKET_MPEG_SECT_PI__SSI];
269
270
0
    proto_item_set_generated(msg_error);
271
0
    expert_add_info(pinfo, msg_error, &ei_eiss_invalid_section_syntax_indicator);
272
0
  }
273
274
1
  if (0 != reserved) {
275
1
    proto_item *msg_error;
276
1
    msg_error = items[PACKET_MPEG_SECT_PI__RESERVED];
277
278
1
    proto_item_set_generated(msg_error);
279
1
    expert_add_info_format(pinfo, msg_error, &ei_eiss_invalid_reserved_bits, "Invalid reserved1 bits (should all be 0)");
280
1
  }
281
282
1
  if (1021 < sect_len) {
283
0
    proto_item *msg_error;
284
0
    msg_error = items[PACKET_MPEG_SECT_PI__LENGTH];
285
286
0
    proto_item_set_generated(msg_error);
287
0
    expert_add_info(pinfo, msg_error, &ei_eiss_invalid_section_length);
288
0
  }
289
290
1
  pi = proto_tree_add_item_ret_uint8(eiss_tree, hf_eiss_reserved2, tvb, offset, 1, ENC_BIG_ENDIAN, &reserved2);
291
1
  if (0 != reserved2) {
292
0
    expert_add_info_format(pinfo, pi, &ei_eiss_invalid_reserved_bits, "Invalid reserved2 bits (should all be 0)");
293
0
  }
294
1
  offset++;
295
296
1
  sect_num = tvb_get_uint8(tvb, offset);
297
1
  last_sect_num = tvb_get_uint8(tvb, offset + 1);
298
1
  pi = proto_tree_add_item(eiss_tree, hf_eiss_section_number, tvb, offset, 1, ENC_BIG_ENDIAN);
299
1
  if (last_sect_num < sect_num) {
300
0
    expert_add_info(pinfo, pi, &ei_eiss_section_number);
301
0
  }
302
1
  offset++;
303
1
  proto_tree_add_item(eiss_tree, hf_eiss_last_section_number,     tvb, offset, 1, ENC_BIG_ENDIAN);
304
1
  offset++;
305
1
  proto_tree_add_item(eiss_tree, hf_eiss_protocol_version_major,  tvb, offset, 1, ENC_BIG_ENDIAN);
306
1
  offset++;
307
1
  proto_tree_add_item(eiss_tree, hf_eiss_protocol_version_minor,  tvb, offset, 1, ENC_BIG_ENDIAN);
308
1
  offset++;
309
310
1
  pi = proto_tree_add_item_ret_uint16(eiss_tree, hf_eiss_application_type,   tvb, offset, 2, ENC_BIG_ENDIAN, &eiss_application_type);
311
1
  if (8 != eiss_application_type) {
312
1
    expert_add_info(pinfo, pi, &ei_eiss_application_type);
313
1
  }
314
1
  offset += 2;
315
1
  proto_tree_add_item(eiss_tree, hf_eiss_organisation_id,         tvb, offset, 4, ENC_BIG_ENDIAN);
316
1
  offset += 4;
317
1
  proto_tree_add_item(eiss_tree, hf_eiss_application_id,          tvb, offset, 2, ENC_BIG_ENDIAN);
318
1
  offset += 2;
319
320
1
  pi = proto_tree_add_item_ret_uint8(eiss_tree, hf_eiss_platform_id_length, tvb, offset, 1, ENC_BIG_ENDIAN, &platform_id_length);
321
1
  if (0 != platform_id_length % 15) {
322
1
    expert_add_info(pinfo, pi, &ei_eiss_platform_id_length);
323
1
  }
324
1
  offset++;
325
326
4
  while (0 < platform_id_length) {
327
3
    unsigned tmp;
328
329
3
    tmp = dissect_etv_bif_platform_ids(tvb, eiss_tree, offset);
330
3
    offset += tmp;
331
3
    if (platform_id_length < tmp) {
332
1
      platform_id_length = 0;
333
      /* error */
334
2
    } else {
335
2
      platform_id_length -= tmp;
336
2
    }
337
3
  }
338
339
1
  if (0 < packet_length) {
340
1
    proto_tree *eiss_desc_tree;
341
1
    eiss_desc_tree = proto_tree_add_subtree(eiss_tree, tvb, offset,
342
1
          packet_length-offset, ett_eiss_desc, NULL, "EISS Descriptor(s)");
343
2
    while (offset < packet_length) {
344
1
      offset += dissect_eiss_descriptors(tvb, pinfo,
345
1
              eiss_desc_tree, offset);
346
1
    }
347
1
  }
348
349
1
  packet_mpeg_sect_crc(tvb, pinfo, eiss_tree, 0, sect_len - 1);
350
1
  return tvb_captured_length(tvb);
351
1
}
352
353
354
void
355
proto_register_eiss(void)
356
14
{
357
358
14
  static hf_register_info hf[] = {
359
14
    { &hf_eiss_reserved2, {
360
14
      "Reserved", "eiss.reserved",
361
14
      FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
362
14
    } },
363
364
14
    { &hf_eiss_section_number, {
365
14
      "Section Number", "eiss.sect_num",
366
14
      FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
367
14
    } },
368
369
14
    { &hf_eiss_last_section_number, {
370
14
      "Last Section Number", "eiss.last_sect_num",
371
14
      FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
372
14
    } },
373
374
14
    { &hf_eiss_protocol_version_major, {
375
14
      "Major Version Number", "eiss.version_major",
376
14
      FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
377
14
    } },
378
379
14
    { &hf_eiss_protocol_version_minor, {
380
14
      "Minor Version Number", "eiss.version_minor",
381
14
      FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
382
14
    } },
383
384
14
    { &hf_eiss_application_type, {
385
14
      "Application Type", "eiss.app_type",
386
14
      FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
387
14
    } },
388
389
14
    { &hf_eiss_organisation_id, {
390
14
      "Organisation Id", "eiss.org_id",
391
14
      FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL
392
14
    } },
393
394
14
    { &hf_eiss_application_id, {
395
14
      "Application Id", "eiss.app_id",
396
14
      FT_UINT16, BASE_HEX|BASE_RANGE_STRING, RVALS(application_id_values), 0, NULL, HFILL
397
14
    } },
398
399
14
    { &hf_eiss_platform_id_length, {
400
14
      "Platform Id Length", "eiss.platform_id_length",
401
14
      FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
402
14
    } },
403
404
14
    { &hf_pdtHWManufacturer, {
405
14
      "Platform Hardware Manufacturer", "eiss.plat_hw_man",
406
14
      FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL
407
14
    } },
408
409
14
    { &hf_pdtHWModel, {
410
14
      "Platform Hardware Model", "eiss.plat_hw_model",
411
14
      FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
412
14
    } },
413
414
14
    { &hf_pdtHWVersionMajor, {
415
14
      "Platform Hardware Major Version", "eiss.plat_hw_major",
416
14
      FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
417
14
    } },
418
419
14
    { &hf_pdtHWVersionMinor, {
420
14
      "Platform Hardware Minor Version", "eiss.plat_hw_minor",
421
14
      FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
422
14
    } },
423
424
14
    { &hf_pdtSWManufacturer, {
425
14
      "Platform Software Manufacturer", "eiss.plat_sw_man",
426
14
      FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL
427
14
    } },
428
429
14
    { &hf_pdtSWModel, {
430
14
      "Platform Software Model", "eiss.plat_sw_model",
431
14
      FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
432
14
    } },
433
434
14
    { &hf_pdtSWVersionMajor, {
435
14
      "Platform Software Major Version", "eiss.plat_sw_major",
436
14
      FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
437
14
    } },
438
439
14
    { &hf_pdtSWVersionMinor, {
440
14
      "Platform Software Minor Version", "eiss.plat_sw_minor",
441
14
      FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
442
14
    } },
443
444
14
    { &hf_pdtProfile, {
445
14
      "Platform Profile", "eiss.plat_profile",
446
14
      FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
447
14
    } },
448
449
14
    { &hf_eiss_descriptor_tag, {
450
14
      "EISS Descriptor Tag", "eiss.desc.tag",
451
14
      FT_UINT8, BASE_HEX, VALS(eiss_descriptor_values), 0, NULL, HFILL
452
14
    } },
453
454
14
    { &hf_eiss_descriptor_length, {
455
14
      "Descriptor Length", "eiss.desc.length",
456
14
      FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
457
14
    } },
458
459
14
    { &hf_eiss_aid_app_control_code, {
460
14
      "Application Control Code", "eiss.aid.app_control_code",
461
14
      FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(aid_control_code_values), 0, NULL, HFILL
462
14
    } },
463
464
14
    { &hf_eiss_aid_app_version_major, {
465
14
      "Application Version Major", "eiss.aid.app_version_major",
466
14
      FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
467
14
    } },
468
469
14
    { &hf_eiss_aid_app_version_minor, {
470
14
      "Application Version Minor", "eiss.aid.app_version_minor",
471
14
      FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
472
14
    } },
473
474
14
    { &hf_eiss_aid_max_proto_version_major, {
475
14
      "Max Protocol Version Major", "eiss.aid.max_proto_version_major",
476
14
      FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
477
14
    } },
478
479
14
    { &hf_eiss_aid_max_proto_version_minor, {
480
14
      "Max Protocol Version Minor", "eiss.aid.max_proto_version_minor",
481
14
      FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
482
14
    } },
483
484
14
    { &hf_eiss_aid_test_flag, {
485
14
      "Application Test Flag", "eiss.aid.test_flag",
486
14
      FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
487
14
    } },
488
489
14
    { &hf_eiss_aid_reserved, {
490
14
      "Reserved", "eiss.aid.reserved",
491
14
      FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL
492
14
    } },
493
494
14
    { &hf_eiss_aid_priority, {
495
14
      "Application Priority", "eiss.aid.priority",
496
14
      FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL
497
14
    } },
498
499
14
    { &hf_eiss_irl_type, {
500
14
      "Initial Resource Locator Type", "eiss.aid.irl.type",
501
14
      FT_UINT16, BASE_HEX, NULL, 0xfc00, NULL, HFILL
502
14
    } },
503
504
14
    { &hf_eiss_irl_length, {
505
14
      "Initial Resource Locator Length", "eiss.aid.irl.length",
506
14
      FT_UINT16, BASE_DEC, NULL, 0x03ff, NULL, HFILL
507
14
    } },
508
509
14
    { &hf_eiss_irl_string, {
510
14
      "Initial Resource Locator String", "eiss.aid.irl.string",
511
14
      FT_UINT_STRING, BASE_NONE, NULL, 0, NULL, HFILL
512
14
    } },
513
514
14
    { &hf_eiss_mtd_time_value, {
515
14
      "Time Value (ms)", "eiss.mtd.time_value",
516
14
      FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL
517
14
    } },
518
519
14
    { &hf_eiss_sed_reserved, {
520
14
      "Reserved", "eiss.sed.reserved",
521
14
      FT_UINT16, BASE_DEC, NULL, 0xf000, NULL, HFILL
522
14
    } },
523
524
14
    { &hf_eiss_sed_descriptor_length, {
525
14
      "Descriptor Length", "eiss.desc.length",
526
14
      FT_UINT16, BASE_DEC, NULL, 0x0fff, NULL, HFILL
527
14
    } },
528
529
14
    { &hf_eiss_sed_time_value, {
530
14
      "Time Value (ms)", "eiss.sed.time_value",
531
14
      FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL
532
14
    } }
533
14
  };
534
535
14
  static int *ett[] = {
536
14
    &ett_eiss,
537
14
    &ett_eiss_platform_id,
538
14
    &ett_eiss_desc,
539
14
  };
540
541
14
  static ei_register_info ei[] = {
542
14
    { &ei_eiss_unknown_descriptor, { "eiss.unknown_descriptor", PI_MALFORMED, PI_ERROR, "Unknown Descriptor", EXPFILL }},
543
14
    { &ei_eiss_invalid_section_syntax_indicator, { "eiss.invalid_section_syntax_indicator", PI_MALFORMED, PI_ERROR, "Invalid section_syntax_indicator (should be 0)", EXPFILL }},
544
14
    { &ei_eiss_invalid_reserved_bits, { "eiss.invalid_reserved_bits", PI_MALFORMED, PI_ERROR, "Invalid reserved bits", EXPFILL }},
545
14
    { &ei_eiss_invalid_section_length, { "eiss.invalid_section_length", PI_MALFORMED, PI_ERROR, "Invalid section_length (must not exceed 1021)", EXPFILL }},
546
14
    { &ei_eiss_section_number, { "eiss.sect_num.invalid", PI_MALFORMED, PI_ERROR, "Invalid section_number (must be <= last_section_number)", EXPFILL }},
547
14
    { &ei_eiss_application_type, { "eiss.app_type.invalid", PI_MALFORMED, PI_ERROR, "Invalid application_type (must be 0x0008)", EXPFILL }},
548
14
    { &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 }},
549
14
  };
550
551
14
  expert_module_t* expert_eiss;
552
553
14
  proto_eiss = proto_register_protocol("ETV-AM EISS Section", "ETV-AM EISS", "eiss");
554
555
14
  proto_register_field_array(proto_eiss, hf, array_length(hf));
556
14
  proto_register_subtree_array(ett, array_length(ett));
557
14
  expert_eiss = expert_register_protocol(proto_eiss);
558
14
  expert_register_field_array(expert_eiss, ei, array_length(ei));
559
560
14
  eiss_handle = register_dissector("eiss", dissect_eiss, proto_eiss);
561
14
}
562
563
564
void
565
proto_reg_handoff_eiss(void)
566
14
{
567
14
  dissector_add_uint("mpeg_sect.tid", EISS_SECTION_TID, eiss_handle);
568
14
}
569
570
/*
571
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
572
 *
573
 * Local variables:
574
 * c-basic-offset: 8
575
 * tab-width: 8
576
 * indent-tabs-mode: t
577
 * End:
578
 *
579
 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
580
 * :indentSize=8:tabSize=8:noTabs=false:
581
 */