2 * Routines for H.224 dissection
3 * Copyright 2022, Anders Broman <anders.broman@ericsson.com>
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
13 RFC description H.224 in SDP: RFC4573 https://www.rfc-editor.org/rfc/rfc4573.html
14 H.281 - FECC protocol H.281 https://www.itu.int/rec/T-REC-H.281/en
15 H.224 - transport encapsulation for FECC H.224 https://www.itu.int/rec/T-REC-H.224-200501-I/en
16 H.323 Annex Q - packing description H.224 in RTP H.323 https://www.itu.int/rec/T-REC-H.323-202203-I
21 #include <wsutil/array.h>
22 #include <epan/packet.h>
23 #include <epan/proto.h>
26 //#include <epan/expert.h>
27 //#include <epan/prefs.h>
30 void proto_reg_handoff_h224(void);
31 void proto_register_h224(void);
33 /* Initialize the protocol and registered fields */
34 static int proto_h224
;
35 static int hf_h224_q922_dlci_priority
;
36 static int hf_h224_q922_ctl
;
37 static int hf_h224_dta
;
38 static int hf_h224_sta
;
39 static int hf_h224_reserved
;
40 static int hf_h224_standard_client_id
;
41 static int hf_h224_extended_client_id_list
;
42 static int hf_h224_non_standard_client
;
43 static int hf_h224_extended_client_id
;
44 static int hf_h224_country_code
;
45 static int hf_h224_extension
;
46 static int hf_h224_manufacturer_code
;
47 static int hf_h224_client_id_manufacturer
;
49 static int hf_h224_es_b7
;
50 static int hf_h224_bs_b6
;
51 static int hf_h224_c1_b5
;
52 static int hf_h224_c2_b4
;
53 static int hf_h224_seg_b3b0
;
54 static int hf_h224_other_client_data
;
56 static int hf_h224_client_list_code
;
57 static int hf_h224_extra_caps_code
;
58 static int hf_h224_response_code
;
59 static int hf_h224_number_of_clients
;
60 static int hf_h224_ex_caps_bit
;
61 static int hf_h224_caps_reserved
;
62 static int hf_h224_brd_svs
;
63 static int hf_h224_number_of_presets
;
64 static int hf_h224_vs_id
;
65 static int hf_h224_vs_reserved_b3
;
66 static int hf_h224_vs_reserved_b3b0
;
67 static int hf_h224_motion_video
;
68 static int hf_h224_norm_res_si
;
69 static int hf_h224_dbl_res_si
;
70 static int hf_h224_pan_cap
;
71 static int hf_h224_tilt_cap
;
72 static int hf_h224_zoom_cap
;
73 static int hf_h224_focus_cap
;
74 static int hf_h224_encoded_characters
;
75 static int hf_h224_end_octet
;
76 static int hf_h224_command_code
;
77 static int hf_h224_message_pan
;
78 static int hf_h224_message_pan_dir
;
79 static int hf_h224_message_tilt
;
80 static int hf_h224_message_tilt_dir
;
81 static int hf_h224_message_zoom
;
82 static int hf_h224_message_zoom_dir
;
83 static int hf_h224_message_focus
;
84 static int hf_h224_message_focus_dir
;
85 static int hf_h224_message_reserved_b7b4
;
86 static int hf_h224_message_reserved_b3b2
;
87 static int hf_h224_message_reserved_b3b0
;
88 static int hf_h224_message_vs_m1
;
89 static int hf_h224_message_vs_m0
;
90 static int hf_h224_message_timeout
;
91 static int hf_h224_message_preset_number
;
93 //static expert_field ei_h224_EXPERTABBREV;
95 static dissector_handle_t h224_handle
;
97 /* Initialize the subtree pointers */
100 /* Definition of DLCI data priority's masks */
101 #define H224_DATA_PRI_MASK 0xFCF0
103 #define FECC_MAX_LENGTH_ASCII_STR 16
104 #define TIMEOUT_INTERVALS 50
105 #define MAX_TIMEOUT_VALUE 800
107 /* Definition of Standard Client IDs */
108 #define H224_CME_CLIENT_ID 0x00
109 #define H224_FECC_CLIENT_ID 0x01
110 #define H224_EXTENED_CLIENT_ID 0x7E
111 #define H224_NON_STANDARD_CLIENT_ID 0x7F
113 /* definitions of CME messages type */
114 #define CME_MSG_Client_List_Message 0x0100
115 #define CME_MSG_Client_List_Command 0x01FF
116 #define CME_MSG_Extra_Capabilities_Message 0x0200
117 #define CME_MSG_Extra_Capabilities_Command 0x02FF
119 /* definitions of FECC messages type */
120 #define FECC_MSG_START_ACTION_REQ 0x01
121 #define FECC_MSG_CONTINUE_ACTION_REQ 0x02
122 #define FECC_MSG_STOP_ACTION_REQ 0x03
123 #define FECC_MSG_SELECT_VIDEO_SOURCE_REQ 0x04
124 #define FECC_MSG_VIDEO_SOURCE_SWITCHED_IND 0x05
125 #define FECC_MSG_STORE_AS_PRESET_REQ 0x06
126 #define FECC_MSG_ACTIVATE_PRESET_REQ 0x07
128 static unsigned dissect_h224_cme_client_data(tvbuff_t
* tvb
, proto_tree
* tree
, unsigned offset
);
129 static unsigned dissect_h224_fecc_client_data(tvbuff_t
* tvb
, proto_tree
* tree
, unsigned offset
);
130 static unsigned dissect_h224_extended_client_data(tvbuff_t
* tvb
, proto_tree
* tree
, unsigned offset
);
131 static unsigned dissect_h224_non_standard_client_data(tvbuff_t
* tvb
, proto_tree
* tree
, unsigned offset
);
135 unsigned (*decode
) (tvbuff_t
*, proto_tree
*, unsigned);
138 static const h224_opt_t h224opt
[] = {
139 /* CME */ {H224_CME_CLIENT_ID
, dissect_h224_cme_client_data
},
140 /* FECC */ {H224_FECC_CLIENT_ID
, dissect_h224_fecc_client_data
},
141 /* EXTENED */ {H224_EXTENED_CLIENT_ID
, dissect_h224_extended_client_data
},
142 /* NON_STANDARD */ {H224_NON_STANDARD_CLIENT_ID
, dissect_h224_non_standard_client_data
},
146 /* DLCI address for data priority */
147 static const value_string h224_data_priority
[] =
149 { 6, "Low Priority Data" },
150 { 7, "High Priority Data" },
154 static const value_string h224_client_data_type
[] =
156 { H224_CME_CLIENT_ID
, "Client Data For CME(Client Management Entity)" },
157 { H224_FECC_CLIENT_ID
, "Client Data For FECC(Far-End Camera Control)" },
158 { H224_EXTENED_CLIENT_ID
, "Client Data For Extended Client ID list" },
159 { H224_NON_STANDARD_CLIENT_ID
, "Client Data For Non-standard client" },
163 static const value_string h224_fecc_message_type
[] =
165 { FECC_MSG_START_ACTION_REQ
, "START ACTION Request" },
166 { FECC_MSG_CONTINUE_ACTION_REQ
, "CONTINUE ACTION Request" },
167 { FECC_MSG_STOP_ACTION_REQ
, "STOP ACTION Request" },
168 { FECC_MSG_SELECT_VIDEO_SOURCE_REQ
, "SELECT VIDEO SOURCE Request" },
169 { FECC_MSG_VIDEO_SOURCE_SWITCHED_IND
, "VIDEO SOURCE SWITCHED indication" },
170 { FECC_MSG_STORE_AS_PRESET_REQ
, "STORE AS PRESET Request" },
171 { FECC_MSG_ACTIVATE_PRESET_REQ
, "ACTIVATE PRESET Request" },
175 static const true_false_string tfs_right_left
= { "Right", "Left" };
176 static const true_false_string tfs_in_out
= { "In", "Out" };
178 static value_string_ext h224_client_data_ext
= VALUE_STRING_EXT_INIT(h224_client_data_type
);
181 dissect_h224_standard_clients_ids(tvbuff_t
* tvb
, proto_tree
* tree
, unsigned offset
, uint8_t client_id
)
183 uint32_t manufacturer_code
;
185 if (client_id
== H224_EXTENED_CLIENT_ID
) {
186 proto_tree_add_item(tree
, hf_h224_extended_client_id_list
, tvb
, offset
, 1, ENC_NA
);
188 proto_tree_add_item(tree
, hf_h224_extended_client_id
, tvb
, offset
, 1, ENC_NA
);
190 } else if (client_id
== H224_NON_STANDARD_CLIENT_ID
){
191 proto_tree_add_item(tree
, hf_h224_non_standard_client
, tvb
, offset
, 1, ENC_NA
);
193 manufacturer_code
= tvb_get_uint32(tvb
, offset
, ENC_BIG_ENDIAN
);
194 proto_tree_add_item(tree
, hf_h224_country_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
196 proto_tree_add_item(tree
, hf_h224_extension
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
198 proto_tree_add_uint(tree
, hf_h224_manufacturer_code
, tvb
, offset
- 2, 4, manufacturer_code
);
200 proto_tree_add_item(tree
, hf_h224_client_id_manufacturer
, tvb
, offset
, 1, ENC_NA
);
203 proto_tree_add_item(tree
, hf_h224_standard_client_id
, tvb
, offset
, 1, ENC_NA
);
210 dissect_h224_cme_client_data(tvbuff_t
* tvb
, proto_tree
* tree
, unsigned offset
)
217 proto_tree
*ext_tree
;
219 ext_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, -1, ett_h224
, NULL
,
220 val_to_str_ext_const(H224_CME_CLIENT_ID
, &h224_client_data_ext
, "Unknown field"));
221 type
= tvb_get_uint16(tvb
, offset
, ENC_BIG_ENDIAN
);
223 case CME_MSG_Client_List_Message
:
224 proto_tree_add_item(ext_tree
, hf_h224_client_list_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
226 proto_tree_add_item(ext_tree
, hf_h224_response_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
228 proto_tree_add_item(ext_tree
, hf_h224_number_of_clients
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
229 num
= tvb_get_uint8(tvb
, offset
);
231 proto_tree_add_item(ext_tree
, hf_h224_ex_caps_bit
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
232 for (int i
= 0; i
< num
; i
++) {
233 oct
= tvb_get_uint8(tvb
, offset
);
234 offset
= dissect_h224_standard_clients_ids(tvb
, ext_tree
, offset
, (oct
& 0x7f));
237 case CME_MSG_Client_List_Command
:
238 proto_tree_add_item(ext_tree
, hf_h224_client_list_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
240 proto_tree_add_item(ext_tree
, hf_h224_response_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
243 case CME_MSG_Extra_Capabilities_Message
:
244 proto_tree_add_item(ext_tree
, hf_h224_extra_caps_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
246 proto_tree_add_item(ext_tree
, hf_h224_response_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
248 proto_tree_add_item(ext_tree
, hf_h224_ex_caps_bit
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
249 oct
= tvb_get_uint8(tvb
, offset
);
250 offset
= dissect_h224_standard_clients_ids(tvb
, ext_tree
, offset
, oct
);
251 if ((oct
& 0x7f) == 0x01) {
252 static int* const fecc_number_of_presets
[] = {
253 &hf_h224_caps_reserved
,
255 &hf_h224_number_of_presets
,
258 proto_tree_add_bitmask_list(ext_tree
, tvb
, offset
, 1, fecc_number_of_presets
, ENC_BIG_ENDIAN
);
260 oct
= tvb_get_uint8(tvb
, offset
);
261 static int* const fecc_vrs_capabilities
[] = {
263 &hf_h224_vs_reserved_b3
,
264 &hf_h224_motion_video
,
265 &hf_h224_norm_res_si
,
269 proto_tree_add_bitmask_list(ext_tree
, tvb
, offset
, 1, fecc_vrs_capabilities
, ENC_BIG_ENDIAN
);
271 source_id
= (oct
& 0xf0) >> 4;
273 zero_offset
= tvb_find_uint8(tvb
, offset
, FECC_MAX_LENGTH_ASCII_STR
, 0);
274 if (zero_offset
> offset
) {
275 proto_tree_add_item(ext_tree
, hf_h224_encoded_characters
, tvb
, offset
, zero_offset
- offset
, ENC_ASCII
);
276 offset
= zero_offset
;
277 proto_tree_add_item(ext_tree
, hf_h224_end_octet
, tvb
, offset
, 1, ENC_NA
);
281 static int* const fecc_caps_ability
[] = {
286 &hf_h224_vs_reserved_b3b0
,
289 proto_tree_add_bitmask_list(ext_tree
, tvb
, offset
, 1, fecc_caps_ability
, ENC_BIG_ENDIAN
);
293 case CME_MSG_Extra_Capabilities_Command
:
294 proto_tree_add_item(ext_tree
, hf_h224_extra_caps_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
296 proto_tree_add_item(ext_tree
, hf_h224_response_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
298 proto_tree_add_item(ext_tree
, hf_h224_ex_caps_bit
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
299 oct
= tvb_get_uint8(tvb
, offset
);
300 offset
= dissect_h224_standard_clients_ids(tvb
, ext_tree
, offset
, oct
);
309 dissect_h224_fecc_client_data(tvbuff_t
* tvb
, proto_tree
* tree
, unsigned offset
)
312 proto_tree
*ext_tree
;
314 ext_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, -1, ett_h224
, NULL
,
315 val_to_str_ext_const(H224_FECC_CLIENT_ID
, &h224_client_data_ext
, "Unknown field"));
316 oct
= tvb_get_uint8(tvb
, offset
);
317 proto_tree_add_item(ext_tree
, hf_h224_command_code
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
319 static int* const fecc_message_action
[] = {
320 &hf_h224_message_pan
,
321 &hf_h224_message_pan_dir
,
322 &hf_h224_message_tilt
,
323 &hf_h224_message_tilt_dir
,
324 &hf_h224_message_zoom
,
325 &hf_h224_message_zoom_dir
,
326 &hf_h224_message_focus
,
327 &hf_h224_message_focus_dir
,
331 case FECC_MSG_START_ACTION_REQ
:
334 proto_tree_add_bitmask_list(ext_tree
, tvb
, offset
, 1, fecc_message_action
, ENC_BIG_ENDIAN
);
336 proto_tree_add_item(ext_tree
, hf_h224_message_reserved_b7b4
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
337 oct
= tvb_get_uint8(tvb
, offset
);
338 timeout
= (oct
& 0x0f) ? (oct
* TIMEOUT_INTERVALS
) : MAX_TIMEOUT_VALUE
;
339 proto_tree_add_uint_format(ext_tree
, hf_h224_message_timeout
, tvb
, offset
, 1, oct
,"%u (%u milliseconds)", oct
, timeout
);
343 case FECC_MSG_CONTINUE_ACTION_REQ
:
344 case FECC_MSG_STOP_ACTION_REQ
:
345 proto_tree_add_bitmask_list(ext_tree
, tvb
, offset
, 1, fecc_message_action
, ENC_BIG_ENDIAN
);
348 case FECC_MSG_SELECT_VIDEO_SOURCE_REQ
:
349 case FECC_MSG_VIDEO_SOURCE_SWITCHED_IND
:
351 static int* const fecc_message_m1m0
[] = {
353 &hf_h224_message_reserved_b3b2
,
354 &hf_h224_message_vs_m1
,
355 &hf_h224_message_vs_m0
,
358 proto_tree_add_bitmask_list(ext_tree
, tvb
, offset
, 1, fecc_message_m1m0
, ENC_BIG_ENDIAN
);
362 case FECC_MSG_STORE_AS_PRESET_REQ
:
363 case FECC_MSG_ACTIVATE_PRESET_REQ
:
365 static int* const fecc_message_preset_num
[] = {
366 &hf_h224_message_preset_number
,
367 &hf_h224_message_reserved_b3b0
,
370 proto_tree_add_bitmask_list(ext_tree
, tvb
, offset
, 1, fecc_message_preset_num
, ENC_BIG_ENDIAN
);
380 static unsigned dissect_h224_extended_client_data(tvbuff_t
* tvb
, proto_tree
* tree
, unsigned offset
) {
381 proto_tree
*ext_tree
;
383 ext_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, -1, ett_h224
, NULL
,
384 val_to_str_ext_const(H224_EXTENED_CLIENT_ID
, &h224_client_data_ext
, "Unknown field"));
385 proto_tree_add_item(ext_tree
, hf_h224_other_client_data
, tvb
, offset
, -1, ENC_NA
);
390 static unsigned dissect_h224_non_standard_client_data(tvbuff_t
* tvb
, proto_tree
* tree
, unsigned offset
) {
391 proto_tree
*ext_tree
;
393 ext_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, -1, ett_h224
, NULL
,
394 val_to_str_ext_const(H224_NON_STANDARD_CLIENT_ID
, &h224_client_data_ext
, "Unknown field"));
395 proto_tree_add_item(ext_tree
, hf_h224_other_client_data
, tvb
, offset
, -1, ENC_NA
);
399 /* Code to actually dissect the packets */
401 dissect_h224(tvbuff_t
* tvb
, packet_info
* pinfo
, proto_tree
* tree
, void* data _U_
)
404 proto_tree
* h224_tree
;
409 /* Set the Protocol column in the summary display */
410 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "H.224");
412 ti
= proto_tree_add_item(tree
, proto_h224
, tvb
, offset
, -1, ENC_NA
);
413 h224_tree
= proto_item_add_subtree(ti
, ett_h224
);
415 /* On IP transport networks, the H.224 protocol octet structure shall be the same as Figure 2/H.224
416 * except that the HDLC bit stuffing, HDLC flags and HDLC Frame Check Sequence shall be omitted.
418 /* The 10-bit DLCI address for data priority */
419 proto_tree_add_item(h224_tree
, hf_h224_q922_dlci_priority
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
421 /* Q.922 UI-Mode format 1 octets */
422 proto_tree_add_item(h224_tree
, hf_h224_q922_ctl
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
424 /* Destination terminal address 2 octets */
425 proto_tree_add_item(h224_tree
, hf_h224_dta
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
427 /* Source terminal address 2 octets */
428 proto_tree_add_item(h224_tree
, hf_h224_sta
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
430 proto_tree_add_item(h224_tree
, hf_h224_reserved
, tvb
, offset
, 1, ENC_NA
);
433 * CLIENT ID: The client to receive the contents of the datagram. The Client ID may be any
434 * of the following formats:
435 * - Standard Client ID - Single octet.
436 * - Extended Client ID - Two octets (0x7E, extended Client ID).
437 * - Non-standard Client ID - Six octets (0x7F, country, manufacturer code, ID)
439 oct
= tvb_get_uint8(tvb
, offset
);
440 offset
= dissect_h224_standard_clients_ids(tvb
, h224_tree
, offset
, oct
);
442 static int* const h224_flags
[] = {
451 proto_tree_add_bitmask_list(h224_tree
, tvb
, offset
, 1, h224_flags
, ENC_BIG_ENDIAN
);
456 while (h224opt
[++i
].decode
) {
457 if (h224opt
[i
].optcode
== oct
) {
458 h224opt
[i
].decode(tvb
, h224_tree
, offset
);
462 return tvb_reported_length(tvb
);
465 /* Register the protocol with Wireshark. */
467 proto_register_h224(void)
469 //module_t *h224_module;
470 //expert_module_t *expert_h224;
472 static hf_register_info hf
[] = {
473 { &hf_h224_q922_dlci_priority
,
474 { "Q.922 DLCI Priority", "h224.q922_dlci_pri",
475 FT_UINT16
, BASE_HEX
, VALS(h224_data_priority
), H224_DATA_PRI_MASK
,
479 { "Q.922 Control Octet", "h224.q922_ctl",
480 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
484 { "Destination Terminal Address", "h224.dta",
485 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
489 { "Source Terminal Address", "h224.sta",
490 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
494 { "Reserved", "h224.reserved",
495 FT_UINT8
, BASE_DEC
, NULL
, 0x80,
498 { &hf_h224_standard_client_id
,
499 { "Standard Client ID", "h224.standard_client_id",
500 FT_UINT8
, BASE_HEX
, NULL
, 0x7f,
503 { &hf_h224_extended_client_id_list
,
504 { "Extended Client ID List", "h224.extended_client_id_list",
505 FT_UINT8
, BASE_HEX
, NULL
, 0x7f,
508 { &hf_h224_non_standard_client
,
509 { "Non-standard Client", "h224.non_standard_client",
510 FT_UINT8
, BASE_HEX
, NULL
, 0x7f,
513 { &hf_h224_extended_client_id
,
514 { "Extended Client ID", "h224.extended_client_id",
515 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
518 { &hf_h224_country_code
,
519 { "Country code", "h224.country_code",
520 FT_UINT8
, BASE_HEX
, VALS(T35CountryCode_vals
), 0x0,
523 { &hf_h224_extension
,
524 { "Extension", "h224.Extension",
525 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
528 { &hf_h224_manufacturer_code
,
529 { "Manufacturer code", "h224.manufacturer_code",
530 FT_UINT32
, BASE_HEX
, VALS(H221ManufacturerCode_vals
), 0x0,
533 { &hf_h224_client_id_manufacturer
,
534 { "Manufacturer Client ID", "h224.manufacturer_client_id",
535 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
539 { "Ending Segment(ES)", "h224.flag.es",
540 FT_BOOLEAN
, 8, NULL
, 0x80,
544 { "Beginning Segment(BS)", "h224.flag.bs",
545 FT_BOOLEAN
, 8, NULL
, 0x40,
549 { "C1", "h224.flag.c1",
550 FT_BOOLEAN
, 8, NULL
, 0x20,
554 { "C0", "h224.flag.c0",
555 FT_BOOLEAN
, 8, NULL
, 0x10,
559 { "Segment number", "h224.flags_seg",
560 FT_UINT8
, BASE_DEC
, NULL
, 0x0f,
563 { &hf_h224_client_list_code
,
564 { "Client List code", "h224.client_list_code",
565 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
568 { &hf_h224_extra_caps_code
,
569 { "Extra Capabilities code", "h224.ex_caps_code",
570 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
573 { &hf_h224_response_code
,
574 { "Response Code", "h224.response_code",
575 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
578 { &hf_h224_number_of_clients
,
579 { "Number of clients", "h224.number_of_clients",
580 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
583 { &hf_h224_ex_caps_bit
,
584 { "Extra Capabilities bit", "h224.ex_caps_bit",
585 FT_BOOLEAN
, 8, NULL
, 0x80,
588 { &hf_h224_caps_reserved
,
589 { "Preset reserved", "h224.preset_reserved",
590 FT_UINT8
, BASE_DEC
, NULL
, 0xe0,
594 { "Broadcast switch video sources", "h224.brd_svs",
595 FT_BOOLEAN
, 8, NULL
, 0x10,
598 { &hf_h224_number_of_presets
,
599 { "Number of presets", "h224.number_of_presets",
600 FT_UINT8
, BASE_DEC
, NULL
, 0x0f,
604 { "Video source id", "h224.vs_id",
605 FT_UINT8
, BASE_DEC
, NULL
, 0xf0,
608 { &hf_h224_vs_reserved_b3
,
609 { "Reserved type", "h224.reserved_type",
610 FT_UINT8
, BASE_DEC
, NULL
, 0x08,
613 { &hf_h224_vs_reserved_b3b0
,
614 { "Reserved Capabilities", "h224.reserved_caps",
615 FT_UINT8
, BASE_DEC
, NULL
, 0x0f,
618 { &hf_h224_motion_video
,
619 { "Motion video", "h224.motion_video",
620 FT_BOOLEAN
, 8, NULL
, 0x04,
623 { &hf_h224_norm_res_si
,
624 { "Normal resolution still image", "h224.norm_res_si",
625 FT_BOOLEAN
, 8, NULL
, 0x02,
628 { &hf_h224_dbl_res_si
,
629 { "Double resolution still image", "h224.dbl_res_si",
630 FT_BOOLEAN
, 8, NULL
, 0x01,
634 { "Pan Capability", "h224.pan_cap",
635 FT_BOOLEAN
, 8, NULL
, 0x80,
639 { "Tilt Capability", "h224.tilt_cap",
640 FT_BOOLEAN
, 8, NULL
, 0x40,
644 { "Zoom Capability", "h224.zoom_cap",
645 FT_BOOLEAN
, 8, NULL
, 0x20,
648 { &hf_h224_focus_cap
,
649 { "Focus Capability", "h224.focus_cap",
650 FT_BOOLEAN
, 8, NULL
, 0x10,
653 { &hf_h224_encoded_characters
,
654 { "Ascii String", "h224.ascii_str",
655 FT_STRING
, BASE_NONE
, NULL
, 0,
658 { &hf_h224_end_octet
,
659 { "End octet", "h224.end_oct",
660 FT_UINT8
, BASE_DEC
, NULL
, 0,
663 { &hf_h224_command_code
,
664 { "FECC Message Code", "h224.fecc_message_code",
665 FT_UINT8
, BASE_HEX
, VALS(h224_fecc_message_type
), 0,
668 { &hf_h224_message_pan
,
669 { "Pan action", "h224.pan_action",
670 FT_BOOLEAN
, 8, NULL
, 0x80,
673 { &hf_h224_message_pan_dir
,
674 { "Pan direction", "h224.pan_dir",
675 FT_BOOLEAN
, 8, TFS(&tfs_right_left
), 0x40,
678 { &hf_h224_message_tilt
,
679 { "Tilt action", "h224.tilt_action",
680 FT_BOOLEAN
, 8, NULL
, 0x20,
683 { &hf_h224_message_tilt_dir
,
684 { "Tilt direction", "h224.tilt_dir",
685 FT_BOOLEAN
, 8, TFS(&tfs_up_down
), 0x10,
688 { &hf_h224_message_zoom
,
689 { "Zoom action", "h224.zoom_action",
690 FT_BOOLEAN
, 8, NULL
, 0x08,
693 { &hf_h224_message_zoom_dir
,
694 { "Zoom direction", "h224.zoom_dir",
695 FT_BOOLEAN
, 8, TFS(&tfs_in_out
), 0x04,
698 { &hf_h224_message_focus
,
699 { "Focus action", "h224.focus_action",
700 FT_BOOLEAN
, 8, NULL
, 0x02,
703 { &hf_h224_message_focus_dir
,
704 { "Focus direction", "h224.focus_dir",
705 FT_BOOLEAN
, 8, TFS(&tfs_in_out
), 0x01,
708 { &hf_h224_message_reserved_b7b4
,
709 { "Action Reserved", "h224.act_reserved",
710 FT_UINT8
, BASE_DEC
, NULL
, 0xf0,
713 { &hf_h224_message_reserved_b3b2
,
714 { "Mode Reserved", "h224.mode_reserved",
715 FT_UINT8
, BASE_DEC
, NULL
, 0x0c,
718 { &hf_h224_message_reserved_b3b0
,
719 { "Activate Preset Reserved", "h224.ap_reserved",
720 FT_UINT8
, BASE_DEC
, NULL
, 0x0f,
723 { &hf_h224_message_vs_m1
,
724 { "M1", "h224.vs_m1",
725 FT_UINT8
, BASE_DEC
, NULL
, 0x02,
728 { &hf_h224_message_vs_m0
,
729 { "M0", "h224.vs_m0",
730 FT_UINT8
, BASE_DEC
, NULL
, 0x01,
733 { &hf_h224_message_timeout
,
734 { "Timeout", "h224.timeout",
735 FT_UINT8
, BASE_DEC
, NULL
, 0x0f,
738 { &hf_h224_message_preset_number
,
739 { "Preset Number", "h224.preset_number",
740 FT_UINT8
, BASE_DEC
, NULL
, 0xf0,
743 { &hf_h224_other_client_data
,
744 { "Client data", "h224.client_data",
745 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
749 static int *ett
[] = {
753 /* Setup protocol expert items */
754 //static ei_register_info ei[] = {
755 // { &ei_h224_EXPERTABBREV,
756 // { "h224.EXPERTABBREV", PI_GROUP, PI_SEVERITY,
757 // "EXPERTDESCR", EXPFILL }
761 /* Register the protocol name and description */
762 proto_h224
= proto_register_protocol("H.224", "H.224", "h224");
764 /* Register the header fields and subtrees */
765 proto_register_field_array(proto_h224
, hf
, array_length(hf
));
766 proto_register_subtree_array(ett
, array_length(ett
));
768 /* Register expert items */
769 // expert_h224 = expert_register_protocol(proto_h224);
770 // expert_register_field_array(expert_h224, ei, array_length(ei));
772 h224_handle
= register_dissector("h224", dissect_h224
, proto_h224
);
778 proto_reg_handoff_h224(void)
780 dissector_add_string("rtp_dyn_payload_type", "H224", h224_handle
);
781 dissector_add_for_decode_as("rtp.pt", h224_handle
);
785 * Editor modelines - https://www.wireshark.org/tools/modelines.html
790 * indent-tabs-mode: nil
793 * vi: set shiftwidth=4 tabstop=8 expandtab:
794 * :indentSize=4:tabSize=8:noTabs=true: