diff options
Diffstat (limited to 'epan/dissectors/asn1/dop/packet-dop-template.c')
-rw-r--r-- | epan/dissectors/asn1/dop/packet-dop-template.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/epan/dissectors/asn1/dop/packet-dop-template.c b/epan/dissectors/asn1/dop/packet-dop-template.c index 56de6bca..2c8ad631 100644 --- a/epan/dissectors/asn1/dop/packet-dop-template.c +++ b/epan/dissectors/asn1/dop/packet-dop-template.c @@ -16,6 +16,7 @@ #include <epan/oids.h> #include <epan/asn1.h> #include <epan/expert.h> +#include <wsutil/array.h> #include "packet-ber.h" #include "packet-acse.h" @@ -39,26 +40,26 @@ void proto_register_dop(void); void proto_reg_handoff_dop(void); /* Initialize the protocol and registered fields */ -static int proto_dop = -1; +static int proto_dop; -static const char *binding_type = NULL; /* binding_type */ +static const char *binding_type; /* binding_type */ static int call_dop_oid_callback(const char *base_string, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, const char *col_info, void* data); #include "packet-dop-hf.c" /* Initialize the subtree pointers */ -static gint ett_dop = -1; -static gint ett_dop_unknown = -1; +static int ett_dop; +static int ett_dop_unknown; #include "packet-dop-ett.c" -static expert_field ei_dop_unknown_binding_parameter = EI_INIT; -static expert_field ei_dop_unsupported_opcode = EI_INIT; -static expert_field ei_dop_unsupported_errcode = EI_INIT; -static expert_field ei_dop_unsupported_pdu = EI_INIT; -static expert_field ei_dop_zero_pdu = EI_INIT; +static expert_field ei_dop_unknown_binding_parameter; +static expert_field ei_dop_unsupported_opcode; +static expert_field ei_dop_unsupported_errcode; +static expert_field ei_dop_unsupported_pdu; +static expert_field ei_dop_zero_pdu; -static dissector_handle_t dop_handle = NULL; +static dissector_handle_t dop_handle; /* Dissector table */ static dissector_table_t dop_dissector_table; @@ -119,7 +120,7 @@ dissect_dop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* da return 0; session = (struct SESSION_DATA_STRUCTURE*)data; - asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); + asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo); item = proto_tree_add_item(parent_tree, proto_dop, tvb, 0, -1, ENC_NA); tree = proto_item_add_subtree(item, ett_dop); @@ -204,7 +205,7 @@ dissect_dop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* da while (tvb_reported_length_remaining(tvb, offset) > 0){ old_offset=offset; - offset=(*dop_dissector)(FALSE, tvb, offset, &asn1_ctx, tree, -1); + offset=(*dop_dissector)(false, tvb, offset, &asn1_ctx, tree, -1); if(offset == old_offset){ proto_tree_add_expert(tree, pinfo, &ei_dop_zero_pdu, tvb, offset, -1); break; @@ -227,7 +228,7 @@ void proto_register_dop(void) { }; /* List of subtrees */ - static gint *ett[] = { + static int *ett[] = { &ett_dop, &ett_dop_unknown, #include "packet-dop-ettarr.c" @@ -281,7 +282,7 @@ void proto_reg_handoff_dop(void) { /* ABSTRACT SYNTAXES */ /* Register DOP with ROS (with no use of RTSE) */ - register_ros_oid_dissector_handle("2.5.9.4", dop_handle, 0, "id-as-directory-operational-binding-management", FALSE); + register_ros_oid_dissector_handle("2.5.9.4", dop_handle, 0, "id-as-directory-operational-binding-management", false); /* BINDING TYPES */ |