summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-opa-snc.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-opa-snc.c
parentAdding upstream version 4.2.6. (diff)
downloadwireshark-c4e8a3222648fcf22ca207f1815ebbf7cd144eeb.tar.xz
wireshark-c4e8a3222648fcf22ca207f1815ebbf7cd144eeb.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-opa-snc.c')
-rw-r--r--epan/dissectors/packet-opa-snc.c100
1 files changed, 50 insertions, 50 deletions
diff --git a/epan/dissectors/packet-opa-snc.c b/epan/dissectors/packet-opa-snc.c
index 9ca2fdb2..f5ae4b7a 100644
--- a/epan/dissectors/packet-opa-snc.c
+++ b/epan/dissectors/packet-opa-snc.c
@@ -58,33 +58,33 @@ static const value_string vals_opa_snc_rhf_rcvtype[] = {
};
/* Wireshark ID */
-static gint proto_opa_snc = -1;
+static int proto_opa_snc;
/* Variables to hold expansion values between packets */
-static gint ett_snc = -1;
-static gint ett_sncpbc = -1;
-static gint ett_sncrhf = -1;
+static int ett_snc;
+static int ett_sncpbc;
+static int ett_sncrhf;
/* SnC Fields */
-static gint hf_opa_snc_direction = -1;
-static gint hf_opa_snc_portnumber = -1;
-static gint hf_opa_snc_Reserved16 = -1;
-static gint hf_opa_snc_Reserved32 = -1;
-static gint hf_opa_snc_Reserved64 = -1;
-static gint hf_opa_snc_pbc_reserved_63_48 = -1;
-static gint hf_opa_snc_pbc_pbcstaticratecontrolcnt = -1;
-static gint hf_opa_snc_pbc_pbcintr = -1;
-static gint hf_opa_snc_pbc_pbcdcinfo = -1;
-static gint hf_opa_snc_pbc_pbctestebp = -1;
-static gint hf_opa_snc_pbc_pbcpacketbypass = -1;
-static gint hf_opa_snc_pbc_pbcinserthcrc = -1;
-static gint hf_opa_snc_pbc_pbccreditreturn = -1;
-static gint hf_opa_snc_pbc_pbcinsertbypassicrc = -1;
-static gint hf_opa_snc_pbc_pbctestbadicrc = -1;
-static gint hf_opa_snc_pbc_pbcfecn = -1;
-static gint hf_opa_snc_pbc_reserved_21_16 = -1;
-static gint hf_opa_snc_pbc_pbcvl = -1;
-static gint hf_opa_snc_pbc_pbclengthdws = -1;
+static int hf_opa_snc_direction;
+static int hf_opa_snc_portnumber;
+static int hf_opa_snc_Reserved16;
+static int hf_opa_snc_Reserved32;
+static int hf_opa_snc_Reserved64;
+static int hf_opa_snc_pbc_reserved_63_48;
+static int hf_opa_snc_pbc_pbcstaticratecontrolcnt;
+static int hf_opa_snc_pbc_pbcintr;
+static int hf_opa_snc_pbc_pbcdcinfo;
+static int hf_opa_snc_pbc_pbctestebp;
+static int hf_opa_snc_pbc_pbcpacketbypass;
+static int hf_opa_snc_pbc_pbcinserthcrc;
+static int hf_opa_snc_pbc_pbccreditreturn;
+static int hf_opa_snc_pbc_pbcinsertbypassicrc;
+static int hf_opa_snc_pbc_pbctestbadicrc;
+static int hf_opa_snc_pbc_pbcfecn;
+static int hf_opa_snc_pbc_reserved_21_16;
+static int hf_opa_snc_pbc_pbcvl;
+static int hf_opa_snc_pbc_pbclengthdws;
static int * const _snc_pbc_1[] = {
&hf_opa_snc_pbc_reserved_63_48,
&hf_opa_snc_pbc_pbcstaticratecontrolcnt,
@@ -105,23 +105,23 @@ static int * const _snc_pbc_2[] = {
&hf_opa_snc_pbc_pbclengthdws,
NULL
};
-static gint hf_opa_snc_rhf_icrcerr = -1;
-static gint hf_opa_snc_rhf_reserved_62 = -1;
-static gint hf_opa_snc_rhf_eccerr = -1;
-static gint hf_opa_snc_rhf_lenerr = -1;
-static gint hf_opa_snc_rhf_tiderr = -1;
-static gint hf_opa_snc_rhf_rcvtypeerr = -1;
-static gint hf_opa_snc_rhf_dcerr = -1;
-static gint hf_opa_snc_rhf_dcuncerr = -1;
-static gint hf_opa_snc_rhf_khdrlenerr = -1;
-static gint hf_opa_snc_rhf_hdrqoffset = -1;
-static gint hf_opa_snc_rhf_egroffset = -1;
-static gint hf_opa_snc_rhf_rcvseq = -1;
-static gint hf_opa_snc_rhf_dcinfo = -1;
-static gint hf_opa_snc_rhf_egrindex = -1;
-static gint hf_opa_snc_rhf_useegrbfr = -1;
-static gint hf_opa_snc_rhf_rcvtype = -1;
-static gint hf_opa_snc_rhf_pktlen = -1;
+static int hf_opa_snc_rhf_icrcerr;
+static int hf_opa_snc_rhf_reserved_62;
+static int hf_opa_snc_rhf_eccerr;
+static int hf_opa_snc_rhf_lenerr;
+static int hf_opa_snc_rhf_tiderr;
+static int hf_opa_snc_rhf_rcvtypeerr;
+static int hf_opa_snc_rhf_dcerr;
+static int hf_opa_snc_rhf_dcuncerr;
+static int hf_opa_snc_rhf_khdrlenerr;
+static int hf_opa_snc_rhf_hdrqoffset;
+static int hf_opa_snc_rhf_egroffset;
+static int hf_opa_snc_rhf_rcvseq;
+static int hf_opa_snc_rhf_dcinfo;
+static int hf_opa_snc_rhf_egrindex;
+static int hf_opa_snc_rhf_useegrbfr;
+static int hf_opa_snc_rhf_rcvtype;
+static int hf_opa_snc_rhf_pktlen;
static int * const _snc_rhf_1[] = {
&hf_opa_snc_rhf_icrcerr,
&hf_opa_snc_rhf_reserved_62,
@@ -146,13 +146,13 @@ static int * const _snc_rhf_2[] = {
NULL
};
-static expert_field ei_opa_snc_nobypass = EI_INIT;
+static expert_field ei_opa_snc_nobypass;
-static void cf_opa_snc_dw_to_b(gchar *buf, guint32 value)
+static void cf_opa_snc_dw_to_b(char *buf, uint32_t value)
{
snprintf(buf, ITEM_LABEL_LENGTH, "%u DWORDS, %u Bytes", value, value * 4);
}
-static void cf_opa_snc_qw_to_b(gchar *buf, guint32 value)
+static void cf_opa_snc_qw_to_b(char *buf, uint32_t value)
{
snprintf(buf, ITEM_LABEL_LENGTH, "%u QWORDS, %u Bytes", value, value * 8);
}
@@ -163,11 +163,11 @@ static dissector_handle_t opa_9b_handle;
static int dissect_opa_snc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
- gint offset = 0; /* Current Offset */
+ int offset = 0; /* Current Offset */
- gboolean isBypass = TRUE; /* Tracks if we are parsing a bypass packet or Not */
- guint8 Direction = tvb_get_guint8(tvb, offset + 1);
- guint64 RHF_PBC;
+ bool isBypass = true; /* Tracks if we are parsing a bypass packet or Not */
+ uint8_t Direction = tvb_get_uint8(tvb, offset + 1);
+ uint64_t RHF_PBC;
proto_item *SnC_item;
proto_tree * SnC_tree,*PBC_tree,*RHF_tree;
@@ -204,10 +204,10 @@ static int dissect_opa_snc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
break;
case 2: /* For use with internal debugging tools */
proto_tree_add_item(SnC_tree, hf_opa_snc_Reserved64, tvb, offset, 8, ENC_NA);
- isBypass = FALSE;
+ isBypass = false;
break;
default:
- isBypass = FALSE;
+ isBypass = false;
}
offset += 8;
@@ -372,7 +372,7 @@ void proto_register_opa_snc(void)
}
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_snc,
&ett_sncpbc,
&ett_sncrhf,