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-xdmcp.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-xdmcp.c')
-rw-r--r-- | epan/dissectors/packet-xdmcp.c | 132 |
1 files changed, 66 insertions, 66 deletions
diff --git a/epan/dissectors/packet-xdmcp.c b/epan/dissectors/packet-xdmcp.c index cc6463b2..9316e93a 100644 --- a/epan/dissectors/packet-xdmcp.c +++ b/epan/dissectors/packet-xdmcp.c @@ -66,50 +66,50 @@ static const value_string family_vals[] = { { 0, NULL } }; -static gint proto_xdmcp = -1; -static gint hf_xdmcp_version = -1; -static gint hf_xdmcp_opcode = -1; -static gint hf_xdmcp_length = -1; -static gint hf_xdmcp_authentication_name = -1; -static gint hf_xdmcp_authorization_name = -1; -static gint hf_xdmcp_hostname = -1; -static gint hf_xdmcp_status = -1; -static gint hf_xdmcp_session_id = -1; -static gint hf_xdmcp_display_number = -1; -static gint hf_xdmcp_manufacturer_display_id = -1; -static gint hf_xdmcp_manufacturer_display_id_len = -1; -static gint hf_xdmcp_display_class = -1; -static gint hf_xdmcp_display_class_len = -1; -static gint hf_xdmcp_client_address_ipv4 = -1; -static gint hf_xdmcp_client_address_ipv6 = -1; -static gint hf_xdmcp_client_address_bytes = -1; -static gint hf_xdmcp_client_address_bytes_len = -1; -static gint hf_xdmcp_client_port_u16 = -1; -static gint hf_xdmcp_client_port_bytes = -1; -static gint hf_xdmcp_client_port_len = -1; -static gint hf_xdmcp_authentication_data = -1; -static gint hf_xdmcp_authentication_data_len = -1; -static gint hf_xdmcp_authorization_data = -1; -static gint hf_xdmcp_authorization_data_len = -1; -static gint hf_xdmcp_connection_type = -1; -static gint hf_xdmcp_connection_address_ipv4 = -1; -static gint hf_xdmcp_connection_address_ipv6 = -1; -static gint hf_xdmcp_connection_address_bytes = -1; -static gint hf_xdmcp_session_running = -1; - -static gint ett_xdmcp = -1; -static gint ett_xdmcp_authentication_names = -1; -static gint ett_xdmcp_authorization_names = -1; -static gint ett_xdmcp_connections = -1; -static gint ett_xdmcp_connection = -1; - -static expert_field ei_xdmcp_conn_address_mismatch = EI_INIT; - -static gint xdmcp_add_string(proto_tree *tree, gint hf, - tvbuff_t *tvb, gint offset) +static int proto_xdmcp; +static int hf_xdmcp_version; +static int hf_xdmcp_opcode; +static int hf_xdmcp_length; +static int hf_xdmcp_authentication_name; +static int hf_xdmcp_authorization_name; +static int hf_xdmcp_hostname; +static int hf_xdmcp_status; +static int hf_xdmcp_session_id; +static int hf_xdmcp_display_number; +static int hf_xdmcp_manufacturer_display_id; +static int hf_xdmcp_manufacturer_display_id_len; +static int hf_xdmcp_display_class; +static int hf_xdmcp_display_class_len; +static int hf_xdmcp_client_address_ipv4; +static int hf_xdmcp_client_address_ipv6; +static int hf_xdmcp_client_address_bytes; +static int hf_xdmcp_client_address_bytes_len; +static int hf_xdmcp_client_port_u16; +static int hf_xdmcp_client_port_bytes; +static int hf_xdmcp_client_port_len; +static int hf_xdmcp_authentication_data; +static int hf_xdmcp_authentication_data_len; +static int hf_xdmcp_authorization_data; +static int hf_xdmcp_authorization_data_len; +static int hf_xdmcp_connection_type; +static int hf_xdmcp_connection_address_ipv4; +static int hf_xdmcp_connection_address_ipv6; +static int hf_xdmcp_connection_address_bytes; +static int hf_xdmcp_session_running; + +static int ett_xdmcp; +static int ett_xdmcp_authentication_names; +static int ett_xdmcp_authorization_names; +static int ett_xdmcp_connections; +static int ett_xdmcp_connection; + +static expert_field ei_xdmcp_conn_address_mismatch; + +static int xdmcp_add_string(proto_tree *tree, int hf, + tvbuff_t *tvb, int offset) { char *str; - guint len; + unsigned len; len = tvb_get_ntohs(tvb, offset); str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset+2, len, ENC_ASCII); @@ -118,10 +118,10 @@ static gint xdmcp_add_string(proto_tree *tree, gint hf, return len+2; } -static gint xdmcp_add_bytes(proto_tree *tree, gint hf_byte, gint hf_length, - tvbuff_t *tvb, gint offset) +static int xdmcp_add_bytes(proto_tree *tree, int hf_byte, int hf_length, + tvbuff_t *tvb, int offset) { - guint len; + unsigned len; len = tvb_get_ntohs(tvb, offset); proto_tree_add_item(tree, hf_length, tvb, offset, 2, ENC_BIG_ENDIAN); @@ -129,21 +129,21 @@ static gint xdmcp_add_bytes(proto_tree *tree, gint hf_byte, gint hf_length, return len+2; } -static gint xdmcp_add_authentication_names(proto_tree *tree, - tvbuff_t *tvb, gint offset) +static int xdmcp_add_authentication_names(proto_tree *tree, + tvbuff_t *tvb, int offset) { proto_tree *anames_tree; proto_item *anames_ti; - gint anames_len, anames_start_offset; + int anames_len, anames_start_offset; anames_start_offset = offset; - anames_len = tvb_get_guint8(tvb, offset); + anames_len = tvb_get_uint8(tvb, offset); anames_tree = proto_tree_add_subtree_format(tree, tvb, anames_start_offset, -1, ett_xdmcp_authentication_names, &anames_ti, "Authentication names (%d)", anames_len); - anames_len = tvb_get_guint8(tvb, offset); + anames_len = tvb_get_uint8(tvb, offset); offset++; while (anames_len > 0) { offset += xdmcp_add_string(anames_tree, hf_xdmcp_authentication_name, @@ -154,21 +154,21 @@ static gint xdmcp_add_authentication_names(proto_tree *tree, return offset - anames_start_offset; } -static gint xdmcp_add_authorization_names(proto_tree *tree, - tvbuff_t *tvb, gint offset) +static int xdmcp_add_authorization_names(proto_tree *tree, + tvbuff_t *tvb, int offset) { proto_tree *anames_tree; proto_item *anames_ti; - gint anames_len, anames_start_offset; + int anames_len, anames_start_offset; anames_start_offset = offset; - anames_len = tvb_get_guint8(tvb, offset); + anames_len = tvb_get_uint8(tvb, offset); anames_tree = proto_tree_add_subtree_format(tree, tvb, anames_start_offset, -1, ett_xdmcp_authorization_names, &anames_ti, "Authorization names (%d)", anames_len); - anames_len = tvb_get_guint8(tvb, offset); + anames_len = tvb_get_uint8(tvb, offset); offset++; while (anames_len > 0) { offset += xdmcp_add_string(anames_tree, hf_xdmcp_authorization_name, @@ -187,8 +187,8 @@ static gint xdmcp_add_authorization_names(proto_tree *tree, static int dissect_xdmcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - gint version = -1, opcode = -1; - gint offset = 0; + int version = -1, opcode = -1; + int offset = 0; proto_item *ti; proto_tree *xdmcp_tree = 0; @@ -227,7 +227,7 @@ static int dissect_xdmcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo switch (opcode) { case XDMCP_FORWARD_QUERY: { - gint alen, plen; + int alen, plen; alen = tvb_get_ntohs(tvb, offset); /* I have never seen anything except IPv4 addresses here, * but in theory the protocol should support other address @@ -280,17 +280,17 @@ static int dissect_xdmcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo { proto_tree *clist_tree; proto_item *clist_ti; - gint ctypes_len, caddrs_len, n; - gint ctypes_start_offset, caddrs_offset; + int ctypes_len, caddrs_len, n; + int ctypes_start_offset, caddrs_offset; ti = proto_tree_add_item(xdmcp_tree, hf_xdmcp_display_number, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; - ctypes_len = tvb_get_guint8(tvb, offset); + ctypes_len = tvb_get_uint8(tvb, offset); ctypes_start_offset = offset; caddrs_offset = offset + 1 + 2*ctypes_len; - caddrs_len = tvb_get_guint8(tvb, caddrs_offset); + caddrs_len = tvb_get_uint8(tvb, caddrs_offset); if (ctypes_len != caddrs_len) { expert_add_info(pinfo, ti, &ei_xdmcp_conn_address_mismatch); return offset; @@ -309,8 +309,8 @@ static int dissect_xdmcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo proto_item *connection_ti; proto_tree *connection_tree; - gint alen; - gint ctype = tvb_get_ntohs(tvb, offset); + int alen; + int ctype = tvb_get_ntohs(tvb, offset); offset += 2; alen = tvb_get_ntohs(tvb, caddrs_offset); caddrs_offset += 2; @@ -412,7 +412,7 @@ static int dissect_xdmcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo case XDMCP_ALIVE: { - guint8 session_running = tvb_get_guint8(tvb, offset); + uint8_t session_running = tvb_get_uint8(tvb, offset); proto_tree_add_uint_format_value(xdmcp_tree, hf_xdmcp_session_running, tvb, offset, 1, session_running, "%s", session_running ? "Yes" : "No"); offset++; @@ -585,7 +585,7 @@ void proto_register_xdmcp(void) }; /* Setup protocol subtree array */ - static gint *ett[] = { + static int *ett[] = { &ett_xdmcp, &ett_xdmcp_authentication_names, &ett_xdmcp_authorization_names, |