summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-vines.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-vines.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 '')
-rw-r--r--epan/dissectors/packet-vines.c410
1 files changed, 205 insertions, 205 deletions
diff --git a/epan/dissectors/packet-vines.c b/epan/dissectors/packet-vines.c
index 7f0a671c..906a8e46 100644
--- a/epan/dissectors/packet-vines.c
+++ b/epan/dissectors/packet-vines.c
@@ -103,172 +103,172 @@ void proto_reg_handoff_vines_icp(void);
#define UDP_PORT_VINES 573
-static int proto_vines_frp = -1;
-static int hf_vines_frp_flags = -1;
-static int hf_vines_frp_flags_first_fragment = -1;
-static int hf_vines_frp_flags_last_fragment = -1;
-static int hf_vines_frp_sequence_number = -1;
+static int proto_vines_frp;
+static int hf_vines_frp_flags;
+static int hf_vines_frp_flags_first_fragment;
+static int hf_vines_frp_flags_last_fragment;
+static int hf_vines_frp_sequence_number;
-static gint ett_vines_frp = -1;
-static gint ett_vines_frp_flags = -1;
+static int ett_vines_frp;
+static int ett_vines_frp_flags;
static dissector_handle_t vines_frp_handle, vines_frp_new_handle;
-static int proto_vines_llc = -1;
-static int hf_vines_llc_packet_type = -1;
+static int proto_vines_llc;
+static int hf_vines_llc_packet_type;
-static gint ett_vines_llc = -1;
+static int ett_vines_llc;
static dissector_handle_t vines_llc_handle;
-static int proto_vines_ip = -1;
-static int hf_vines_ip_protocol = -1;
-static int hf_vines_ip_checksum = -1;
-static int hf_vines_ip_length = -1;
-static int hf_vines_ip_source = -1;
-static int hf_vines_ip_destination = -1;
-static int hf_vines_tctl = -1;
-static int hf_vines_tctl_node = -1;
-static int hf_vines_tctl_class = -1;
-static int hf_vines_tctl_forward_router = -1;
-static int hf_vines_tctl_metric = -1;
-static int hf_vines_tctl_notif_packet = -1;
-static int hf_vines_tctl_hop_count = -1;
-
-static gint ett_vines_ip = -1;
-static gint ett_vines_ip_tctl = -1;
+static int proto_vines_ip;
+static int hf_vines_ip_protocol;
+static int hf_vines_ip_checksum;
+static int hf_vines_ip_length;
+static int hf_vines_ip_source;
+static int hf_vines_ip_destination;
+static int hf_vines_tctl;
+static int hf_vines_tctl_node;
+static int hf_vines_tctl_class;
+static int hf_vines_tctl_forward_router;
+static int hf_vines_tctl_metric;
+static int hf_vines_tctl_notif_packet;
+static int hf_vines_tctl_hop_count;
+
+static int ett_vines_ip;
+static int ett_vines_ip_tctl;
static dissector_handle_t vines_ip_handle;
-static int proto_vines_echo = -1;
+static int proto_vines_echo;
-static gint hf_vines_echo_data = -1;
+static int hf_vines_echo_data;
-static gint ett_vines_echo = -1;
+static int ett_vines_echo;
static dissector_handle_t vines_echo_handle;
-static int proto_vines_ipc = -1;
-static int hf_vines_ipc_src_port = -1;
-static int hf_vines_ipc_dest_port = -1;
-static int hf_vines_ipc_packet_type = -1;
-static int hf_vines_ipc_control = -1;
-static int hf_vines_ipc_control_ack = -1;
-static int hf_vines_ipc_control_end_msg = -1;
-static int hf_vines_ipc_control_beg_msg = -1;
-static int hf_vines_ipc_control_abort_msg = -1;
-static int hf_vines_ipc_local_connection_id = -1;
-static int hf_vines_ipc_sequence_number = -1;
-static int hf_vines_ipc_length = -1;
-static int hf_vines_ipc_remote_connection_id = -1;
-static int hf_vines_ipc_ack_number = -1;
-static int hf_vines_ipc_error = -1;
-
-static gint ett_vines_ipc = -1;
-static gint ett_vines_ipc_control = -1;
+static int proto_vines_ipc;
+static int hf_vines_ipc_src_port;
+static int hf_vines_ipc_dest_port;
+static int hf_vines_ipc_packet_type;
+static int hf_vines_ipc_control;
+static int hf_vines_ipc_control_ack;
+static int hf_vines_ipc_control_end_msg;
+static int hf_vines_ipc_control_beg_msg;
+static int hf_vines_ipc_control_abort_msg;
+static int hf_vines_ipc_local_connection_id;
+static int hf_vines_ipc_sequence_number;
+static int hf_vines_ipc_length;
+static int hf_vines_ipc_remote_connection_id;
+static int hf_vines_ipc_ack_number;
+static int hf_vines_ipc_error;
+
+static int ett_vines_ipc;
+static int ett_vines_ipc_control;
static dissector_handle_t vines_ipc_handle;
-static int proto_vines_spp = -1;
-static int hf_vines_spp_src_port = -1;
-static int hf_vines_spp_dest_port = -1;
-static int hf_vines_spp_packet_type = -1;
-static int hf_vines_spp_control = -1;
-static int hf_vines_spp_control_ack = -1;
-static int hf_vines_spp_control_end_msg = -1;
-static int hf_vines_spp_control_beg_msg = -1;
-static int hf_vines_spp_control_abort_msg = -1;
-static int hf_vines_spp_local_id = -1;
-static int hf_vines_spp_remote_id = -1;
-static int hf_vines_spp_seq_num = -1;
-static int hf_vines_spp_ack_num = -1;
-static int hf_vines_spp_window = -1;
-
-static gint ett_vines_spp = -1;
-static gint ett_vines_spp_control = -1;
+static int proto_vines_spp;
+static int hf_vines_spp_src_port;
+static int hf_vines_spp_dest_port;
+static int hf_vines_spp_packet_type;
+static int hf_vines_spp_control;
+static int hf_vines_spp_control_ack;
+static int hf_vines_spp_control_end_msg;
+static int hf_vines_spp_control_beg_msg;
+static int hf_vines_spp_control_abort_msg;
+static int hf_vines_spp_local_id;
+static int hf_vines_spp_remote_id;
+static int hf_vines_spp_seq_num;
+static int hf_vines_spp_ack_num;
+static int hf_vines_spp_window;
+
+static int ett_vines_spp;
+static int ett_vines_spp_control;
static dissector_handle_t vines_spp_handle;
-static int proto_vines_arp = -1;
-static int hf_vines_arp_address = -1;
-static int hf_vines_arp_version = -1;
-static int hf_vines_arp_packet_type = -1;
-static int hf_vines_arp_interface_metric = -1;
-static int hf_vines_arp_sequence_number = -1;
+static int proto_vines_arp;
+static int hf_vines_arp_address;
+static int hf_vines_arp_version;
+static int hf_vines_arp_packet_type;
+static int hf_vines_arp_interface_metric;
+static int hf_vines_arp_sequence_number;
-static gint ett_vines_arp = -1;
+static int ett_vines_arp;
static dissector_handle_t vines_arp_handle;
-static int proto_vines_rtp = -1;
-static int hf_vines_rtp_comp_flag = -1;
-static int hf_vines_rtp_comp_flag_neighbor_router = -1;
-static int hf_vines_rtp_comp_flag_sequence_rtp = -1;
-static int hf_vines_rtp_comp_flag_sequence_rtp_version = -1;
-static int hf_vines_rtp_control = -1;
-static int hf_vines_rtp_control_sync_broadcast = -1;
-static int hf_vines_rtp_control_topology_update = -1;
-static int hf_vines_rtp_control_specific_request = -1;
-static int hf_vines_rtp_control_end_msg = -1;
-static int hf_vines_rtp_control_beg_msg = -1;
-static int hf_vines_rtp_machine_rtp = -1;
-static int hf_vines_rtp_machine_tcpip = -1;
-static int hf_vines_rtp_machine_bus = -1;
-static int hf_vines_rtp_flag_sequence_rtp = -1;
-static int hf_vines_rtp_flag_network_p2p = -1;
-static int hf_vines_rtp_flag_data_link_p2p = -1;
-static int hf_vines_rtp_flag_broadcast_medium = -1;
-static int hf_vines_rtp_metric_to_preferred_gateway = -1;
-static int hf_vines_rtp_requested_info = -1;
-static int hf_vines_rtp_metric_to_destination = -1;
-static int hf_vines_rtp_source_route_length = -1;
-static int hf_vines_rtp_router_sequence_number = -1;
-static int hf_vines_rtp_sequence_number = -1;
-static int hf_vines_rtp_data_offset = -1;
-static int hf_vines_rtp_preferred_gateway_sequence_number = -1;
-static int hf_vines_rtp_preferred_gateway_node_type = -1;
-static int hf_vines_rtp_metric = -1;
-static int hf_vines_rtp_destination_sequence_number = -1;
-static int hf_vines_rtp_link_address_length = -1;
-static int hf_vines_rtp_controller_type = -1;
-static int hf_vines_rtp_destination_node_type = -1;
-static int hf_vines_rtp_information_type = -1;
-static int hf_vines_rtp_version = -1;
-static int hf_vines_rtp_preferred_gateway = -1;
-static int hf_vines_rtp_neighbor_metric = -1;
-static int hf_vines_rtp_destination = -1;
-static int hf_vines_rtp_node_type = -1;
-static int hf_vines_rtp_operation_type = -1;
-static int hf_vines_rtp_packet_id = -1;
-static int hf_vines_rtp_network_number = -1;
-static int hf_vines_rtp_machine_type = -1;
-static int hf_vines_rtp_destination_controller_type = -1;
-static int hf_vines_rtp_destination_machine = -1;
-static int hf_vines_rtp_pref_gateway_controller_type = -1;
-static int hf_vines_rtp_pref_gateway_machine = -1;
-static int hf_vines_rtp_network_flags = -1;
-static int hf_vines_rtp_destination_flags = -1;
-static int hf_vines_rtp_preferred_gateway_flags = -1;
-static int hf_vines_rtp_preferred_gateway_data_link_address_ether = -1;
-static int hf_vines_rtp_preferred_gateway_data_link_address_bytes = -1;
-static int hf_vines_rtp_preferred_gateway_source_route = -1;
-
-static gint ett_vines_rtp = -1;
-static gint ett_vines_rtp_compatibility_flags = -1;
-static gint ett_vines_rtp_req_info = -1;
-static gint ett_vines_rtp_control_flags = -1;
-static gint ett_vines_rtp_mtype = -1;
-static gint ett_vines_rtp_flags = -1;
+static int proto_vines_rtp;
+static int hf_vines_rtp_comp_flag;
+static int hf_vines_rtp_comp_flag_neighbor_router;
+static int hf_vines_rtp_comp_flag_sequence_rtp;
+static int hf_vines_rtp_comp_flag_sequence_rtp_version;
+static int hf_vines_rtp_control;
+static int hf_vines_rtp_control_sync_broadcast;
+static int hf_vines_rtp_control_topology_update;
+static int hf_vines_rtp_control_specific_request;
+static int hf_vines_rtp_control_end_msg;
+static int hf_vines_rtp_control_beg_msg;
+static int hf_vines_rtp_machine_rtp;
+static int hf_vines_rtp_machine_tcpip;
+static int hf_vines_rtp_machine_bus;
+static int hf_vines_rtp_flag_sequence_rtp;
+static int hf_vines_rtp_flag_network_p2p;
+static int hf_vines_rtp_flag_data_link_p2p;
+static int hf_vines_rtp_flag_broadcast_medium;
+static int hf_vines_rtp_metric_to_preferred_gateway;
+static int hf_vines_rtp_requested_info;
+static int hf_vines_rtp_metric_to_destination;
+static int hf_vines_rtp_source_route_length;
+static int hf_vines_rtp_router_sequence_number;
+static int hf_vines_rtp_sequence_number;
+static int hf_vines_rtp_data_offset;
+static int hf_vines_rtp_preferred_gateway_sequence_number;
+static int hf_vines_rtp_preferred_gateway_node_type;
+static int hf_vines_rtp_metric;
+static int hf_vines_rtp_destination_sequence_number;
+static int hf_vines_rtp_link_address_length;
+static int hf_vines_rtp_controller_type;
+static int hf_vines_rtp_destination_node_type;
+static int hf_vines_rtp_information_type;
+static int hf_vines_rtp_version;
+static int hf_vines_rtp_preferred_gateway;
+static int hf_vines_rtp_neighbor_metric;
+static int hf_vines_rtp_destination;
+static int hf_vines_rtp_node_type;
+static int hf_vines_rtp_operation_type;
+static int hf_vines_rtp_packet_id;
+static int hf_vines_rtp_network_number;
+static int hf_vines_rtp_machine_type;
+static int hf_vines_rtp_destination_controller_type;
+static int hf_vines_rtp_destination_machine;
+static int hf_vines_rtp_pref_gateway_controller_type;
+static int hf_vines_rtp_pref_gateway_machine;
+static int hf_vines_rtp_network_flags;
+static int hf_vines_rtp_destination_flags;
+static int hf_vines_rtp_preferred_gateway_flags;
+static int hf_vines_rtp_preferred_gateway_data_link_address_ether;
+static int hf_vines_rtp_preferred_gateway_data_link_address_bytes;
+static int hf_vines_rtp_preferred_gateway_source_route;
+
+static int ett_vines_rtp;
+static int ett_vines_rtp_compatibility_flags;
+static int ett_vines_rtp_req_info;
+static int ett_vines_rtp_control_flags;
+static int ett_vines_rtp_mtype;
+static int ett_vines_rtp_flags;
static dissector_handle_t vines_rtp_handle;
-static int proto_vines = -1;
-static int proto_vines_icp = -1;
-static int hf_vines_icp_exception_code = -1;
-static int hf_vines_icp_metric = -1;
-static int hf_vines_icp_packet_type = -1;
+static int proto_vines;
+static int proto_vines_icp;
+static int hf_vines_icp_exception_code;
+static int hf_vines_icp_metric;
+static int hf_vines_icp_packet_type;
-static gint ett_vines_icp = -1;
+static int ett_vines_icp;
static dissector_handle_t vines_icp_handle;
static capture_dissector_handle_t vines_echo_cap_handle;
@@ -296,34 +296,34 @@ enum {
};
typedef struct _e_vspp {
- guint16 vspp_sport;
- guint16 vspp_dport;
- guint8 vspp_pkttype;
- guint8 vspp_control;
- guint16 vspp_lclid; /* Local Connection ID */
- guint16 vspp_rmtid; /* Remote Connection ID */
- guint16 vspp_seqno; /* Sequence Number */
- guint16 vspp_ack; /* Acknowledgement Number */
- guint16 vspp_win;
+ uint16_t vspp_sport;
+ uint16_t vspp_dport;
+ uint8_t vspp_pkttype;
+ uint8_t vspp_control;
+ uint16_t vspp_lclid; /* Local Connection ID */
+ uint16_t vspp_rmtid; /* Remote Connection ID */
+ uint16_t vspp_seqno; /* Sequence Number */
+ uint16_t vspp_ack; /* Acknowledgement Number */
+ uint16_t vspp_win;
} e_vspp;
typedef struct _e_vipc {
- guint16 vipc_sport;
- guint16 vipc_dport;
- guint8 vipc_pkttype;
- guint8 vipc_control;
- guint16 vipc_lclid; /* Local Connection ID */
- guint16 vipc_rmtid; /* Remote Connection ID */
- guint16 vipc_seqno; /* Sequence Number */
- guint16 vipc_ack; /* Acknowledgement Number */
- guint16 vipc_err_len;
+ uint16_t vipc_sport;
+ uint16_t vipc_dport;
+ uint8_t vipc_pkttype;
+ uint8_t vipc_control;
+ uint16_t vipc_lclid; /* Local Connection ID */
+ uint16_t vipc_rmtid; /* Remote Connection ID */
+ uint16_t vipc_seqno; /* Sequence Number */
+ uint16_t vipc_ack; /* Acknowledgement Number */
+ uint16_t vipc_err_len;
} e_vipc;
-static gboolean
-capture_vines(const guchar *pd _U_, int offset _U_, int len _U_, capture_packet_info_t *cpinfo, const union wtap_pseudo_header *pseudo_header _U_)
+static bool
+capture_vines(const unsigned char *pd _U_, int offset _U_, int len _U_, capture_packet_info_t *cpinfo, const union wtap_pseudo_header *pseudo_header _U_)
{
capture_dissector_increment_count(cpinfo, proto_vines);
- return TRUE;
+ return true;
}
/* Control flags */
@@ -378,7 +378,7 @@ dissect_vines_frp_new(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
return 0;
}
- if ((tvb_get_guint8(tvb, 0) & ~(VINES_FRP_FIRST_FRAGMENT|VINES_FRP_LAST_FRAGMENT)) != 0) {
+ if ((tvb_get_uint8(tvb, 0) & ~(VINES_FRP_FIRST_FRAGMENT|VINES_FRP_LAST_FRAGMENT)) != 0) {
/* Those are the only flags; if anything else is set, this
* is presumably not Vines FRP. */
return 0;
@@ -411,7 +411,7 @@ proto_register_vines_frp(void)
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_vines_frp,
&ett_vines_frp_flags
};
@@ -444,7 +444,7 @@ static const value_string vines_llc_ptype_vals[] = {
static int
dissect_vines_llc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint8 ptype;
+ uint8_t ptype;
proto_tree *vines_llc_tree;
proto_item *ti;
tvbuff_t *next_tvb;
@@ -452,7 +452,7 @@ dissect_vines_llc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Vines LLC");
col_clear(pinfo->cinfo, COL_INFO);
- ptype = tvb_get_guint8(tvb, 0);
+ ptype = tvb_get_uint8(tvb, 0);
col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(ptype, vines_llc_ptype_vals,
"Unknown protocol 0x%02x"));
@@ -481,7 +481,7 @@ proto_register_vines_llc(void)
NULL, HFILL }},
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_vines_llc,
};
@@ -520,7 +520,7 @@ static const value_string proto_vals[] = {
{ 0, NULL }
};
-static const guint8 bcast_addr[VINES_ADDR_LEN] = {
+static const uint8_t bcast_addr[VINES_ADDR_LEN] = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
};
@@ -532,12 +532,12 @@ static int
dissect_vines_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
int offset = 0;
- guint16 vip_pktlen;
- guint8 vip_tctl; /* Transport Control */
- guint8 vip_proto;
+ uint16_t vip_pktlen;
+ uint8_t vip_tctl; /* Transport Control */
+ uint8_t vip_proto;
proto_tree *vip_tree, *tctl_tree;
proto_item *ti;
- gboolean is_broadcast = FALSE;
+ bool is_broadcast = false;
tvbuff_t *next_tvb;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Vines IP");
@@ -547,8 +547,8 @@ dissect_vines_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
/* capture the necessary parts of the header */
vip_pktlen = tvb_get_ntohs(tvb, offset+2);
- vip_tctl = tvb_get_guint8(tvb, offset+3);
- vip_proto = tvb_get_guint8(tvb, offset+4);
+ vip_tctl = tvb_get_uint8(tvb, offset+3);
+ vip_proto = tvb_get_uint8(tvb, offset+4);
col_add_fstr(pinfo->cinfo, COL_INFO, "%s (0x%02x)",
val_to_str_const(vip_tctl, proto_vals, "Unknown VIP protocol"),
@@ -561,7 +561,7 @@ dissect_vines_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
/* helpers to transport control */
if (tvb_memeql(tvb, offset+6, bcast_addr, VINES_ADDR_LEN) == 0)
- is_broadcast = TRUE;
+ is_broadcast = true;
/*
* Adjust the length of this tvbuff to include only the Vines IP
@@ -618,7 +618,7 @@ dissect_vines_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
void
proto_register_vines_ip(void)
{
- static gint *ett[] = {
+ static int *ett[] = {
&ett_vines_ip,
&ett_vines_ip_tctl,
};
@@ -735,7 +735,7 @@ proto_register_vines_echo(void)
NULL, HFILL }},
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_vines_echo,
};
@@ -805,7 +805,7 @@ dissect_vines_ipc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
/* To do: check for runts, errs, etc. */
/* Avoids alignment problems on many architectures. */
- tvb_memcpy(tvb, (guint8 *)&viph, offset, sizeof(e_vipc));
+ tvb_memcpy(tvb, (uint8_t *)&viph, offset, sizeof(e_vipc));
viph.vipc_sport = g_ntohs(viph.vipc_sport);
viph.vipc_dport = g_ntohs(viph.vipc_dport);
@@ -978,7 +978,7 @@ proto_register_vines_ipc(void)
NULL, HFILL }},
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_vines_ipc,
&ett_vines_ipc_control,
};
@@ -990,7 +990,7 @@ proto_register_vines_ipc(void)
vines_ipc_handle = register_dissector("vines_ipc", dissect_vines_ipc,
proto_vines_ipc);
- vines_ipc_heur_subdissector_list = register_heur_dissector_list("vines_ipc", proto_vines_ipc);
+ vines_ipc_heur_subdissector_list = register_heur_dissector_list_with_description("vines_ipc", "Vines IPC Data payload", proto_vines_ipc);
}
void
@@ -1017,7 +1017,7 @@ dissect_vines_spp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
/* To do: check for runts, errs, etc. */
/* Avoids alignment problems on many architectures. */
- tvb_memcpy(tvb, (guint8 *)&viph, offset, sizeof(e_vspp));
+ tvb_memcpy(tvb, (uint8_t *)&viph, offset, sizeof(e_vspp));
viph.vspp_sport = g_ntohs(viph.vspp_sport);
viph.vspp_dport = g_ntohs(viph.vspp_dport);
@@ -1144,7 +1144,7 @@ proto_register_vines_spp(void)
NULL, HFILL }}
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_vines_spp,
&ett_vines_spp_control,
};
@@ -1156,7 +1156,7 @@ proto_register_vines_spp(void)
vines_spp_handle = register_dissector("vines_spp", dissect_vines_spp,
proto_vines_spp);
- vines_spp_heur_subdissector_list = register_heur_dissector_list("vines_spp", proto_vines_spp);
+ vines_spp_heur_subdissector_list = register_heur_dissector_list_with_description("vines_spp", "Vines SPP Data payload", proto_vines_spp);
}
void
@@ -1192,9 +1192,9 @@ dissect_vines_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
{
proto_tree *vines_arp_tree;
proto_item *ti;
- guint8 version;
- guint16 packet_type;
- guint16 metric;
+ uint8_t version;
+ uint16_t packet_type;
+ uint16_t metric;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Vines ARP");
col_clear(pinfo->cinfo, COL_INFO);
@@ -1202,7 +1202,7 @@ dissect_vines_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
ti = proto_tree_add_item(tree, proto_vines_arp, tvb, 0, -1, ENC_NA);
vines_arp_tree = proto_item_add_subtree(ti, ett_vines_arp);
- version = tvb_get_guint8(tvb, 0);
+ version = tvb_get_uint8(tvb, 0);
proto_tree_add_item(vines_arp_tree, hf_vines_arp_version, tvb, 0, 1, ENC_NA);
if (version == VINES_VERS_5_5) {
@@ -1210,7 +1210,7 @@ dissect_vines_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
* Sequenced ARP.
*/
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Vines SARP");
- packet_type = tvb_get_guint8(tvb, 1);
+ packet_type = tvb_get_uint8(tvb, 1);
col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(packet_type, vines_arp_packet_type_vals,
"Unknown (0x%02x)"));
@@ -1233,7 +1233,7 @@ dissect_vines_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
/*
* Non-sequenced ARP.
*/
- packet_type = (guint8) tvb_get_ntohs(tvb, 0);
+ packet_type = (uint8_t) tvb_get_ntohs(tvb, 0);
col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(packet_type, vines_arp_packet_type_vals,
"Unknown (0x%02x)"));
@@ -1280,7 +1280,7 @@ proto_register_vines_arp(void)
NULL, HFILL }},
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_vines_arp,
};
@@ -1375,7 +1375,7 @@ static int
srtp_show_machine_info(proto_tree *tree, tvbuff_t *tvb, int offset, int hf_vines,
int hf_metric, int hf_nodetype, int hf_controller_type, int hf_machine)
{
- guint16 metric;
+ uint16_t metric;
proto_tree_add_item(tree, hf_vines, tvb, offset, VINES_ADDR_LEN, ENC_NA);
offset += VINES_ADDR_LEN;
@@ -1396,7 +1396,7 @@ srtp_show_machine_info(proto_tree *tree, tvbuff_t *tvb, int offset, int hf_vines
static int
rtp_show_gateway_info(proto_tree *tree, tvbuff_t *tvb, int offset,
- guint8 link_addr_length, guint8 source_route_length)
+ uint8_t link_addr_length, uint8_t source_route_length)
{
if (link_addr_length != 0) {
proto_tree_add_item(
@@ -1419,10 +1419,10 @@ dissect_vines_rtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
proto_tree *vines_rtp_tree = NULL;
proto_item *ti;
proto_tree *subtree;
- guint8 operation_type;
- guint8 link_addr_length;
- guint8 source_route_length;
- guint16 metric;
+ uint8_t operation_type;
+ uint8_t link_addr_length;
+ uint8_t source_route_length;
+ uint16_t metric;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Vines RTP");
col_clear(pinfo->cinfo, COL_INFO);
@@ -1430,11 +1430,11 @@ dissect_vines_rtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
ti = proto_tree_add_item(tree, proto_vines_rtp, tvb, 0, -1, ENC_NA);
vines_rtp_tree = proto_item_add_subtree(ti, ett_vines_rtp);
- if (tvb_get_guint8(tvb, 0) != 0) {
+ if (tvb_get_uint8(tvb, 0) != 0) {
/*
* Non-sequenced RTP.
*/
- operation_type = tvb_get_guint8(tvb, offset);
+ operation_type = tvb_get_uint8(tvb, offset);
col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(operation_type, vines_rtp_operation_type_vals,
"Unknown (0x%02x)"));
@@ -1454,10 +1454,10 @@ dissect_vines_rtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
case VRTP_OP_REDIRECT2:
proto_tree_add_item(vines_rtp_tree, hf_vines_rtp_version, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
- link_addr_length = tvb_get_guint8(tvb, offset);
+ link_addr_length = tvb_get_uint8(tvb, offset);
proto_tree_add_item(vines_rtp_tree, hf_vines_rtp_link_address_length, tvb, offset, 1, ENC_NA);
offset += 1;
- source_route_length = tvb_get_guint8(tvb, offset);
+ source_route_length = tvb_get_uint8(tvb, offset);
proto_tree_add_item(vines_rtp_tree, hf_vines_rtp_source_route_length, tvb, offset, 1, ENC_NA);
offset += 1;
offset = srtp_show_machine_info(vines_rtp_tree, tvb, offset, hf_vines_rtp_destination,
@@ -1490,7 +1490,7 @@ dissect_vines_rtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Vines SRTP");
proto_tree_add_item(vines_rtp_tree, hf_vines_rtp_version, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
- operation_type = tvb_get_guint8(tvb, offset);
+ operation_type = tvb_get_uint8(tvb, offset);
col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(operation_type, vines_rtp_operation_type_vals,
"Unknown (0x%02x)"));
@@ -1562,10 +1562,10 @@ dissect_vines_rtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
break;
case VRTP_OP_REDIRECT:
- link_addr_length = tvb_get_guint8(tvb, offset);
+ link_addr_length = tvb_get_uint8(tvb, offset);
proto_tree_add_item(vines_rtp_tree, hf_vines_rtp_link_address_length, tvb, offset, 1, ENC_NA);
offset += 1;
- source_route_length = tvb_get_guint8(tvb, offset);
+ source_route_length = tvb_get_uint8(tvb, offset);
proto_tree_add_item(vines_rtp_tree, hf_vines_rtp_source_route_length, tvb, offset, 1, ENC_NA);
offset += 1;
proto_tree_add_item(vines_rtp_tree, hf_vines_rtp_destination, tvb, offset, VINES_ADDR_LEN, ENC_NA);
@@ -1868,7 +1868,7 @@ proto_register_vines_rtp(void)
NULL, HFILL }},
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_vines_rtp,
&ett_vines_rtp_compatibility_flags,
&ett_vines_rtp_req_info,
@@ -1905,10 +1905,10 @@ dissect_vines_icp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
int offset = 0;
proto_tree *vines_icp_tree;
proto_item *ti;
- guint16 packet_type;
- guint16 exception_code;
- guint16 metric;
- gboolean save_in_error_pkt;
+ uint16_t packet_type;
+ uint16_t exception_code;
+ uint16_t metric;
+ bool save_in_error_pkt;
tvbuff_t *next_tvb;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Vines ICP");
@@ -1950,7 +1950,7 @@ dissect_vines_icp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
* "real" packets.
*/
save_in_error_pkt = pinfo->flags.in_error_pkt;
- pinfo->flags.in_error_pkt = TRUE;
+ pinfo->flags.in_error_pkt = true;
/* Decode the first 40 bytes of the original VIP datagram. */
next_tvb = tvb_new_subset_remaining(tvb, offset);
@@ -1981,7 +1981,7 @@ proto_register_vines_icp(void)
NULL, HFILL }},
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_vines_icp,
};