Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-dvb-ait.c
blobd838b1f01acf6ef1f95f7969be0ebd603e5f3d5d
1 /* packet-dvb-ait.c
2 * Routines for DVB Application Information Table (AIT) dissection
3 * Copyright 2012-2013, Martin Kaiser <martin@kaiser.cx>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
12 /* This dissector processes a DVB Application Information Table (AIT) as
13 * defined in ETSI TS 102 809. */
15 #include "config.h"
17 #include <epan/packet.h>
19 #include "packet-mpeg-sect.h"
20 #include "packet-mpeg-descriptor.h"
22 void proto_register_dvb_ait(void);
23 void proto_reg_handoff_dvb_ait(void);
25 static dissector_handle_t dvb_ait_handle;
27 static int proto_dvb_ait;
29 static int ett_dvb_ait;
30 static int ett_dvb_ait_descr;
31 static int ett_dvb_ait_app;
33 static int hf_dvb_ait_test_app_flag;
34 static int hf_dvb_ait_app_type;
35 static int hf_dvb_ait_version_number;
36 static int hf_dvb_ait_current_next_indicator;
37 static int hf_dvb_ait_section_number;
38 static int hf_dvb_ait_last_section_number;
39 static int hf_dvb_ait_descr_loop_len;
40 static int hf_dvb_ait_descr_tag;
41 static int hf_dvb_ait_descr_len;
42 static int hf_dvb_ait_descr_data;
43 static int hf_dvb_ait_descr_app_prof_len;
44 static int hf_dvb_ait_descr_app_prof;
45 static int hf_dvb_ait_descr_app_ver;
46 static int hf_dvb_ait_descr_app_svc_bound;
47 static int hf_dvb_ait_descr_app_vis;
48 static int hf_dvb_ait_descr_app_prio;
49 static int hf_dvb_ait_descr_app_trpt_proto_label;
50 static int hf_dvb_ait_descr_app_name_lang;
51 static int hf_dvb_ait_descr_app_name_name;
52 static int hf_dvb_ait_descr_trpt_proto_id;
53 static int hf_dvb_ait_descr_trpt_proto_label;
54 static int hf_dvb_ait_descr_trpt_sel_remote;
55 static int hf_dvb_ait_descr_trpt_sel_onid;
56 static int hf_dvb_ait_descr_trpt_sel_tsid;
57 static int hf_dvb_ait_descr_trpt_sel_svcid;
58 static int hf_dvb_ait_descr_trpt_sel_comp;
59 static int hf_dvb_ait_descr_trpt_sel_url_base;
60 static int hf_dvb_ait_descr_trpt_sel_url_ext_cnt;
61 static int hf_dvb_ait_descr_trpt_sel_url_ext;
62 static int hf_dvb_ait_descr_trpt_sel_bytes;
63 static int hf_dvb_ait_descr_sal_init_path;
64 static int hf_dvb_ait_app_loop_len;
65 static int hf_dvb_ait_org_id;
66 static int hf_dvb_ait_app_id;
67 static int hf_dvb_ait_app_ctrl_code;
69 static const value_string app_ctrl_code[] = {
70 { 0x01, "Autostart" },
71 { 0x02, "Present" },
72 { 0x03, "Destroy" },
73 { 0x04, "Kill" },
74 { 0x05, "Prefetch" },
75 { 0x06, "Remote" },
76 { 0x07, "Disabled" },
77 { 0x08, "Playback autostart" },
78 { 0, NULL }
81 /* tags of the descriptors defined in ETSI TS 102 809
82 some of these tags are conflicting with MPEG2 or DVB-SI definitions,
83 therefore these descriptors aren't supported by packet-mpeg-descriptor.c */
85 #define AIT_DESCR_APP 0x00
86 #define AIT_DESCR_APP_NAME 0x01
87 #define AIT_DESCR_TRPT_PROTO 0x02
88 #define AIT_DESCR_EXT_APP_AUTH 0x05
89 #define AIT_DESCR_APP_REC 0x06
90 #define AIT_DESCR_APP_ICO 0x0B
91 #define AIT_DESCR_APP_STOR 0x10
92 #define AIT_DESCR_GRA_CONST 0x14
93 #define AIT_DESCR_SIM_APP_LOC 0x15
94 #define AIT_DESCR_SIM_APP_BND 0x17
95 #define AIT_DESCR_APP_SIG 0x6F
97 static const value_string ait_descr_tag[] = {
98 { AIT_DESCR_APP, "Application descriptor" },
99 { AIT_DESCR_APP_NAME, "Application name descriptor" },
100 { AIT_DESCR_TRPT_PROTO, "Transport protocol descriptor" },
101 { AIT_DESCR_EXT_APP_AUTH, "External application authorization descriptor" },
102 { AIT_DESCR_APP_REC, "Application recording descriptor" },
103 { AIT_DESCR_APP_ICO, "Application icons descriptor" },
104 { AIT_DESCR_APP_STOR, "Application storage descriptor" },
105 { AIT_DESCR_GRA_CONST, "Graphics constraints descriptor" },
106 { AIT_DESCR_SIM_APP_LOC, "Simple application location descriptor" },
107 { AIT_DESCR_SIM_APP_BND, "Simple application boundary descriptor" },
108 { AIT_DESCR_APP_SIG, "Application signalling descriptor" },
109 { 0, NULL }
112 #define TRPT_OBJ_CAROUSEL 0x0001
113 #define TRPT_HTTP 0x0003
115 static const value_string trpt_proto_id[] = {
116 { TRPT_OBJ_CAROUSEL, "Object Carousel" },
117 { TRPT_HTTP, "Transport via HTTP" },
118 { 0, NULL }
121 static const value_string app_vis[] = {
122 { 0x0, "not visible" },
123 { 0x1, "not visible to users, only to applications" },
124 { 0x3, "fully visible" },
125 { 0, NULL }
129 /* dissect the body of an application_descriptor
130 offset points to the start of the body,
131 i.e. to the first byte after the length field */
132 static int
133 dissect_dvb_ait_app_desc_body(tvbuff_t *tvb, unsigned offset,
134 uint8_t body_len, packet_info *pinfo _U_, proto_tree *tree)
136 unsigned offset_start, offset_app_prof_start;
137 uint8_t app_prof_len;
138 uint8_t ver_maj, ver_min, ver_mic;
140 offset_start = offset;
142 app_prof_len = tvb_get_uint8(tvb, offset);
143 proto_tree_add_item(tree, hf_dvb_ait_descr_app_prof_len,
144 tvb, offset, 1, ENC_BIG_ENDIAN);
145 offset++;
146 offset_app_prof_start = offset;
147 while (offset-offset_app_prof_start < app_prof_len) {
148 proto_tree_add_item(tree, hf_dvb_ait_descr_app_prof,
149 tvb, offset, 2, ENC_BIG_ENDIAN);
150 offset += 2;
151 ver_maj = tvb_get_uint8(tvb, offset);
152 ver_min = tvb_get_uint8(tvb, offset+1);
153 ver_mic = tvb_get_uint8(tvb, offset+2);
154 proto_tree_add_uint_format(tree, hf_dvb_ait_descr_app_ver,
155 tvb, offset, 3, ver_maj<<16|ver_min<<8|ver_mic,
156 "Version %d.%d.%d", ver_maj, ver_min, ver_mic);
157 offset += 3;
159 proto_tree_add_item(tree, hf_dvb_ait_descr_app_svc_bound,
160 tvb, offset, 1, ENC_BIG_ENDIAN);
161 proto_tree_add_item(tree, hf_dvb_ait_descr_app_vis,
162 tvb, offset, 1, ENC_BIG_ENDIAN);
163 offset++;
164 proto_tree_add_item(tree, hf_dvb_ait_descr_app_prio,
165 tvb, offset, 1, ENC_BIG_ENDIAN);
166 offset++;
167 while (offset-offset_start < body_len) {
168 proto_tree_add_item(tree, hf_dvb_ait_descr_app_trpt_proto_label,
169 tvb, offset, 1, ENC_BIG_ENDIAN);
170 offset++;
172 return (int)(offset-offset_start);
176 static int
177 dissect_dvb_ait_app_name_desc_body(tvbuff_t *tvb, unsigned offset,
178 uint8_t body_len, packet_info *pinfo _U_, proto_tree *tree)
180 unsigned offset_start;
181 uint8_t len;
183 offset_start = offset;
184 while (offset-offset_start < body_len) {
185 proto_tree_add_item(tree, hf_dvb_ait_descr_app_name_lang,
186 tvb, offset, 3, ENC_ASCII);
187 offset += 3;
188 len = tvb_get_uint8(tvb, offset);
189 /* FT_UINT_STRING with 1 leading len byte */
190 proto_tree_add_item(tree, hf_dvb_ait_descr_app_name_name,
191 tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN);
192 offset += 1+len;
195 return (int)(offset-offset_start);
199 static int
200 dissect_dvb_ait_trpt_proto_desc_body(tvbuff_t *tvb, unsigned offset,
201 uint8_t body_len, packet_info *pinfo _U_, proto_tree *tree)
203 unsigned offset_start;
204 uint16_t proto_id;
205 bool remote_connection;
207 offset_start = offset;
209 proto_id = tvb_get_ntohs(tvb, offset);
210 proto_tree_add_item(tree, hf_dvb_ait_descr_trpt_proto_id,
211 tvb, offset, 2, ENC_BIG_ENDIAN);
212 offset += 2;
213 proto_tree_add_item(tree, hf_dvb_ait_descr_trpt_proto_label,
214 tvb, offset, 1, ENC_BIG_ENDIAN);
215 offset++;
216 if (offset-offset_start < body_len) {
217 if (proto_id == TRPT_OBJ_CAROUSEL) {
218 remote_connection = ((tvb_get_uint8(tvb, offset) & 0x80) == 0x80);
219 proto_tree_add_item(tree, hf_dvb_ait_descr_trpt_sel_remote,
220 tvb, offset, 1, ENC_BIG_ENDIAN);
221 offset++;
222 if (remote_connection) {
223 proto_tree_add_item(tree, hf_dvb_ait_descr_trpt_sel_onid,
224 tvb, offset, 2, ENC_BIG_ENDIAN);
225 offset += 2;
226 proto_tree_add_item(tree, hf_dvb_ait_descr_trpt_sel_tsid,
227 tvb, offset, 2, ENC_BIG_ENDIAN);
228 offset += 2;
229 proto_tree_add_item(tree, hf_dvb_ait_descr_trpt_sel_svcid,
230 tvb, offset, 2, ENC_BIG_ENDIAN);
231 offset += 2;
233 proto_tree_add_item(tree, hf_dvb_ait_descr_trpt_sel_comp,
234 tvb, offset, 1, ENC_BIG_ENDIAN);
235 offset++;
237 else if (proto_id == TRPT_HTTP) {
238 uint8_t url_base_len, url_ext_cnt, url_ext_len, i;
240 url_base_len = tvb_get_uint8(tvb, offset);
241 /* FT_UINT_STRING with one leading length byte */
242 proto_tree_add_item(tree, hf_dvb_ait_descr_trpt_sel_url_base,
243 tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN);
244 offset += 1+url_base_len;
246 url_ext_cnt = tvb_get_uint8(tvb, offset);
247 proto_tree_add_item(tree, hf_dvb_ait_descr_trpt_sel_url_ext_cnt,
248 tvb, offset, 1, ENC_BIG_ENDIAN);
249 offset++;
251 for (i=0; i<url_ext_cnt; i++) {
252 url_ext_len = tvb_get_uint8(tvb, offset);
253 proto_tree_add_item(tree, hf_dvb_ait_descr_trpt_sel_url_ext,
254 tvb, offset, 1, ENC_ASCII|ENC_BIG_ENDIAN);
255 offset += 1+url_ext_len;
258 else {
259 proto_tree_add_item(tree, hf_dvb_ait_descr_trpt_sel_bytes,
260 tvb, offset, offset_start+body_len-offset, ENC_NA);
261 offset = offset_start+body_len;
265 return (int)(offset-offset_start);
269 static int
270 dissect_dvb_ait_descriptor(tvbuff_t *tvb, unsigned offset,
271 packet_info *pinfo, proto_tree *tree)
273 int ret;
274 unsigned offset_start;
275 uint8_t tag, len;
276 proto_tree *descr_tree;
278 tag = tvb_get_uint8(tvb, offset);
279 len = tvb_get_uint8(tvb, offset+1);
281 /* if the descriptor is a special one that's defined in ETSI TS 102 809,
282 we dissect it ourselves
283 otherwise, we assume it's a generic DVB-SI descriptor and pass it
284 on to packet-mpeg-descriptor */
285 if (try_val_to_str(tag, ait_descr_tag)) {
287 offset_start = offset;
288 descr_tree = proto_tree_add_subtree_format(tree, tvb, offset_start, len+2,
289 ett_dvb_ait_descr, NULL, "Descriptor Tag=0x%02x", tag);
291 proto_tree_add_item(descr_tree, hf_dvb_ait_descr_tag,
292 tvb, offset, 1, ENC_BIG_ENDIAN);
293 offset++;
294 proto_tree_add_item(descr_tree, hf_dvb_ait_descr_len,
295 tvb, offset, 1, ENC_BIG_ENDIAN);
296 offset++;
298 switch (tag) {
299 case AIT_DESCR_APP:
300 ret = dissect_dvb_ait_app_desc_body(tvb, offset, len,
301 pinfo, descr_tree);
302 if (ret>0)
303 offset += ret;
304 break;
305 case AIT_DESCR_APP_NAME:
306 ret = dissect_dvb_ait_app_name_desc_body(tvb, offset, len,
307 pinfo, descr_tree);
308 if (ret>0)
309 offset += ret;
310 break;
311 case AIT_DESCR_TRPT_PROTO:
312 ret = dissect_dvb_ait_trpt_proto_desc_body(tvb, offset, len,
313 pinfo, descr_tree);
314 if (ret>0)
315 offset += ret;
316 break;
317 case AIT_DESCR_SIM_APP_LOC:
318 proto_tree_add_item(descr_tree,
319 hf_dvb_ait_descr_sal_init_path,
320 tvb, offset, len, ENC_ASCII);
321 offset += len;
322 break;
323 default:
324 proto_tree_add_item(descr_tree, hf_dvb_ait_descr_data,
325 tvb, offset, len, ENC_NA);
326 offset += len;
327 break;
330 ret = (int)(offset-offset_start);
332 else
333 ret = (int)proto_mpeg_descriptor_dissect(tvb, offset, tree);
335 return ret;
339 static int
340 dissect_dvb_ait(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
342 int offset=0;
343 proto_item *ait_tree_ti = NULL, *app_tree_ti = NULL;
344 proto_tree *ait_tree = NULL, *ait_app_tree = NULL;
345 int offset_loop_start, offset_inner_loop_start, offset_app_start;
346 uint16_t descr_loop_len, app_loop_len;
347 int ret;
348 uint32_t org_id;
349 uint16_t app_id;
351 col_set_str(pinfo->cinfo, COL_INFO, "Application Information Table (AIT)");
353 if (tree) {
354 ait_tree_ti = proto_tree_add_protocol_format(tree, proto_dvb_ait,
355 tvb, 0, -1, "Application Information Table (AIT)");
356 ait_tree = proto_item_add_subtree(ait_tree_ti, ett_dvb_ait);
359 offset += packet_mpeg_sect_header(tvb, offset, ait_tree, NULL, NULL);
361 proto_tree_add_item(ait_tree, hf_dvb_ait_test_app_flag,
362 tvb, offset, 1, ENC_BIG_ENDIAN);
363 proto_tree_add_item(ait_tree, hf_dvb_ait_app_type,
364 tvb, offset, 2, ENC_BIG_ENDIAN);
365 offset += 2;
367 /* no hf for reserved bits */
368 proto_tree_add_item(ait_tree, hf_dvb_ait_version_number,
369 tvb, offset, 1, ENC_BIG_ENDIAN);
370 proto_tree_add_item(ait_tree, hf_dvb_ait_current_next_indicator,
371 tvb, offset, 1, ENC_BIG_ENDIAN);
372 offset++;
374 proto_tree_add_item(ait_tree, hf_dvb_ait_section_number,
375 tvb, offset, 1, ENC_BIG_ENDIAN);
376 offset++;
378 proto_tree_add_item(ait_tree, hf_dvb_ait_last_section_number,
379 tvb, offset, 1, ENC_BIG_ENDIAN);
380 offset++;
382 descr_loop_len = tvb_get_ntohs(tvb, offset) & 0x0FFF;
383 proto_tree_add_item(ait_tree, hf_dvb_ait_descr_loop_len,
384 tvb, offset, 2, ENC_BIG_ENDIAN);
385 offset += 2;
386 offset_loop_start = offset;
387 while (offset-offset_loop_start < descr_loop_len) {
388 ret = dissect_dvb_ait_descriptor(tvb, offset, pinfo, ait_tree);
389 if (ret<=0)
390 break;
391 offset += ret;
394 app_loop_len = tvb_get_ntohs(tvb, offset) & 0x0FFF;
395 proto_tree_add_item(ait_tree, hf_dvb_ait_app_loop_len,
396 tvb, offset, 2, ENC_BIG_ENDIAN);
397 offset += 2;
398 offset_loop_start = offset;
399 while (offset-offset_loop_start < app_loop_len) {
400 offset_app_start = offset;
401 org_id = tvb_get_ntohl(tvb, offset);
402 app_id = tvb_get_ntohs(tvb, offset+4);
403 ait_app_tree = proto_tree_add_subtree_format(ait_tree, tvb, offset, -1,
404 ett_dvb_ait_app, &app_tree_ti, "Application: Org 0x%x, App 0x%x", org_id, app_id);
406 proto_tree_add_item(ait_app_tree, hf_dvb_ait_org_id,
407 tvb, offset, 4, ENC_BIG_ENDIAN);
408 offset += 4;
409 proto_tree_add_item(ait_app_tree, hf_dvb_ait_app_id,
410 tvb, offset, 2, ENC_BIG_ENDIAN);
411 offset += 2;
412 proto_tree_add_item(ait_app_tree, hf_dvb_ait_app_ctrl_code,
413 tvb, offset, 1, ENC_BIG_ENDIAN);
414 offset++;
415 descr_loop_len = tvb_get_ntohs(tvb, offset) & 0x0FFF;
416 proto_tree_add_item(ait_app_tree, hf_dvb_ait_descr_loop_len,
417 tvb, offset, 2, ENC_BIG_ENDIAN);
418 offset += 2;
419 offset_inner_loop_start = offset;
420 while (offset-offset_inner_loop_start < descr_loop_len) {
421 ret = dissect_dvb_ait_descriptor(tvb, offset, pinfo, ait_app_tree);
422 if (ret<=0)
423 break;
424 offset += ret;
426 proto_item_set_len(app_tree_ti, offset-offset_app_start);
429 offset += packet_mpeg_sect_crc(tvb, pinfo, ait_tree, 0, offset);
431 proto_item_set_len(ait_tree_ti, offset);
433 return offset;
436 void
437 proto_register_dvb_ait(void)
439 static int *ett[] = {
440 &ett_dvb_ait,
441 &ett_dvb_ait_descr,
442 &ett_dvb_ait_app
445 static hf_register_info hf[] = {
446 { &hf_dvb_ait_test_app_flag,
447 { "Test application flag", "dvb_ait.test_app_flag",
448 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL } },
449 { &hf_dvb_ait_app_type,
450 { "Application type", "dvb_ait.app_type",
451 FT_UINT16, BASE_HEX, NULL, 0x7FFF, NULL, HFILL } },
452 { &hf_dvb_ait_version_number,
453 { "Version Number", "dvb_ait.version",
454 FT_UINT8, BASE_HEX, NULL, 0x3E, NULL, HFILL } },
455 { &hf_dvb_ait_current_next_indicator,
456 { "Current/Next Indicator", "dvb_ait.cur_next_ind",
457 FT_UINT8, BASE_DEC, NULL, 0x01, NULL, HFILL } },
458 { &hf_dvb_ait_section_number,
459 { "Section Number", "dvb_ait.sect_num",
460 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } },
461 { &hf_dvb_ait_last_section_number,
462 { "Last Section Number", "dvb_ait.last_sect_num",
463 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } },
464 { &hf_dvb_ait_descr_loop_len,
465 { "Descriptor loop length", "dvb_ait.descr_loop_len",
466 FT_UINT16, BASE_DEC, NULL, 0x0FFF, NULL, HFILL } },
467 { &hf_dvb_ait_descr_tag,
468 { "Descriptor Tag", "dvb_ait.descr.tag",
469 FT_UINT8, BASE_HEX, VALS(ait_descr_tag), 0, NULL, HFILL } },
470 { &hf_dvb_ait_descr_len,
471 { "Descriptor Length", "dvb_ait.descr.len",
472 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } },
473 { &hf_dvb_ait_descr_data,
474 { "Descriptor Data", "dvb_ait.descr.data",
475 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } },
476 { &hf_dvb_ait_descr_app_prof_len,
477 { "Application profiles length", "dvb_ait.descr.app.prof_len",
478 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } },
479 { &hf_dvb_ait_descr_app_prof,
480 { "Application profile", "dvb_ait.descr.app.prof",
481 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL } },
482 /* version is major|minor|micro */
483 { &hf_dvb_ait_descr_app_ver,
484 { "Version", "dvb_ait.descr.app.ver",
485 FT_UINT24, BASE_HEX, NULL, 0, NULL, HFILL } },
486 { &hf_dvb_ait_descr_app_svc_bound,
487 { "Service-bound flag", "dvb_ait.descr.app.svc_bound_flag",
488 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL } },
489 { &hf_dvb_ait_descr_app_vis,
490 { "Visibility", "dvb_ait.descr.app.visibility",
491 FT_UINT8, BASE_HEX, VALS(app_vis), 0x60, NULL, HFILL } },
492 { &hf_dvb_ait_descr_app_prio,
493 { "Application priority", "dvb_ait.descr.app.prio",
494 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } },
495 { &hf_dvb_ait_descr_app_trpt_proto_label,
496 { "Transport protocol label", "dvb_ait.descr.app.trpt_proto_label",
497 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } },
498 { &hf_dvb_ait_descr_app_name_lang,
499 { "ISO 639 language code", "dvb_ait.descr.app_name.lang",
500 FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL } },
501 { &hf_dvb_ait_descr_app_name_name,
502 { "Application name", "dvb_ait.descr.app_name.name",
503 FT_UINT_STRING, BASE_NONE, NULL, 0, NULL, HFILL } },
504 { &hf_dvb_ait_descr_trpt_proto_id,
505 { "Protocol ID", "dvb_ait.descr.trpt_proto.id",
506 FT_UINT16, BASE_HEX, VALS(trpt_proto_id), 0, NULL, HFILL } },
507 { &hf_dvb_ait_descr_trpt_proto_label,
508 { "Transport protocol label", "dvb_ait.descr.trpt_proto.label",
509 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } },
510 { &hf_dvb_ait_descr_trpt_sel_remote,
511 { "Remote connection", "dvb_ait.descr.trpt_proto.remote",
512 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL } },
513 { &hf_dvb_ait_descr_trpt_sel_onid,
514 { "Original network ID", "dvb_ait.descr.trpt_proto.onid",
515 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL } },
516 { &hf_dvb_ait_descr_trpt_sel_tsid,
517 { "Transport stream ID", "dvb_ait.descr.trpt_proto.tsid",
518 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL } },
519 { &hf_dvb_ait_descr_trpt_sel_svcid,
520 { "Service ID", "dvb_ait.descr.trpt_proto.svcid",
521 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL } },
522 { &hf_dvb_ait_descr_trpt_sel_comp,
523 { "Component tag", "dvb_ait.descr.trpt_proto.comp_tag",
524 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL } },
525 { &hf_dvb_ait_descr_trpt_sel_url_base,
526 { "URL base", "dvb_ait.descr.trpt_proto.url_base",
527 FT_UINT_STRING, BASE_NONE, NULL, 0, NULL, HFILL } },
528 { &hf_dvb_ait_descr_trpt_sel_url_ext_cnt,
529 { "URL extension count", "dvb_ait.descr.trpt_proto.url_ext_cnt",
530 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL } },
531 { &hf_dvb_ait_descr_trpt_sel_url_ext,
532 { "URL extension", "dvb_ait.descr.trpt_proto.url_ext",
533 FT_UINT_STRING, BASE_NONE, NULL, 0, NULL, HFILL } },
534 { &hf_dvb_ait_descr_trpt_sel_bytes,
535 { "Selector bytes", "dvb_ait.descr.trpt_proto.selector_bytes",
536 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL } },
537 { &hf_dvb_ait_descr_sal_init_path,
538 { "Initial path", "dvb_ait.descr.sim_app_loc.initial_path",
539 FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL } },
540 { &hf_dvb_ait_app_loop_len,
541 { "Application loop length", "dvb_ait.app_loop_len",
542 FT_UINT16, BASE_DEC, NULL, 0x0FFF, NULL, HFILL } },
543 { &hf_dvb_ait_org_id,
544 { "Organisation ID", "dvb_ait.app.org_id",
545 FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL } },
546 { &hf_dvb_ait_app_id,
547 { "Application ID", "dvb_ait.app.app_id",
548 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL } },
549 { &hf_dvb_ait_app_ctrl_code,
550 { "Application control code", "dvb_ait.app.ctrl_code",
551 FT_UINT8, BASE_HEX, VALS(app_ctrl_code), 0, NULL, HFILL } }
554 proto_dvb_ait = proto_register_protocol("DVB Application Information Table", "DVB AIT", "dvb_ait");
556 proto_register_field_array(proto_dvb_ait, hf, array_length(hf));
557 proto_register_subtree_array(ett, array_length(ett));
559 dvb_ait_handle = register_dissector("dvb_ait", dissect_dvb_ait, proto_dvb_ait);
563 void
564 proto_reg_handoff_dvb_ait(void)
566 dissector_add_uint("mpeg_sect.tid", DVB_AIT_TID, dvb_ait_handle);
570 * Editor modelines - https://www.wireshark.org/tools/modelines.html
572 * Local variables:
573 * c-basic-offset: 4
574 * tab-width: 8
575 * indent-tabs-mode: nil
576 * End:
578 * vi: set shiftwidth=4 tabstop=8 expandtab:
579 * :indentSize=4:tabSize=8:noTabs=true: