2 * Routines for H.283 packet dissection
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
14 #include <epan/packet.h>
15 #include <epan/oids.h>
16 #include <epan/asn1.h>
17 #include <wsutil/array.h>
19 #include "packet-per.h"
21 #define PNAME "H.283 Logical Channel Transport"
25 void proto_register_h283(void);
26 void proto_reg_handoff_h283(void);
28 /* Initialize the protocol and registered fields */
29 static int proto_h283
;
30 #include "packet-h283-hf.c"
32 /* Initialize the subtree pointers */
34 #include "packet-h283-ett.c"
37 static dissector_handle_t rdc_pdu_handle
;
38 static dissector_handle_t rdc_device_list_handle
;
39 static dissector_handle_t data_handle
;
40 static dissector_handle_t h283_udp_handle
;
43 static bool info_is_set
;
45 #include "packet-h283-fn.c"
48 dissect_h283_udp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
)
50 proto_item
*ti
= NULL
;
51 proto_tree
*h283_tree
= NULL
;
53 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, PSNAME
);
57 ti
= proto_tree_add_item(tree
, proto_h283
, tvb
, 0, -1, ENC_NA
);
58 h283_tree
= proto_item_add_subtree(ti
, ett_h283
);
60 return dissect_LCTPDU_PDU(tvb
, pinfo
, h283_tree
, NULL
);
63 /*--- proto_register_h283 ----------------------------------------------*/
64 void proto_register_h283(void) {
67 static hf_register_info hf
[] = {
68 #include "packet-h283-hfarr.c"
71 /* List of subtrees */
74 #include "packet-h283-ettarr.c"
77 /* Register protocol */
78 proto_h283
= proto_register_protocol(PNAME
, PSNAME
, PFNAME
);
80 /* Register fields and subtrees */
81 proto_register_field_array(proto_h283
, hf
, array_length(hf
));
82 proto_register_subtree_array(ett
, array_length(ett
));
84 h283_udp_handle
= register_dissector(PFNAME
, dissect_h283_udp
, proto_h283
);
88 /*--- proto_reg_handoff_h283 -------------------------------------------*/
89 void proto_reg_handoff_h283(void)
91 dissector_add_for_decode_as_with_preference("udp.port", h283_udp_handle
);
93 rdc_pdu_handle
= find_dissector_add_dependency("rdc", proto_h283
);
94 rdc_device_list_handle
= find_dissector_add_dependency("rdc.device_list", proto_h283
);
95 data_handle
= find_dissector("data");