summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-starteam.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
commita86c5f7cae7ec9a3398300555a0b644689d946a1 (patch)
tree39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /epan/dissectors/packet-starteam.c
parentReleasing progress-linux version 4.2.6-1~progress7.99u1. (diff)
downloadwireshark-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-starteam.c')
-rw-r--r--epan/dissectors/packet-starteam.c84
1 files changed, 42 insertions, 42 deletions
diff --git a/epan/dissectors/packet-starteam.c b/epan/dissectors/packet-starteam.c
index d1eccb23..5b8fba7d 100644
--- a/epan/dissectors/packet-starteam.c
+++ b/epan/dissectors/packet-starteam.c
@@ -24,35 +24,35 @@
void proto_register_starteam(void);
void proto_reg_handoff_starteam(void);
-static int proto_starteam = -1;
-
-static int hf_starteam_mdh_session_tag = -1;
-static int hf_starteam_mdh_ctimestamp = -1;
-static int hf_starteam_mdh_flags = -1;
-static int hf_starteam_mdh_keyid = -1;
-static int hf_starteam_mdh_reserved = -1;
-static int hf_starteam_ph_signature = -1;
-static int hf_starteam_ph_packet_size = -1;
-static int hf_starteam_ph_data_size = -1;
-static int hf_starteam_ph_data_flags = -1;
-static int hf_starteam_id_revision_level = -1;
-static int hf_starteam_id_client = -1;
-static int hf_starteam_id_connect = -1;
-static int hf_starteam_id_component = -1;
-static int hf_starteam_id_command = -1;
-static int hf_starteam_id_command_time = -1;
-static int hf_starteam_id_command_userid = -1;
-static int hf_starteam_data_data = -1;
-
-static gint ett_starteam = -1;
-static gint ett_starteam_mdh = -1;
-static gint ett_starteam_ph = -1;
-static gint ett_starteam_id = -1;
-static gint ett_starteam_data = -1;
+static int proto_starteam;
+
+static int hf_starteam_mdh_session_tag;
+static int hf_starteam_mdh_ctimestamp;
+static int hf_starteam_mdh_flags;
+static int hf_starteam_mdh_keyid;
+static int hf_starteam_mdh_reserved;
+static int hf_starteam_ph_signature;
+static int hf_starteam_ph_packet_size;
+static int hf_starteam_ph_data_size;
+static int hf_starteam_ph_data_flags;
+static int hf_starteam_id_revision_level;
+static int hf_starteam_id_client;
+static int hf_starteam_id_connect;
+static int hf_starteam_id_component;
+static int hf_starteam_id_command;
+static int hf_starteam_id_command_time;
+static int hf_starteam_id_command_userid;
+static int hf_starteam_data_data;
+
+static int ett_starteam;
+static int ett_starteam_mdh;
+static int ett_starteam_ph;
+static int ett_starteam_id;
+static int ett_starteam_data;
static dissector_handle_t starteam_tcp_handle;
-static gboolean starteam_desegment = TRUE;
+static bool starteam_desegment = true;
#define STARTEAM_MAGIC 0x416C616E /* "Alan" */
@@ -462,7 +462,7 @@ static const value_string starteam_opcode_vals[] = {
static value_string_ext starteam_opcode_vals_ext = VALUE_STRING_EXT_INIT(starteam_opcode_vals);
-static gint iPreviousFrameNumber = -1;
+static int iPreviousFrameNumber = -1;
static void
starteam_init(void)
@@ -473,12 +473,12 @@ starteam_init(void)
static int
dissect_starteam(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- gint offset = 0;
+ int offset = 0;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "StarTeam");
/* This is a trick to know whether this is the first PDU in this packet or not */
- if(iPreviousFrameNumber != (gint) pinfo->num){
+ if(iPreviousFrameNumber != (int) pinfo->num){
col_clear(pinfo->cinfo, COL_INFO);
} else {
col_append_str(pinfo->cinfo, COL_INFO, " | ");
@@ -486,16 +486,16 @@ dissect_starteam(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
iPreviousFrameNumber = pinfo->num;
if(tvb_captured_length(tvb) >= 16){
- guint32 iCommand = 0;
- gboolean bRequest = FALSE;
+ uint32_t iCommand = 0;
+ bool bRequest = false;
if(tvb_get_ntohl(tvb, offset + 0) == STARTEAM_MAGIC){
/* This packet is a response */
- bRequest = FALSE;
+ bRequest = false;
col_append_fstr(pinfo->cinfo, COL_INFO, "Reply: %d bytes", tvb_reported_length(tvb));
} else if(tvb_captured_length_remaining(tvb, offset) >= 28 && tvb_get_ntohl(tvb, offset + 20) == STARTEAM_MAGIC){
/* This packet is a request */
- bRequest = TRUE;
+ bRequest = true;
if(tvb_captured_length_remaining(tvb, offset) >= 66){
iCommand = tvb_get_letohl(tvb, offset + 62);
}
@@ -560,11 +560,11 @@ dissect_starteam(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
return tvb_captured_length(tvb);
}
-static guint
+static unsigned
get_starteam_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb,
int offset, void *data _U_)
{
- guint32 iPDULength = 0;
+ uint32_t iPDULength = 0;
if(tvb_captured_length_remaining(tvb, offset) >= 8 && tvb_get_ntohl(tvb, offset + 0) == STARTEAM_MAGIC){
/* Response */
iPDULength = tvb_get_letohl(tvb, offset + 4) + 16;
@@ -583,19 +583,19 @@ dissect_starteam_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
}
-static gboolean
+static bool
dissect_starteam_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
if(tvb_captured_length(tvb) >= 32){
- gint iOffsetLengths = -1;
+ int iOffsetLengths = -1;
if(tvb_get_ntohl(tvb, 0) == STARTEAM_MAGIC){
iOffsetLengths = 4;
} else if(tvb_get_ntohl(tvb, 20) == STARTEAM_MAGIC){
iOffsetLengths = 24;
}
if(iOffsetLengths != -1){
- guint32 iLengthPacket;
- guint32 iLengthData;
+ uint32_t iLengthPacket;
+ uint32_t iLengthData;
iLengthPacket = tvb_get_letohl(tvb, iOffsetLengths);
iLengthData = tvb_get_letohl(tvb, iOffsetLengths + 4);
@@ -607,11 +607,11 @@ dissect_starteam_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
/* Dissect the packet */
dissect_starteam(tvb, pinfo, tree, data);
- return TRUE;
+ return true;
}
}
}
- return FALSE;
+ return false;
}
void
@@ -669,7 +669,7 @@ proto_register_starteam(void)
{ &hf_starteam_data_data,
{ "Data", "starteam.data", FT_STRINGZ, BASE_NONE, NULL, 0x0, NULL, HFILL }}
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_starteam,
&ett_starteam_mdh,
&ett_starteam_ph,