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-rdp_egfx.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-rdp_egfx.c')
-rw-r--r-- | epan/dissectors/packet-rdp_egfx.c | 132 |
1 files changed, 66 insertions, 66 deletions
diff --git a/epan/dissectors/packet-rdp_egfx.c b/epan/dissectors/packet-rdp_egfx.c index 48726b3a..3f6c5d1c 100644 --- a/epan/dissectors/packet-rdp_egfx.c +++ b/epan/dissectors/packet-rdp_egfx.c @@ -29,61 +29,61 @@ void proto_register_rdp_egfx(void); void proto_reg_handoff_rdp_egfx(void); -static int proto_rdp_egfx = -1; +static int proto_rdp_egfx; -static int hf_egfx_cmdId = -1; -static int hf_egfx_flags = -1; -static int hf_egfx_pduLength = -1; +static int hf_egfx_cmdId; +static int hf_egfx_flags; +static int hf_egfx_pduLength; -static int hf_egfx_caps_capsSetCount = -1; -static int hf_egfx_cap_version = -1; -static int hf_egfx_cap_length = -1; +static int hf_egfx_caps_capsSetCount; +static int hf_egfx_cap_version; +static int hf_egfx_cap_length; -static int hf_egfx_reset_width = -1; -static int hf_egfx_reset_height = -1; -static int hf_egfx_reset_monitorCount = -1; -static int hf_egfx_reset_monitorDefLeft = -1; -static int hf_egfx_reset_monitorDefTop = -1; -static int hf_egfx_reset_monitorDefRight = -1; -static int hf_egfx_reset_monitorDefBottom = -1; -static int hf_egfx_reset_monitorDefFlags = -1; +static int hf_egfx_reset_width; +static int hf_egfx_reset_height; +static int hf_egfx_reset_monitorCount; +static int hf_egfx_reset_monitorDefLeft; +static int hf_egfx_reset_monitorDefTop; +static int hf_egfx_reset_monitorDefRight; +static int hf_egfx_reset_monitorDefBottom; +static int hf_egfx_reset_monitorDefFlags; -static int hf_egfx_ack_queue_depth = -1; -static int hf_egfx_ack_frame_id = -1; -static int hf_egfx_ack_total_decoded = -1; -static int hf_egfx_ack_frame_start = -1; -static int hf_egfx_ack_frame_end = -1; +static int hf_egfx_ack_queue_depth; +static int hf_egfx_ack_frame_id; +static int hf_egfx_ack_total_decoded; +static int hf_egfx_ack_frame_start; +static int hf_egfx_ack_frame_end; -static int hf_egfx_ackqoe_frame_id = -1; -static int hf_egfx_ackqoe_timestamp = -1; -static int hf_egfx_ackqoe_timediffse = -1; -static int hf_egfx_ackqoe_timediffedr = -1; -static int hf_egfx_ackqoe_frame_start = -1; -static int hf_egfx_ackqoe_frame_end = -1; +static int hf_egfx_ackqoe_frame_id; +static int hf_egfx_ackqoe_timestamp; +static int hf_egfx_ackqoe_timediffse; +static int hf_egfx_ackqoe_timediffedr; +static int hf_egfx_ackqoe_frame_start; +static int hf_egfx_ackqoe_frame_end; -static int hf_egfx_start_timestamp = -1; -static int hf_egfx_start_frameid = -1; -static int hf_egfx_start_acked_in = -1; +static int hf_egfx_start_timestamp; +static int hf_egfx_start_frameid; +static int hf_egfx_start_acked_in; -static int hf_egfx_end_frameid = -1; -static int hf_egfx_end_acked_in = -1; +static int hf_egfx_end_frameid; +static int hf_egfx_end_acked_in; -static int ett_rdp_egfx = -1; -static int ett_egfx_caps = -1; -static int ett_egfx_capsconfirm = -1; -static int ett_egfx_cap = -1; -static int ett_egfx_cap_version = -1; -static int ett_egfx_ack = -1; -static int ett_egfx_ackqoe = -1; -static int ett_egfx_reset = -1; -static int ett_egfx_monitors = -1; -static int ett_egfx_monitordef = -1; +static int ett_rdp_egfx; +static int ett_egfx_caps; +static int ett_egfx_capsconfirm; +static int ett_egfx_cap; +static int ett_egfx_cap_version; +static int ett_egfx_ack; +static int ett_egfx_ackqoe; +static int ett_egfx_reset; +static int ett_egfx_monitors; +static int ett_egfx_monitordef; -static expert_field ei_egfx_pdulen_invalid = EI_INIT; -static expert_field ei_egfx_invalid_compression = EI_INIT; +static expert_field ei_egfx_pdulen_invalid; +static expert_field ei_egfx_invalid_compression; #define PNAME "RDP Graphic pipeline channel Protocol" @@ -199,7 +199,7 @@ typedef struct { } egfx_frame_t; static const char * -find_egfx_version(guint32 v) { +find_egfx_version(uint32_t v) { const value_string *vs = rdp_egfx_caps_version_vals; for ( ; vs->strptr; vs++) if (vs->value == v) @@ -241,17 +241,17 @@ dissect_rdp_egfx_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t proto_item *pi; proto_tree *tree; proto_tree *subtree; - gint offset = 0; - guint32 cmdId = 0; - guint32 pduLength; - guint32 i; + int offset = 0; + uint32_t cmdId = 0; + uint32_t pduLength; + uint32_t i; parent_tree = proto_tree_get_root(parent_tree); col_set_str(pinfo->cinfo, COL_PROTOCOL, "EGFX"); col_clear(pinfo->cinfo, COL_INFO); while (tvb_captured_length_remaining(tvb, offset) > 8) { - pduLength = tvb_get_guint32(tvb, offset + 4, ENC_LITTLE_ENDIAN); + pduLength = tvb_get_uint32(tvb, offset + 4, ENC_LITTLE_ENDIAN); item = proto_tree_add_item(parent_tree, proto_rdp_egfx, tvb, offset, pduLength, ENC_NA); tree = proto_item_add_subtree(item, ett_rdp_egfx); @@ -270,10 +270,10 @@ dissect_rdp_egfx_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t return offset; } - gint nextOffset = offset + (pduLength - 8); + int nextOffset = offset + (pduLength - 8); switch (cmdId) { case RDPGFX_CMDID_CAPSADVERTISE: { - guint16 capsSetCount = tvb_get_guint16(tvb, offset, ENC_LITTLE_ENDIAN); + uint16_t capsSetCount = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN); col_append_sep_str(pinfo->cinfo, COL_INFO, ",", "Caps advertise"); proto_tree_add_item(tree, hf_egfx_caps_capsSetCount, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -282,8 +282,8 @@ dissect_rdp_egfx_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t offset += 2; for (i = 0; i < capsSetCount; i++) { - guint32 version = tvb_get_guint32(tvb, offset, ENC_LITTLE_ENDIAN); - guint32 capsDataLength = tvb_get_guint32(tvb, offset + 4, ENC_LITTLE_ENDIAN); + uint32_t version = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN); + uint32_t capsDataLength = tvb_get_uint32(tvb, offset + 4, ENC_LITTLE_ENDIAN); proto_tree* vtree = proto_tree_add_subtree(subtree, tvb, offset, 8 + capsDataLength, ett_egfx_cap_version, NULL, find_egfx_version(version)); proto_tree_add_item(vtree, hf_egfx_cap_version, tvb, offset, 4, ENC_LITTLE_ENDIAN); @@ -298,7 +298,7 @@ dissect_rdp_egfx_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t } case RDPGFX_CMDID_CAPSCONFIRM: { - guint32 capsDataLength; + uint32_t capsDataLength; col_append_sep_str(pinfo->cinfo, COL_INFO, ",", "Caps confirm"); @@ -311,7 +311,7 @@ dissect_rdp_egfx_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t } case RDPGFX_CMDID_RESETGRAPHICS: { - guint32 nmonitor; + uint32_t nmonitor; proto_tree *monitors_tree; col_append_sep_str(pinfo->cinfo, COL_INFO, ",", "Reset graphics"); @@ -328,11 +328,11 @@ dissect_rdp_egfx_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t monitors_tree = proto_tree_add_subtree(subtree, tvb, offset, nmonitor * 20, ett_egfx_monitors, NULL, "Monitors"); for (i = 0; i < nmonitor; i++) { proto_item *monitor_tree; - guint32 left, top, right, bottom; - left = tvb_get_guint32(tvb, offset, ENC_LITTLE_ENDIAN); - top = tvb_get_guint32(tvb, offset+4, ENC_LITTLE_ENDIAN); - right = tvb_get_guint32(tvb, offset+8, ENC_LITTLE_ENDIAN); - bottom = tvb_get_guint32(tvb, offset+12, ENC_LITTLE_ENDIAN); + uint32_t left, top, right, bottom; + left = tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN); + top = tvb_get_uint32(tvb, offset+4, ENC_LITTLE_ENDIAN); + right = tvb_get_uint32(tvb, offset+8, ENC_LITTLE_ENDIAN); + bottom = tvb_get_uint32(tvb, offset+12, ENC_LITTLE_ENDIAN); monitor_tree = proto_tree_add_subtree_format(monitors_tree, tvb, offset, 20, ett_egfx_monitordef, NULL, "(%d,%d) - (%d,%d)", left, top, right, bottom); @@ -356,7 +356,7 @@ dissect_rdp_egfx_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t } case RDPGFX_CMDID_STARTFRAME: { - guint32 frameId; + uint32_t frameId; egfx_frame_t *frame; col_append_sep_str(pinfo->cinfo, COL_INFO, ",", "Start frame"); proto_tree_add_item(tree, hf_egfx_start_timestamp, tvb, offset, 4, ENC_LITTLE_ENDIAN); @@ -381,7 +381,7 @@ dissect_rdp_egfx_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t } case RDPGFX_CMDID_ENDFRAME: { - guint32 frameId; + uint32_t frameId; egfx_frame_t *frame; col_append_sep_str(pinfo->cinfo, COL_INFO, ",", "End frame"); @@ -406,7 +406,7 @@ dissect_rdp_egfx_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t } case RDPGFX_CMDID_FRAMEACKNOWLEDGE: { - guint32 frameId; + uint32_t frameId; egfx_frame_t *frame; col_append_sep_str(pinfo->cinfo, COL_INFO, ",", "Frame acknowledge"); @@ -443,7 +443,7 @@ dissect_rdp_egfx_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t } case RDPGFX_CMDID_QOEFRAMEACKNOWLEDGE: { - guint32 frameId; + uint32_t frameId; egfx_frame_t *frame; col_append_sep_str(pinfo->cinfo, COL_INFO, ",", "Frame acknowledge QoE"); @@ -567,7 +567,7 @@ dissect_rdp_egfx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, voi parent_tree = proto_tree_get_root(parent_tree); if (!rdp_isServerAddressTarget(pinfo)) { - guint32 hash = crc32_ccitt_tvb(tvb, tvb_captured_length_remaining(tvb, 0)); + uint32_t hash = crc32_ccitt_tvb(tvb, tvb_captured_length_remaining(tvb, 0)); egfx_pdu_info_t *pdu_infos = p_get_proto_data(wmem_file_scope(), pinfo, proto_rdp_egfx, EGFX_PDU_KEY); if (!pdu_infos) { pdu_infos = wmem_alloc(wmem_file_scope(), sizeof(*pdu_infos)); @@ -756,7 +756,7 @@ void proto_register_rdp_egfx(void) { }, }; - static gint *ett[] = { + static int *ett[] = { &ett_rdp_egfx, &ett_egfx_caps, &ett_egfx_cap, |