diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:53 +0000 |
commit | a86c5f7cae7ec9a3398300555a0b644689d946a1 (patch) | |
tree | 39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /epan/dissectors/packet-cl3.c | |
parent | Releasing progress-linux version 4.2.6-1~progress7.99u1. (diff) | |
download | wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.tar.xz wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.zip |
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-cl3.c')
-rw-r--r-- | epan/dissectors/packet-cl3.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/epan/dissectors/packet-cl3.c b/epan/dissectors/packet-cl3.c index 0b1aa8f6..145cba57 100644 --- a/epan/dissectors/packet-cl3.c +++ b/epan/dissectors/packet-cl3.c @@ -36,15 +36,15 @@ void proto_reg_handoff_cl3(void); static dissector_handle_t cl3_handle; /* persistent handles for this dissector */ -static int proto_cl3 = -1; +static int proto_cl3; static dissector_table_t cl3_command_table; -static gint ett_cl3 = -1; -static int hf_cl3_version = -1; -static int hf_cl3_headerlen = -1; -static int hf_cl3_subproto = -1; -static int hf_cl3_payload = -1; -static expert_field ei_cl3_badheaderlen = EI_INIT; -static expert_field ei_cl3_unsup_ver = EI_INIT; +static int ett_cl3; +static int hf_cl3_version; +static int hf_cl3_headerlen; +static int hf_cl3_subproto; +static int hf_cl3_payload; +static expert_field ei_cl3_badheaderlen; +static expert_field ei_cl3_unsup_ver; /* Known CL3 (sub-)protocol type strings: */ @@ -54,7 +54,7 @@ static const value_string cl3_protocols[] = { }; -/* called for each incomming framing matching the CL3 ethertype with a version number of 1: */ +/* called for each incoming framing matching the CL3 ethertype with a version number of 1: */ static void dissect_cl3_v1( tvbuff_t *tvb, @@ -62,13 +62,13 @@ dissect_cl3_v1( proto_tree *tree, proto_item *ti, proto_tree *cl3_tree, - guint16 header_length + uint16_t header_length ) { dissector_handle_t dh; tvbuff_t *tvb_sub; - guint16 subprotocol_id; + uint16_t subprotocol_id; /* ensure the header length is valid for version 1 */ if (header_length != 4) { @@ -79,7 +79,7 @@ dissect_cl3_v1( subprotocol_id = tvb_get_ntohs(tvb, 2); /* append the subprotocol id to the "packet summary view" fields */ - col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "[Subprotocol 0x%04X]", (guint)subprotocol_id); + col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "[Subprotocol 0x%04X]", (unsigned)subprotocol_id); /* add elements to the CL3 tree... CL3 version 1 fields: (pretty much just the sub protocol id) */ @@ -93,16 +93,16 @@ dissect_cl3_v1( } } -/* called for each incomming framing matching the CL3 ethertype: */ +/* called for each incoming framing matching the CL3 ethertype: */ static int dissect_cl3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { proto_item *ti; proto_tree *cl3_tree; - guint16 version; - guint16 header_length; - guint32 payload_length; + uint16_t version; + uint16_t header_length; + uint32_t payload_length; /* parse the header fields */ version = header_length = tvb_get_ntohs(tvb, 0); @@ -115,10 +115,10 @@ dissect_cl3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) /* setup the "packet summary view" fields */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "CL3"); col_clear(pinfo->cinfo, COL_INFO); - col_add_fstr(pinfo->cinfo, COL_INFO, "CableLabs Layer-3 Protocol (Ver %u)", (guint)version); + col_add_fstr(pinfo->cinfo, COL_INFO, "CableLabs Layer-3 Protocol (Ver %u)", (unsigned)version); /* create a tree node for us... */ - ti = proto_tree_add_protocol_format(tree, proto_cl3, tvb, 0, header_length, "CableLabs Layer-3 Protocol (CL3) Version %u", (guint)version); + ti = proto_tree_add_protocol_format(tree, proto_cl3, tvb, 0, header_length, "CableLabs Layer-3 Protocol (CL3) Version %u", (unsigned)version); cl3_tree = proto_item_add_subtree(ti, ett_cl3); /* CL3 version agnostic fields: (pretty much just the first byte; like ipv4, version + length) */ @@ -131,7 +131,7 @@ dissect_cl3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) expert_add_info(pinfo, ti, &ei_cl3_badheaderlen); } - /* version-specific disscection... */ + /* version-specific dissection... */ switch (version) { case 1: dissect_cl3_v1(tvb, pinfo, tree, ti, cl3_tree, header_length); @@ -169,7 +169,7 @@ proto_register_cl3(void) { FT_BYTES, BASE_NONE, NULL, 0x0, "The payload carried by this CableLabs layer-3 protocol packet", HFILL}}, }; - static gint *ett[] = { + static int *ett[] = { &ett_cl3, }; static ei_register_info ei[] = { |