summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-linx.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:26 +0000
commitc4e8a3222648fcf22ca207f1815ebbf7cd144eeb (patch)
tree93d5c6aa93d9987680dd1adad5685e2ad698f223 /epan/dissectors/packet-linx.c
parentAdding upstream version 4.2.6. (diff)
downloadwireshark-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 'epan/dissectors/packet-linx.c')
-rw-r--r--epan/dissectors/packet-linx.c184
1 files changed, 92 insertions, 92 deletions
diff --git a/epan/dissectors/packet-linx.c b/epan/dissectors/packet-linx.c
index 8ba4b804..4eefec76 100644
--- a/epan/dissectors/packet-linx.c
+++ b/epan/dissectors/packet-linx.c
@@ -41,112 +41,112 @@ void proto_reg_handoff_linx_tcp(void);
static dissector_handle_t linx_handle;
-static int proto_linx = -1;
-static int proto_linx_tcp = -1;
+static int proto_linx;
+static int proto_linx_tcp;
/* ALL */
-static int hf_linx_nexthdr = -1;
+static int hf_linx_nexthdr;
/* MULTICORE */
-static int hf_linx_multicore_scoreid = -1;
-static int hf_linx_multicore_dcoreid = -1;
-static int hf_linx_multicore_reserved = -1;
-static int hf_linx_multicore_reserved1 = -1;
+static int hf_linx_multicore_scoreid;
+static int hf_linx_multicore_dcoreid;
+static int hf_linx_multicore_reserved;
+static int hf_linx_multicore_reserved1;
/* MAIN */
-static int hf_linx_main_version = -1;
-static int hf_linx_main_reserved = -1;
-static int hf_linx_main_connection = -1;
-static int hf_linx_main_bundle = -1;
-static int hf_linx_main_pkgsize = -1;
+static int hf_linx_main_version;
+static int hf_linx_main_reserved;
+static int hf_linx_main_connection;
+static int hf_linx_main_bundle;
+static int hf_linx_main_pkg_size;
/* UDATA */
-static int hf_linx_udata_reserved = -1;
-static int hf_linx_udata_morefrags = -1;
-static int hf_linx_udata_fragno = -1;
-static int hf_linx_udata_signo = -1;
-static int hf_linx_udata_dstaddr16 = -1;
-static int hf_linx_udata_dstaddr32 = -1;
-static int hf_linx_udata_srcaddr16 = -1;
-static int hf_linx_udata_srcaddr32 = -1;
-static int hf_linx_udata_payload = -1;
+static int hf_linx_udata_reserved;
+static int hf_linx_udata_morefrags;
+static int hf_linx_udata_fragno;
+static int hf_linx_udata_signo;
+static int hf_linx_udata_dstaddr16;
+static int hf_linx_udata_dstaddr32;
+static int hf_linx_udata_srcaddr16;
+static int hf_linx_udata_srcaddr32;
+static int hf_linx_udata_payload;
/* ACK */
-static int hf_linx_ack_reserved = -1;
-static int hf_linx_ack_request = -1;
-static int hf_linx_ack_ackno = -1;
-static int hf_linx_ack_seqno = -1;
+static int hf_linx_ack_reserved;
+static int hf_linx_ack_request;
+static int hf_linx_ack_ackno;
+static int hf_linx_ack_seqno;
/* CONN */
-static int hf_linx_conn_cmd = -1;
-static int hf_linx_conn_size = -1;
-static int hf_linx_conn_reserved = -1;
-static int hf_linx_conn_srcmac = -1;
-static int hf_linx_conn_dstmac = -1;
-static int hf_linx_conn_winsize = -1;
-static int hf_linx_conn_publcid = -1;
-static int hf_linx_conn_feat_neg_str = -1;
+static int hf_linx_conn_cmd;
+static int hf_linx_conn_size;
+static int hf_linx_conn_reserved;
+static int hf_linx_conn_srcmac;
+static int hf_linx_conn_dstmac;
+static int hf_linx_conn_winsize;
+static int hf_linx_conn_publcid;
+static int hf_linx_conn_feat_neg_str;
/* FRAG */
-static int hf_linx_frag_reserved = -1;
-static int hf_linx_frag_morefrags = -1;
-static int hf_linx_frag_fragno = -1;
+static int hf_linx_frag_reserved;
+static int hf_linx_frag_morefrags;
+static int hf_linx_frag_fragno;
/* NACK */
-static int hf_linx_nack_reserv1 = -1;
-static int hf_linx_nack_reserv2 = -1;
-static int hf_linx_nack_count = -1;
-static int hf_linx_nack_seqno = -1;
+static int hf_linx_nack_reserv1;
+static int hf_linx_nack_reserv2;
+static int hf_linx_nack_count;
+static int hf_linx_nack_seqno;
/* RLNH */
-static int hf_linx_rlnh_msg_type32 = -1;
-static int hf_linx_rlnh_msg_type8 = -1;
-/* static int hf_linx_rlnh_linkaddr = -1; */
-static int hf_linx_rlnh_src_linkaddr = -1;
-static int hf_linx_rlnh_version = -1;
-static int hf_linx_rlnh_status = -1;
-static int hf_linx_rlnh_name = -1;
-static int hf_linx_rlnh_peer_linkaddr = -1;
-static int hf_linx_rlnh_feat_neg_str = -1;
-static int hf_linx_rlnh_msg_reserved = -1;
+static int hf_linx_rlnh_msg_type32;
+static int hf_linx_rlnh_msg_type8;
+/* static int hf_linx_rlnh_linkaddr; */
+static int hf_linx_rlnh_src_linkaddr;
+static int hf_linx_rlnh_version;
+static int hf_linx_rlnh_status;
+static int hf_linx_rlnh_name;
+static int hf_linx_rlnh_peer_linkaddr;
+static int hf_linx_rlnh_feat_neg_str;
+static int hf_linx_rlnh_msg_reserved;
/* TCP CM */
-/* static int hf_linx_tcp_reserved = -1; */
-static int hf_linx_tcp_oob = -1;
-static int hf_linx_tcp_version = -1;
-static int hf_linx_tcp_type = -1;
-static int hf_linx_tcp_src = -1;
-static int hf_linx_tcp_dst = -1;
-static int hf_linx_tcp_size = -1;
-static int hf_linx_tcp_rlnh_msg_type32 = -1;
-static int hf_linx_tcp_rlnh_msg_type8 = -1;
-/* static int hf_linx_tcp_rlnh_linkaddr = -1; */
-static int hf_linx_tcp_rlnh_src_linkaddr = -1;
-static int hf_linx_tcp_rlnh_version = -1;
-static int hf_linx_tcp_rlnh_status = -1;
-static int hf_linx_tcp_rlnh_name = -1;
-static int hf_linx_tcp_rlnh_peer_linkaddr = -1;
-static int hf_linx_tcp_rlnh_feat_neg_str = -1;
-static int hf_linx_tcp_rlnh_msg_reserved = -1;
-static int hf_linx_tcp_payload = -1;
-
-
-static int rlnh_version = 0;
-
-static gint ett_linx = -1;
-static gint ett_linx_multicore = -1;
-static gint ett_linx_main = -1;
-static gint ett_linx_error = -1;
-static gint ett_linx_udata = -1;
-static gint ett_linx_ack = -1;
-static gint ett_linx_tcp = -1;
-
-static expert_field ei_linx_version = EI_INIT;
-static expert_field ei_linx_rlnh_msg = EI_INIT;
-static expert_field ei_linx_header = EI_INIT;
-
-static expert_field ei_linx_tcp_version = EI_INIT;
-static expert_field ei_linx_tcp_rlnh_msg = EI_INIT;
+/* static int hf_linx_tcp_reserved; */
+static int hf_linx_tcp_oob;
+static int hf_linx_tcp_version;
+static int hf_linx_tcp_type;
+static int hf_linx_tcp_src;
+static int hf_linx_tcp_dst;
+static int hf_linx_tcp_size;
+static int hf_linx_tcp_rlnh_msg_type32;
+static int hf_linx_tcp_rlnh_msg_type8;
+/* static int hf_linx_tcp_rlnh_linkaddr; */
+static int hf_linx_tcp_rlnh_src_linkaddr;
+static int hf_linx_tcp_rlnh_version;
+static int hf_linx_tcp_rlnh_status;
+static int hf_linx_tcp_rlnh_name;
+static int hf_linx_tcp_rlnh_peer_linkaddr;
+static int hf_linx_tcp_rlnh_feat_neg_str;
+static int hf_linx_tcp_rlnh_msg_reserved;
+static int hf_linx_tcp_payload;
+
+
+static int rlnh_version;
+
+static int ett_linx;
+static int ett_linx_multicore;
+static int ett_linx_main;
+static int ett_linx_error;
+static int ett_linx_udata;
+static int ett_linx_ack;
+static int ett_linx_tcp;
+
+static expert_field ei_linx_version;
+static expert_field ei_linx_rlnh_msg;
+static expert_field ei_linx_header;
+
+static expert_field ei_linx_tcp_version;
+static expert_field ei_linx_tcp_rlnh_msg;
@@ -269,7 +269,7 @@ static const value_string linx_conn_cmd[] = {
static int
dissect_linx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint32 dword;
+ uint32_t dword;
int offset = 0;
int nexthdr;
int thishdr;
@@ -347,7 +347,7 @@ dissect_linx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
proto_tree_add_item(main_header_tree, hf_linx_main_reserved , tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(main_header_tree, hf_linx_main_connection, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(main_header_tree, hf_linx_main_bundle , tvb, offset, 4, ENC_BIG_ENDIAN);
- proto_tree_add_item(main_header_tree, hf_linx_main_pkgsize , tvb, offset, 4, ENC_BIG_ENDIAN);
+ proto_tree_add_item(main_header_tree, hf_linx_main_pkg_size , tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
/* Supports version 2 and 3 so far */
@@ -661,7 +661,7 @@ proto_register_linx(void)
{ &hf_linx_main_bundle, /* in ETHCM_MAIN */
{ "Bundle", "linx.bundle", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00004000, NULL, HFILL },
},
- { &hf_linx_main_pkgsize, /* in ETHCM_MAIN */
+ { &hf_linx_main_pkg_size, /* in ETHCM_MAIN */
{ "Package Size", "linx.pcksize", FT_UINT32, BASE_DEC, NULL, 0x00003fff, NULL, HFILL },
},
{ &hf_linx_udata_reserved, /* in ETHCM_UDATA */
@@ -785,7 +785,7 @@ proto_register_linx(void)
};
/* Setup protocol subtree array */
- static gint *ett[] = {
+ static int *ett[] = {
&ett_linx,
&ett_linx_multicore,
&ett_linx_main,
@@ -831,7 +831,7 @@ proto_reg_handoff_linx(void)
static int
dissect_linx_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint32 dword;
+ uint32_t dword;
int offset = 0;
proto_item *ti, *ver_item, *msg_item;
proto_tree *linx_tcp_tree;
@@ -1030,7 +1030,7 @@ proto_register_linx_tcp(void)
}
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_linx_tcp,
};