summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dlep.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-dlep.c')
-rw-r--r--epan/dissectors/packet-dlep.c294
1 files changed, 147 insertions, 147 deletions
diff --git a/epan/dissectors/packet-dlep.c b/epan/dissectors/packet-dlep.c
index af5e7809..045e7e93 100644
--- a/epan/dissectors/packet-dlep.c
+++ b/epan/dissectors/packet-dlep.c
@@ -193,7 +193,7 @@
#define DLEP_MSG_HEADER_LEN 4
-static gboolean dlep_desegment = TRUE;
+static bool dlep_desegment = true;
static dissector_handle_t dlep_msg_handle;
static dissector_handle_t dlep_sig_handle;
@@ -202,82 +202,82 @@ static dissector_table_t dlep_dataitem_table;
void proto_register_dlep(void);
void proto_reg_handoff_dlep(void);
-static gint proto_dlep = -1;
-static gint proto_dataitem = -1;
-
-static gint ett_dlep = -1;
-static gint ett_dlep_dataitem = -1;
-static gint ett_dlep_flags = -1;
-
-static gint hf_dlep_signal = -1;
-static gint hf_dlep_signal_signature = -1;
-static gint hf_dlep_signal_type = -1;
-static gint hf_dlep_signal_length = -1;
-static gint hf_dlep_message = -1;
-static gint hf_dlep_message_type = -1;
-static gint hf_dlep_message_length = -1;
-static gint hf_dlep_dataitem = -1;
-static gint hf_dlep_dataitem_type = -1;
-static gint hf_dlep_dataitem_length = -1;
-static gint hf_dlep_dataitem_value = -1;
-static gint hf_dlep_dataitem_status = -1;
-static gint hf_dlep_dataitem_status_code = -1;
-static gint hf_dlep_dataitem_status_text = -1;
-static gint hf_dlep_dataitem_v4conn = -1;
-static gint hf_dlep_dataitem_v4conn_flags = -1;
-static gint hf_dlep_dataitem_v4conn_flags_tls = -1;
-static gint hf_dlep_dataitem_v4conn_addr = -1;
-static gint hf_dlep_dataitem_v4conn_port = -1;
-static gint hf_dlep_dataitem_v6conn = -1;
-static gint hf_dlep_dataitem_v6conn_flags = -1;
-static gint hf_dlep_dataitem_v6conn_flags_tls = -1;
-static gint hf_dlep_dataitem_v6conn_addr = -1;
-static gint hf_dlep_dataitem_v6conn_port = -1;
-static gint hf_dlep_dataitem_peertype = -1;
-static gint hf_dlep_dataitem_peertype_flags = -1;
-static gint hf_dlep_dataitem_peertype_flags_smi = -1;
-static gint hf_dlep_dataitem_peertype_description = -1;
-static gint hf_dlep_dataitem_heartbeat = -1;
-static gint hf_dlep_dataitem_extsupp = -1;
-static gint hf_dlep_dataitem_extsupp_code = -1;
-static gint hf_dlep_dataitem_macaddr_eui48 = -1;
-static gint hf_dlep_dataitem_macaddr_eui64 = -1;
-static gint hf_dlep_dataitem_v4addr = -1;
-static gint hf_dlep_dataitem_v4addr_flags = -1;
-static gint hf_dlep_dataitem_v4addr_flags_adddrop = -1;
-static gint hf_dlep_dataitem_v4addr_addr = -1;
-static gint hf_dlep_dataitem_v6addr = -1;
-static gint hf_dlep_dataitem_v6addr_flags = -1;
-static gint hf_dlep_dataitem_v6addr_flags_adddrop = -1;
-static gint hf_dlep_dataitem_v6addr_addr = -1;
-static gint hf_dlep_dataitem_v4subnet = -1;
-static gint hf_dlep_dataitem_v4subnet_flags = -1;
-static gint hf_dlep_dataitem_v4subnet_flags_adddrop = -1;
-static gint hf_dlep_dataitem_v4subnet_subnet = -1;
-static gint hf_dlep_dataitem_v4subnet_prefixlen = -1;
-static gint hf_dlep_dataitem_v6subnet = -1;
-static gint hf_dlep_dataitem_v6subnet_flags = -1;
-static gint hf_dlep_dataitem_v6subnet_flags_adddrop = -1;
-static gint hf_dlep_dataitem_v6subnet_subnet = -1;
-static gint hf_dlep_dataitem_v6subnet_prefixlen = -1;
-static gint hf_dlep_dataitem_mdrr = -1;
-static gint hf_dlep_dataitem_mdrt = -1;
-static gint hf_dlep_dataitem_cdrr = -1;
-static gint hf_dlep_dataitem_cdrt = -1;
-static gint hf_dlep_dataitem_latency = -1;
-static gint hf_dlep_dataitem_resources = -1;
-static gint hf_dlep_dataitem_rlqr = -1;
-static gint hf_dlep_dataitem_rlqt = -1;
-static gint hf_dlep_dataitem_mtu = -1;
-static gint hf_dlep_dataitem_hop_count_flags = -1;
-static gint hf_dlep_dataitem_hop_count_flags_p = -1;
-static gint hf_dlep_dataitem_hop_count_flags_reserved = -1;
-static gint hf_dlep_dataitem_hop_count = -1;
-static gint hf_dlep_dataitem_hop_control = -1;
-static gint hf_dlep_dataitem_li_length = -1;
-static gint hf_dlep_dataitem_li = -1;
-static gint hf_dlep_dataitem_max_lat = -1;
-static gint hf_dlep_dataitem_min_lat = -1;
+static int proto_dlep;
+static int proto_dataitem;
+
+static int ett_dlep;
+static int ett_dlep_dataitem;
+static int ett_dlep_flags;
+
+static int hf_dlep_signal;
+static int hf_dlep_signal_signature;
+static int hf_dlep_signal_type;
+static int hf_dlep_signal_length;
+static int hf_dlep_message;
+static int hf_dlep_message_type;
+static int hf_dlep_message_length;
+static int hf_dlep_dataitem;
+static int hf_dlep_dataitem_type;
+static int hf_dlep_dataitem_length;
+static int hf_dlep_dataitem_value;
+static int hf_dlep_dataitem_status;
+static int hf_dlep_dataitem_status_code;
+static int hf_dlep_dataitem_status_text;
+static int hf_dlep_dataitem_v4conn;
+static int hf_dlep_dataitem_v4conn_flags;
+static int hf_dlep_dataitem_v4conn_flags_tls;
+static int hf_dlep_dataitem_v4conn_addr;
+static int hf_dlep_dataitem_v4conn_port;
+static int hf_dlep_dataitem_v6conn;
+static int hf_dlep_dataitem_v6conn_flags;
+static int hf_dlep_dataitem_v6conn_flags_tls;
+static int hf_dlep_dataitem_v6conn_addr;
+static int hf_dlep_dataitem_v6conn_port;
+static int hf_dlep_dataitem_peertype;
+static int hf_dlep_dataitem_peertype_flags;
+static int hf_dlep_dataitem_peertype_flags_smi;
+static int hf_dlep_dataitem_peertype_description;
+static int hf_dlep_dataitem_heartbeat;
+static int hf_dlep_dataitem_extsupp;
+static int hf_dlep_dataitem_extsupp_code;
+static int hf_dlep_dataitem_macaddr_eui48;
+static int hf_dlep_dataitem_macaddr_eui64;
+static int hf_dlep_dataitem_v4addr;
+static int hf_dlep_dataitem_v4addr_flags;
+static int hf_dlep_dataitem_v4addr_flags_adddrop;
+static int hf_dlep_dataitem_v4addr_addr;
+static int hf_dlep_dataitem_v6addr;
+static int hf_dlep_dataitem_v6addr_flags;
+static int hf_dlep_dataitem_v6addr_flags_adddrop;
+static int hf_dlep_dataitem_v6addr_addr;
+static int hf_dlep_dataitem_v4subnet;
+static int hf_dlep_dataitem_v4subnet_flags;
+static int hf_dlep_dataitem_v4subnet_flags_adddrop;
+static int hf_dlep_dataitem_v4subnet_subnet;
+static int hf_dlep_dataitem_v4subnet_prefixlen;
+static int hf_dlep_dataitem_v6subnet;
+static int hf_dlep_dataitem_v6subnet_flags;
+static int hf_dlep_dataitem_v6subnet_flags_adddrop;
+static int hf_dlep_dataitem_v6subnet_subnet;
+static int hf_dlep_dataitem_v6subnet_prefixlen;
+static int hf_dlep_dataitem_mdrr;
+static int hf_dlep_dataitem_mdrt;
+static int hf_dlep_dataitem_cdrr;
+static int hf_dlep_dataitem_cdrt;
+static int hf_dlep_dataitem_latency;
+static int hf_dlep_dataitem_resources;
+static int hf_dlep_dataitem_rlqr;
+static int hf_dlep_dataitem_rlqt;
+static int hf_dlep_dataitem_mtu;
+static int hf_dlep_dataitem_hop_count_flags;
+static int hf_dlep_dataitem_hop_count_flags_p;
+static int hf_dlep_dataitem_hop_count_flags_reserved;
+static int hf_dlep_dataitem_hop_count;
+static int hf_dlep_dataitem_hop_control;
+static int hf_dlep_dataitem_li_length;
+static int hf_dlep_dataitem_li;
+static int hf_dlep_dataitem_max_lat;
+static int hf_dlep_dataitem_min_lat;
static const value_string signal_type_vals[] = {
{ DLEP_SIG_RESERVED, "Reserved" },
@@ -376,20 +376,20 @@ static const range_string hop_cntrl_action_vals[] = {
{ 0, 0, NULL }
};
-static expert_field ei_dlep_signal_unexpected_length = EI_INIT;
-static expert_field ei_dlep_message_unexpected_length = EI_INIT;
-static expert_field ei_dlep_dataitem_unexpected_length = EI_INIT;
-static expert_field ei_dlep_dataitem_macaddr_unexpected_length = EI_INIT;
+static expert_field ei_dlep_signal_unexpected_length;
+static expert_field ei_dlep_message_unexpected_length;
+static expert_field ei_dlep_dataitem_unexpected_length;
+static expert_field ei_dlep_dataitem_macaddr_unexpected_length;
/* Section 13.1: Status */
static int
decode_dataitem_status(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- const gint len = tvb_captured_length(tvb);
- gint offset = 0;
+ const int len = tvb_captured_length(tvb);
+ int offset = 0;
proto_item *tmp_pi = NULL;
- guint32 status_code;
+ uint32_t status_code;
/* Add and hide the specific dataitem protocol item */
tmp_pi = proto_tree_add_item(pt, hf_dlep_dataitem_status, tvb, offset, len, ENC_NA);
@@ -415,11 +415,11 @@ static int
decode_dataitem_v4conn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- const gint len = tvb_captured_length(tvb);
- gint offset = 0;
+ const int len = tvb_captured_length(tvb);
+ int offset = 0;
proto_item* tmp_pi = NULL;
proto_tree* flags_pt = NULL;
- guint32 v4conn_port;
+ uint32_t v4conn_port;
tmp_pi = proto_tree_add_item(pt, hf_dlep_dataitem_v4conn, tvb, offset, len, ENC_NA);
proto_item_set_hidden(tmp_pi);
@@ -447,11 +447,11 @@ static int
decode_dataitem_v6conn(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- const gint len = tvb_captured_length(tvb);
- gint offset = 0;
+ const int len = tvb_captured_length(tvb);
+ int offset = 0;
proto_item* tmp_pi = NULL;
proto_tree* flags_pt = NULL;
- guint32 v6conn_port;
+ uint32_t v6conn_port;
tmp_pi = proto_tree_add_item(pt, hf_dlep_dataitem_v6conn, tvb, offset, len, ENC_NA);
proto_item_set_hidden(tmp_pi);
@@ -479,8 +479,8 @@ static int
decode_dataitem_peertype(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- const gint len = tvb_captured_length(tvb);
- gint offset = 0;
+ const int len = tvb_captured_length(tvb);
+ int offset = 0;
proto_item *tmp_pi = NULL;
proto_tree * flags_pt = NULL;
@@ -508,8 +508,8 @@ static int
decode_dataitem_heartbeat(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- gint offset = 0;
- guint32 heartbeat;
+ int offset = 0;
+ uint32_t heartbeat;
proto_tree_add_item_ret_uint(pt, hf_dlep_dataitem_heartbeat, tvb, offset, DLEP_DIT_HEARTBEAT_LEN, ENC_BIG_ENDIAN, &heartbeat);
proto_item_append_text(pi, ": %u (ms)", heartbeat);
@@ -523,9 +523,9 @@ static int
decode_dataitem_extsupp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- const gint len = tvb_captured_length(tvb);
- gint offset = 0;
- guint32 extension_code;
+ const int len = tvb_captured_length(tvb);
+ int offset = 0;
+ uint32_t extension_code;
proto_item* tmp_pi = NULL;
@@ -543,19 +543,19 @@ decode_dataitem_extsupp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *pt, v
/* Section 13.7: MAC Address */
static int
-decode_dataitem_macaddr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *pt, void *data _U_)
+decode_dataitem_macaddr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- const gint len = tvb_captured_length(tvb);
- gint offset = 0;
+ const int len = tvb_captured_length(tvb);
+ int offset = 0;
switch(len) {
case FT_ETHER_LEN:
proto_tree_add_item(pt, hf_dlep_dataitem_macaddr_eui48, tvb, offset, len, ENC_NA);
- proto_item_append_text(pi, ": %s", tvb_ether_to_str(wmem_packet_scope(), tvb, offset));
+ proto_item_append_text(pi, ": %s", tvb_ether_to_str(pinfo->pool, tvb, offset));
break;
case FT_EUI64_LEN:
proto_tree_add_item(pt, hf_dlep_dataitem_macaddr_eui64, tvb, offset, len, ENC_BIG_ENDIAN);
- proto_item_append_text(pi, ": %s", tvb_eui64_to_str(wmem_packet_scope(), tvb, offset));
+ proto_item_append_text(pi, ": %s", tvb_eui64_to_str(pinfo->pool, tvb, offset));
break;
default:
proto_tree_add_expert(pt, NULL, &ei_dlep_dataitem_macaddr_unexpected_length, tvb, offset, len);
@@ -571,7 +571,7 @@ static int
decode_dataitem_v4addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- gint offset = 0;
+ int offset = 0;
proto_item* tmp_pi = NULL;
proto_tree* flags_pt = NULL;
@@ -581,7 +581,7 @@ decode_dataitem_v4addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pt, void *
tmp_pi = proto_tree_add_item(pt, hf_dlep_dataitem_v4addr_flags, tvb, offset, DLEP_DIT_V4ADDR_FLAGS_LEN, ENC_NA);
flags_pt = proto_item_add_subtree(tmp_pi, ett_dlep_flags);
proto_tree_add_item(flags_pt, hf_dlep_dataitem_v4addr_flags_adddrop, tvb, offset, DLEP_DIT_V4ADDR_FLAGS_LEN, ENC_BIG_ENDIAN);
- proto_item_append_text(pi, ", %s:", tfs_get_string(tvb_get_guint8(tvb, offset) & DLEP_DIT_V4ADDR_FLAGMASK_ADDDROP, &tfs_add_drop));
+ proto_item_append_text(pi, ", %s:", tfs_get_string(tvb_get_uint8(tvb, offset) & DLEP_DIT_V4ADDR_FLAGMASK_ADDDROP, &tfs_add_drop));
offset+=DLEP_DIT_V4ADDR_FLAGS_LEN;
proto_tree_add_item(pt, hf_dlep_dataitem_v4addr_addr, tvb, offset, FT_IPv4_LEN, ENC_BIG_ENDIAN);
@@ -596,7 +596,7 @@ static int
decode_dataitem_v6addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- gint offset = 0;
+ int offset = 0;
proto_item* tmp_pi = NULL;
proto_tree* flags_pt = NULL;
@@ -606,7 +606,7 @@ decode_dataitem_v6addr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pt, void *
tmp_pi = proto_tree_add_item(pt, hf_dlep_dataitem_v6addr_flags, tvb, offset, DLEP_DIT_V6ADDR_FLAGS_LEN, ENC_NA);
flags_pt = proto_item_add_subtree(tmp_pi, ett_dlep_flags);
proto_tree_add_item(flags_pt, hf_dlep_dataitem_v6addr_flags_adddrop, tvb, offset, DLEP_DIT_V6ADDR_FLAGS_LEN, ENC_BIG_ENDIAN);
- proto_item_append_text(pi, ", %s:", tfs_get_string(tvb_get_guint8(tvb, offset) & DLEP_DIT_V6ADDR_FLAGMASK_ADDDROP, &tfs_add_drop));
+ proto_item_append_text(pi, ", %s:", tfs_get_string(tvb_get_uint8(tvb, offset) & DLEP_DIT_V6ADDR_FLAGMASK_ADDDROP, &tfs_add_drop));
offset+=DLEP_DIT_V6ADDR_FLAGS_LEN;
proto_tree_add_item(pt, hf_dlep_dataitem_v6addr_addr, tvb, offset, FT_IPv6_LEN, ENC_NA);
@@ -621,10 +621,10 @@ static int
decode_dataitem_v4subnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- gint offset = 0;
+ int offset = 0;
proto_item* tmp_pi = NULL;
proto_tree* flags_pt = NULL;
- guint32 prefixlen;
+ uint32_t prefixlen;
tmp_pi = proto_tree_add_item(pt, hf_dlep_dataitem_v4subnet, tvb, offset, DLEP_DIT_V4SUBNET_LEN, ENC_NA);
proto_item_set_hidden(tmp_pi);
@@ -632,7 +632,7 @@ decode_dataitem_v4subnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pt, void
tmp_pi = proto_tree_add_item(pt, hf_dlep_dataitem_v4subnet_flags, tvb, offset, DLEP_DIT_V4SUBNET_FLAGS_LEN, ENC_NA);
flags_pt = proto_item_add_subtree(tmp_pi, ett_dlep_flags);
proto_tree_add_item(flags_pt, hf_dlep_dataitem_v4subnet_flags_adddrop, tvb, offset, DLEP_DIT_V4SUBNET_FLAGS_LEN, ENC_BIG_ENDIAN);
- proto_item_append_text(pi, ", %s:", tfs_get_string(tvb_get_guint8(tvb, offset) & DLEP_DIT_V4SUBNET_FLAGMASK_ADDDROP, &tfs_add_drop));
+ proto_item_append_text(pi, ", %s:", tfs_get_string(tvb_get_uint8(tvb, offset) & DLEP_DIT_V4SUBNET_FLAGMASK_ADDDROP, &tfs_add_drop));
offset+=DLEP_DIT_V4SUBNET_FLAGS_LEN;
proto_tree_add_item(pt, hf_dlep_dataitem_v4subnet_subnet, tvb, offset, FT_IPv4_LEN, ENC_BIG_ENDIAN);
@@ -651,10 +651,10 @@ static int
decode_dataitem_v6subnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- gint offset = 0;
+ int offset = 0;
proto_item* tmp_pi = NULL;
proto_tree* flags_pt = NULL;
- guint32 prefixlen;
+ uint32_t prefixlen;
tmp_pi = proto_tree_add_item(pt, hf_dlep_dataitem_v6subnet, tvb, offset, DLEP_DIT_V6SUBNET_LEN, ENC_NA);
proto_item_set_hidden(tmp_pi);
@@ -662,7 +662,7 @@ decode_dataitem_v6subnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pt, void
tmp_pi = proto_tree_add_item(pt, hf_dlep_dataitem_v6subnet_flags, tvb, offset, DLEP_DIT_V6SUBNET_FLAGS_LEN, ENC_NA);
flags_pt = proto_item_add_subtree(tmp_pi, ett_dlep_flags);
proto_tree_add_item(flags_pt, hf_dlep_dataitem_v6subnet_flags_adddrop, tvb, offset, DLEP_DIT_V6SUBNET_FLAGS_LEN, ENC_BIG_ENDIAN);
- proto_item_append_text(pi, ", %s:", tfs_get_string(tvb_get_guint8(tvb, offset) & DLEP_DIT_V6SUBNET_FLAGMASK_ADDDROP, &tfs_add_drop));
+ proto_item_append_text(pi, ", %s:", tfs_get_string(tvb_get_uint8(tvb, offset) & DLEP_DIT_V6SUBNET_FLAGMASK_ADDDROP, &tfs_add_drop));
offset+=DLEP_DIT_V6SUBNET_FLAGS_LEN;
proto_tree_add_item(pt, hf_dlep_dataitem_v6subnet_subnet, tvb, offset, FT_IPv6_LEN, ENC_NA);
@@ -681,8 +681,8 @@ static int
decode_dataitem_mdrr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- gint offset = 0;
- guint64 mdrr;
+ int offset = 0;
+ uint64_t mdrr;
proto_tree_add_item_ret_uint64(pt, hf_dlep_dataitem_mdrr, tvb, offset, DLEP_DIT_MDRR_LEN, ENC_BIG_ENDIAN, &mdrr);
proto_item_append_text(pi, ": %" PRIu64 " (bps)", mdrr);
@@ -696,8 +696,8 @@ static int
decode_dataitem_mdrt(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- gint offset = 0;
- guint64 mdrt;
+ int offset = 0;
+ uint64_t mdrt;
proto_tree_add_item_ret_uint64(pt, hf_dlep_dataitem_mdrt, tvb, offset, DLEP_DIT_MDRT_LEN, ENC_BIG_ENDIAN, &mdrt);
proto_item_append_text(pi, ": %" PRIu64 " (bps)", mdrt);
@@ -711,8 +711,8 @@ static int
decode_dataitem_cdrr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- gint offset = 0;
- guint64 cdrr;
+ int offset = 0;
+ uint64_t cdrr;
proto_tree_add_item_ret_uint64(pt, hf_dlep_dataitem_cdrr, tvb, offset, DLEP_DIT_CDRR_LEN, ENC_BIG_ENDIAN, &cdrr);
proto_item_append_text(pi, ": %" PRIu64 " (bps)", cdrr);
@@ -726,8 +726,8 @@ static int
decode_dataitem_cdrt(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- gint offset = 0;
- guint64 cdrt;
+ int offset = 0;
+ uint64_t cdrt;
proto_tree_add_item_ret_uint64(pt, hf_dlep_dataitem_cdrt, tvb, offset, DLEP_DIT_CDRT_LEN, ENC_BIG_ENDIAN, &cdrt);
proto_item_append_text(pi, ": %" PRIu64 " (bps)", cdrt);
@@ -741,8 +741,8 @@ static int
decode_dataitem_latency(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- gint offset = 0;
- guint64 latency;
+ int offset = 0;
+ uint64_t latency;
proto_tree_add_item_ret_uint64(pt, hf_dlep_dataitem_latency, tvb, offset, DLEP_DIT_LAT_LEN, ENC_BIG_ENDIAN, &latency);
proto_item_append_text(pi, ": %" PRIu64 " (us)", latency);
@@ -756,8 +756,8 @@ static int
decode_dataitem_resources(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- gint offset = 0;
- guint32 resources;
+ int offset = 0;
+ uint32_t resources;
proto_tree_add_item_ret_uint(pt, hf_dlep_dataitem_resources, tvb, offset, DLEP_DIT_RES_LEN, ENC_BIG_ENDIAN, &resources);
proto_item_append_text(pi, ": %u (%%)", resources);
@@ -771,8 +771,8 @@ static int
decode_dataitem_rlqr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- gint offset = 0;
- guint32 rlqr;
+ int offset = 0;
+ uint32_t rlqr;
proto_tree_add_item_ret_uint(pt, hf_dlep_dataitem_rlqr, tvb, offset, DLEP_DIT_RLQR_LEN, ENC_BIG_ENDIAN, &rlqr);
proto_item_append_text(pi, ": %u (%%)", rlqr);
@@ -786,8 +786,8 @@ static int
decode_dataitem_rlqt(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- gint offset = 0;
- guint32 rlqt;
+ int offset = 0;
+ uint32_t rlqt;
proto_tree_add_item_ret_uint(pt, hf_dlep_dataitem_rlqt, tvb, offset, DLEP_DIT_RLQT_LEN, ENC_BIG_ENDIAN, &rlqt);
proto_item_append_text(pi, ": %u (%%)", rlqt);
@@ -801,8 +801,8 @@ static int
decode_dataitem_mtu(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- gint offset = 0;
- guint32 mtu;
+ int offset = 0;
+ uint32_t mtu;
proto_tree_add_item_ret_uint(pt, hf_dlep_dataitem_mtu, tvb, offset, DLEP_DIT_MTU_LEN, ENC_BIG_ENDIAN, &mtu);
proto_item_append_text(pi, ": %u (bytes)", mtu);
@@ -816,7 +816,7 @@ static int
decode_dataitem_hop_cnt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- gint offset = 0;
+ int offset = 0;
proto_item *pi_field = NULL;
static int * const hop_cnt_flags[] = {
&hf_dlep_dataitem_hop_count_flags_p,
@@ -838,7 +838,7 @@ static int
decode_dataitem_hop_cntrl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- gint offset = 0;
+ int offset = 0;
proto_item *pi_field = NULL;
pi_field = proto_tree_add_item(pt, hf_dlep_dataitem_hop_control, tvb, offset, DLEP_DIT_HOP_CNTRL_LEN, ENC_BIG_ENDIAN);
@@ -853,7 +853,7 @@ static int
decode_dataitem_li_length(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- gint offset = 0;
+ int offset = 0;
proto_item *pi_field = NULL;
pi_field = proto_tree_add_item(pt, hf_dlep_dataitem_li_length, tvb, offset, DLEP_DIT_LI_LENGTH_LEN, ENC_BIG_ENDIAN);
@@ -868,8 +868,8 @@ static int
decode_dataitem_li(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- const gint len = tvb_captured_length(tvb);
- gint offset = 0;
+ const int len = tvb_captured_length(tvb);
+ int offset = 0;
proto_tree_add_item(pt, hf_dlep_dataitem_li, tvb, offset, len, ENC_NA);
proto_item_append_text(pi, ": %s", tvb_bytes_to_str(pinfo->pool, tvb, offset, len));
@@ -883,7 +883,7 @@ static int
decode_dataitem_lat_range(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pt, void *data _U_)
{
proto_item *pi = proto_tree_get_parent(pt);
- gint offset = 0;
+ int offset = 0;
proto_item *max_lat = NULL;
proto_item *min_lat = NULL;
@@ -967,8 +967,8 @@ static int
decode_signal_header(tvbuff_t *tvb, int offset, proto_item* pi, proto_tree *pt, packet_info *pinfo)
{
proto_item *tmp_pi = NULL;
- guint32 signal_type;
- guint32 signal_length;
+ uint32_t signal_type;
+ uint32_t signal_length;
tmp_pi = proto_tree_add_item(pt, hf_dlep_signal, tvb, offset, 0, ENC_NA);
proto_item_set_hidden(tmp_pi);
@@ -984,19 +984,19 @@ decode_signal_header(tvbuff_t *tvb, int offset, proto_item* pi, proto_tree *pt,
tmp_pi = proto_tree_add_item_ret_uint(pt, hf_dlep_signal_length, tvb, offset, 2, ENC_BIG_ENDIAN, &signal_length);
offset+=2;
- if (signal_length != (guint32)tvb_reported_length_remaining(tvb, offset))
+ if (signal_length != (uint32_t)tvb_reported_length_remaining(tvb, offset))
expert_add_info(pinfo, tmp_pi, &ei_dlep_signal_unexpected_length);
return offset;
}
/* Section 11.2: DLEP Message Header */
-static guint
+static unsigned
get_dlep_message_header_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_)
{
- guint message_length;
+ unsigned message_length;
- message_length = tvb_get_guint16(tvb, offset+2, ENC_BIG_ENDIAN);
+ message_length = tvb_get_uint16(tvb, offset+2, ENC_BIG_ENDIAN);
return message_length + DLEP_MSG_HEADER_LEN;
}
@@ -1005,8 +1005,8 @@ static int
decode_message_header(tvbuff_t *tvb, int offset, proto_item* pi, proto_tree *pt, packet_info *pinfo)
{
proto_item *tmp_pi = NULL;
- guint32 message_type;
- guint32 message_length;
+ uint32_t message_type;
+ uint32_t message_length;
tmp_pi = proto_tree_add_item(pt, hf_dlep_message, tvb, offset, 0, ENC_NA);
proto_item_set_hidden(tmp_pi);
@@ -1019,7 +1019,7 @@ decode_message_header(tvbuff_t *tvb, int offset, proto_item* pi, proto_tree *pt,
tmp_pi = proto_tree_add_item_ret_uint(pt, hf_dlep_message_length, tvb, offset, 2, ENC_BIG_ENDIAN, &message_length);
offset+=2;
- if (message_length != (guint32)tvb_reported_length_remaining(tvb, offset))
+ if (message_length != (uint32_t)tvb_reported_length_remaining(tvb, offset))
expert_add_info(pinfo, tmp_pi, &ei_dlep_message_unexpected_length);
return offset;
@@ -1075,7 +1075,7 @@ dissect_dlep_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pt, void *data _
return tvb_captured_length(tvb);
}
-static gboolean
+static int
dissect_dlep_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
tcp_dissect_pdus(tvb, pinfo, tree, dlep_desegment, DLEP_MSG_HEADER_LEN, get_dlep_message_header_len, dissect_dlep_msg, data);
@@ -1299,7 +1299,7 @@ proto_register_dlep(void)
}
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_dlep,
&ett_dlep_dataitem,
&ett_dlep_flags