summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-msrcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-msrcp.c')
-rw-r--r--epan/dissectors/packet-msrcp.c66
1 files changed, 34 insertions, 32 deletions
diff --git a/epan/dissectors/packet-msrcp.c b/epan/dissectors/packet-msrcp.c
index 3b5b58e4..06b8bb40 100644
--- a/epan/dissectors/packet-msrcp.c
+++ b/epan/dissectors/packet-msrcp.c
@@ -12,6 +12,8 @@
#include "config.h"
+
+#include <wsutil/array.h>
#include <epan/packet.h>
#include <epan/expert.h>
#include <epan/conversation.h>
@@ -48,32 +50,32 @@ typedef struct _msrcp_conv_info_t {
} msrcp_conv_info_t;
typedef struct _msrcp_transaction_t {
- guint32 req_frame;
- guint32 rep_frame;
+ uint32_t req_frame;
+ uint32_t rep_frame;
nstime_t req_time;
- guint32 seq;
- gboolean matched;
+ uint32_t seq;
+ bool matched;
} msrcp_transaction_t;
-static int proto_msrcp = -1;
-static int hf_msrcp_id = -1;
-static int hf_msrcp_type = -1;
-static int hf_msrcp_vers = -1;
-static int hf_msrcp_reserved = -1;
-static int hf_msrcp_next_header = -1;
-static int hf_msrcp_len = -1;
-static int hf_msrcp_seq = -1;
-static int hf_msrcp_response_in = -1;
-static int hf_msrcp_response_to = -1;
-static int hf_msrcp_ext_header = -1;
-static int hf_msrcp_ext_next_header = -1;
-static int hf_msrcp_ext_len = -1;
-static int hf_msrcp_ext_res = -1;
-
-static gint ett_msrcp = -1;
-static gint ett_msrcp_nxt = -1;
-
-static expert_field ei_msrcp_no_resp = EI_INIT;
+static int proto_msrcp;
+static int hf_msrcp_id;
+static int hf_msrcp_type;
+static int hf_msrcp_vers;
+static int hf_msrcp_reserved;
+static int hf_msrcp_next_header;
+static int hf_msrcp_len;
+static int hf_msrcp_seq;
+static int hf_msrcp_response_in;
+static int hf_msrcp_response_to;
+static int hf_msrcp_ext_header;
+static int hf_msrcp_ext_next_header;
+static int hf_msrcp_ext_len;
+static int hf_msrcp_ext_res;
+
+static int ett_msrcp;
+static int ett_msrcp_nxt;
+
+static expert_field ei_msrcp_no_resp;
// Handles for subparsing
static dissector_handle_t eth_handle;
@@ -98,13 +100,13 @@ dissect_msrcp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* data _U
SrcAddr: 16 bytes
DstAddr: 16 bytes
*/
- guint tree_offset = 0;
+ unsigned tree_offset = 0;
proto_tree* msrcp_tree, * nxt_tree;
proto_item* ti, * nxt_ti;
tvbuff_t* next_tvb;
- guint32 seq;
- guint16 type;
+ uint32_t seq;
+ uint16_t type;
// variables for our expert analysis
conversation_t* conv = NULL;
@@ -112,8 +114,8 @@ dissect_msrcp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* data _U
msrcp_transaction_t* msrcp_trans = NULL;
wmem_tree_key_t key[3];
- type = tvb_get_guint8(tvb, MSRCP_OFFSET_TYPE);
- seq = tvb_get_guint32(tvb, MSRCP_OFFSET_SEQ, ENC_LITTLE_ENDIAN);
+ type = tvb_get_uint8(tvb, MSRCP_OFFSET_TYPE);
+ seq = tvb_get_uint32(tvb, MSRCP_OFFSET_SEQ, ENC_LITTLE_ENDIAN);
conv = find_or_create_conversation(pinfo);
msrcp_info = (msrcp_conv_info_t*)conversation_get_proto_data(conv, proto_msrcp);
@@ -141,7 +143,7 @@ dissect_msrcp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* data _U
msrcp_trans->rep_frame = 0;
msrcp_trans->req_time = pinfo->abs_ts;
msrcp_trans->seq = seq;
- msrcp_trans->matched = FALSE;
+ msrcp_trans->matched = false;
wmem_tree_insert32_array(msrcp_info->pdus, key, (void*)msrcp_trans);
}
else
@@ -156,7 +158,7 @@ dissect_msrcp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* data _U
else if (msrcp_trans->rep_frame == 0)
{
msrcp_trans->rep_frame = pinfo->num;
- msrcp_trans->matched = TRUE;
+ msrcp_trans->matched = true;
}
}
}
@@ -186,7 +188,7 @@ dissect_msrcp(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, void* data _U
msrcp_trans->req_frame = 0;
msrcp_trans->rep_frame = 0;
msrcp_trans->req_time = pinfo->abs_ts;
- msrcp_trans->matched = FALSE;
+ msrcp_trans->matched = false;
}
}
@@ -341,7 +343,7 @@ proto_register_msrcp(void)
},
};
- static gint* ett[] = {
+ static int* ett[] = {
&ett_msrcp,
&ett_msrcp_nxt
};