diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:26 +0000 |
commit | c4e8a3222648fcf22ca207f1815ebbf7cd144eeb (patch) | |
tree | 93d5c6aa93d9987680dd1adad5685e2ad698f223 /epan/dissectors/packet-soupbintcp.c | |
parent | Adding upstream version 4.2.6. (diff) | |
download | wireshark-upstream.tar.xz wireshark-upstream.zip |
Adding upstream version 4.4.0.upstream/4.4.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | epan/dissectors/packet-soupbintcp.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/epan/dissectors/packet-soupbintcp.c b/epan/dissectors/packet-soupbintcp.c index 6b8baa5c..dda49763 100644 --- a/epan/dissectors/packet-soupbintcp.c +++ b/epan/dissectors/packet-soupbintcp.c @@ -61,14 +61,14 @@ struct conv_data { * * Set by the Login Accepted packet, and then updated for each * subsequent Sequenced Data packet during dissection. */ - guint next_seq; + unsigned next_seq; }; /** Per-PDU data, stored in the frame's private data pointer */ struct pdu_data { /** Sequence number for this PDU */ - guint seq_num; + unsigned seq_num; }; @@ -97,31 +97,31 @@ static const value_string reject_code_val[] = { /* Initialize the protocol and registered fields */ -static int proto_soupbintcp = -1; +static int proto_soupbintcp; static dissector_handle_t soupbintcp_handle; static heur_dissector_list_t heur_subdissector_list; /* Preferences */ -static gboolean soupbintcp_desegment = TRUE; +static bool soupbintcp_desegment = true; /* Initialize the subtree pointers */ -static gint ett_soupbintcp = -1; +static int ett_soupbintcp; /* Header field formatting */ -static int hf_soupbintcp_packet_length = -1; -static int hf_soupbintcp_packet_type = -1; -static int hf_soupbintcp_message = -1; -static int hf_soupbintcp_text = -1; -static int hf_soupbintcp_username = -1; -static int hf_soupbintcp_password = -1; -static int hf_soupbintcp_session = -1; -static int hf_soupbintcp_seq_num = -1; -static int hf_soupbintcp_next_seq_num = -1; -static int hf_soupbintcp_req_seq_num = -1; -static int hf_soupbintcp_reject_code = -1; - -static expert_field ei_soupbintcp_next_seq_num_invalid = EI_INIT; -static expert_field ei_soupbintcp_req_seq_num_invalid = EI_INIT; +static int hf_soupbintcp_packet_length; +static int hf_soupbintcp_packet_type; +static int hf_soupbintcp_message; +static int hf_soupbintcp_text; +static int hf_soupbintcp_username; +static int hf_soupbintcp_password; +static int hf_soupbintcp_session; +static int hf_soupbintcp_seq_num; +static int hf_soupbintcp_next_seq_num; +static int hf_soupbintcp_req_seq_num; +static int hf_soupbintcp_reject_code; + +static expert_field ei_soupbintcp_next_seq_num_invalid; +static expert_field ei_soupbintcp_req_seq_num_invalid; /** Dissector for SoupBinTCP messages */ static void @@ -133,26 +133,26 @@ dissect_soupbintcp_common( struct conv_data *conv_data; struct pdu_data *pdu_data; const char *pkt_name; - gint32 seq_num; - gboolean seq_num_valid; + int32_t seq_num; + bool seq_num_valid; proto_item *ti; proto_tree *soupbintcp_tree = NULL; conversation_t *conv = NULL; - guint16 expected_len; - guint8 pkt_type; - gint offset = 0; - guint this_seq = 0, next_seq = 0, key; + uint16_t expected_len; + uint8_t pkt_type; + int offset = 0; + unsigned this_seq = 0, next_seq = 0, key; heur_dtbl_entry_t *hdtbl_entry; proto_item *pi; /* Record the start of the packet to use as a sequence number key */ - key = (guint)tvb_raw_offset(tvb); + key = (unsigned)tvb_raw_offset(tvb); /* Get the 16-bit big-endian SOUP packet length */ expected_len = tvb_get_ntohs(tvb, 0); /* Get the 1-byte SOUP message type */ - pkt_type = tvb_get_guint8(tvb, 2); + pkt_type = tvb_get_uint8(tvb, 2); /* Since we use the packet name a few times, get and save that value */ pkt_name = val_to_str(pkt_type, pkt_type_val, "Unknown (%u)"); @@ -388,7 +388,7 @@ dissect_soupbintcp_common( /** Return the size of the PDU in @p tvb, starting at @p offset */ -static guint +static unsigned get_soupbintcp_pdu_len( packet_info *pinfo _U_, tvbuff_t *tvb, @@ -400,7 +400,7 @@ get_soupbintcp_pdu_len( least two bytes here because we told tcp_dissect_pdus() that we needed them. Add 2 to the retrieved value, because the SOUP length doesn't include the length field itself. */ - return (guint)tvb_get_ntohs(tvb, offset) + 2; + return (unsigned)tvb_get_ntohs(tvb, offset) + 2; } @@ -509,7 +509,7 @@ proto_register_soupbintcp(void) HFILL }} }; - static gint *ett[] = { + static int *ett[] = { &ett_soupbintcp }; @@ -538,7 +538,7 @@ proto_register_soupbintcp(void) "spanning multiple TCP segments.", &soupbintcp_desegment); - heur_subdissector_list = register_heur_dissector_list("soupbintcp", proto_soupbintcp); + heur_subdissector_list = register_heur_dissector_list_with_description("soupbintcp", "SoupBinTCP encapsulated data", proto_soupbintcp); expert_soupbinttcp = expert_register_protocol(proto_soupbintcp); expert_register_field_array(expert_soupbinttcp, ei, array_length(ei)); |