2 * Routines for H.282 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.282 Remote Device Control"
25 void proto_register_h282(void);
26 void proto_reg_handoff_h282(void);
28 /* Initialize the protocol and registered fields */
29 static int proto_h282
;
30 #include "packet-h282-hf.c"
32 /* Initialize the subtree pointers */
34 #include "packet-h282-ett.c"
40 #include "packet-h282-fn.c"
43 dissect_h282(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
)
45 proto_item
*ti
= NULL
;
46 proto_tree
*h282_tree
= NULL
;
48 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, PSNAME
);
50 ti
= proto_tree_add_item(tree
, proto_h282
, tvb
, 0, -1, ENC_NA
);
51 h282_tree
= proto_item_add_subtree(ti
, ett_h282
);
53 return dissect_RDCPDU_PDU(tvb
, pinfo
, h282_tree
, NULL
);
56 /*--- proto_register_h282 ----------------------------------------------*/
57 void proto_register_h282(void) {
60 static hf_register_info hf
[] = {
61 #include "packet-h282-hfarr.c"
64 /* List of subtrees */
67 #include "packet-h282-ettarr.c"
70 /* Register protocol */
71 proto_h282
= proto_register_protocol(PNAME
, PSNAME
, PFNAME
);
73 /* Register fields and subtrees */
74 proto_register_field_array(proto_h282
, hf
, array_length(hf
));
75 proto_register_subtree_array(ett
, array_length(ett
));
77 register_dissector(PFNAME
, dissect_h282
, proto_h282
);
78 register_dissector(PFNAME
".device_list", dissect_NonCollapsingCapabilities_PDU
, proto_h282
);
82 /*--- proto_reg_handoff_h282 -------------------------------------------*/
83 void proto_reg_handoff_h282(void)