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-ms-nns.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-ms-nns.c')
-rw-r--r-- | epan/dissectors/packet-ms-nns.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/epan/dissectors/packet-ms-nns.c b/epan/dissectors/packet-ms-nns.c index a364dc5b..c9b00d2f 100644 --- a/epan/dissectors/packet-ms-nns.c +++ b/epan/dissectors/packet-ms-nns.c @@ -38,21 +38,21 @@ static const value_string nns_message_id_vals[] = { }; struct nns_session_state { - guint32 handshake_done; - gboolean first_handshake_done; + uint32_t handshake_done; + bool first_handshake_done; }; -static int proto_nns = -1; -static int hf_nns_message_id = -1; -static int hf_nns_major_version = -1; -static int hf_nns_minor_version = -1; -static int hf_nns_auth_payload_size = -1; -static int hf_nns_auth_payload = -1; -static int hf_nns_payload_size = -1; -static int hf_nns_payload = -1; +static int proto_nns; +static int hf_nns_message_id; +static int hf_nns_major_version; +static int hf_nns_minor_version; +static int hf_nns_auth_payload_size; +static int hf_nns_auth_payload; +static int hf_nns_payload_size; +static int hf_nns_payload; -static gint ett_nns = -1; -static gint ett_nns_payload = -1; +static int ett_nns; +static int ett_nns_payload; #define MS_NNS_MIN_LENGTH 4 @@ -61,12 +61,12 @@ dissect_nns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { proto_item *ti, *pti; proto_tree *nns_tree, *payload_tree; - guint offset = 0; - guint32 message_id; - guint32 payload_size; + unsigned offset = 0; + uint32_t message_id; + uint32_t payload_size; conversation_t *conversation; tvbuff_t *nt_tvb; - gint remaining; + int remaining; struct nns_session_state *session_state; if (tvb_reported_length(tvb) < MS_NNS_MIN_LENGTH) @@ -97,14 +97,14 @@ dissect_nns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) col_append_str(pinfo->cinfo, COL_INFO, "Data"); if ( payload_size > 0) { remaining = tvb_reported_length_remaining(tvb, offset); - if ((guint32) remaining < payload_size) { + if ((uint32_t) remaining < payload_size) { pinfo->desegment_offset = offset - 4; pinfo->desegment_len = payload_size - remaining; return (offset - 4); } proto_tree_add_item(nns_tree, hf_nns_payload, tvb, offset, payload_size, ENC_NA); offset += payload_size; - session_state->first_handshake_done = FALSE; + session_state->first_handshake_done = false; } } else { @@ -118,7 +118,7 @@ dissect_nns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) proto_tree_add_item_ret_uint(nns_tree, hf_nns_auth_payload_size, tvb, offset, 2, ENC_BIG_ENDIAN, &payload_size); offset += 2; if ( payload_size > 0) { - if ((guint32) tvb_reported_length_remaining(tvb, offset) < payload_size) { + if ((uint32_t) tvb_reported_length_remaining(tvb, offset) < payload_size) { pinfo->desegment_offset = offset - 5; pinfo->desegment_len = payload_size; return (offset - 5); @@ -133,7 +133,7 @@ dissect_nns(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) } if ( message_id == MS_NNS_MESSAGE_HANDSHAKE_DONE) { session_state->handshake_done = pinfo->num; - session_state->first_handshake_done = (session_state->first_handshake_done ? FALSE : TRUE); + session_state->first_handshake_done = (session_state->first_handshake_done ? false : true); } } return offset; @@ -179,7 +179,7 @@ void proto_register_nns(void) } }; - static gint *ett[] = { + static int *ett[] = { &ett_nns, &ett_nns_payload }; |