summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-infiniband.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
commit9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9 (patch)
tree2784370cda9bbf2da9114d70f05399c0b229d28c /epan/dissectors/packet-infiniband.c
parentAdding debian version 4.2.6-1. (diff)
downloadwireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.tar.xz
wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-infiniband.c')
-rw-r--r--epan/dissectors/packet-infiniband.c2194
1 files changed, 1156 insertions, 1038 deletions
diff --git a/epan/dissectors/packet-infiniband.c b/epan/dissectors/packet-infiniband.c
index 20ca03d4..591ab82d 100644
--- a/epan/dissectors/packet-infiniband.c
+++ b/epan/dissectors/packet-infiniband.c
@@ -38,65 +38,65 @@ void proto_reg_handoff_infiniband(void);
#define RDMA_IP_CM_SID_PREFIX 0x0000000001000000
/* Wireshark ID */
-static int proto_infiniband = -1;
-static int proto_infiniband_link = -1;
+static int proto_infiniband;
+static int proto_infiniband_link;
/* Variables to hold expansion values between packets */
-/* static gint ett_infiniband = -1; */
-static gint ett_all_headers = -1;
-static gint ett_lrh = -1;
-static gint ett_grh = -1;
-static gint ett_bth = -1;
-static gint ett_rwh = -1;
-static gint ett_rdeth = -1;
-static gint ett_deth = -1;
-static gint ett_reth = -1;
-static gint ett_atomiceth = -1;
-static gint ett_aeth = -1;
-static gint ett_aeth_syndrome = -1;
-static gint ett_atomicacketh = -1;
-static gint ett_immdt = -1;
-static gint ett_ieth = -1;
-static gint ett_payload = -1;
-static gint ett_vendor = -1;
-static gint ett_subn_lid_routed = -1;
-static gint ett_subn_directed_route = -1;
-static gint ett_subnadmin = -1;
-static gint ett_mad = -1;
-static gint ett_cm = -1;
-static gint ett_cm_sid = -1;
-static gint ett_cm_ipcm = -1;
-static gint ett_rmpp = -1;
-static gint ett_subm_attribute = -1;
-static gint ett_suba_attribute = -1;
-static gint ett_datadetails = -1;
-static gint ett_noticestraps = -1;
-/* static gint ett_nodedesc = -1; */
-/* static gint ett_nodeinfo = -1; */
-/* static gint ett_switchinfo = -1; */
-/* static gint ett_guidinfo = -1; */
-/* static gint ett_portinfo = -1; */
-static gint ett_portinfo_capmask = -1;
-static gint ett_pkeytable = -1;
-static gint ett_sltovlmapping = -1;
-static gint ett_vlarbitrationtable = -1;
-static gint ett_linearforwardingtable = -1;
-static gint ett_randomforwardingtable = -1;
-static gint ett_multicastforwardingtable = -1;
-static gint ett_sminfo = -1;
-static gint ett_vendordiag = -1;
-static gint ett_ledinfo = -1;
-static gint ett_linkspeedwidthpairs = -1;
-static gint ett_informinfo = -1;
-static gint ett_linkrecord = -1;
-static gint ett_servicerecord = -1;
-static gint ett_pathrecord = -1;
-static gint ett_mcmemberrecord = -1;
-static gint ett_tracerecord = -1;
-static gint ett_multipathrecord = -1;
-static gint ett_serviceassocrecord = -1;
-static gint ett_perfclass = -1;
-static gint ett_link = -1;
+/* static int ett_infiniband; */
+static int ett_all_headers;
+static int ett_lrh;
+static int ett_grh;
+static int ett_bth;
+static int ett_rwh;
+static int ett_rdeth;
+static int ett_deth;
+static int ett_reth;
+static int ett_atomiceth;
+static int ett_aeth;
+static int ett_aeth_syndrome;
+static int ett_atomicacketh;
+static int ett_immdt;
+static int ett_ieth;
+static int ett_payload;
+static int ett_vendor;
+static int ett_subn_lid_routed;
+static int ett_subn_directed_route;
+static int ett_subnadmin;
+static int ett_mad;
+static int ett_cm;
+static int ett_cm_sid;
+static int ett_cm_ipcm;
+static int ett_rmpp;
+static int ett_subm_attribute;
+static int ett_suba_attribute;
+static int ett_datadetails;
+static int ett_noticestraps;
+/* static int ett_nodedesc; */
+/* static int ett_nodeinfo; */
+/* static int ett_switchinfo; */
+/* static int ett_guidinfo; */
+/* static int ett_portinfo; */
+static int ett_portinfo_capmask;
+static int ett_pkeytable;
+static int ett_sltovlmapping;
+static int ett_vlarbitrationtable;
+static int ett_linearforwardingtable;
+static int ett_randomforwardingtable;
+static int ett_multicastforwardingtable;
+static int ett_sminfo;
+static int ett_vendordiag;
+static int ett_ledinfo;
+static int ett_linkspeedwidthpairs;
+static int ett_informinfo;
+static int ett_linkrecord;
+static int ett_servicerecord;
+static int ett_pathrecord;
+static int ett_mcmemberrecord;
+static int ett_tracerecord;
+static int ett_multipathrecord;
+static int ett_serviceassocrecord;
+static int ett_perfclass;
+static int ett_link;
/* Dissector Declaration */
static dissector_handle_t ib_handle;
@@ -113,14 +113,14 @@ static dissector_table_t subdissector_table;
* Structure to hold information from the common MAD header.
* This is necessary because the MAD header contains information which significantly changes the dissection algorithm. */
typedef struct {
- guint8 managementClass;
- guint8 classVersion;
- guint8 method;
- guint8 status;
- guint16 classSpecific;
- guint64 transactionID;
- guint16 attributeID;
- guint32 attributeModifier;
+ uint8_t managementClass;
+ uint8_t classVersion;
+ uint8_t method;
+ uint8_t status;
+ uint16_t classSpecific;
+ uint64_t transactionID;
+ uint16_t attributeID;
+ uint32_t attributeModifier;
char data[MAD_DATA_SIZE];
} MAD_Data;
@@ -133,94 +133,95 @@ typedef enum {
/* Forward-declarations */
static void dissect_infiniband_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ib_packet_start_header starts_with);
-static gint32 find_next_header_sequence(struct infinibandinfo* ibInfo);
-static gboolean contains(guint32 value, guint32* arr, int length);
-static void dissect_general_info(tvbuff_t *tvb, gint offset, packet_info *pinfo, ib_packet_start_header starts_with);
+static int32_t find_next_header_sequence(struct infinibandinfo* ibInfo);
+static bool contains(uint32_t value, uint32_t* arr, int length);
+static void dissect_general_info(tvbuff_t *tvb, int offset, packet_info *pinfo, ib_packet_start_header starts_with);
/* Parsing Methods for specific IB headers. */
-static void parse_VENDOR(proto_tree *, tvbuff_t *, gint *);
-static void parse_PAYLOAD(proto_tree *, packet_info *, struct infinibandinfo *, tvbuff_t *, gint *, gint length, gint crclen, proto_tree *);
-static void parse_IETH(proto_tree *, tvbuff_t *, gint *);
-static void parse_IMMDT(proto_tree *, tvbuff_t *, gint *offset);
-static void parse_ATOMICACKETH(proto_tree *, tvbuff_t *, gint *offset);
-static void parse_AETH(proto_tree *, tvbuff_t *, gint *offset, packet_info *pinfo);
-static void parse_ATOMICETH(proto_tree *, tvbuff_t *, gint *offset);
-static void parse_RETH(proto_tree *, tvbuff_t *, gint *offset,
+static void parse_VENDOR(proto_tree *, tvbuff_t *, int *);
+static void parse_PAYLOAD(proto_tree *, packet_info *, struct infinibandinfo *, tvbuff_t *, int *, int length, int crclen, proto_tree *);
+static void parse_IETH(proto_tree *, tvbuff_t *, int *);
+static void parse_IMMDT(proto_tree *, tvbuff_t *, int *offset);
+static void parse_ATOMICACKETH(proto_tree *, tvbuff_t *, int *offset);
+static void parse_AETH(proto_tree *, tvbuff_t *, int *offset, packet_info *pinfo);
+static void parse_ATOMICETH(proto_tree *, tvbuff_t *, int *offset);
+static void parse_RETH(proto_tree *, tvbuff_t *, int *offset,
struct infinibandinfo *info);
-static void parse_DETH(proto_tree *, packet_info *, tvbuff_t *, gint *offset);
-static void parse_RDETH(proto_tree *, tvbuff_t *, gint *offset);
-static void parse_IPvSix(proto_tree *, tvbuff_t *, gint *offset, packet_info *);
-static void parse_RWH(proto_tree *, tvbuff_t *, gint *offset, packet_info *, proto_tree *);
-static void parse_DCCETH(proto_tree *parentTree, tvbuff_t *tvb, gint *offset);
-
-static void parse_SUBN_LID_ROUTED(proto_tree *, packet_info *, tvbuff_t *, gint *offset);
-static void parse_SUBN_DIRECTED_ROUTE(proto_tree *, packet_info *, tvbuff_t *, gint *offset);
-static void parse_SUBNADMN(proto_tree *, packet_info *, tvbuff_t *, gint *offset);
-static void parse_PERF(proto_tree *, tvbuff_t *, packet_info *, gint *offset);
-static void parse_BM(proto_tree *, tvbuff_t *, gint *offset);
-static void parse_DEV_MGT(proto_tree *, tvbuff_t *, gint *offset);
-static void parse_COM_MGT(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, gint *offset, proto_tree* top_tree);
-static void parse_SNMP(proto_tree *, tvbuff_t *, gint *offset);
-static void parse_VENDOR_MANAGEMENT(proto_tree *, tvbuff_t *, gint *offset);
-static void parse_APPLICATION_MANAGEMENT(proto_tree *, tvbuff_t *, gint *offset);
-static void parse_RESERVED_MANAGEMENT(proto_tree *, tvbuff_t *, gint *offset);
-
-static gboolean parse_MAD_Common(proto_tree*, tvbuff_t*, gint *offset, MAD_Data*);
-static gboolean parse_RMPP(proto_tree* , tvbuff_t* , gint *offset);
+static void parse_DETH(proto_tree *, packet_info *, tvbuff_t *, int *offset);
+static void parse_RDETH(proto_tree *, tvbuff_t *, int *offset);
+static void parse_IPvSix(proto_tree *, tvbuff_t *, int *offset, packet_info *);
+static void parse_RWH(proto_tree *, tvbuff_t *, int *offset, packet_info *, proto_tree *);
+static void parse_DCCETH(proto_tree *parentTree, tvbuff_t *tvb, int *offset);
+static void parse_FETH(proto_tree *, tvbuff_t *, int *offset);
+
+static void parse_SUBN_LID_ROUTED(proto_tree *, packet_info *, tvbuff_t *, int *offset);
+static void parse_SUBN_DIRECTED_ROUTE(proto_tree *, packet_info *, tvbuff_t *, int *offset);
+static void parse_SUBNADMN(proto_tree *, packet_info *, tvbuff_t *, int *offset);
+static void parse_PERF(proto_tree *, tvbuff_t *, packet_info *, int *offset);
+static void parse_BM(proto_tree *, tvbuff_t *, int *offset);
+static void parse_DEV_MGT(proto_tree *, tvbuff_t *, int *offset);
+static void parse_COM_MGT(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, int *offset, proto_tree* top_tree);
+static void parse_SNMP(proto_tree *, tvbuff_t *, int *offset);
+static void parse_VENDOR_MANAGEMENT(proto_tree *, tvbuff_t *, int *offset);
+static void parse_APPLICATION_MANAGEMENT(proto_tree *, tvbuff_t *, int *offset);
+static void parse_RESERVED_MANAGEMENT(proto_tree *, tvbuff_t *, int *offset);
+
+static bool parse_MAD_Common(proto_tree*, tvbuff_t*, int *offset, MAD_Data*);
+static bool parse_RMPP(proto_tree* , tvbuff_t* , int *offset);
static void label_SUBM_Method(proto_item*, MAD_Data*, packet_info*);
static void label_SUBM_Attribute(proto_item*, MAD_Data*, packet_info*);
static void label_SUBA_Method(proto_item*, MAD_Data*, packet_info*);
static void label_SUBA_Attribute(proto_item*, MAD_Data*, packet_info*);
/* Class Attribute Parsing Routines */
-static gboolean parse_SUBM_Attribute(proto_tree*, tvbuff_t*, gint *offset, MAD_Data*);
-static gboolean parse_SUBA_Attribute(proto_tree*, tvbuff_t*, gint *offset, MAD_Data*);
+static bool parse_SUBM_Attribute(proto_tree*, tvbuff_t*, int *offset, MAD_Data*);
+static bool parse_SUBA_Attribute(proto_tree*, tvbuff_t*, int *offset, MAD_Data*);
/* These methods parse individual attributes
* Naming convention FunctionHandle = "parse_" + [Attribute Name];
* Where [Attribute Name] is the attribute identifier from chapter 14 of the IB Specification
* Subnet Management */
-static void parse_NoticesAndTraps(proto_tree*, tvbuff_t*, gint *offset);
-static void parse_NodeDescription(proto_tree*, tvbuff_t*, gint *offset);
-static int parse_NodeInfo(proto_tree*, tvbuff_t*, gint *offset);
-static int parse_SwitchInfo(proto_tree*, tvbuff_t*, gint *offset);
-static int parse_GUIDInfo(proto_tree*, tvbuff_t*, gint *offset);
-static int parse_PortInfo(proto_tree*, tvbuff_t*, gint *offset);
-static void parse_P_KeyTable(proto_tree*, tvbuff_t*, gint *offset);
-static void parse_SLtoVLMappingTable(proto_tree*, tvbuff_t*, gint *offset);
-static void parse_VLArbitrationTable(proto_tree*, tvbuff_t*, gint *offset);
-static void parse_LinearForwardingTable(proto_tree*, tvbuff_t*, gint *offset);
-static void parse_RandomForwardingTable(proto_tree*, tvbuff_t*, gint *offset);
-static void parse_MulticastForwardingTable(proto_tree*, tvbuff_t*, gint *offset);
-static int parse_SMInfo(proto_tree*, tvbuff_t*, gint *offset);
-static int parse_VendorDiag(proto_tree*, tvbuff_t*, gint *offset);
-static void parse_LedInfo(proto_tree*, tvbuff_t*, gint *offset);
-static int parse_LinkSpeedWidthPairsTable(proto_tree*, tvbuff_t*, gint *offset);
+static void parse_NoticesAndTraps(proto_tree*, tvbuff_t*, int *offset);
+static void parse_NodeDescription(proto_tree*, tvbuff_t*, int *offset);
+static int parse_NodeInfo(proto_tree*, tvbuff_t*, int *offset);
+static int parse_SwitchInfo(proto_tree*, tvbuff_t*, int *offset);
+static int parse_GUIDInfo(proto_tree*, tvbuff_t*, int *offset);
+static int parse_PortInfo(proto_tree*, tvbuff_t*, int *offset);
+static void parse_P_KeyTable(proto_tree*, tvbuff_t*, int *offset);
+static void parse_SLtoVLMappingTable(proto_tree*, tvbuff_t*, int *offset);
+static void parse_VLArbitrationTable(proto_tree*, tvbuff_t*, int *offset);
+static void parse_LinearForwardingTable(proto_tree*, tvbuff_t*, int *offset);
+static void parse_RandomForwardingTable(proto_tree*, tvbuff_t*, int *offset);
+static void parse_MulticastForwardingTable(proto_tree*, tvbuff_t*, int *offset);
+static int parse_SMInfo(proto_tree*, tvbuff_t*, int *offset);
+static int parse_VendorDiag(proto_tree*, tvbuff_t*, int *offset);
+static void parse_LedInfo(proto_tree*, tvbuff_t*, int *offset);
+static int parse_LinkSpeedWidthPairsTable(proto_tree*, tvbuff_t*, int *offset);
/* These methods parse individual attributes for specific MAD management classes.
* Naming convention FunctionHandle = "parse_" + [Management Class] + "_" + [Attribute Name];
* Where [Management Class] is the shorthand name for the management class as defined
* in the MAD Management Classes section below in this file, and [Attribute Name] is the
* attribute identifier from the corresponding chapter of the IB Specification */
-static int parse_PERF_PortCounters(proto_tree* parentTree, tvbuff_t* tvb, packet_info *pinfo, gint *offset);
-static int parse_PERF_PortCountersExtended(proto_tree* parentTree, tvbuff_t* tvb, packet_info *pinfo, gint *offset);
+static int parse_PERF_PortCounters(proto_tree* parentTree, tvbuff_t* tvb, packet_info *pinfo, int *offset);
+static int parse_PERF_PortCountersExtended(proto_tree* parentTree, tvbuff_t* tvb, packet_info *pinfo, int *offset);
/* Subnet Administration */
-static int parse_InformInfo(proto_tree*, tvbuff_t*, gint *offset);
-static int parse_LinkRecord(proto_tree*, tvbuff_t*, gint *offset);
-static int parse_ServiceRecord(proto_tree*, tvbuff_t*, gint *offset);
-static int parse_PathRecord(proto_tree*, tvbuff_t*, gint *offset);
-static int parse_MCMemberRecord(proto_tree*, tvbuff_t*, gint *offset);
-static int parse_TraceRecord(proto_tree*, tvbuff_t*, gint *offset);
-static int parse_MultiPathRecord(proto_tree*, tvbuff_t*, gint *offset);
-static int parse_ServiceAssociationRecord(proto_tree*, tvbuff_t*, gint *offset);
+static int parse_InformInfo(proto_tree*, tvbuff_t*, int *offset);
+static int parse_LinkRecord(proto_tree*, tvbuff_t*, int *offset);
+static int parse_ServiceRecord(proto_tree*, tvbuff_t*, int *offset);
+static int parse_PathRecord(proto_tree*, tvbuff_t*, int *offset);
+static int parse_MCMemberRecord(proto_tree*, tvbuff_t*, int *offset);
+static int parse_TraceRecord(proto_tree*, tvbuff_t*, int *offset);
+static int parse_MultiPathRecord(proto_tree*, tvbuff_t*, int *offset);
+static int parse_ServiceAssociationRecord(proto_tree*, tvbuff_t*, int *offset);
/* Subnet Administration */
-static void parse_RID(proto_tree*, tvbuff_t*, gint *offset, MAD_Data*);
+static void parse_RID(proto_tree*, tvbuff_t*, int *offset, MAD_Data*);
/* Common */
-static int parse_ClassPortInfo(proto_tree*, tvbuff_t*, gint *offset);
+static int parse_ClassPortInfo(proto_tree*, tvbuff_t*, int *offset);
/* SM Methods */
static const value_string SUBM_Methods[] = {
@@ -479,256 +480,262 @@ static const value_string OperationalVLs[]= {
};
/* For reserved fields in various packets */
-static int hf_infiniband_reserved = -1;
+static int hf_infiniband_reserved;
/* Local Route Header (LRH) */
-static int hf_infiniband_LRH = -1;
-static int hf_infiniband_virtual_lane = -1;
-static int hf_infiniband_link_version = -1;
-static int hf_infiniband_service_level = -1;
-static int hf_infiniband_reserved2 = -1;
-static int hf_infiniband_link_next_header = -1;
-static int hf_infiniband_destination_local_id = -1;
-static int hf_infiniband_reserved5 = -1;
-static int hf_infiniband_packet_length = -1;
-static int hf_infiniband_source_local_id = -1;
+static int hf_infiniband_LRH;
+static int hf_infiniband_virtual_lane;
+static int hf_infiniband_link_version;
+static int hf_infiniband_service_level;
+static int hf_infiniband_reserved2;
+static int hf_infiniband_link_next_header;
+static int hf_infiniband_destination_local_id;
+static int hf_infiniband_reserved5;
+static int hf_infiniband_packet_length;
+static int hf_infiniband_source_local_id;
/* Global Route Header (GRH) */
-static int hf_infiniband_GRH = -1;
-static int hf_infiniband_ip_version = -1;
-static int hf_infiniband_traffic_class = -1;
-static int hf_infiniband_flow_label = -1;
-static int hf_infiniband_payload_length = -1;
-static int hf_infiniband_next_header = -1;
-static int hf_infiniband_hop_limit = -1;
-static int hf_infiniband_source_gid = -1;
-static int hf_infiniband_destination_gid = -1;
+static int hf_infiniband_GRH;
+static int hf_infiniband_ip_version;
+static int hf_infiniband_traffic_class;
+static int hf_infiniband_flow_label;
+static int hf_infiniband_payload_length;
+static int hf_infiniband_next_header;
+static int hf_infiniband_hop_limit;
+static int hf_infiniband_source_gid;
+static int hf_infiniband_destination_gid;
/* Base Transport Header (BTH) */
-static int hf_infiniband_BTH = -1;
-static int hf_infiniband_opcode = -1;
-static int hf_infiniband_solicited_event = -1;
-static int hf_infiniband_migreq = -1;
-static int hf_infiniband_pad_count = -1;
-static int hf_infiniband_transport_header_version = -1;
-static int hf_infiniband_partition_key = -1;
-static int hf_infiniband_destination_qp = -1;
-static int hf_infiniband_acknowledge_request = -1;
-static int hf_infiniband_reserved7 = -1;
-static int hf_infiniband_packet_sequence_number = -1;
+static int hf_infiniband_BTH;
+static int hf_infiniband_opcode;
+static int hf_infiniband_solicited_event;
+static int hf_infiniband_migreq;
+static int hf_infiniband_pad_count;
+static int hf_infiniband_transport_header_version;
+static int hf_infiniband_partition_key;
+static int hf_infiniband_destination_qp;
+static int hf_infiniband_acknowledge_request;
+static int hf_infiniband_reserved7;
+static int hf_infiniband_packet_sequence_number;
/* Raw Header (RWH) */
-static int hf_infiniband_RWH = -1;
-static int hf_infiniband_etype = -1;
+static int hf_infiniband_RWH;
+static int hf_infiniband_etype;
/* Reliable Datagram Extended Transport Header (RDETH) */
-static int hf_infiniband_RDETH = -1;
-static int hf_infiniband_ee_context = -1;
+static int hf_infiniband_RDETH;
+static int hf_infiniband_ee_context;
/* Datagram Extended Transport Header (DETH) */
-static int hf_infiniband_DETH = -1;
-static int hf_infiniband_queue_key = -1;
-static int hf_infiniband_source_qp = -1;
+static int hf_infiniband_DETH;
+static int hf_infiniband_queue_key;
+static int hf_infiniband_source_qp;
/* RDMA Extended Transport Header (RETH) */
-static int hf_infiniband_RETH = -1;
-static int hf_infiniband_virtual_address = -1;
-static int hf_infiniband_remote_key = -1;
-static int hf_infiniband_dma_length = -1;
+static int hf_infiniband_RETH;
+static int hf_infiniband_virtual_address;
+static int hf_infiniband_remote_key;
+static int hf_infiniband_dma_length;
/* Atomic Extended Transport Header (AtomicETH) */
-static int hf_infiniband_AtomicETH = -1;
-/* static int hf_infiniband_virtual_address_AtomicETH = -1; */
-/* static int hf_infiniband_remote_key_AtomicETH = -1; */
-static int hf_infiniband_swap_or_add_data = -1;
-static int hf_infiniband_compare_data = -1;
+static int hf_infiniband_AtomicETH;
+/* static int hf_infiniband_virtual_address_AtomicETH; */
+/* static int hf_infiniband_remote_key_AtomicETH; */
+static int hf_infiniband_swap_or_add_data;
+static int hf_infiniband_compare_data;
/* ACK Extended Transport Header (AETH) */
-static int hf_infiniband_AETH = -1;
-static int hf_infiniband_syndrome = -1;
-static int hf_infiniband_syndrome_reserved = -1;
-static int hf_infiniband_syndrome_opcode = -1;
-static int hf_infiniband_syndrome_credit_count = -1;
-static int hf_infiniband_syndrome_timer = -1;
-static int hf_infiniband_syndrome_reserved_value = -1;
-static int hf_infiniband_syndrome_error_code = -1;
-static int hf_infiniband_message_sequence_number = -1;
+static int hf_infiniband_AETH;
+static int hf_infiniband_syndrome;
+static int hf_infiniband_syndrome_reserved;
+static int hf_infiniband_syndrome_opcode;
+static int hf_infiniband_syndrome_credit_count;
+static int hf_infiniband_syndrome_timer;
+static int hf_infiniband_syndrome_reserved_value;
+static int hf_infiniband_syndrome_error_code;
+static int hf_infiniband_message_sequence_number;
/* Atomic ACK Extended Transport Header (AtomicAckETH) */
-static int hf_infiniband_AtomicAckETH = -1;
-static int hf_infiniband_original_remote_data = -1;
+static int hf_infiniband_AtomicAckETH;
+static int hf_infiniband_original_remote_data;
/* Immediate Extended Transport Header (ImmDt) */
-static int hf_infiniband_IMMDT = -1;
+static int hf_infiniband_IMMDT;
/* Invalidate Extended Transport Header (IETH) */
-static int hf_infiniband_IETH = -1;
+static int hf_infiniband_IETH;
+/* FLUSH Extended Transport Header (FETH) */
+static int hf_infiniband_FETH;
+static int hf_infiniband_reserved27;
+static int hf_infiniband_selectivity_level;
+static int hf_infiniband_placement_type;
+
/* Payload */
-static int hf_infiniband_payload = -1;
-static int hf_infiniband_invariant_crc = -1;
-static int hf_infiniband_variant_crc = -1;
+static int hf_infiniband_payload;
+static int hf_infiniband_invariant_crc;
+static int hf_infiniband_variant_crc;
/* Unknown or Vendor Specific */
-static int hf_infiniband_raw_data = -1;
-static int hf_infiniband_vendor = -1;
+static int hf_infiniband_raw_data;
+static int hf_infiniband_vendor;
/* CM REQ Header */
-static int hf_cm_req_local_comm_id = -1;
-static int hf_cm_req_service_id = -1;
-static int hf_cm_req_service_id_prefix = -1;
-static int hf_cm_req_service_id_protocol = -1;
-static int hf_cm_req_service_id_dport = -1;
-static int hf_cm_req_local_ca_guid = -1;
-static int hf_cm_req_local_qkey = -1;
-static int hf_cm_req_local_qpn = -1;
-static int hf_cm_req_respo_res = -1;
-static int hf_cm_req_local_eecn = -1;
-static int hf_cm_req_init_depth = -1;
-static int hf_cm_req_remote_eecn = -1;
-static int hf_cm_req_remote_cm_resp_to = -1;
-static int hf_cm_req_transp_serv_type = -1;
-static int hf_cm_req_e2e_flow_ctrl = -1;
-static int hf_cm_req_start_psn = -1;
-static int hf_cm_req_local_cm_resp_to = -1;
-static int hf_cm_req_retry_count = -1;
-static int hf_cm_req_pkey = -1;
-static int hf_cm_req_path_pp_mtu = -1;
-static int hf_cm_req_rdc_exists = -1;
-static int hf_cm_req_rnr_retry_count = -1;
-static int hf_cm_req_max_cm_retries = -1;
-static int hf_cm_req_srq = -1;
-static int hf_cm_req_extended_transport = -1;
-static int hf_cm_req_primary_local_lid = -1;
-static int hf_cm_req_primary_remote_lid = -1;
-static int hf_cm_req_primary_local_gid = -1;
-static int hf_cm_req_primary_remote_gid = -1;
-static int hf_cm_req_primary_local_gid_ipv4 = -1;
-static int hf_cm_req_primary_remote_gid_ipv4 = -1;
-static int hf_cm_req_primary_flow_label = -1;
-static int hf_cm_req_primary_reserved0 = -1;
-static int hf_cm_req_primary_packet_rate = -1;
-static int hf_cm_req_primary_traffic_class = -1;
-static int hf_cm_req_primary_hop_limit = -1;
-static int hf_cm_req_primary_sl = -1;
-static int hf_cm_req_primary_subnet_local = -1;
-static int hf_cm_req_primary_reserved1 = -1;
-static int hf_cm_req_primary_local_ack_to = -1;
-static int hf_cm_req_primary_reserved2 = -1;
-static int hf_cm_req_alt_local_lid = -1;
-static int hf_cm_req_alt_remote_lid = -1;
-static int hf_cm_req_alt_local_gid = -1;
-static int hf_cm_req_alt_remote_gid = -1;
-static int hf_cm_req_flow_label = -1;
-static int hf_cm_req_alt_reserved0 = -1;
-static int hf_cm_req_packet_rate = -1;
-static int hf_cm_req_alt_traffic_class = -1;
-static int hf_cm_req_alt_hop_limit = -1;
-static int hf_cm_req_SL = -1;
-static int hf_cm_req_subnet_local = -1;
-static int hf_cm_req_alt_reserved1 = -1;
-static int hf_cm_req_local_ACK_timeout = -1;
-static int hf_cm_req_alt_reserved2 = -1;
-static int hf_cm_req_private_data = -1;
-static int hf_cm_req_ip_cm_req_msg = -1;
-static int hf_cm_req_ip_cm_majv = -1;
-static int hf_cm_req_ip_cm_minv = -1;
-static int hf_cm_req_ip_cm_ipv = -1;
-static int hf_cm_req_ip_cm_res = -1;
-static int hf_cm_req_ip_cm_sport = -1;
-static int hf_cm_req_ip_cm_sip6 = -1;
-static int hf_cm_req_ip_cm_dip6 = -1;
-static int hf_cm_req_ip_cm_sip4 = -1;
-static int hf_cm_req_ip_cm_dip4 = -1;
-static int hf_ip_cm_req_consumer_private_data = -1;
+static int hf_cm_req_local_comm_id;
+static int hf_cm_req_service_id;
+static int hf_cm_req_service_id_prefix;
+static int hf_cm_req_service_id_protocol;
+static int hf_cm_req_service_id_dport;
+static int hf_cm_req_local_ca_guid;
+static int hf_cm_req_local_qkey;
+static int hf_cm_req_local_qpn;
+static int hf_cm_req_respo_res;
+static int hf_cm_req_local_eecn;
+static int hf_cm_req_init_depth;
+static int hf_cm_req_remote_eecn;
+static int hf_cm_req_remote_cm_resp_to;
+static int hf_cm_req_transp_serv_type;
+static int hf_cm_req_e2e_flow_ctrl;
+static int hf_cm_req_start_psn;
+static int hf_cm_req_local_cm_resp_to;
+static int hf_cm_req_retry_count;
+static int hf_cm_req_pkey;
+static int hf_cm_req_path_pp_mtu;
+static int hf_cm_req_rdc_exists;
+static int hf_cm_req_rnr_retry_count;
+static int hf_cm_req_max_cm_retries;
+static int hf_cm_req_srq;
+static int hf_cm_req_extended_transport;
+static int hf_cm_req_primary_local_lid;
+static int hf_cm_req_primary_remote_lid;
+static int hf_cm_req_primary_local_gid;
+static int hf_cm_req_primary_remote_gid;
+static int hf_cm_req_primary_local_gid_ipv4;
+static int hf_cm_req_primary_remote_gid_ipv4;
+static int hf_cm_req_primary_flow_label;
+static int hf_cm_req_primary_reserved0;
+static int hf_cm_req_primary_packet_rate;
+static int hf_cm_req_primary_traffic_class;
+static int hf_cm_req_primary_hop_limit;
+static int hf_cm_req_primary_sl;
+static int hf_cm_req_primary_subnet_local;
+static int hf_cm_req_primary_reserved1;
+static int hf_cm_req_primary_local_ack_to;
+static int hf_cm_req_primary_reserved2;
+static int hf_cm_req_alt_local_lid;
+static int hf_cm_req_alt_remote_lid;
+static int hf_cm_req_alt_local_gid;
+static int hf_cm_req_alt_remote_gid;
+static int hf_cm_req_flow_label;
+static int hf_cm_req_alt_reserved0;
+static int hf_cm_req_packet_rate;
+static int hf_cm_req_alt_traffic_class;
+static int hf_cm_req_alt_hop_limit;
+static int hf_cm_req_SL;
+static int hf_cm_req_subnet_local;
+static int hf_cm_req_alt_reserved1;
+static int hf_cm_req_local_ACK_timeout;
+static int hf_cm_req_alt_reserved2;
+static int hf_cm_req_private_data;
+static int hf_cm_req_ip_cm_req_msg;
+static int hf_cm_req_ip_cm_majv;
+static int hf_cm_req_ip_cm_minv;
+static int hf_cm_req_ip_cm_ipv;
+static int hf_cm_req_ip_cm_res;
+static int hf_cm_req_ip_cm_sport;
+static int hf_cm_req_ip_cm_sip6;
+static int hf_cm_req_ip_cm_dip6;
+static int hf_cm_req_ip_cm_sip4;
+static int hf_cm_req_ip_cm_dip4;
+static int hf_ip_cm_req_consumer_private_data;
/* CM REP Header */
-static int hf_cm_rep_localcommid = -1;
-static int hf_cm_rep_remotecommid = -1;
-static int hf_cm_rep_localqkey = -1;
-static int hf_cm_rep_localqpn = -1;
-static int hf_cm_rep_localeecontnum = -1;
-static int hf_cm_rep_startingpsn = -1;
-static int hf_cm_rep_responderres = -1;
-static int hf_cm_rep_initiatordepth = -1;
-static int hf_cm_rep_tgtackdelay = -1;
-static int hf_cm_rep_failoveracc = -1;
-static int hf_cm_rep_e2eflowctl = -1;
-static int hf_cm_rep_rnrretrycount = -1;
-static int hf_cm_rep_srq = -1;
-static int hf_cm_rep_reserved = -1;
-static int hf_cm_rep_localcaguid = -1;
-static int hf_cm_rep_privatedata = -1;
+static int hf_cm_rep_localcommid;
+static int hf_cm_rep_remotecommid;
+static int hf_cm_rep_localqkey;
+static int hf_cm_rep_localqpn;
+static int hf_cm_rep_localeecontnum;
+static int hf_cm_rep_startingpsn;
+static int hf_cm_rep_responderres;
+static int hf_cm_rep_initiatordepth;
+static int hf_cm_rep_tgtackdelay;
+static int hf_cm_rep_failoveracc;
+static int hf_cm_rep_e2eflowctl;
+static int hf_cm_rep_rnrretrycount;
+static int hf_cm_rep_srq;
+static int hf_cm_rep_reserved;
+static int hf_cm_rep_localcaguid;
+static int hf_cm_rep_privatedata;
/* CM RTU Header */
-static int hf_cm_rtu_localcommid = -1;
-static int hf_cm_rtu_remotecommid = -1;
-static int hf_cm_rtu_privatedata = -1;
+static int hf_cm_rtu_localcommid;
+static int hf_cm_rtu_remotecommid;
+static int hf_cm_rtu_privatedata;
/* CM REJ Header */
-static int hf_cm_rej_local_commid = -1;
-static int hf_cm_rej_remote_commid = -1;
-static int hf_cm_rej_msg_rej = -1;
-static int hf_cm_rej_msg_reserved0 = -1;
-static int hf_cm_rej_rej_info_len = -1;
-static int hf_cm_rej_msg_reserved1 = -1;
-static int hf_cm_rej_reason = -1;
-static int hf_cm_rej_add_rej_info = -1;
-static int hf_cm_rej_private_data = -1;
+static int hf_cm_rej_local_commid;
+static int hf_cm_rej_remote_commid;
+static int hf_cm_rej_msg_rej;
+static int hf_cm_rej_msg_reserved0;
+static int hf_cm_rej_rej_info_len;
+static int hf_cm_rej_msg_reserved1;
+static int hf_cm_rej_reason;
+static int hf_cm_rej_add_rej_info;
+static int hf_cm_rej_private_data;
/* CM DREQ Header */
-static int hf_cm_dreq_localcommid = -1;
-static int hf_cm_dreq_remotecommid = -1;
-static int hf_cm_dreq_remote_qpn = -1;
-static int hf_cm_dreq_privatedata = -1;
+static int hf_cm_dreq_localcommid;
+static int hf_cm_dreq_remotecommid;
+static int hf_cm_dreq_remote_qpn;
+static int hf_cm_dreq_privatedata;
/* CM DRSP Header */
-static int hf_cm_drsp_localcommid = -1;
-static int hf_cm_drsp_remotecommid = -1;
-static int hf_cm_drsp_privatedata = -1;
+static int hf_cm_drsp_localcommid;
+static int hf_cm_drsp_remotecommid;
+static int hf_cm_drsp_privatedata;
/* MAD Base Header */
-static int hf_infiniband_MAD = -1;
-static int hf_infiniband_base_version = -1;
-static int hf_infiniband_mgmt_class = -1;
-static int hf_infiniband_class_version = -1;
-static int hf_infiniband_method = -1;
-static int hf_infiniband_status = -1;
-static int hf_infiniband_class_specific = -1;
-static int hf_infiniband_transaction_id = -1;
-static int hf_infiniband_attribute_id = -1;
-static int hf_infiniband_attribute_modifier = -1;
-static int hf_infiniband_data = -1;
+static int hf_infiniband_MAD;
+static int hf_infiniband_base_version;
+static int hf_infiniband_mgmt_class;
+static int hf_infiniband_class_version;
+static int hf_infiniband_method;
+static int hf_infiniband_status;
+static int hf_infiniband_class_specific;
+static int hf_infiniband_transaction_id;
+static int hf_infiniband_attribute_id;
+static int hf_infiniband_attribute_modifier;
+static int hf_infiniband_data;
/* RMPP Header */
-static int hf_infiniband_RMPP = -1;
-static int hf_infiniband_rmpp_version = -1;
-static int hf_infiniband_rmpp_type = -1;
-static int hf_infiniband_r_resp_time = -1;
-static int hf_infiniband_rmpp_flags = -1;
-static int hf_infiniband_rmpp_status = -1;
-static int hf_infiniband_rmpp_data1 = -1;
-static int hf_infiniband_rmpp_data2 = -1;
+static int hf_infiniband_RMPP;
+static int hf_infiniband_rmpp_version;
+static int hf_infiniband_rmpp_type;
+static int hf_infiniband_r_resp_time;
+static int hf_infiniband_rmpp_flags;
+static int hf_infiniband_rmpp_status;
+static int hf_infiniband_rmpp_data1;
+static int hf_infiniband_rmpp_data2;
/* RMPP Data */
-/* static int hf_infiniband_RMPP_DATA = -1; */
-static int hf_infiniband_segment_number = -1;
-static int hf_infiniband_payload_length32 = -1;
-static int hf_infiniband_transferred_data = -1;
+/* static int hf_infiniband_RMPP_DATA; */
+static int hf_infiniband_segment_number;
+static int hf_infiniband_payload_length32;
+static int hf_infiniband_transferred_data;
/* RMPP ACK */
-static int hf_infiniband_new_window_last = -1;
+static int hf_infiniband_new_window_last;
/* RMPP ABORT and STOP */
-static int hf_infiniband_optional_extended_error_data = -1;
+static int hf_infiniband_optional_extended_error_data;
/* SMP Data LID Routed */
-static int hf_infiniband_SMP_LID = -1;
-static int hf_infiniband_m_key = -1;
-static int hf_infiniband_smp_data = -1;
+static int hf_infiniband_SMP_LID;
+static int hf_infiniband_m_key;
+static int hf_infiniband_smp_data;
/* SMP Data Directed Route */
-static int hf_infiniband_SMP_DIRECTED = -1;
-static int hf_infiniband_smp_status = -1;
-static int hf_infiniband_hop_pointer = -1;
-static int hf_infiniband_hop_count = -1;
-static int hf_infiniband_dr_slid = -1;
-static int hf_infiniband_dr_dlid = -1;
-static int hf_infiniband_d = -1;
-static int hf_infiniband_initial_path = -1;
-static int hf_infiniband_return_path = -1;
+static int hf_infiniband_SMP_DIRECTED;
+static int hf_infiniband_smp_status;
+static int hf_infiniband_hop_pointer;
+static int hf_infiniband_hop_count;
+static int hf_infiniband_dr_slid;
+static int hf_infiniband_dr_dlid;
+static int hf_infiniband_d;
+static int hf_infiniband_initial_path;
+static int hf_infiniband_return_path;
/* SA MAD Header */
-static int hf_infiniband_SA = -1;
-static int hf_infiniband_sm_key = -1;
-static int hf_infiniband_attribute_offset = -1;
-static int hf_infiniband_component_mask = -1;
-static int hf_infiniband_subnet_admin_data = -1;
+static int hf_infiniband_SA;
+static int hf_infiniband_sm_key;
+static int hf_infiniband_attribute_offset;
+static int hf_infiniband_component_mask;
+static int hf_infiniband_subnet_admin_data;
/* Mellanox EoIB encapsulation header */
-static int proto_mellanox_eoib = -1;
-static int hf_infiniband_ver = -1;
-static int hf_infiniband_tcp_chk = -1;
-static int hf_infiniband_ip_chk = -1;
-static int hf_infiniband_fcs = -1;
-static int hf_infiniband_ms = -1;
-static int hf_infiniband_seg_off = -1;
-static int hf_infiniband_seg_id = -1;
+static int proto_mellanox_eoib;
+static int hf_infiniband_ver;
+static int hf_infiniband_tcp_chk;
+static int hf_infiniband_ip_chk;
+static int hf_infiniband_fcs;
+static int hf_infiniband_ms;
+static int hf_infiniband_seg_off;
+static int hf_infiniband_seg_id;
-static gint ett_eoib = -1;
+static int ett_eoib;
#define MELLANOX_VERSION_FLAG 0x3000
#define MELLANOX_TCP_CHECKSUM_FLAG 0x0C00
@@ -745,167 +752,167 @@ static gint ett_eoib = -1;
* did not provide adequate readability for the granularity of attribute/attribute fields. */
/* NodeDescription */
-static int hf_infiniband_NodeDescription_NodeString = -1;
+static int hf_infiniband_NodeDescription_NodeString;
/* NodeInfo */
-static int hf_infiniband_NodeInfo_BaseVersion = -1;
-static int hf_infiniband_NodeInfo_ClassVersion = -1;
-static int hf_infiniband_NodeInfo_NodeType = -1;
-static int hf_infiniband_NodeInfo_NumPorts = -1;
-static int hf_infiniband_NodeInfo_SystemImageGUID = -1;
-static int hf_infiniband_NodeInfo_NodeGUID = -1;
-static int hf_infiniband_NodeInfo_PortGUID = -1;
-static int hf_infiniband_NodeInfo_PartitionCap = -1;
-static int hf_infiniband_NodeInfo_DeviceID = -1;
-static int hf_infiniband_NodeInfo_Revision = -1;
-static int hf_infiniband_NodeInfo_LocalPortNum = -1;
-static int hf_infiniband_NodeInfo_VendorID = -1;
+static int hf_infiniband_NodeInfo_BaseVersion;
+static int hf_infiniband_NodeInfo_ClassVersion;
+static int hf_infiniband_NodeInfo_NodeType;
+static int hf_infiniband_NodeInfo_NumPorts;
+static int hf_infiniband_NodeInfo_SystemImageGUID;
+static int hf_infiniband_NodeInfo_NodeGUID;
+static int hf_infiniband_NodeInfo_PortGUID;
+static int hf_infiniband_NodeInfo_PartitionCap;
+static int hf_infiniband_NodeInfo_DeviceID;
+static int hf_infiniband_NodeInfo_Revision;
+static int hf_infiniband_NodeInfo_LocalPortNum;
+static int hf_infiniband_NodeInfo_VendorID;
/* SwitchInfo */
-static int hf_infiniband_SwitchInfo_LinearFDBCap = -1;
-static int hf_infiniband_SwitchInfo_RandomFDBCap = -1;
-static int hf_infiniband_SwitchInfo_MulticastFDBCap = -1;
-static int hf_infiniband_SwitchInfo_LinearFDBTop = -1;
-static int hf_infiniband_SwitchInfo_DefaultPort = -1;
-static int hf_infiniband_SwitchInfo_DefaultMulticastPrimaryPort = -1;
-static int hf_infiniband_SwitchInfo_DefaultMulticastNotPrimaryPort = -1;
-static int hf_infiniband_SwitchInfo_LifeTimeValue = -1;
-static int hf_infiniband_SwitchInfo_PortStateChange = -1;
-static int hf_infiniband_SwitchInfo_OptimizedSLtoVLMappingProgramming = -1;
-static int hf_infiniband_SwitchInfo_LIDsPerPort = -1;
-static int hf_infiniband_SwitchInfo_PartitionEnforcementCap = -1;
-static int hf_infiniband_SwitchInfo_InboundEnforcementCap = -1;
-static int hf_infiniband_SwitchInfo_OutboundEnforcementCap = -1;
-static int hf_infiniband_SwitchInfo_FilterRawInboundCap = -1;
-static int hf_infiniband_SwitchInfo_FilterRawOutboundCap = -1;
-static int hf_infiniband_SwitchInfo_EnhancedPortZero = -1;
+static int hf_infiniband_SwitchInfo_LinearFDBCap;
+static int hf_infiniband_SwitchInfo_RandomFDBCap;
+static int hf_infiniband_SwitchInfo_MulticastFDBCap;
+static int hf_infiniband_SwitchInfo_LinearFDBTop;
+static int hf_infiniband_SwitchInfo_DefaultPort;
+static int hf_infiniband_SwitchInfo_DefaultMulticastPrimaryPort;
+static int hf_infiniband_SwitchInfo_DefaultMulticastNotPrimaryPort;
+static int hf_infiniband_SwitchInfo_LifeTimeValue;
+static int hf_infiniband_SwitchInfo_PortStateChange;
+static int hf_infiniband_SwitchInfo_OptimizedSLtoVLMappingProgramming;
+static int hf_infiniband_SwitchInfo_LIDsPerPort;
+static int hf_infiniband_SwitchInfo_PartitionEnforcementCap;
+static int hf_infiniband_SwitchInfo_InboundEnforcementCap;
+static int hf_infiniband_SwitchInfo_OutboundEnforcementCap;
+static int hf_infiniband_SwitchInfo_FilterRawInboundCap;
+static int hf_infiniband_SwitchInfo_FilterRawOutboundCap;
+static int hf_infiniband_SwitchInfo_EnhancedPortZero;
/* GUIDInfo */
-/* static int hf_infiniband_GUIDInfo_GUIDBlock = -1; */
-static int hf_infiniband_GUIDInfo_GUID = -1;
+/* static int hf_infiniband_GUIDInfo_GUIDBlock; */
+static int hf_infiniband_GUIDInfo_GUID;
/* PortInfo */
-static int hf_infiniband_PortInfo_GidPrefix = -1;
-static int hf_infiniband_PortInfo_LID = -1;
-static int hf_infiniband_PortInfo_MasterSMLID = -1;
-static int hf_infiniband_PortInfo_CapabilityMask = -1;
+static int hf_infiniband_PortInfo_GidPrefix;
+static int hf_infiniband_PortInfo_LID;
+static int hf_infiniband_PortInfo_MasterSMLID;
+static int hf_infiniband_PortInfo_CapabilityMask;
/* Capability Mask Flags */
-static int hf_infiniband_PortInfo_CapabilityMask_SM = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_NoticeSupported = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_TrapSupported = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_OptionalIPDSupported = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_AutomaticMigrationSupported = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_SLMappingSupported = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_MKeyNVRAM = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_PKeyNVRAM = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_LEDInfoSupported = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_SMdisabled = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_SystemImageGUIDSupported = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_PKeySwitchExternalPortTrapSupported = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_CommunicationManagementSupported = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_SNMPTunnelingSupported = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_ReinitSupported = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_DeviceManagementSupported = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_VendorClassSupported = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_DRNoticeSupported = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_CapabilityMaskNoticeSupported = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_BootManagementSupported = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_LinkRoundTripLatencySupported = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_ClientRegistrationSupported = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_OtherLocalChangesNoticeSupported = -1;
-static int hf_infiniband_PortInfo_CapabilityMask_LinkSpeedWIdthPairsTableSupported = -1;
+static int hf_infiniband_PortInfo_CapabilityMask_SM;
+static int hf_infiniband_PortInfo_CapabilityMask_NoticeSupported;
+static int hf_infiniband_PortInfo_CapabilityMask_TrapSupported;
+static int hf_infiniband_PortInfo_CapabilityMask_OptionalIPDSupported;
+static int hf_infiniband_PortInfo_CapabilityMask_AutomaticMigrationSupported;
+static int hf_infiniband_PortInfo_CapabilityMask_SLMappingSupported;
+static int hf_infiniband_PortInfo_CapabilityMask_MKeyNVRAM;
+static int hf_infiniband_PortInfo_CapabilityMask_PKeyNVRAM;
+static int hf_infiniband_PortInfo_CapabilityMask_LEDInfoSupported;
+static int hf_infiniband_PortInfo_CapabilityMask_SMdisabled;
+static int hf_infiniband_PortInfo_CapabilityMask_SystemImageGUIDSupported;
+static int hf_infiniband_PortInfo_CapabilityMask_PKeySwitchExternalPortTrapSupported;
+static int hf_infiniband_PortInfo_CapabilityMask_CommunicationManagementSupported;
+static int hf_infiniband_PortInfo_CapabilityMask_SNMPTunnelingSupported;
+static int hf_infiniband_PortInfo_CapabilityMask_ReinitSupported;
+static int hf_infiniband_PortInfo_CapabilityMask_DeviceManagementSupported;
+static int hf_infiniband_PortInfo_CapabilityMask_VendorClassSupported;
+static int hf_infiniband_PortInfo_CapabilityMask_DRNoticeSupported;
+static int hf_infiniband_PortInfo_CapabilityMask_CapabilityMaskNoticeSupported;
+static int hf_infiniband_PortInfo_CapabilityMask_BootManagementSupported;
+static int hf_infiniband_PortInfo_CapabilityMask_LinkRoundTripLatencySupported;
+static int hf_infiniband_PortInfo_CapabilityMask_ClientRegistrationSupported;
+static int hf_infiniband_PortInfo_CapabilityMask_OtherLocalChangesNoticeSupported;
+static int hf_infiniband_PortInfo_CapabilityMask_LinkSpeedWIdthPairsTableSupported;
/* End Capability Mask Flags */
-static int hf_infiniband_PortInfo_DiagCode = -1;
-static int hf_infiniband_PortInfo_M_KeyLeasePeriod = -1;
-static int hf_infiniband_PortInfo_LocalPortNum = -1;
-static int hf_infiniband_PortInfo_LinkWidthEnabled = -1;
-static int hf_infiniband_PortInfo_LinkWidthSupported = -1;
-static int hf_infiniband_PortInfo_LinkWidthActive = -1;
-static int hf_infiniband_PortInfo_LinkSpeedSupported = -1;
-static int hf_infiniband_PortInfo_PortState = -1;
-static int hf_infiniband_PortInfo_PortPhysicalState = -1;
-static int hf_infiniband_PortInfo_LinkDownDefaultState = -1;
-static int hf_infiniband_PortInfo_M_KeyProtectBits = -1;
-static int hf_infiniband_PortInfo_LMC = -1;
-static int hf_infiniband_PortInfo_LinkSpeedActive = -1;
-static int hf_infiniband_PortInfo_LinkSpeedEnabled = -1;
-static int hf_infiniband_PortInfo_NeighborMTU = -1;
-static int hf_infiniband_PortInfo_MasterSMSL = -1;
-static int hf_infiniband_PortInfo_VLCap = -1;
-static int hf_infiniband_PortInfo_M_Key = -1;
-static int hf_infiniband_PortInfo_InitType = -1;
-static int hf_infiniband_PortInfo_VLHighLimit = -1;
-static int hf_infiniband_PortInfo_VLArbitrationHighCap = -1;
-static int hf_infiniband_PortInfo_VLArbitrationLowCap = -1;
-static int hf_infiniband_PortInfo_InitTypeReply = -1;
-static int hf_infiniband_PortInfo_MTUCap = -1;
-static int hf_infiniband_PortInfo_VLStallCount = -1;
-static int hf_infiniband_PortInfo_HOQLife = -1;
-static int hf_infiniband_PortInfo_OperationalVLs = -1;
-static int hf_infiniband_PortInfo_PartitionEnforcementInbound = -1;
-static int hf_infiniband_PortInfo_PartitionEnforcementOutbound = -1;
-static int hf_infiniband_PortInfo_FilterRawInbound = -1;
-static int hf_infiniband_PortInfo_FilterRawOutbound = -1;
-static int hf_infiniband_PortInfo_M_KeyViolations = -1;
-static int hf_infiniband_PortInfo_P_KeyViolations = -1;
-static int hf_infiniband_PortInfo_Q_KeyViolations = -1;
-static int hf_infiniband_PortInfo_GUIDCap = -1;
-static int hf_infiniband_PortInfo_ClientReregister = -1;
-static int hf_infiniband_PortInfo_SubnetTimeOut = -1;
-static int hf_infiniband_PortInfo_RespTimeValue = -1;
-static int hf_infiniband_PortInfo_LocalPhyErrors = -1;
-static int hf_infiniband_PortInfo_OverrunErrors = -1;
-static int hf_infiniband_PortInfo_MaxCreditHint = -1;
-static int hf_infiniband_PortInfo_LinkRoundTripLatency = -1;
+static int hf_infiniband_PortInfo_DiagCode;
+static int hf_infiniband_PortInfo_M_KeyLeasePeriod;
+static int hf_infiniband_PortInfo_LocalPortNum;
+static int hf_infiniband_PortInfo_LinkWidthEnabled;
+static int hf_infiniband_PortInfo_LinkWidthSupported;
+static int hf_infiniband_PortInfo_LinkWidthActive;
+static int hf_infiniband_PortInfo_LinkSpeedSupported;
+static int hf_infiniband_PortInfo_PortState;
+static int hf_infiniband_PortInfo_PortPhysicalState;
+static int hf_infiniband_PortInfo_LinkDownDefaultState;
+static int hf_infiniband_PortInfo_M_KeyProtectBits;
+static int hf_infiniband_PortInfo_LMC;
+static int hf_infiniband_PortInfo_LinkSpeedActive;
+static int hf_infiniband_PortInfo_LinkSpeedEnabled;
+static int hf_infiniband_PortInfo_NeighborMTU;
+static int hf_infiniband_PortInfo_MasterSMSL;
+static int hf_infiniband_PortInfo_VLCap;
+static int hf_infiniband_PortInfo_M_Key;
+static int hf_infiniband_PortInfo_InitType;
+static int hf_infiniband_PortInfo_VLHighLimit;
+static int hf_infiniband_PortInfo_VLArbitrationHighCap;
+static int hf_infiniband_PortInfo_VLArbitrationLowCap;
+static int hf_infiniband_PortInfo_InitTypeReply;
+static int hf_infiniband_PortInfo_MTUCap;
+static int hf_infiniband_PortInfo_VLStallCount;
+static int hf_infiniband_PortInfo_HOQLife;
+static int hf_infiniband_PortInfo_OperationalVLs;
+static int hf_infiniband_PortInfo_PartitionEnforcementInbound;
+static int hf_infiniband_PortInfo_PartitionEnforcementOutbound;
+static int hf_infiniband_PortInfo_FilterRawInbound;
+static int hf_infiniband_PortInfo_FilterRawOutbound;
+static int hf_infiniband_PortInfo_M_KeyViolations;
+static int hf_infiniband_PortInfo_P_KeyViolations;
+static int hf_infiniband_PortInfo_Q_KeyViolations;
+static int hf_infiniband_PortInfo_GUIDCap;
+static int hf_infiniband_PortInfo_ClientReregister;
+static int hf_infiniband_PortInfo_SubnetTimeOut;
+static int hf_infiniband_PortInfo_RespTimeValue;
+static int hf_infiniband_PortInfo_LocalPhyErrors;
+static int hf_infiniband_PortInfo_OverrunErrors;
+static int hf_infiniband_PortInfo_MaxCreditHint;
+static int hf_infiniband_PortInfo_LinkRoundTripLatency;
/* P_KeyTable */
-static int hf_infiniband_P_KeyTable_P_KeyTableBlock = -1;
-static int hf_infiniband_P_KeyTable_MembershipType = -1;
-static int hf_infiniband_P_KeyTable_P_KeyBase = -1;
+static int hf_infiniband_P_KeyTable_P_KeyTableBlock;
+static int hf_infiniband_P_KeyTable_MembershipType;
+static int hf_infiniband_P_KeyTable_P_KeyBase;
/* SLtoVLMappingTable */
-static int hf_infiniband_SLtoVLMappingTable_SLtoVL_HighBits = -1;
-static int hf_infiniband_SLtoVLMappingTable_SLtoVL_LowBits = -1;
+static int hf_infiniband_SLtoVLMappingTable_SLtoVL_HighBits;
+static int hf_infiniband_SLtoVLMappingTable_SLtoVL_LowBits;
/* VLArbitrationTable */
-/* static int hf_infiniband_VLArbitrationTable_VLWeightPairs = -1; */
-static int hf_infiniband_VLArbitrationTable_VL = -1;
-static int hf_infiniband_VLArbitrationTable_Weight = -1;
+/* static int hf_infiniband_VLArbitrationTable_VLWeightPairs; */
+static int hf_infiniband_VLArbitrationTable_VL;
+static int hf_infiniband_VLArbitrationTable_Weight;
/* LinearForwardingTable */
-/* static int hf_infiniband_LinearForwardingTable_LinearForwardingTableBlock = -1; */
-static int hf_infiniband_LinearForwardingTable_Port = -1;
+/* static int hf_infiniband_LinearForwardingTable_LinearForwardingTableBlock; */
+static int hf_infiniband_LinearForwardingTable_Port;
/* RandomForwardingTable */
-/* static int hf_infiniband_RandomForwardingTable_RandomForwardingTableBlock = -1; */
-static int hf_infiniband_RandomForwardingTable_LID = -1;
-static int hf_infiniband_RandomForwardingTable_Valid = -1;
-static int hf_infiniband_RandomForwardingTable_LMC = -1;
-static int hf_infiniband_RandomForwardingTable_Port = -1;
+/* static int hf_infiniband_RandomForwardingTable_RandomForwardingTableBlock; */
+static int hf_infiniband_RandomForwardingTable_LID;
+static int hf_infiniband_RandomForwardingTable_Valid;
+static int hf_infiniband_RandomForwardingTable_LMC;
+static int hf_infiniband_RandomForwardingTable_Port;
/* MulticastForwardingTable */
-/* static int hf_infiniband_MulticastForwardingTable_MulticastForwardingTableBlock = -1; */
-static int hf_infiniband_MulticastForwardingTable_PortMask = -1;
+/* static int hf_infiniband_MulticastForwardingTable_MulticastForwardingTableBlock; */
+static int hf_infiniband_MulticastForwardingTable_PortMask;
/* SMInfo */
-static int hf_infiniband_SMInfo_GUID = -1;
-static int hf_infiniband_SMInfo_SM_Key = -1;
-static int hf_infiniband_SMInfo_ActCount = -1;
-static int hf_infiniband_SMInfo_Priority = -1;
-static int hf_infiniband_SMInfo_SMState = -1;
+static int hf_infiniband_SMInfo_GUID;
+static int hf_infiniband_SMInfo_SM_Key;
+static int hf_infiniband_SMInfo_ActCount;
+static int hf_infiniband_SMInfo_Priority;
+static int hf_infiniband_SMInfo_SMState;
/* VendorDiag */
-static int hf_infiniband_VendorDiag_NextIndex = -1;
-static int hf_infiniband_VendorDiag_DiagData = -1;
+static int hf_infiniband_VendorDiag_NextIndex;
+static int hf_infiniband_VendorDiag_DiagData;
/* LedInfo */
-static int hf_infiniband_LedInfo_LedMask = -1;
+static int hf_infiniband_LedInfo_LedMask;
/* LinkSpeedWidthPairsTable */
-static int hf_infiniband_LinkSpeedWidthPairsTable_NumTables = -1;
-static int hf_infiniband_LinkSpeedWidthPairsTable_PortMask = -1;
-static int hf_infiniband_LinkSpeedWidthPairsTable_SpeedTwoFive = -1;
-static int hf_infiniband_LinkSpeedWidthPairsTable_SpeedFive = -1;
-static int hf_infiniband_LinkSpeedWidthPairsTable_SpeedTen = -1;
+static int hf_infiniband_LinkSpeedWidthPairsTable_NumTables;
+static int hf_infiniband_LinkSpeedWidthPairsTable_PortMask;
+static int hf_infiniband_LinkSpeedWidthPairsTable_SpeedTwoFive;
+static int hf_infiniband_LinkSpeedWidthPairsTable_SpeedFive;
+static int hf_infiniband_LinkSpeedWidthPairsTable_SpeedTen;
/* Attributes for Subnet Administration.
* Mostly we have "Records" here which are just structures of SM attributes.
@@ -920,263 +927,263 @@ static int hf_infiniband_LinkSpeedWidthPairsTable_SpeedTen = -1;
/* MulticastForwardingTableRecord */
/* VLArbitrationTableRecord */
-static int hf_infiniband_SA_LID = -1;
-static int hf_infiniband_SA_EndportLID = -1;
-static int hf_infiniband_SA_PortNum = -1;
-static int hf_infiniband_SA_InputPortNum = -1;
-static int hf_infiniband_SA_OutputPortNum = -1;
-static int hf_infiniband_SA_BlockNum_EightBit = -1;
-static int hf_infiniband_SA_BlockNum_NineBit = -1;
-static int hf_infiniband_SA_BlockNum_SixteenBit = -1;
-static int hf_infiniband_SA_Position = -1;
-/* static int hf_infiniband_SA_Index = -1; */
+static int hf_infiniband_SA_LID;
+static int hf_infiniband_SA_EndportLID;
+static int hf_infiniband_SA_PortNum;
+static int hf_infiniband_SA_InputPortNum;
+static int hf_infiniband_SA_OutputPortNum;
+static int hf_infiniband_SA_BlockNum_EightBit;
+static int hf_infiniband_SA_BlockNum_NineBit;
+static int hf_infiniband_SA_BlockNum_SixteenBit;
+static int hf_infiniband_SA_Position;
+/* static int hf_infiniband_SA_Index; */
/* InformInfoRecord */
-static int hf_infiniband_InformInfoRecord_SubscriberGID = -1;
-static int hf_infiniband_InformInfoRecord_Enum = -1;
+static int hf_infiniband_InformInfoRecord_SubscriberGID;
+static int hf_infiniband_InformInfoRecord_Enum;
/* InformInfo */
-static int hf_infiniband_InformInfo_GID = -1;
-static int hf_infiniband_InformInfo_LIDRangeBegin = -1;
-static int hf_infiniband_InformInfo_LIDRangeEnd = -1;
-static int hf_infiniband_InformInfo_IsGeneric = -1;
-static int hf_infiniband_InformInfo_Subscribe = -1;
-static int hf_infiniband_InformInfo_Type = -1;
-static int hf_infiniband_InformInfo_TrapNumberDeviceID = -1;
-static int hf_infiniband_InformInfo_QPN = -1;
-static int hf_infiniband_InformInfo_RespTimeValue = -1;
-static int hf_infiniband_InformInfo_ProducerTypeVendorID = -1;
+static int hf_infiniband_InformInfo_GID;
+static int hf_infiniband_InformInfo_LIDRangeBegin;
+static int hf_infiniband_InformInfo_LIDRangeEnd;
+static int hf_infiniband_InformInfo_IsGeneric;
+static int hf_infiniband_InformInfo_Subscribe;
+static int hf_infiniband_InformInfo_Type;
+static int hf_infiniband_InformInfo_TrapNumberDeviceID;
+static int hf_infiniband_InformInfo_QPN;
+static int hf_infiniband_InformInfo_RespTimeValue;
+static int hf_infiniband_InformInfo_ProducerTypeVendorID;
/* LinkRecord */
-static int hf_infiniband_LinkRecord_FromLID = -1;
-static int hf_infiniband_LinkRecord_FromPort = -1;
-static int hf_infiniband_LinkRecord_ToPort = -1;
-static int hf_infiniband_LinkRecord_ToLID = -1;
+static int hf_infiniband_LinkRecord_FromLID;
+static int hf_infiniband_LinkRecord_FromPort;
+static int hf_infiniband_LinkRecord_ToPort;
+static int hf_infiniband_LinkRecord_ToLID;
/* ServiceRecord */
-static int hf_infiniband_ServiceRecord_ServiceID = -1;
-static int hf_infiniband_ServiceRecord_ServiceGID = -1;
-static int hf_infiniband_ServiceRecord_ServiceP_Key = -1;
-static int hf_infiniband_ServiceRecord_ServiceLease = -1;
-static int hf_infiniband_ServiceRecord_ServiceKey = -1;
-static int hf_infiniband_ServiceRecord_ServiceName = -1;
-static int hf_infiniband_ServiceRecord_ServiceData = -1;
+static int hf_infiniband_ServiceRecord_ServiceID;
+static int hf_infiniband_ServiceRecord_ServiceGID;
+static int hf_infiniband_ServiceRecord_ServiceP_Key;
+static int hf_infiniband_ServiceRecord_ServiceLease;
+static int hf_infiniband_ServiceRecord_ServiceKey;
+static int hf_infiniband_ServiceRecord_ServiceName;
+static int hf_infiniband_ServiceRecord_ServiceData;
/* ServiceAssociationRecord */
-static int hf_infiniband_ServiceAssociationRecord_ServiceKey = -1;
-static int hf_infiniband_ServiceAssociationRecord_ServiceName = -1;
+static int hf_infiniband_ServiceAssociationRecord_ServiceKey;
+static int hf_infiniband_ServiceAssociationRecord_ServiceName;
/* PathRecord */
-static int hf_infiniband_PathRecord_DGID = -1;
-static int hf_infiniband_PathRecord_SGID = -1;
-static int hf_infiniband_PathRecord_DLID = -1;
-static int hf_infiniband_PathRecord_SLID = -1;
-static int hf_infiniband_PathRecord_RawTraffic = -1;
-static int hf_infiniband_PathRecord_FlowLabel = -1;
-static int hf_infiniband_PathRecord_HopLimit = -1;
-static int hf_infiniband_PathRecord_TClass = -1;
-static int hf_infiniband_PathRecord_Reversible = -1;
-static int hf_infiniband_PathRecord_NumbPath = -1;
-static int hf_infiniband_PathRecord_P_Key = -1;
-static int hf_infiniband_PathRecord_SL = -1;
-static int hf_infiniband_PathRecord_MTUSelector = -1;
-static int hf_infiniband_PathRecord_MTU = -1;
-static int hf_infiniband_PathRecord_RateSelector = -1;
-static int hf_infiniband_PathRecord_Rate = -1;
-static int hf_infiniband_PathRecord_PacketLifeTimeSelector = -1;
-static int hf_infiniband_PathRecord_PacketLifeTime = -1;
-static int hf_infiniband_PathRecord_Preference = -1;
+static int hf_infiniband_PathRecord_DGID;
+static int hf_infiniband_PathRecord_SGID;
+static int hf_infiniband_PathRecord_DLID;
+static int hf_infiniband_PathRecord_SLID;
+static int hf_infiniband_PathRecord_RawTraffic;
+static int hf_infiniband_PathRecord_FlowLabel;
+static int hf_infiniband_PathRecord_HopLimit;
+static int hf_infiniband_PathRecord_TClass;
+static int hf_infiniband_PathRecord_Reversible;
+static int hf_infiniband_PathRecord_NumbPath;
+static int hf_infiniband_PathRecord_P_Key;
+static int hf_infiniband_PathRecord_SL;
+static int hf_infiniband_PathRecord_MTUSelector;
+static int hf_infiniband_PathRecord_MTU;
+static int hf_infiniband_PathRecord_RateSelector;
+static int hf_infiniband_PathRecord_Rate;
+static int hf_infiniband_PathRecord_PacketLifeTimeSelector;
+static int hf_infiniband_PathRecord_PacketLifeTime;
+static int hf_infiniband_PathRecord_Preference;
/* MCMemberRecord */
-static int hf_infiniband_MCMemberRecord_MGID = -1;
-static int hf_infiniband_MCMemberRecord_PortGID = -1;
-static int hf_infiniband_MCMemberRecord_Q_Key = -1;
-static int hf_infiniband_MCMemberRecord_MLID = -1;
-static int hf_infiniband_MCMemberRecord_MTUSelector = -1;
-static int hf_infiniband_MCMemberRecord_MTU = -1;
-static int hf_infiniband_MCMemberRecord_TClass = -1;
-static int hf_infiniband_MCMemberRecord_P_Key = -1;
-static int hf_infiniband_MCMemberRecord_RateSelector = -1;
-static int hf_infiniband_MCMemberRecord_Rate = -1;
-static int hf_infiniband_MCMemberRecord_PacketLifeTimeSelector = -1;
-static int hf_infiniband_MCMemberRecord_PacketLifeTime = -1;
-static int hf_infiniband_MCMemberRecord_SL = -1;
-static int hf_infiniband_MCMemberRecord_FlowLabel = -1;
-static int hf_infiniband_MCMemberRecord_HopLimit = -1;
-static int hf_infiniband_MCMemberRecord_Scope = -1;
-static int hf_infiniband_MCMemberRecord_JoinState = -1;
-static int hf_infiniband_MCMemberRecord_ProxyJoin = -1;
+static int hf_infiniband_MCMemberRecord_MGID;
+static int hf_infiniband_MCMemberRecord_PortGID;
+static int hf_infiniband_MCMemberRecord_Q_Key;
+static int hf_infiniband_MCMemberRecord_MLID;
+static int hf_infiniband_MCMemberRecord_MTUSelector;
+static int hf_infiniband_MCMemberRecord_MTU;
+static int hf_infiniband_MCMemberRecord_TClass;
+static int hf_infiniband_MCMemberRecord_P_Key;
+static int hf_infiniband_MCMemberRecord_RateSelector;
+static int hf_infiniband_MCMemberRecord_Rate;
+static int hf_infiniband_MCMemberRecord_PacketLifeTimeSelector;
+static int hf_infiniband_MCMemberRecord_PacketLifeTime;
+static int hf_infiniband_MCMemberRecord_SL;
+static int hf_infiniband_MCMemberRecord_FlowLabel;
+static int hf_infiniband_MCMemberRecord_HopLimit;
+static int hf_infiniband_MCMemberRecord_Scope;
+static int hf_infiniband_MCMemberRecord_JoinState;
+static int hf_infiniband_MCMemberRecord_ProxyJoin;
/* TraceRecord */
-static int hf_infiniband_TraceRecord_GIDPrefix = -1;
-static int hf_infiniband_TraceRecord_IDGeneration = -1;
-static int hf_infiniband_TraceRecord_NodeType = -1;
-static int hf_infiniband_TraceRecord_NodeID = -1;
-static int hf_infiniband_TraceRecord_ChassisID = -1;
-static int hf_infiniband_TraceRecord_EntryPortID = -1;
-static int hf_infiniband_TraceRecord_ExitPortID = -1;
-static int hf_infiniband_TraceRecord_EntryPort = -1;
-static int hf_infiniband_TraceRecord_ExitPort = -1;
+static int hf_infiniband_TraceRecord_GIDPrefix;
+static int hf_infiniband_TraceRecord_IDGeneration;
+static int hf_infiniband_TraceRecord_NodeType;
+static int hf_infiniband_TraceRecord_NodeID;
+static int hf_infiniband_TraceRecord_ChassisID;
+static int hf_infiniband_TraceRecord_EntryPortID;
+static int hf_infiniband_TraceRecord_ExitPortID;
+static int hf_infiniband_TraceRecord_EntryPort;
+static int hf_infiniband_TraceRecord_ExitPort;
/* MultiPathRecord */
-static int hf_infiniband_MultiPathRecord_RawTraffic = -1;
-static int hf_infiniband_MultiPathRecord_FlowLabel = -1;
-static int hf_infiniband_MultiPathRecord_HopLimit = -1;
-static int hf_infiniband_MultiPathRecord_TClass = -1;
-static int hf_infiniband_MultiPathRecord_Reversible = -1;
-static int hf_infiniband_MultiPathRecord_NumbPath = -1;
-static int hf_infiniband_MultiPathRecord_P_Key = -1;
-static int hf_infiniband_MultiPathRecord_SL = -1;
-static int hf_infiniband_MultiPathRecord_MTUSelector = -1;
-static int hf_infiniband_MultiPathRecord_MTU = -1;
-static int hf_infiniband_MultiPathRecord_RateSelector = -1;
-static int hf_infiniband_MultiPathRecord_Rate = -1;
-static int hf_infiniband_MultiPathRecord_PacketLifeTimeSelector = -1;
-static int hf_infiniband_MultiPathRecord_PacketLifeTime = -1;
-static int hf_infiniband_MultiPathRecord_IndependenceSelector = -1;
-static int hf_infiniband_MultiPathRecord_GIDScope = -1;
-static int hf_infiniband_MultiPathRecord_SGIDCount = -1;
-static int hf_infiniband_MultiPathRecord_DGIDCount = -1;
-static int hf_infiniband_MultiPathRecord_SDGID = -1;
+static int hf_infiniband_MultiPathRecord_RawTraffic;
+static int hf_infiniband_MultiPathRecord_FlowLabel;
+static int hf_infiniband_MultiPathRecord_HopLimit;
+static int hf_infiniband_MultiPathRecord_TClass;
+static int hf_infiniband_MultiPathRecord_Reversible;
+static int hf_infiniband_MultiPathRecord_NumbPath;
+static int hf_infiniband_MultiPathRecord_P_Key;
+static int hf_infiniband_MultiPathRecord_SL;
+static int hf_infiniband_MultiPathRecord_MTUSelector;
+static int hf_infiniband_MultiPathRecord_MTU;
+static int hf_infiniband_MultiPathRecord_RateSelector;
+static int hf_infiniband_MultiPathRecord_Rate;
+static int hf_infiniband_MultiPathRecord_PacketLifeTimeSelector;
+static int hf_infiniband_MultiPathRecord_PacketLifeTime;
+static int hf_infiniband_MultiPathRecord_IndependenceSelector;
+static int hf_infiniband_MultiPathRecord_GIDScope;
+static int hf_infiniband_MultiPathRecord_SGIDCount;
+static int hf_infiniband_MultiPathRecord_DGIDCount;
+static int hf_infiniband_MultiPathRecord_SDGID;
/* ClassPortInfo */
-static int hf_infiniband_ClassPortInfo_BaseVersion = -1;
-static int hf_infiniband_ClassPortInfo_ClassVersion = -1;
-static int hf_infiniband_ClassPortInfo_CapabilityMask = -1;
-static int hf_infiniband_ClassPortInfo_CapabilityMask2 = -1;
-static int hf_infiniband_ClassPortInfo_RespTimeValue = -1;
-static int hf_infiniband_ClassPortInfo_RedirectGID = -1;
-static int hf_infiniband_ClassPortInfo_RedirectTC = -1;
-static int hf_infiniband_ClassPortInfo_RedirectSL = -1;
-static int hf_infiniband_ClassPortInfo_RedirectFL = -1;
-static int hf_infiniband_ClassPortInfo_RedirectLID = -1;
-static int hf_infiniband_ClassPortInfo_RedirectP_Key = -1;
-static int hf_infiniband_ClassPortInfo_Reserved = -1;
-static int hf_infiniband_ClassPortInfo_RedirectQP = -1;
-static int hf_infiniband_ClassPortInfo_RedirectQ_Key = -1;
-static int hf_infiniband_ClassPortInfo_TrapGID = -1;
-static int hf_infiniband_ClassPortInfo_TrapTC = -1;
-static int hf_infiniband_ClassPortInfo_TrapSL = -1;
-static int hf_infiniband_ClassPortInfo_TrapFL = -1;
-static int hf_infiniband_ClassPortInfo_TrapLID = -1;
-static int hf_infiniband_ClassPortInfo_TrapP_Key = -1;
-static int hf_infiniband_ClassPortInfo_TrapQP = -1;
-static int hf_infiniband_ClassPortInfo_TrapQ_Key = -1;
+static int hf_infiniband_ClassPortInfo_BaseVersion;
+static int hf_infiniband_ClassPortInfo_ClassVersion;
+static int hf_infiniband_ClassPortInfo_CapabilityMask;
+static int hf_infiniband_ClassPortInfo_CapabilityMask2;
+static int hf_infiniband_ClassPortInfo_RespTimeValue;
+static int hf_infiniband_ClassPortInfo_RedirectGID;
+static int hf_infiniband_ClassPortInfo_RedirectTC;
+static int hf_infiniband_ClassPortInfo_RedirectSL;
+static int hf_infiniband_ClassPortInfo_RedirectFL;
+static int hf_infiniband_ClassPortInfo_RedirectLID;
+static int hf_infiniband_ClassPortInfo_RedirectP_Key;
+static int hf_infiniband_ClassPortInfo_Reserved;
+static int hf_infiniband_ClassPortInfo_RedirectQP;
+static int hf_infiniband_ClassPortInfo_RedirectQ_Key;
+static int hf_infiniband_ClassPortInfo_TrapGID;
+static int hf_infiniband_ClassPortInfo_TrapTC;
+static int hf_infiniband_ClassPortInfo_TrapSL;
+static int hf_infiniband_ClassPortInfo_TrapFL;
+static int hf_infiniband_ClassPortInfo_TrapLID;
+static int hf_infiniband_ClassPortInfo_TrapP_Key;
+static int hf_infiniband_ClassPortInfo_TrapQP;
+static int hf_infiniband_ClassPortInfo_TrapQ_Key;
/* Notice */
-static int hf_infiniband_Notice_IsGeneric = -1;
-static int hf_infiniband_Notice_Type = -1;
-static int hf_infiniband_Notice_ProducerTypeVendorID = -1;
-static int hf_infiniband_Notice_TrapNumberDeviceID = -1;
-static int hf_infiniband_Notice_IssuerLID = -1;
-static int hf_infiniband_Notice_NoticeToggle = -1;
-static int hf_infiniband_Notice_NoticeCount = -1;
-static int hf_infiniband_Notice_DataDetails = -1;
-/* static int hf_infiniband_Notice_IssuerGID = -1; */
-/* static int hf_infiniband_Notice_ClassTrapSpecificData = -1; */
+static int hf_infiniband_Notice_IsGeneric;
+static int hf_infiniband_Notice_Type;
+static int hf_infiniband_Notice_ProducerTypeVendorID;
+static int hf_infiniband_Notice_TrapNumberDeviceID;
+static int hf_infiniband_Notice_IssuerLID;
+static int hf_infiniband_Notice_NoticeToggle;
+static int hf_infiniband_Notice_NoticeCount;
+static int hf_infiniband_Notice_DataDetails;
+/* static int hf_infiniband_Notice_IssuerGID; */
+/* static int hf_infiniband_Notice_ClassTrapSpecificData; */
/* ClassPortInfo attribute in Performance class */
-static int hf_infiniband_PerfMgt_ClassPortInfo = -1;
+static int hf_infiniband_PerfMgt_ClassPortInfo;
/* PortCounters attribute in Performance class */
-static int hf_infiniband_PortCounters = -1;
-static int hf_infiniband_PortCounters_PortSelect = -1;
-static int hf_infiniband_PortCounters_CounterSelect = -1;
-static int hf_infiniband_PortCounters_SymbolErrorCounter = -1;
-static int hf_infiniband_PortCounters_LinkErrorRecoveryCounter = -1;
-static int hf_infiniband_PortCounters_LinkDownedCounter = -1;
-static int hf_infiniband_PortCounters_PortRcvErrors = -1;
-static int hf_infiniband_PortCounters_PortRcvRemotePhysicalErrors = -1;
-static int hf_infiniband_PortCounters_PortRcvSwitchRelayErrors = -1;
-static int hf_infiniband_PortCounters_PortXmitDiscards = -1;
-static int hf_infiniband_PortCounters_PortXmitConstraintErrors = -1;
-static int hf_infiniband_PortCounters_PortRcvConstraintErrors = -1;
-static int hf_infiniband_PortCounters_LocalLinkIntegrityErrors = -1;
-static int hf_infiniband_PortCounters_ExcessiveBufferOverrunErrors = -1;
-static int hf_infiniband_PortCounters_VL15Dropped = -1;
-static int hf_infiniband_PortCounters_PortXmitData = -1;
-static int hf_infiniband_PortCounters_PortRcvData = -1;
-static int hf_infiniband_PortCounters_PortXmitPkts = -1;
-static int hf_infiniband_PortCounters_PortRcvPkts = -1;
+static int hf_infiniband_PortCounters;
+static int hf_infiniband_PortCounters_PortSelect;
+static int hf_infiniband_PortCounters_CounterSelect;
+static int hf_infiniband_PortCounters_SymbolErrorCounter;
+static int hf_infiniband_PortCounters_LinkErrorRecoveryCounter;
+static int hf_infiniband_PortCounters_LinkDownedCounter;
+static int hf_infiniband_PortCounters_PortRcvErrors;
+static int hf_infiniband_PortCounters_PortRcvRemotePhysicalErrors;
+static int hf_infiniband_PortCounters_PortRcvSwitchRelayErrors;
+static int hf_infiniband_PortCounters_PortXmitDiscards;
+static int hf_infiniband_PortCounters_PortXmitConstraintErrors;
+static int hf_infiniband_PortCounters_PortRcvConstraintErrors;
+static int hf_infiniband_PortCounters_LocalLinkIntegrityErrors;
+static int hf_infiniband_PortCounters_ExcessiveBufferOverrunErrors;
+static int hf_infiniband_PortCounters_VL15Dropped;
+static int hf_infiniband_PortCounters_PortXmitData;
+static int hf_infiniband_PortCounters_PortRcvData;
+static int hf_infiniband_PortCounters_PortXmitPkts;
+static int hf_infiniband_PortCounters_PortRcvPkts;
/* Extended PortCounters attribute in Performance class */
-static int hf_infiniband_PortCountersExt = -1;
-static int hf_infiniband_PortCountersExt_PortSelect = -1;
-static int hf_infiniband_PortCountersExt_CounterSelect = -1;
-static int hf_infiniband_PortCountersExt_PortXmitData = -1;
-static int hf_infiniband_PortCountersExt_PortRcvData = -1;
-static int hf_infiniband_PortCountersExt_PortXmitPkts = -1;
-static int hf_infiniband_PortCountersExt_PortRcvPkts = -1;
-static int hf_infiniband_PortCountersExt_PortUnicastXmitPkts = -1;
-static int hf_infiniband_PortCountersExt_PortUnicastRcvPkts = -1;
-static int hf_infiniband_PortCountersExt_PortMulticastXmitPkts = -1;
-static int hf_infiniband_PortCountersExt_PortMulticastRcvPkts = -1;
+static int hf_infiniband_PortCountersExt;
+static int hf_infiniband_PortCountersExt_PortSelect;
+static int hf_infiniband_PortCountersExt_CounterSelect;
+static int hf_infiniband_PortCountersExt_PortXmitData;
+static int hf_infiniband_PortCountersExt_PortRcvData;
+static int hf_infiniband_PortCountersExt_PortXmitPkts;
+static int hf_infiniband_PortCountersExt_PortRcvPkts;
+static int hf_infiniband_PortCountersExt_PortUnicastXmitPkts;
+static int hf_infiniband_PortCountersExt_PortUnicastRcvPkts;
+static int hf_infiniband_PortCountersExt_PortMulticastXmitPkts;
+static int hf_infiniband_PortCountersExt_PortMulticastRcvPkts;
/* Notice DataDetails and ClassTrapSpecific Data for certain traps
* Note that traps reuse many fields, so they are only declared once under the first trap that they appear.
* There is no need to redeclare them for specific Traps (as with other SA Attributes) because they are uniform between Traps. */
/* Parse DataDetails for a given Trap */
-static gint parse_NoticeDataDetails(proto_tree*, tvbuff_t*, gint *offset, guint16 trapNumber);
+static int parse_NoticeDataDetails(proto_tree*, tvbuff_t*, int *offset, uint16_t trapNumber);
/* Traps 64,65,66,67 */
-static int hf_infiniband_Trap_GIDADDR = -1;
+static int hf_infiniband_Trap_GIDADDR;
/* Traps 68,69 */
/* DataDetails */
-static int hf_infiniband_Trap_COMP_MASK = -1;
-static int hf_infiniband_Trap_WAIT_FOR_REPATH = -1;
+static int hf_infiniband_Trap_COMP_MASK;
+static int hf_infiniband_Trap_WAIT_FOR_REPATH;
/* ClassTrapSpecificData */
-/* static int hf_infiniband_Trap_PATH_REC = -1; */
+/* static int hf_infiniband_Trap_PATH_REC; */
/* Trap 128 */
-static int hf_infiniband_Trap_LIDADDR = -1;
+static int hf_infiniband_Trap_LIDADDR;
/* Trap 129, 130, 131 */
-static int hf_infiniband_Trap_PORTNO = -1;
+static int hf_infiniband_Trap_PORTNO;
/* Trap 144 */
-static int hf_infiniband_Trap_OtherLocalChanges = -1;
-static int hf_infiniband_Trap_CAPABILITYMASK = -1;
-static int hf_infiniband_Trap_LinkSpeecEnabledChange = -1;
-static int hf_infiniband_Trap_LinkWidthEnabledChange = -1;
-static int hf_infiniband_Trap_NodeDescriptionChange = -1;
+static int hf_infiniband_Trap_OtherLocalChanges;
+static int hf_infiniband_Trap_CAPABILITYMASK;
+static int hf_infiniband_Trap_LinkSpeecEnabledChange;
+static int hf_infiniband_Trap_LinkWidthEnabledChange;
+static int hf_infiniband_Trap_NodeDescriptionChange;
/* Trap 145 */
-static int hf_infiniband_Trap_SYSTEMIMAGEGUID = -1;
+static int hf_infiniband_Trap_SYSTEMIMAGEGUID;
/* Trap 256 */
-static int hf_infiniband_Trap_DRSLID = -1;
-static int hf_infiniband_Trap_METHOD = -1;
-static int hf_infiniband_Trap_ATTRIBUTEID = -1;
-static int hf_infiniband_Trap_ATTRIBUTEMODIFIER = -1;
-static int hf_infiniband_Trap_MKEY = -1;
-static int hf_infiniband_Trap_DRNotice = -1;
-static int hf_infiniband_Trap_DRPathTruncated = -1;
-static int hf_infiniband_Trap_DRHopCount = -1;
-static int hf_infiniband_Trap_DRNoticeReturnPath = -1;
+static int hf_infiniband_Trap_DRSLID;
+static int hf_infiniband_Trap_METHOD;
+static int hf_infiniband_Trap_ATTRIBUTEID;
+static int hf_infiniband_Trap_ATTRIBUTEMODIFIER;
+static int hf_infiniband_Trap_MKEY;
+static int hf_infiniband_Trap_DRNotice;
+static int hf_infiniband_Trap_DRPathTruncated;
+static int hf_infiniband_Trap_DRHopCount;
+static int hf_infiniband_Trap_DRNoticeReturnPath;
/* Trap 257, 258 */
-static int hf_infiniband_Trap_LIDADDR1 = -1;
-static int hf_infiniband_Trap_LIDADDR2 = -1;
-static int hf_infiniband_Trap_KEY = -1;
-static int hf_infiniband_Trap_SL = -1;
-static int hf_infiniband_Trap_QP1 = -1;
-static int hf_infiniband_Trap_QP2 = -1;
-static int hf_infiniband_Trap_GIDADDR1 = -1;
-static int hf_infiniband_Trap_GIDADDR2 = -1;
+static int hf_infiniband_Trap_LIDADDR1;
+static int hf_infiniband_Trap_LIDADDR2;
+static int hf_infiniband_Trap_KEY;
+static int hf_infiniband_Trap_SL;
+static int hf_infiniband_Trap_QP1;
+static int hf_infiniband_Trap_QP2;
+static int hf_infiniband_Trap_GIDADDR1;
+static int hf_infiniband_Trap_GIDADDR2;
/* Trap 259 */
-static int hf_infiniband_Trap_DataValid = -1;
-static int hf_infiniband_Trap_PKEY = -1;
-static int hf_infiniband_Trap_SWLIDADDR = -1;
+static int hf_infiniband_Trap_DataValid;
+static int hf_infiniband_Trap_PKEY;
+static int hf_infiniband_Trap_SWLIDADDR;
/* Infiniband Link */
-static int hf_infiniband_link_op = -1;
-static int hf_infiniband_link_fctbs = -1;
-static int hf_infiniband_link_vl = -1;
-static int hf_infiniband_link_fccl = -1;
-static int hf_infiniband_link_lpcrc = -1;
+static int hf_infiniband_link_op;
+static int hf_infiniband_link_fctbs;
+static int hf_infiniband_link_vl;
+static int hf_infiniband_link_fccl;
+static int hf_infiniband_link_lpcrc;
/* Trap Type/Descriptions for dissection */
static const value_string Operand_Description[]= {
@@ -1232,6 +1239,8 @@ static const value_string bth_opcode_tbl[] = {
{ 0x15, "Reliable Connection (RC) - Reserved" },
{ 0x16, "Reliable Connection (RC) - SEND Last with Invalidate" },
{ 0x17, "Reliable Connection (RC) - SEND Only with Invalidate" },
+ { 0x1C, "Reliable Connection (RC) - FLUSH" },
+ { 0x1D, "Reliable Connection (RC) - ATOMIC WRITE" },
{ 0x20, "Unreliable Connection (UC) - SEND First" },
{ 0x21, "Unreliable Connection (UC) - SEND Middle" },
{ 0x22, "Unreliable Connection (UC) - SEND Last" },
@@ -1266,6 +1275,8 @@ static const value_string bth_opcode_tbl[] = {
{ 0x53, "Reliable Datagram (RD) - CmpSwap" },
{ 0x54, "Reliable Datagram (RD) - FetchAdd" },
{ 0x55, "Reliable Datagram (RD) - RESYNC" },
+ { 0x5C, "Reliable Datagram (RD) - FLUSH" },
+ { 0x5D, "Reliable Datagram (RD) - ATOMIC WRITE" },
{ 0x64, "Unreliable Datagram (UD) - SEND only" },
{ 0x65, "Unreliable Datagram (UD) - SEND only with Immediate" },
{ 0x80, "CNP" },
@@ -1292,6 +1303,8 @@ static const value_string bth_opcode_tbl[] = {
{ 0xB4, "Extended Reliable Connection (XRC) - FetchAdd" },
{ 0xB6, "Extended Reliable Connection (XRC) - SEND Last with Invalidate" },
{ 0xB7, "Extended Reliable Connection (XRC) - SEND Only with Invalidate" },
+ { 0xBC, "Extended Reliable Connection (XRC) - FLUSH" },
+ { 0xBD, "Extended Reliable Connection (XRC) - ATOMIC WRITE" },
{ 0, NULL}
};
@@ -1408,6 +1421,8 @@ static const value_string OpCodeMap[] =
{ RC_FETCH_ADD, "RC Fetch Add "},
{ RC_SEND_LAST_INVAL, "RC Send Last Invalidate "},
{ RC_SEND_ONLY_INVAL, "RC Send Only Invalidate " },
+ { RC_FLUSH, "RC Flush " },
+ { RC_ATOMIC_WRITE, "RC Atomic Write " },
{ RD_SEND_FIRST, "RD Send First "},
{ RD_SEND_MIDDLE, "RD Send Middle " },
@@ -1431,6 +1446,8 @@ static const value_string OpCodeMap[] =
{ RD_CMP_SWAP, "RD Compare Swap "},
{ RD_FETCH_ADD, "RD Fetch Add "},
{ RD_RESYNC, "RD RESYNC "},
+ { RD_FLUSH, "RD Flush "},
+ { RD_ATOMIC_WRITE, "RD Atomic Write " },
{ UD_SEND_ONLY, "UD Send Only "},
{ UD_SEND_ONLY_IMM, "UD Send Only Immediate "},
@@ -1531,6 +1548,12 @@ static const value_string DctOpCodeMap[] =
/* ___________________________________ */
#define DCCETH 23
/* ___________________________________ */
+#define FETH_RETH 24
+/* ___________________________________ */
+#define RDETH_FETH_RETH 25
+/* ___________________________________ */
+#define RDETH_RETH_PAYLD 26
+/* ___________________________________ */
/* Infiniband transport services
@@ -1550,50 +1573,50 @@ static const value_string DctOpCodeMap[] =
/* Array of all availavle OpCodes to make matching a bit easier.
* The OpCodes dictate the header sequence following in the packet.
* These arrays tell the dissector which headers must be decoded for the given OpCode. */
-static guint32 opCode_RDETH_DETH_ATOMICETH[] = {
+static uint32_t opCode_RDETH_DETH_ATOMICETH[] = {
RD_CMP_SWAP,
RD_FETCH_ADD
};
-static guint32 opCode_IETH_PAYLD[] = {
+static uint32_t opCode_IETH_PAYLD[] = {
RC_SEND_LAST_INVAL,
RC_SEND_ONLY_INVAL
};
-static guint32 opCode_ATOMICETH[] = {
+static uint32_t opCode_ATOMICETH[] = {
RC_CMP_SWAP,
RC_FETCH_ADD
};
-static guint32 opCode_RDETH_DETH_RETH_PAYLD[] = {
+static uint32_t opCode_RDETH_DETH_RETH_PAYLD[] = {
RD_RDMA_WRITE_FIRST,
RD_RDMA_WRITE_ONLY
};
-static guint32 opCode_RETH_IMMDT_PAYLD[] = {
+static uint32_t opCode_RETH_IMMDT_PAYLD[] = {
RC_RDMA_WRITE_ONLY_IMM,
UC_RDMA_WRITE_ONLY_IMM
};
-static guint32 opCode_RDETH_DETH_IMMDT_PAYLD[] = {
+static uint32_t opCode_RDETH_DETH_IMMDT_PAYLD[] = {
RD_SEND_LAST_IMM,
RD_SEND_ONLY_IMM,
RD_RDMA_WRITE_LAST_IMM
};
-static guint32 opCode_RDETH_AETH_PAYLD[] = {
+static uint32_t opCode_RDETH_AETH_PAYLD[] = {
RD_RDMA_READ_RESPONSE_FIRST,
RD_RDMA_READ_RESPONSE_LAST,
RD_RDMA_READ_RESPONSE_ONLY
};
-static guint32 opCode_AETH_PAYLD[] = {
+static uint32_t opCode_AETH_PAYLD[] = {
RC_RDMA_READ_RESPONSE_FIRST,
RC_RDMA_READ_RESPONSE_LAST,
RC_RDMA_READ_RESPONSE_ONLY
};
-static guint32 opCode_RETH_PAYLD[] = {
+static uint32_t opCode_RETH_PAYLD[] = {
RC_RDMA_WRITE_FIRST,
RC_RDMA_WRITE_ONLY,
UC_RDMA_WRITE_FIRST,
UC_RDMA_WRITE_ONLY
};
-static guint32 opCode_RDETH_DETH_PAYLD[] = {
+static uint32_t opCode_RDETH_DETH_PAYLD[] = {
RD_SEND_FIRST,
RD_SEND_MIDDLE,
RD_SEND_LAST,
@@ -1602,7 +1625,7 @@ static guint32 opCode_RDETH_DETH_PAYLD[] = {
RD_RDMA_WRITE_LAST
};
-static guint32 opCode_IMMDT_PAYLD[] = {
+static uint32_t opCode_IMMDT_PAYLD[] = {
RC_SEND_LAST_IMM,
RC_SEND_ONLY_IMM,
RC_RDMA_WRITE_LAST_IMM,
@@ -1611,7 +1634,7 @@ static guint32 opCode_IMMDT_PAYLD[] = {
UC_RDMA_WRITE_LAST_IMM
};
-static guint32 opCode_PAYLD[] = {
+static uint32_t opCode_PAYLD[] = {
RC_SEND_FIRST,
RC_SEND_MIDDLE,
RC_SEND_LAST,
@@ -1630,59 +1653,59 @@ static guint32 opCode_PAYLD[] = {
/* It is not necessary to create arrays for these OpCodes since they indicate only one further header.
* We can just decode it directly
-* static guint32 opCode_DETH_IMMDT_PAYLD[] = {
+* static uint32_t opCode_DETH_IMMDT_PAYLD[] = {
* UD_SEND_ONLY_IMM
* };
-* static guint32 opCode_DETH_PAYLD[] = {
+* static uint32_t opCode_DETH_PAYLD[] = {
* UD_SEND_ONLY
* };
-* static guint32 opCode_RDETH_DETH[] = {
+* static uint32_t opCode_RDETH_DETH[] = {
* RD_RESYNC
* };
-* static guint32 opCode_RDETH_DETH_RETH[] = {
+* static uint32_t opCode_RDETH_DETH_RETH[] = {
* RD_RDMA_READ_REQUEST
* };
-* static guint32 opCode_RDETH_DETH_RETH_IMMDT_PAYLD[] = {
+* static uint32_t opCode_RDETH_DETH_RETH_IMMDT_PAYLD[] = {
* RD_RDMA_WRITE_ONLY_IMM
* };
-* static guint32 opCode_RDETH_AETH_ATOMICACKETH[] = {
+* static uint32_t opCode_RDETH_AETH_ATOMICACKETH[] = {
* RD_ATOMIC_ACKNOWLEDGE
* };
-* static guint32 opCode_RDETH_AETH[] = {
+* static uint32_t opCode_RDETH_AETH[] = {
* RD_ACKNOWLEDGE
* };
-* static guint32 opCode_RDETH_PAYLD[] = {
+* static uint32_t opCode_RDETH_PAYLD[] = {
* RD_RDMA_READ_RESPONSE_MIDDLE
* };
-* static guint32 opCode_AETH_ATOMICACKETH[] = {
+* static uint32_t opCode_AETH_ATOMICACKETH[] = {
* RC_ATOMIC_ACKNOWLEDGE
* };
-* static guint32 opCode_RETH[] = {
+* static uint32_t opCode_RETH[] = {
* RC_RDMA_READ_REQUEST
* };
-* static guint32 opCode_AETH[] = {
+* static uint32_t opCode_AETH[] = {
* RC_ACKNOWLEDGE
* }; */
/* settings to be set by the user via the preferences dialog */
-static guint pref_rroce_udp_port = DEFAULT_RROCE_UDP_PORT;
-static gboolean try_heuristic_first = TRUE;
+static unsigned pref_rroce_udp_port = DEFAULT_RROCE_UDP_PORT;
+static bool try_heuristic_first = true;
/* saves information about connections that have been/are in the process of being
negotiated via ConnectionManagement packets */
typedef struct {
- guint8 req_gid[GID_SIZE],
+ uint8_t req_gid[GID_SIZE],
resp_gid[GID_SIZE]; /* GID of requester/responder, respectively */
- guint16 req_lid,
+ uint16_t req_lid,
resp_lid; /* LID of requester/responder, respectively */
- guint32 req_qp,
+ uint32_t req_qp,
resp_qp; /* QP number of requester/responder, respectively */
- guint64 service_id; /* service id for this connection */
+ uint64_t service_id; /* service id for this connection */
} connection_context;
/* holds a table of connection contexts being negotiated by CM. the key is a obtained
using add_address_to_hash64(initiator address, TransactionID) */
-static GHashTable *CM_context_table = NULL;
+static GHashTable *CM_context_table;
/* heuristics sub-dissectors list for dissecting the data payload of IB packets */
static heur_dissector_list_t heur_dissectors_payload;
@@ -1690,12 +1713,12 @@ static heur_dissector_list_t heur_dissectors_payload;
static heur_dissector_list_t heur_dissectors_cm_private;
/* ----- This sections contains various utility functions indirectly related to Infiniband dissection ---- */
-static void infiniband_payload_prompt(packet_info *pinfo _U_, gchar* result)
+static void infiniband_payload_prompt(packet_info *pinfo _U_, char* result)
{
snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "Dissect Infiniband payload as");
}
-static void table_destroy_notify(gpointer data) {
+static void table_destroy_notify(void *data) {
g_free(data);
}
@@ -1750,8 +1773,8 @@ dissect_infiniband_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
proto_tree *all_headers_tree;
/* BTH - Base Trasport Header */
- gboolean dctBthHeader = FALSE;
- gint bthSize = 12;
+ bool dctBthHeader = false;
+ int bthSize = 12;
/* LRH - Local Route Header */
proto_item *local_route_header_item;
@@ -1759,19 +1782,19 @@ dissect_infiniband_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
/* Raw Data */
proto_item *RAWDATA_header_item;
- guint8 lnh_val; /* Link Next Header Value */
- gint offset = 0; /* Current Offset */
+ uint8_t lnh_val; /* Link Next Header Value */
+ int offset = 0; /* Current Offset */
/* General Variables */
- gboolean bthFollows = FALSE; /* Tracks if we are parsing a BTH. This is a significant decision point */
- struct infinibandinfo info = { NULL, 0, 0, 0, 0, 0, 0, 0, FALSE};
- gint32 nextHeaderSequence = -1; /* defined by this dissector. #define which indicates the upcoming header sequence from OpCode */
- guint8 nxtHdr = 0; /* Keyed off for header dissection order */
- guint16 packetLength = 0; /* Packet Length. We track this as tvb_length - offset. */
+ bool bthFollows = false; /* Tracks if we are parsing a BTH. This is a significant decision point */
+ struct infinibandinfo info = { NULL, 0, 0, 0, 0, 0, 0, 0, false};
+ int32_t nextHeaderSequence = -1; /* defined by this dissector. #define which indicates the upcoming header sequence from OpCode */
+ uint8_t nxtHdr = 0; /* Keyed off for header dissection order */
+ uint16_t packetLength = 0; /* Packet Length. We track this as tvb_length - offset. */
/* It provides the parsing methods a known size */
/* that must be available for that header. */
- gint crc_length = 0;
- gint crclen = 6;
+ int crc_length = 0;
+ int crclen = 6;
void *src_addr, /* the address to be displayed in the source/destination columns */
*dst_addr; /* (lid/gid number) will be stored here */
@@ -1825,7 +1848,7 @@ dissect_infiniband_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
/* Save Link Next Header... This tells us what the next header is. */
- lnh_val = tvb_get_guint8(tvb, offset);
+ lnh_val = tvb_get_uint8(tvb, offset);
lnh_val = lnh_val & 0x03;
offset += 1;
@@ -1834,9 +1857,9 @@ dissect_infiniband_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
/* Set destination in packet view. */
- dst_addr = wmem_alloc(pinfo->pool, sizeof(guint16));
- *((guint16*) dst_addr) = tvb_get_ntohs(tvb, offset);
- set_address(&pinfo->dst, AT_IB, sizeof(guint16), dst_addr);
+ dst_addr = wmem_alloc(pinfo->pool, sizeof(uint16_t));
+ *((uint16_t*) dst_addr) = tvb_get_ntohs(tvb, offset);
+ set_address(&pinfo->dst, AT_IB, sizeof(uint16_t), dst_addr);
offset += 2;
@@ -1852,9 +1875,9 @@ dissect_infiniband_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
proto_tree_add_item(local_route_header_tree, hf_infiniband_source_local_id, tvb, offset, 2, ENC_BIG_ENDIAN);
/* Set Source in packet view. */
- src_addr = wmem_alloc(pinfo->pool, sizeof(guint16));
- *((guint16*) src_addr) = tvb_get_ntohs(tvb, offset);
- set_address(&pinfo->src, AT_IB, sizeof(guint16), src_addr);
+ src_addr = wmem_alloc(pinfo->pool, sizeof(uint16_t));
+ *((uint16_t*) src_addr) = tvb_get_ntohs(tvb, offset);
+ set_address(&pinfo->src, AT_IB, sizeof(uint16_t), src_addr);
offset += 2;
packetLength -= 8; /* Shave 8 bytes for the LRH. */
@@ -1880,7 +1903,7 @@ skip_lrh:
proto_tree_add_item(global_route_header_tree, hf_infiniband_payload_length, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
- nxtHdr = tvb_get_guint8(tvb, offset);
+ nxtHdr = tvb_get_uint8(tvb, offset);
proto_tree_add_item(global_route_header_tree, hf_infiniband_next_header, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -1910,14 +1933,14 @@ skip_lrh:
case IBA_LOCAL: {
proto_item *base_transport_header_item;
proto_tree *base_transport_header_tree;
- bthFollows = TRUE;
+ bthFollows = true;
/* Get the OpCode - this tells us what headers are following */
- info.opCode = tvb_get_guint8(tvb, offset);
- info.pad_count = (tvb_get_guint8(tvb, offset+1) & 0x30) >> 4;
+ info.opCode = tvb_get_uint8(tvb, offset);
+ info.pad_count = (tvb_get_uint8(tvb, offset+1) & 0x30) >> 4;
if ((info.opCode >> 5) == 0x2) {
- info.dctConnect = !(tvb_get_guint8(tvb, offset + 1) & 0x80);
- dctBthHeader = TRUE;
+ info.dctConnect = !(tvb_get_uint8(tvb, offset + 1) & 0x80);
+ dctBthHeader = true;
bthSize += 8;
}
@@ -1928,10 +1951,10 @@ skip_lrh:
if (dctBthHeader) {
/* since DCT uses the same opcodes as RD we will use another name mapping */
- col_append_str(pinfo->cinfo, COL_INFO, val_to_str_const((guint32)info.opCode, DctOpCodeMap, "Unknown OpCode"));
+ col_append_str(pinfo->cinfo, COL_INFO, val_to_str_const((uint32_t)info.opCode, DctOpCodeMap, "Unknown OpCode "));
}
else {
- col_append_str(pinfo->cinfo, COL_INFO, val_to_str_const((guint32)info.opCode, OpCodeMap, "Unknown OpCode"));
+ col_append_str(pinfo->cinfo, COL_INFO, val_to_str_const((uint32_t)info.opCode, OpCodeMap, "Unknown OpCode "));
}
offset += 1;
@@ -2185,7 +2208,31 @@ skip_lrh:
parse_PAYLOAD(all_headers_tree, pinfo, &info, tvb, &offset, packetLength, crclen, tree);
break;
+ case FETH_RETH:
+ parse_FETH(all_headers_tree, tvb, &offset);
+ parse_RETH(all_headers_tree, tvb, &offset, &info);
+ /*packetLength -= 4;*/ /* FETH */
+ /*packetLength -= 16;*/ /* RETH */
+ break;
+ case RDETH_FETH_RETH:
+ parse_RDETH(all_headers_tree, tvb, &offset);
+ parse_FETH(all_headers_tree, tvb, &offset);
+ parse_RETH(all_headers_tree, tvb, &offset, &info);
+
+ /*packetLength -= 4;*/ /* RDETH */
+ /*packetLength -= 4;*/ /* FETH */
+ /*packetLength -= 16;*/ /* RETH */
+ break;
+ case RDETH_RETH_PAYLD:
+ parse_RDETH(all_headers_tree, tvb, &offset);
+ parse_RETH(all_headers_tree, tvb, &offset, &info);
+
+ packetLength -= 4;
+ packetLength -= 16;
+
+ parse_PAYLOAD(all_headers_tree, pinfo, &info, tvb, &offset, packetLength, crclen, tree);
+ break;
default:
parse_VENDOR(all_headers_tree, tvb, &offset);
break;
@@ -2227,16 +2274,16 @@ dissect_infiniband_link(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
proto_tree *link_tree;
proto_item *operand_item;
- gint offset = 0; /* Current Offset */
- guint8 operand; /* Link packet Operand */
+ int offset = 0; /* Current Offset */
+ uint8_t operand; /* Link packet Operand */
- operand = tvb_get_guint8(tvb, offset);
+ operand = tvb_get_uint8(tvb, offset);
operand = (operand & 0xF0) >> 4;
/* Mark the Packet type as Infiniband in the wireshark UI */
/* Clear other columns */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "InfiniBand Link");
- col_add_fstr(pinfo->cinfo, COL_INFO, "%s",
+ col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(operand, Operand_Description, "Unknown (0x%1x)"));
/* Assigns column values */
@@ -2274,46 +2321,46 @@ dissect_infiniband_link(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
* Searches largest header sequence groups first, and then finally resorts to single matches for unique header sequences
* IN: OpCode: The OpCode from the Base Transport Header.
* OUT: The Header Sequence enumeration. See Declarations for #defines from (0-22) */
-static gint32
+static int32_t
find_next_header_sequence(struct infinibandinfo* ibInfo)
{
if (ibInfo->opCode == 0x55)
return ibInfo->dctConnect ? DCCETH : PAYLD;
- if (contains(ibInfo->opCode, &opCode_PAYLD[0], (gint32)array_length(opCode_PAYLD)))
+ if (contains(ibInfo->opCode, &opCode_PAYLD[0], (int32_t)array_length(opCode_PAYLD)))
return PAYLD;
- if (contains(ibInfo->opCode, &opCode_IMMDT_PAYLD[0], (gint32)array_length(opCode_IMMDT_PAYLD)))
+ if (contains(ibInfo->opCode, &opCode_IMMDT_PAYLD[0], (int32_t)array_length(opCode_IMMDT_PAYLD)))
return IMMDT_PAYLD;
- if (contains(ibInfo->opCode, &opCode_RDETH_DETH_PAYLD[0], (gint32)array_length(opCode_RDETH_DETH_PAYLD)))
+ if (contains(ibInfo->opCode, &opCode_RDETH_DETH_PAYLD[0], (int32_t)array_length(opCode_RDETH_DETH_PAYLD)))
return RDETH_DETH_PAYLD;
- if (contains(ibInfo->opCode, &opCode_RETH_PAYLD[0], (gint32)array_length(opCode_RETH_PAYLD)))
+ if (contains(ibInfo->opCode, &opCode_RETH_PAYLD[0], (int32_t)array_length(opCode_RETH_PAYLD)))
return RETH_PAYLD;
- if (contains(ibInfo->opCode, &opCode_RDETH_AETH_PAYLD[0], (gint32)array_length(opCode_RDETH_AETH_PAYLD)))
+ if (contains(ibInfo->opCode, &opCode_RDETH_AETH_PAYLD[0], (int32_t)array_length(opCode_RDETH_AETH_PAYLD)))
return RDETH_AETH_PAYLD;
- if (contains(ibInfo->opCode, &opCode_AETH_PAYLD[0], (gint32)array_length(opCode_AETH_PAYLD)))
+ if (contains(ibInfo->opCode, &opCode_AETH_PAYLD[0], (int32_t)array_length(opCode_AETH_PAYLD)))
return AETH_PAYLD;
- if (contains(ibInfo->opCode, &opCode_RDETH_DETH_IMMDT_PAYLD[0], (gint32)array_length(opCode_RDETH_DETH_IMMDT_PAYLD)))
+ if (contains(ibInfo->opCode, &opCode_RDETH_DETH_IMMDT_PAYLD[0], (int32_t)array_length(opCode_RDETH_DETH_IMMDT_PAYLD)))
return RDETH_DETH_IMMDT_PAYLD;
- if (contains(ibInfo->opCode, &opCode_RETH_IMMDT_PAYLD[0], (gint32)array_length(opCode_RETH_IMMDT_PAYLD)))
+ if (contains(ibInfo->opCode, &opCode_RETH_IMMDT_PAYLD[0], (int32_t)array_length(opCode_RETH_IMMDT_PAYLD)))
return RETH_IMMDT_PAYLD;
- if (contains(ibInfo->opCode, &opCode_RDETH_DETH_RETH_PAYLD[0], (gint32)array_length(opCode_RDETH_DETH_RETH_PAYLD)))
+ if (contains(ibInfo->opCode, &opCode_RDETH_DETH_RETH_PAYLD[0], (int32_t)array_length(opCode_RDETH_DETH_RETH_PAYLD)))
return RDETH_DETH_RETH_PAYLD;
- if (contains(ibInfo->opCode, &opCode_ATOMICETH[0], (gint32)array_length(opCode_ATOMICETH)))
+ if (contains(ibInfo->opCode, &opCode_ATOMICETH[0], (int32_t)array_length(opCode_ATOMICETH)))
return ATOMICETH;
- if (contains(ibInfo->opCode, &opCode_IETH_PAYLD[0], (gint32)array_length(opCode_IETH_PAYLD)))
+ if (contains(ibInfo->opCode, &opCode_IETH_PAYLD[0], (int32_t)array_length(opCode_IETH_PAYLD)))
return IETH_PAYLD;
- if (contains(ibInfo->opCode, &opCode_RDETH_DETH_ATOMICETH[0], (gint32)array_length(opCode_RDETH_DETH_ATOMICETH)))
+ if (contains(ibInfo->opCode, &opCode_RDETH_DETH_ATOMICETH[0], (int32_t)array_length(opCode_RDETH_DETH_ATOMICETH)))
return RDETH_DETH_ATOMICETH;
if ((ibInfo->opCode ^ RC_ACKNOWLEDGE) == 0)
@@ -2349,6 +2396,18 @@ find_next_header_sequence(struct infinibandinfo* ibInfo)
if ((ibInfo->opCode ^ UD_SEND_ONLY_IMM) == 0)
return DETH_IMMDT_PAYLD;
+ if ((ibInfo->opCode ^ RC_FLUSH) == 0)
+ return FETH_RETH;
+
+ if ((ibInfo->opCode ^ RD_FLUSH) == 0)
+ return RDETH_FETH_RETH;
+
+ if ((ibInfo->opCode ^ RC_ATOMIC_WRITE) == 0)
+ return RETH_PAYLD;
+
+ if ((ibInfo->opCode ^ RD_ATOMIC_WRITE) == 0)
+ return RDETH_RETH_PAYLD;
+
return -1;
}
@@ -2358,16 +2417,16 @@ find_next_header_sequence(struct infinibandinfo* ibInfo)
* IN: Codes: The organized array of OpCodes to look through
* IN: Array length, because we're in C++...
* OUT: Boolean indicating if that OpCode was found in OpCodes */
-static gboolean
-contains(guint32 OpCode, guint32* Codes, gint32 length)
+static bool
+contains(uint32_t OpCode, uint32_t* Codes, int32_t length)
{
- gint32 i;
+ int32_t i;
for (i = 0; i < length; i++)
{
if ((OpCode ^ Codes[i]) == 0)
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/* Parse RDETH - Reliable Datagram Extended Transport Header
@@ -2375,9 +2434,9 @@ contains(guint32 OpCode, guint32* Codes, gint32 length)
* IN: tvb - the data buffer from wireshark
* IN/OUT: The current and updated offset */
static void
-parse_RDETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
+parse_RDETH(proto_tree * parentTree, tvbuff_t *tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
/* RDETH - Reliable Datagram Extended Transport Header */
proto_item *RDETH_header_item;
proto_tree *RDETH_header_tree;
@@ -2398,9 +2457,9 @@ parse_RDETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
* IN: tvb - the data buffer from wireshark
* IN/OUT: The current and updated offset */
static void
-parse_DETH(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, gint *offset)
+parse_DETH(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
/* DETH - Datagram Extended Transport Header */
proto_item *DETH_header_item;
proto_tree *DETH_header_tree;
@@ -2420,13 +2479,13 @@ parse_DETH(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, gint *offs
*offset = local_offset;
}
-/* Parse DETH - DC Connected Extended Transport Header
+/* Parse DCCETH - DC Connected Extended Transport Header
* IN: parentTree to add the dissection to - in this code the all_headers_tree
* IN: dctConnect - True if this is a DCT-Connect packet.
* IN: tvb - the data buffer from wireshark
* IN/OUT: The current and updated offset */
static void
-parse_DCCETH(proto_tree *parentTree _U_, tvbuff_t *tvb _U_, gint *offset)
+parse_DCCETH(proto_tree *parentTree _U_, tvbuff_t *tvb _U_, int *offset)
{
/* Do nothing just skip the header size */
*offset += 16;
@@ -2439,10 +2498,10 @@ parse_DCCETH(proto_tree *parentTree _U_, tvbuff_t *tvb _U_, gint *offset)
* OUT: Updated info->reth_remote_key
* OUT: Updated info->reth_dma_length */
static void
-parse_RETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset,
+parse_RETH(proto_tree * parentTree, tvbuff_t *tvb, int *offset,
struct infinibandinfo *info)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
/* RETH - RDMA Extended Transport Header */
proto_item *RETH_header_item;
proto_tree *RETH_header_tree;
@@ -2466,9 +2525,9 @@ parse_RETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset,
* IN: tvb - the data buffer from wireshark
* IN/OUT: The current and updated offset */
static void
-parse_ATOMICETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
+parse_ATOMICETH(proto_tree * parentTree, tvbuff_t *tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
/* AtomicETH - Atomic Extended Transport Header */
proto_item *ATOMICETH_header_item;
proto_tree *ATOMICETH_header_tree;
@@ -2493,16 +2552,16 @@ parse_ATOMICETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
* IN: tvb - the data buffer from wireshark
* IN/OUT: The current and updated offset */
static void
-parse_AETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset, packet_info *pinfo)
+parse_AETH(proto_tree * parentTree, tvbuff_t *tvb, int *offset, packet_info *pinfo)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
/* AETH - ACK Extended Transport Header */
proto_item *AETH_header_item;
proto_tree *AETH_header_tree;
proto_item *AETH_syndrome_item;
proto_tree *AETH_syndrome_tree;
- guint8 opcode;
- guint32 nak_error;
+ uint8_t opcode;
+ uint32_t nak_error;
AETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_AETH, tvb, local_offset, 4, ENC_NA);
proto_item_set_text(AETH_header_item, "%s", "AETH - ACK Extended Transport Header");
@@ -2512,7 +2571,7 @@ parse_AETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset, packet_info *pi
AETH_syndrome_tree = proto_item_add_subtree(AETH_syndrome_item, ett_aeth_syndrome);
proto_tree_add_item(AETH_syndrome_tree, hf_infiniband_syndrome_reserved, tvb, local_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(AETH_syndrome_tree, hf_infiniband_syndrome_opcode, tvb, local_offset, 1, ENC_BIG_ENDIAN);
- opcode = ((tvb_get_guint8(tvb, local_offset) & AETH_SYNDROME_OPCODE) >> 5);
+ opcode = ((tvb_get_uint8(tvb, local_offset) & AETH_SYNDROME_OPCODE) >> 5);
proto_item_append_text(AETH_syndrome_item, ", %s", val_to_str_const(opcode, aeth_syndrome_opcode_vals, "Unknown"));
switch (opcode)
{
@@ -2543,9 +2602,9 @@ parse_AETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset, packet_info *pi
* IN: tvb - the data buffer from wireshark
* IN/OUT: The current and updated offset */
static void
-parse_ATOMICACKETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
+parse_ATOMICACKETH(proto_tree * parentTree, tvbuff_t *tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
/* AtomicAckEth - Atomic ACK Extended Transport Header */
proto_item *ATOMICACKETH_header_item;
proto_tree *ATOMICACKETH_header_tree;
@@ -2563,9 +2622,9 @@ parse_ATOMICACKETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
* IN: tvb - the data buffer from wireshark
* IN/OUT: The current and updated offset */
static void
-parse_IMMDT(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
+parse_IMMDT(proto_tree * parentTree, tvbuff_t *tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
/* IMMDT - Immediate Data Extended Transport Header */
proto_item *IMMDT_header_item;
proto_tree *IMMDT_header_tree;
@@ -2583,9 +2642,9 @@ parse_IMMDT(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
* IN: tvb - the data buffer from wireshark
* IN/OUT: The current and updated offset */
static void
-parse_IETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
+parse_IETH(proto_tree * parentTree, tvbuff_t *tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
/* IETH - Invalidate Extended Transport Header */
proto_item *IETH_header_item;
proto_tree *IETH_header_tree;
@@ -2600,6 +2659,31 @@ parse_IETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
*offset = local_offset;
}
+/* Parse FETH - FLUSH extended transport header
+* IN: parentTree to add the dissection to - in this code the all_headers_tree
+* IN: tvb - the data buffer from wireshark
+* IN/OUT: The current and updated offset */
+static void
+parse_FETH(proto_tree * parentTree, tvbuff_t *tvb, int *offset)
+{
+ int local_offset = *offset;
+ /* FETH - FLUSH Extended Transport Header */
+ proto_item *FETH_header_item;
+ proto_tree *FETH_header_tree;
+
+ FETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_FETH, tvb, local_offset, 4, ENC_NA);
+ proto_item_set_text(FETH_header_item, "%s", "FETH - FLUSH Extended Transport Header");
+ FETH_header_tree = proto_item_add_subtree(FETH_header_item, ett_ieth);
+
+ proto_tree_add_item(FETH_header_tree, hf_infiniband_reserved27, tvb, local_offset, 4, ENC_BIG_ENDIAN);
+ local_offset += 3;
+ proto_tree_add_item(FETH_header_tree, hf_infiniband_selectivity_level, tvb, local_offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(FETH_header_tree, hf_infiniband_placement_type, tvb, local_offset, 1, ENC_BIG_ENDIAN);
+
+ local_offset += 1;
+ *offset = local_offset;
+}
+
static void update_sport(packet_info *pinfo)
{
conversation_t *conv;
@@ -2627,15 +2711,15 @@ static void update_sport(packet_info *pinfo)
* IN: top_tree - parent tree of Infiniband dissector */
static void parse_PAYLOAD(proto_tree *parentTree,
packet_info *pinfo, struct infinibandinfo *info,
- tvbuff_t *tvb, gint *offset, gint length, gint crclen, proto_tree *top_tree)
+ tvbuff_t *tvb, int *offset, int length, int crclen, proto_tree *top_tree)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
/* Payload - Packet Payload */
- guint8 management_class;
+ uint8_t management_class;
tvbuff_t *volatile next_tvb;
- gint reported_length;
+ int reported_length;
heur_dtbl_entry_t *hdtbl_entry;
- gboolean dissector_found = FALSE;
+ bool dissector_found = false;
if (!tvb_bytes_exist(tvb, *offset, length)) /* previously consumed bytes + offset was all the data - none or corrupt payload */
{
@@ -2647,24 +2731,24 @@ static void parse_PAYLOAD(proto_tree *parentTree,
/* management datagrams are determined by the source/destination QPs */
if (pinfo->srcport == 0 || pinfo->srcport == 1 || pinfo->destport == 0 || pinfo->destport == 1) /* management datagram */
{
- management_class = tvb_get_guint8(tvb, (*offset) + 1);
+ management_class = tvb_get_uint8(tvb, (*offset) + 1);
- if (((management_class >= (guint8)VENDOR_1_START) && (management_class <= (guint8)VENDOR_1_END))
- || ((management_class >= (guint8)VENDOR_2_START) && (management_class <= (guint8)VENDOR_2_END)))
+ if (((management_class >= (uint8_t)VENDOR_1_START) && (management_class <= (uint8_t)VENDOR_1_END))
+ || ((management_class >= (uint8_t)VENDOR_2_START) && (management_class <= (uint8_t)VENDOR_2_END)))
{
/* parse vendor specific */
col_set_str(pinfo->cinfo, COL_INFO, "VENDOR (Unknown Attribute)");
parse_VENDOR_MANAGEMENT(parentTree, tvb, offset);
}
- else if ((management_class >= (guint8)APPLICATION_START) && (management_class <= (guint8)APPLICATION_END))
+ else if ((management_class >= (uint8_t)APPLICATION_START) && (management_class <= (uint8_t)APPLICATION_END))
{
/* parse application specific */
col_set_str(pinfo->cinfo, COL_INFO, "APP (Unknown Attribute)");
parse_APPLICATION_MANAGEMENT(parentTree, tvb, offset);
}
- else if (((management_class == (guint8)0x00) || (management_class == (guint8)0x02))
- || ((management_class >= (guint8)0x50) && (management_class <= (guint8)0x80))
- || ((management_class >= (guint8)0x82)))
+ else if (((management_class == (uint8_t)0x00) || (management_class == (uint8_t)0x02))
+ || ((management_class >= (uint8_t)0x50) && (management_class <= (uint8_t)0x80))
+ || ((management_class >= (uint8_t)0x82)))
{
/* parse reserved classes */
col_set_str(pinfo->cinfo, COL_INFO, "RESERVED (Unknown Attribute)");
@@ -2736,26 +2820,26 @@ static void parse_PAYLOAD(proto_tree *parentTree,
if (try_heuristic_first)
{
if (dissector_try_heuristic(heur_dissectors_payload, next_tvb, pinfo, top_tree, &hdtbl_entry, info))
- dissector_found = TRUE;
+ dissector_found = true;
}
- if (dissector_found == FALSE)
+ if (dissector_found == false)
{
- if (dissector_try_payload_new(subdissector_table, next_tvb, pinfo, top_tree, TRUE, info))
+ if (dissector_try_payload_new(subdissector_table, next_tvb, pinfo, top_tree, true, info))
{
- dissector_found = TRUE;
+ dissector_found = true;
}
else
{
if (!try_heuristic_first)
{
if (dissector_try_heuristic(heur_dissectors_payload, next_tvb, pinfo, top_tree, &hdtbl_entry, info))
- dissector_found = TRUE;
+ dissector_found = true;
}
}
}
- if (dissector_found == FALSE)
+ if (dissector_found == false)
{
/* No sub-dissector found.
Label rest of packet as "Data" */
@@ -2773,12 +2857,12 @@ static void parse_PAYLOAD(proto_tree *parentTree,
* IN: parentTree to add the dissection to - in this code the all_headers_tree
* IN: tvb - the data buffer from wireshark
* IN/OUT: The current and updated offset */
-static void parse_VENDOR(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
+static void parse_VENDOR(proto_tree * parentTree, tvbuff_t *tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_item *VENDOR_header_item;
proto_tree *VENDOR_header_tree;
- gint VENDOR_header_length;
+ int VENDOR_header_length;
VENDOR_header_item = proto_tree_add_item(parentTree, hf_infiniband_vendor, tvb, local_offset, 4, ENC_NA);
proto_item_set_text(VENDOR_header_item, "%s", "Vendor Specific or Unknown Header Sequence");
@@ -2793,7 +2877,7 @@ static void parse_VENDOR(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
* IN: tvb - the data buffer from wireshark
* IN/OUT: The current and updated offset
* IN: pinfo - packet info from wireshark */
-static void parse_IPvSix(proto_tree *parentTree, tvbuff_t *tvb, gint *offset, packet_info *pinfo)
+static void parse_IPvSix(proto_tree *parentTree, tvbuff_t *tvb, int *offset, packet_info *pinfo)
{
tvbuff_t *ipv6_tvb;
@@ -2813,16 +2897,16 @@ static void parse_IPvSix(proto_tree *parentTree, tvbuff_t *tvb, gint *offset, pa
* IN/OUT: The current and updated offset
* IN: pinfo - packet info from wireshark
* IN: top_tree - parent tree of Infiniband dissector */
-static void parse_RWH(proto_tree *ah_tree, tvbuff_t *tvb, gint *offset, packet_info *pinfo, proto_tree *top_tree)
+static void parse_RWH(proto_tree *ah_tree, tvbuff_t *tvb, int *offset, packet_info *pinfo, proto_tree *top_tree)
{
- guint16 ether_type;
+ uint16_t ether_type;
tvbuff_t *next_tvb;
/* RWH - Raw Header */
proto_item *RWH_header_item;
proto_tree *RWH_header_tree;
- gint captured_length, reported_length;
+ int captured_length, reported_length;
RWH_header_item = proto_tree_add_item(ah_tree, hf_infiniband_RWH, tvb, *offset, 4, ENC_NA);
proto_item_set_text(RWH_header_item, "%s", "RWH - Raw Header");
@@ -2867,24 +2951,24 @@ static void parse_RWH(proto_tree *ah_tree, tvbuff_t *tvb, gint *offset, packet_i
* IN: The current offset
* IN: pinfo - packet info from wireshark
* IN: top_tree - parent tree of Infiniband dissector */
-static gboolean dissect_mellanox_eoib(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
+static bool dissect_mellanox_eoib(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
proto_item *header_item;
proto_tree *header_subtree;
tvbuff_t *encap_tvb;
int offset = 0;
- gboolean more_segments;
+ bool more_segments;
struct infinibandinfo *info = (struct infinibandinfo *)data;
if (((info->opCode & 0xE0) >> 5) != TRANSPORT_UD)
- return FALSE;
+ return false;
- if ((tvb_get_guint8(tvb, offset) & 0xF0) != 0xC0)
- return FALSE;
+ if ((tvb_get_uint8(tvb, offset) & 0xF0) != 0xC0)
+ return false;
if (tvb_reported_length(tvb) < 4) {
/* not even large enough to contain the eoib encap header. error! */
- return FALSE;
+ return false;
}
header_item = proto_tree_add_item(tree, proto_mellanox_eoib, tvb, offset, 4, ENC_NA);
@@ -2911,7 +2995,7 @@ static gboolean dissect_mellanox_eoib(tvbuff_t *tvb, packet_info *pinfo, proto_t
call_dissector(eth_handle, encap_tvb, pinfo, tree);
}
- return TRUE;
+ return true;
}
/* IBA packet data could be anything in principle, however it is common
@@ -2919,24 +3003,24 @@ static gboolean dissect_mellanox_eoib(tvbuff_t *tvb, packet_info *pinfo, proto_t
* similar to the RWH header. There is no way to identify these frames
* positively.
*/
-static gboolean dissect_eth_over_ib(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
+static bool dissect_eth_over_ib(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
- guint16 etype, reserved;
+ uint16_t etype, reserved;
const char *saved_proto;
tvbuff_t *next_tvb;
struct infinibandinfo *info = (struct infinibandinfo *)data;
- volatile gboolean dissector_found = FALSE;
+ volatile bool dissector_found = false;
if (tvb_reported_length(tvb) < 4) {
/* not even large enough to contain the eoib encap header. error! */
- return FALSE;
+ return false;
}
etype = tvb_get_ntohs(tvb, 0);
reserved = tvb_get_ntohs(tvb, 2);
if (reserved != 0)
- return FALSE;
+ return false;
next_tvb = tvb_new_subset_remaining(tvb, 4);
@@ -2947,7 +3031,7 @@ static gboolean dissect_eth_over_ib(tvbuff_t *tvb, packet_info *pinfo, proto_tre
saved_proto = pinfo->current_proto;
TRY {
- dissector_found = dissector_try_uint(ethertype_dissector_table,
+ dissector_found = (bool)dissector_try_uint(ethertype_dissector_table,
etype, next_tvb, pinfo, tree);
}
CATCH_NONFATAL_ERRORS {
@@ -2964,7 +3048,7 @@ static gboolean dissect_eth_over_ib(tvbuff_t *tvb, packet_info *pinfo, proto_tre
*/
show_exception(next_tvb, pinfo, tree, EXCEPT_CODE, GET_MESSAGE);
- dissector_found = TRUE;
+ dissector_found = true;
pinfo->current_proto = saved_proto;
}
ENDTRY;
@@ -2991,11 +3075,11 @@ static gboolean dissect_eth_over_ib(tvbuff_t *tvb, packet_info *pinfo, proto_tre
* IN: pinfo - packet info from wireshark
* IN: tvb - the data buffer from wireshark
* IN/OUT: The current and updated offset */
-static void parse_SUBN_LID_ROUTED(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, gint *offset)
+static void parse_SUBN_LID_ROUTED(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, int *offset)
{
/* Parse the Common MAD Header */
MAD_Data MadData;
- gint local_offset;
+ int local_offset;
proto_item *SUBN_LID_ROUTED_header_item;
proto_tree *SUBN_LID_ROUTED_header_tree;
@@ -3035,11 +3119,11 @@ static void parse_SUBN_LID_ROUTED(proto_tree *parentTree, packet_info *pinfo, tv
* IN: parentTree to add the dissection to
* IN: tvb - the data buffer from wireshark
* IN/OUT: The current and updated offset */
-static void parse_SUBN_DIRECTED_ROUTE(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, gint *offset)
+static void parse_SUBN_DIRECTED_ROUTE(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, int *offset)
{
/* Parse the Common MAD Header */
MAD_Data MadData;
- gint local_offset;
+ int local_offset;
proto_item *SUBN_DIRECTED_ROUTE_header_item;
proto_tree *SUBN_DIRECTED_ROUTE_header_tree;
@@ -3098,11 +3182,11 @@ static void parse_SUBN_DIRECTED_ROUTE(proto_tree *parentTree, packet_info *pinfo
* IN: pinfo - packet info from wireshark
* IN: tvb - the data buffer from wireshark
* IN/OUT: The current and updated offset */
-static void parse_SUBNADMN(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, gint *offset)
+static void parse_SUBNADMN(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, int *offset)
{
/* Parse the Common MAD Header */
MAD_Data MadData;
- gint local_offset;
+ int local_offset;
proto_item *SUBNADMN_header_item;
proto_tree *SUBNADMN_header_tree;
@@ -3147,11 +3231,11 @@ static void parse_SUBNADMN(proto_tree *parentTree, packet_info *pinfo, tvbuff_t
* IN: tvb - the data buffer from wireshark
* IN: pinfo - the pinfo struct from wireshark
* IN/OUT: The current and updated offset */
-static void parse_PERF(proto_tree *parentTree, tvbuff_t *tvb, packet_info *pinfo, gint *offset)
+static void parse_PERF(proto_tree *parentTree, tvbuff_t *tvb, packet_info *pinfo, int *offset)
{
/* Parse the Common MAD Header */
MAD_Data MadData;
- gint local_offset;
+ int local_offset;
proto_item *PERF_header_item;
if (!parse_MAD_Common(parentTree, tvb, offset, &MadData))
@@ -3191,11 +3275,11 @@ static void parse_PERF(proto_tree *parentTree, tvbuff_t *tvb, packet_info *pinfo
* IN: parentTree to add the dissection to
* IN: tvb - the data buffer from wireshark
* IN/OUT: The current and updated offset */
-static void parse_BM(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
+static void parse_BM(proto_tree *parentTree, tvbuff_t *tvb, int *offset)
{
/* Parse the Common MAD Header */
MAD_Data MadData;
- gint local_offset;
+ int local_offset;
proto_item *BM_header_item;
if (!parse_MAD_Common(parentTree, tvb, offset, &MadData))
@@ -3215,11 +3299,11 @@ static void parse_BM(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
* IN: parentTree to add the dissection to
* IN: tvb - the data buffer from wireshark
* IN/OUT: The current and updated offset */
-static void parse_DEV_MGT(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
+static void parse_DEV_MGT(proto_tree *parentTree, tvbuff_t *tvb, int *offset)
{
/* Parse the Common MAD Header */
MAD_Data MadData;
- gint local_offset;
+ int local_offset;
proto_item *DEVM_header_item;
if (!parse_MAD_Common(parentTree, tvb, offset, &MadData))
@@ -3234,12 +3318,12 @@ static void parse_DEV_MGT(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
*offset = local_offset;
}
-static gboolean parse_CM_Req_ServiceID(proto_tree *parent_tree, tvbuff_t *tvb, gint *offset, guint64 serviceid)
+static bool parse_CM_Req_ServiceID(proto_tree *parent_tree, tvbuff_t *tvb, int *offset, uint64_t serviceid)
{
proto_item *service_id_item;
proto_tree *service_id_tree;
- gint local_offset = *offset;
- gboolean ip_cm_sid;
+ int local_offset = *offset;
+ bool ip_cm_sid;
if ((serviceid & RDMA_IP_CM_SID_PREFIX_MASK) == RDMA_IP_CM_SID_PREFIX) {
service_id_item = proto_tree_add_item(parent_tree, hf_cm_req_service_id, tvb, local_offset, 8, ENC_NA);
@@ -3252,29 +3336,29 @@ static gboolean parse_CM_Req_ServiceID(proto_tree *parent_tree, tvbuff_t *tvb, g
local_offset += 1;
proto_tree_add_item(service_id_tree, hf_cm_req_service_id_dport, tvb, local_offset, 2, ENC_BIG_ENDIAN);
local_offset += 2;
- ip_cm_sid = TRUE;
+ ip_cm_sid = true;
} else {
proto_tree_add_item(parent_tree, hf_cm_req_service_id, tvb, local_offset, 8, ENC_BIG_ENDIAN);
local_offset += 8;
- ip_cm_sid = FALSE;
+ ip_cm_sid = false;
}
*offset = local_offset;
return ip_cm_sid;
}
-static guint64 make_hash_key(guint64 transcationID, address *addr)
+static uint64_t make_hash_key(uint64_t transcationID, address *addr)
{
- guint64 hash_key;
+ uint64_t hash_key;
hash_key = transcationID;
hash_key = add_address_to_hash64(hash_key, addr);
return hash_key;
}
-static connection_context* lookup_connection(guint64 transcationID, address *addr)
+static connection_context* lookup_connection(uint64_t transcationID, address *addr)
{
connection_context *connection;
- guint64 hash_key;
+ uint64_t hash_key;
hash_key = make_hash_key(transcationID, addr);
@@ -3282,9 +3366,9 @@ static connection_context* lookup_connection(guint64 transcationID, address *add
return connection;
}
-static void remove_connection(guint64 transcationID, address *addr)
+static void remove_connection(uint64_t transcationID, address *addr)
{
- guint64 hash_key;
+ uint64_t hash_key;
hash_key = make_hash_key(transcationID, addr);
@@ -3292,11 +3376,11 @@ static void remove_connection(guint64 transcationID, address *addr)
}
static void
-create_conv_and_add_proto_data(packet_info *pinfo, guint64 service_id,
- gboolean client_to_server,
- address *addr, const guint16 lid,
- const guint32 port, const guint32 src_port,
- const guint options, guint8 *mad_data)
+create_conv_and_add_proto_data(packet_info *pinfo, uint64_t service_id,
+ bool client_to_server,
+ address *addr, const uint16_t lid,
+ const uint32_t port, const uint32_t src_port,
+ const unsigned options, uint8_t *mad_data)
{
conversation_t *conv;
conversation_infiniband_data *proto_data;
@@ -3311,15 +3395,15 @@ create_conv_and_add_proto_data(packet_info *pinfo, guint64 service_id,
conversation_add_proto_data(conv, proto_infiniband, proto_data);
/* next, register the conversation using the LIDs */
- set_address(addr, AT_IB, sizeof(guint16), wmem_memdup(pinfo->pool, &lid, sizeof lid));
+ set_address(addr, AT_IB, sizeof(uint16_t), wmem_memdup(pinfo->pool, &lid, sizeof lid));
conv = conversation_new(pinfo->num, addr, addr,
CONVERSATION_IBQP, port, port, options);
conversation_add_proto_data(conv, proto_infiniband, proto_data);
}
-static void save_conversation_info(packet_info *pinfo, guint8 *local_gid, guint8 *remote_gid,
- guint32 local_qpn, guint32 local_lid, guint32 remote_lid,
- guint64 serviceid, MAD_Data *MadData)
+static void save_conversation_info(packet_info *pinfo, uint8_t *local_gid, uint8_t *remote_gid,
+ uint32_t local_qpn, uint32_t local_lid, uint32_t remote_lid,
+ uint64_t serviceid, MAD_Data *MadData)
{
/* the following saves information about the conversation this packet defines,
so there's no point in doing it more than once per packet */
@@ -3328,7 +3412,7 @@ static void save_conversation_info(packet_info *pinfo, guint8 *local_gid, guint8
connection_context *connection;
conversation_infiniband_data *proto_data;
conversation_t *conv;
- guint64 *hash_key = g_new(guint64, 1);
+ uint64_t *hash_key = g_new(uint64_t, 1);
/* create a new connection context and store it in the hash table */
connection = g_new(connection_context, 1);
@@ -3356,7 +3440,7 @@ static void save_conversation_info(packet_info *pinfo, guint8 *local_gid, guint8
QPN */
proto_data = wmem_new(wmem_file_scope(), conversation_infiniband_data);
proto_data->service_id = connection->service_id;
- proto_data->client_to_server = TRUE;
+ proto_data->client_to_server = true;
conv = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst,
CONVERSATION_IBQP, pinfo->srcport, pinfo->destport, 0);
@@ -3365,18 +3449,18 @@ static void save_conversation_info(packet_info *pinfo, guint8 *local_gid, guint8
/* create unidirection conversation for packets that will flow from
* server to client.
*/
- create_conv_and_add_proto_data(pinfo, connection->service_id, FALSE,
+ create_conv_and_add_proto_data(pinfo, connection->service_id, false,
&pinfo->src, connection->req_lid,
connection->req_qp, 0, NO_ADDR2|NO_PORT2,
&MadData->data[0]);
}
}
-static void parse_IP_CM_Req_Msg(proto_tree *parent_tree, tvbuff_t *tvb, gint local_offset)
+static void parse_IP_CM_Req_Msg(proto_tree *parent_tree, tvbuff_t *tvb, int local_offset)
{
proto_item *private_data_item;
proto_tree *private_data_tree;
- guint8 ipv;
+ uint8_t ipv;
private_data_item = proto_tree_add_item(parent_tree, hf_cm_req_ip_cm_req_msg, tvb, local_offset, 92, ENC_NA);
proto_item_set_text(private_data_item, "%s", "IP CM Private Data");
@@ -3386,7 +3470,7 @@ static void parse_IP_CM_Req_Msg(proto_tree *parent_tree, tvbuff_t *tvb, gint loc
proto_tree_add_item(private_data_tree, hf_cm_req_ip_cm_minv, tvb, local_offset, 1, ENC_BIG_ENDIAN);
local_offset += 1;
- ipv = (tvb_get_guint8(tvb, local_offset) & 0xf0) >> 4;
+ ipv = (tvb_get_uint8(tvb, local_offset) & 0xf0) >> 4;
proto_tree_add_item(private_data_tree, hf_cm_req_ip_cm_ipv, tvb, local_offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(private_data_tree, hf_cm_req_ip_cm_res, tvb, local_offset, 1, ENC_BIG_ENDIAN);
@@ -3412,18 +3496,18 @@ static void parse_IP_CM_Req_Msg(proto_tree *parent_tree, tvbuff_t *tvb, gint loc
tvb, local_offset, 56, ENC_NA);
}
-static void parse_CM_Req(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb, gint *offset,
+static void parse_CM_Req(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb, int *offset,
MAD_Data *MadData, proto_tree *CM_header_tree, struct infinibandinfo *info)
{
tvbuff_t *next_tvb;
heur_dtbl_entry_t *hdtbl_entry;
- guint8 *local_gid, *remote_gid;
- guint64 serviceid;
- gint local_offset;
- guint32 local_qpn;
- guint32 local_lid;
- guint32 remote_lid;
- gboolean ip_cm_sid;
+ uint8_t *local_gid, *remote_gid;
+ uint64_t serviceid;
+ int local_offset;
+ uint32_t local_qpn;
+ uint32_t local_lid;
+ uint32_t remote_lid;
+ bool ip_cm_sid;
local_offset = *offset;
@@ -3479,30 +3563,32 @@ static void parse_CM_Req(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb
local_offset += 2;
if (pinfo->dst.type == AT_IPv4) {
- local_gid = (guint8 *)wmem_alloc(pinfo->pool, 4);
+ local_gid = (uint8_t *)wmem_alloc(pinfo->pool, 4);
proto_tree_add_item(CM_header_tree, hf_cm_req_primary_local_gid_ipv4, tvb, local_offset + 12, 4, ENC_NA);
- (*(guint32*)local_gid) = tvb_get_ipv4(tvb, local_offset + 12);
+ (*(uint32_t*)local_gid) = tvb_get_ipv4(tvb, local_offset + 12);
local_offset += 16;
- remote_gid = (guint8 *)wmem_alloc(pinfo->pool, 4);
+ remote_gid = (uint8_t *)wmem_alloc(pinfo->pool, 4);
proto_tree_add_item(CM_header_tree, hf_cm_req_primary_remote_gid_ipv4, tvb, local_offset + 12, 4, ENC_NA);
- (*(guint32*)remote_gid) = tvb_get_ipv4(tvb, local_offset + 12);
+ (*(uint32_t*)remote_gid) = tvb_get_ipv4(tvb, local_offset + 12);
} else {
- local_gid = (guint8 *)wmem_alloc(pinfo->pool, GID_SIZE);
+ local_gid = (uint8_t *)wmem_alloc(pinfo->pool, GID_SIZE);
proto_tree_add_item(CM_header_tree, hf_cm_req_primary_local_gid, tvb, local_offset, 16, ENC_NA);
tvb_get_ipv6(tvb, local_offset, (ws_in6_addr*)local_gid);
local_offset += 16;
- remote_gid = (guint8 *)wmem_alloc(pinfo->pool, GID_SIZE);
+ remote_gid = (uint8_t *)wmem_alloc(pinfo->pool, GID_SIZE);
proto_tree_add_item(CM_header_tree, hf_cm_req_primary_remote_gid, tvb, local_offset, 16, ENC_NA);
tvb_get_ipv6(tvb, local_offset, (ws_in6_addr*)remote_gid);
}
local_offset += 16;
proto_tree_add_item(CM_header_tree, hf_cm_req_primary_flow_label, tvb, local_offset, 3, ENC_BIG_ENDIAN);
+ local_offset += 2;
proto_tree_add_item(CM_header_tree, hf_cm_req_primary_reserved0, tvb, local_offset, 1, ENC_BIG_ENDIAN);
+ local_offset += 1;
proto_tree_add_item(CM_header_tree, hf_cm_req_primary_packet_rate, tvb, local_offset, 1, ENC_BIG_ENDIAN);
- local_offset += 4;
+ local_offset += 1;
proto_tree_add_item(CM_header_tree, hf_cm_req_primary_traffic_class, tvb, local_offset, 1, ENC_BIG_ENDIAN);
local_offset += 1;
proto_tree_add_item(CM_header_tree, hf_cm_req_primary_hop_limit, tvb, local_offset, 1, ENC_BIG_ENDIAN);
@@ -3523,9 +3609,11 @@ static void parse_CM_Req(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb
proto_tree_add_item(CM_header_tree, hf_cm_req_alt_remote_gid, tvb, local_offset, 16, ENC_NA);
local_offset += 16;
proto_tree_add_item(CM_header_tree, hf_cm_req_flow_label, tvb, local_offset, 3, ENC_BIG_ENDIAN);
+ local_offset += 2;
proto_tree_add_item(CM_header_tree, hf_cm_req_alt_reserved0, tvb, local_offset, 1, ENC_BIG_ENDIAN);
+ local_offset += 1;
proto_tree_add_item(CM_header_tree, hf_cm_req_packet_rate, tvb, local_offset, 1, ENC_BIG_ENDIAN);
- local_offset += 4;
+ local_offset += 1;
proto_tree_add_item(CM_header_tree, hf_cm_req_alt_traffic_class, tvb, local_offset, 1, ENC_BIG_ENDIAN);
local_offset += 1;
proto_tree_add_item(CM_header_tree, hf_cm_req_alt_hop_limit, tvb, local_offset, 1, ENC_BIG_ENDIAN);
@@ -3565,7 +3653,7 @@ static void create_bidi_conv(packet_info *pinfo, connection_context *connection)
proto_data = wmem_new(wmem_file_scope(), conversation_infiniband_data);
proto_data->service_id = connection->service_id;
- proto_data->client_to_server = FALSE;
+ proto_data->client_to_server = false;
memset(&proto_data->mad_private_data[0], 0, MAD_DATA_SIZE);
conv = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst,
CONVERSATION_IBQP, connection->resp_qp,
@@ -3602,7 +3690,7 @@ attach_connection_to_pinfo(packet_info *pinfo, connection_context *connection,
* first for client to server direction so that upper level protocols
* can do appropriate dissection depending on the message direction.
*/
- create_conv_and_add_proto_data(pinfo, connection->service_id, TRUE,
+ create_conv_and_add_proto_data(pinfo, connection->service_id, true,
&resp_addr, connection->resp_lid,
connection->resp_qp, connection->req_qp,
NO_ADDR2|NO_PORT2, &MadData->data[0]);
@@ -3631,7 +3719,7 @@ static void update_passive_conv_info(packet_info *pinfo,
}
static void update_conversation_info(packet_info *pinfo,
- guint32 remote_qpn,
+ uint32_t remote_qpn,
MAD_Data *MadData)
{
/* the following saves information about the conversation this packet defines,
@@ -3652,13 +3740,13 @@ static void update_conversation_info(packet_info *pinfo,
}
}
-static void parse_CM_Rsp(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb, gint *offset,
+static void parse_CM_Rsp(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb, int *offset,
MAD_Data *MadData, proto_tree *CM_header_tree, struct infinibandinfo *info)
{
tvbuff_t *next_tvb;
heur_dtbl_entry_t *hdtbl_entry;
- guint32 remote_qpn;
- gint local_offset;
+ uint32_t remote_qpn;
+ int local_offset;
local_offset = *offset;
@@ -3710,7 +3798,7 @@ static void parse_CM_Rsp(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb
static connection_context*
try_connection_dissectors(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb,
address *addr, MAD_Data *MadData, struct infinibandinfo *info,
- gint pdata_offset, gint pdata_length)
+ int pdata_offset, int pdata_length)
{
tvbuff_t *next_tvb;
heur_dtbl_entry_t *hdtbl_entry;
@@ -3724,11 +3812,11 @@ try_connection_dissectors(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tv
return connection;
}
-static void parse_CM_Rtu(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb, gint *offset,
+static void parse_CM_Rtu(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb, int *offset,
MAD_Data *MadData, proto_tree *CM_header_tree,
struct infinibandinfo *info)
{
- gint local_offset;
+ int local_offset;
local_offset = *offset;
proto_tree_add_item(CM_header_tree, hf_cm_rtu_localcommid, tvb, local_offset, 4, ENC_BIG_ENDIAN);
@@ -3741,11 +3829,11 @@ static void parse_CM_Rtu(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb
*offset = local_offset;
}
-static void parse_CM_Rej(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb, gint *offset,
+static void parse_CM_Rej(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb, int *offset,
MAD_Data *MadData, proto_tree *CM_header_tree,
struct infinibandinfo *info)
{
- gint local_offset;
+ int local_offset;
local_offset = *offset;
proto_tree_add_item(CM_header_tree, hf_cm_rej_local_commid, tvb, local_offset, 4, ENC_BIG_ENDIAN);
@@ -3769,11 +3857,11 @@ static void parse_CM_Rej(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb
*offset = local_offset;
}
-static void parse_CM_DReq(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb, gint *offset,
+static void parse_CM_DReq(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb, int *offset,
MAD_Data *MadData, proto_tree *CM_header_tree,
struct infinibandinfo *info)
{
- gint local_offset;
+ int local_offset;
local_offset = *offset;
proto_tree_add_item(CM_header_tree, hf_cm_dreq_localcommid, tvb, local_offset, 4, ENC_BIG_ENDIAN);
@@ -3790,12 +3878,12 @@ static void parse_CM_DReq(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tv
*offset = local_offset;
}
-static void parse_CM_DRsp(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb, gint *offset,
+static void parse_CM_DRsp(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb, int *offset,
MAD_Data *MadData, proto_tree *CM_header_tree,
struct infinibandinfo *info)
{
connection_context *connection;
- gint local_offset;
+ int local_offset;
local_offset = *offset;
proto_tree_add_item(CM_header_tree, hf_cm_drsp_localcommid, tvb, local_offset, 4, ENC_BIG_ENDIAN);
@@ -3817,11 +3905,11 @@ static void parse_CM_DRsp(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tv
* IN: parentTree to add the dissection to
* IN: tvb - the data buffer from wireshark
* IN/OUT: The current and updated offset */
-static void parse_COM_MGT(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, gint *offset, proto_tree* top_tree)
+static void parse_COM_MGT(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, int *offset, proto_tree* top_tree)
{
MAD_Data MadData;
- struct infinibandinfo info = { NULL, 0, 0, 0, 0, 0, 0, 0, FALSE};
- gint local_offset;
+ struct infinibandinfo info = { NULL, 0, 0, 0, 0, 0, 0, 0, false};
+ int local_offset;
const char *label;
proto_item *CM_header_item;
proto_tree *CM_header_tree;
@@ -3881,11 +3969,11 @@ static void parse_COM_MGT(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *
* IN: parentTree to add the dissection to
* IN: tvb - the data buffer from wireshark
* IN/OUT: The current and updated offset */
-static void parse_SNMP(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
+static void parse_SNMP(proto_tree *parentTree, tvbuff_t *tvb, int *offset)
{
/* Parse the Common MAD Header */
MAD_Data MadData;
- gint local_offset;
+ int local_offset;
proto_item *SNMP_header_item;
if (!parse_MAD_Common(parentTree, tvb, offset, &MadData))
@@ -3905,11 +3993,11 @@ static void parse_SNMP(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
* IN: parentTree to add the dissection to
* IN: tvb - the data buffer from wireshark
* IN/OUT: The current and updated offset */
-static void parse_VENDOR_MANAGEMENT(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
+static void parse_VENDOR_MANAGEMENT(proto_tree *parentTree, tvbuff_t *tvb, int *offset)
{
/* Parse the Common MAD Header */
MAD_Data MadData;
- gint local_offset;
+ int local_offset;
proto_item *VENDOR_header_item;
if (!parse_MAD_Common(parentTree, tvb, offset, &MadData))
@@ -3929,11 +4017,11 @@ static void parse_VENDOR_MANAGEMENT(proto_tree *parentTree, tvbuff_t *tvb, gint
* IN: parentTree to add the dissection to
* IN: tvb - the data buffer from wireshark
* IN/OUT: The current and updated offset */
-static void parse_APPLICATION_MANAGEMENT(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
+static void parse_APPLICATION_MANAGEMENT(proto_tree *parentTree, tvbuff_t *tvb, int *offset)
{
/* Parse the Common MAD Header */
MAD_Data MadData;
- gint local_offset;
+ int local_offset;
proto_item *APP_header_item;
if (!parse_MAD_Common(parentTree, tvb, offset, &MadData))
@@ -3957,11 +4045,11 @@ static void parse_APPLICATION_MANAGEMENT(proto_tree *parentTree, tvbuff_t *tvb,
* IN: parentTree to add the dissection to
* IN: tvb - the data buffer from wireshark
* IN/OUT: The current and updated offset */
-static void parse_RESERVED_MANAGEMENT(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
+static void parse_RESERVED_MANAGEMENT(proto_tree *parentTree, tvbuff_t *tvb, int *offset)
{
/* Parse the Common MAD Header */
MAD_Data MadData;
- gint local_offset;
+ int local_offset;
proto_item *RESV_header_item;
if (!parse_MAD_Common(parentTree, tvb, offset, &MadData))
@@ -3981,22 +4069,22 @@ static void parse_RESERVED_MANAGEMENT(proto_tree *parentTree, tvbuff_t *tvb, gin
* IN: tvb - the data buffer from wireshark
* IN/OUT: The current and updated offset
* IN/OUT: MadData - the data from the MAD header */
-static gboolean parse_MAD_Common(proto_tree *parentTree, tvbuff_t *tvb, gint *offset, MAD_Data* MadData)
+static bool parse_MAD_Common(proto_tree *parentTree, tvbuff_t *tvb, int *offset, MAD_Data* MadData)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_item *MAD_header_item;
proto_tree *MAD_header_tree;
if (MadData == NULL)
- return FALSE;
+ return false;
if (!tvb_bytes_exist(tvb, *offset, 256))
- return FALSE;
+ return false;
/* Get the Management Class to decide between LID Routed and Direct Route */
- MadData->managementClass = tvb_get_guint8(tvb, local_offset + 1);
- MadData->classVersion = tvb_get_guint8(tvb, local_offset + 2);
- MadData->method = tvb_get_guint8(tvb, local_offset + 3);
- MadData->status = tvb_get_guint8(tvb, local_offset + 4);
+ MadData->managementClass = tvb_get_uint8(tvb, local_offset + 1);
+ MadData->classVersion = tvb_get_uint8(tvb, local_offset + 2);
+ MadData->method = tvb_get_uint8(tvb, local_offset + 3);
+ MadData->status = tvb_get_uint8(tvb, local_offset + 4);
MadData->classSpecific = tvb_get_ntohs(tvb, local_offset + 6);
MadData->transactionID = tvb_get_ntoh64(tvb, local_offset + 8);
MadData->attributeID = tvb_get_ntohs(tvb, local_offset + 16);
@@ -4032,17 +4120,17 @@ static gboolean parse_MAD_Common(proto_tree *parentTree, tvbuff_t *tvb, gint *of
proto_tree_add_item(MAD_header_tree, hf_infiniband_data, tvb, local_offset, MAD_DATA_SIZE, ENC_NA);
*offset = local_offset; /* Move the offset to the start of the Data field - this will be where the other parsers start. */
- return TRUE;
+ return true;
}
/* Parse the RMPP (Reliable Multi-Packet Transaction Protocol
* IN: parentTree to add the dissection to
* IN: tvb - the data buffer from wireshark
* IN/OUT: The current and updated offset */
-static gboolean parse_RMPP(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
+static bool parse_RMPP(proto_tree *parentTree, tvbuff_t *tvb, int *offset)
{
- gint local_offset = *offset;
- guint8 RMPP_Type = tvb_get_guint8(tvb, local_offset + 1);
+ int local_offset = *offset;
+ uint8_t RMPP_Type = tvb_get_uint8(tvb, local_offset + 1);
proto_item *RMPP_header_item;
proto_tree *RMPP_header_tree;
@@ -4093,7 +4181,7 @@ static gboolean parse_RMPP(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
break;
}
*offset = local_offset;
- return TRUE;
+ return true;
}
/* Parse the Method from the MAD Common Header.
@@ -4152,9 +4240,9 @@ static void label_SUBA_Attribute(proto_item *SubAItem, MAD_Data *MadHeader, pack
* IN: Parent Tree to add the item to in the dissection tree
* IN: tvbuff, offset - the data and where it is.
* IN: MAD_Data the data from the Common MAD Header that provides the information we need */
-static gboolean parse_SUBM_Attribute(proto_tree *parentTree, tvbuff_t *tvb, gint *offset, MAD_Data *MadHeader)
+static bool parse_SUBM_Attribute(proto_tree *parentTree, tvbuff_t *tvb, int *offset, MAD_Data *MadHeader)
{
- guint16 attributeID = MadHeader->attributeID;
+ uint16_t attributeID = MadHeader->attributeID;
proto_item *SUBM_Attribute_header_item;
proto_tree *SUBM_Attribute_header_tree;
@@ -4219,16 +4307,16 @@ static gboolean parse_SUBM_Attribute(proto_tree *parentTree, tvbuff_t *tvb, gint
*offset += 64;
- return TRUE;
+ return true;
}
/* Parse the attribute from a Subnet Administration Packet.
* IN: Parent Tree to add the item to in the dissection tree
* IN: tvbuff, offset - the data and where it is.
* IN: MAD_Data the data from the Common MAD Header that provides the information we need */
-static gboolean parse_SUBA_Attribute(proto_tree *parentTree, tvbuff_t *tvb, gint *offset, MAD_Data *MadHeader)
+static bool parse_SUBA_Attribute(proto_tree *parentTree, tvbuff_t *tvb, int *offset, MAD_Data *MadHeader)
{
- guint16 attributeID = MadHeader->attributeID;
+ uint16_t attributeID = MadHeader->attributeID;
proto_item *SUBA_Attribute_header_item;
proto_tree *SUBA_Attribute_header_tree;
@@ -4319,7 +4407,7 @@ static gboolean parse_SUBA_Attribute(proto_tree *parentTree, tvbuff_t *tvb, gint
}
*offset += 200;
- return TRUE;
+ return true;
}
/* Subnet Management Attribute Parsing Methods.
@@ -4332,9 +4420,9 @@ static gboolean parse_SUBA_Attribute(proto_tree *parentTree, tvbuff_t *tvb, gint
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static int parse_ClassPortInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static int parse_ClassPortInfo(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_tree *ClassPortInfo_header_tree;
if (!parentTree)
@@ -4398,9 +4486,9 @@ static int parse_ClassPortInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offs
* offset - The offset in TVB where the attribute begins
* trapNumber - The Trap ID of the Trap Data being Dissected */
-static gint parse_NoticeDataDetails(proto_tree* parentTree, tvbuff_t* tvb, gint *offset, guint16 trapNumber)
+static int parse_NoticeDataDetails(proto_tree* parentTree, tvbuff_t* tvb, int *offset, uint16_t trapNumber)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_item *DataDetails_header_item;
proto_tree *DataDetails_header_tree;
@@ -4606,12 +4694,12 @@ static gint parse_NoticeDataDetails(proto_tree* parentTree, tvbuff_t* tvb, gint
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static void parse_NoticesAndTraps(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static void parse_NoticesAndTraps(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_item *NoticesAndTraps_header_item;
proto_tree *NoticesAndTraps_header_tree;
- guint16 trapNumber = tvb_get_ntohs(tvb, local_offset + 4);
+ uint16_t trapNumber = tvb_get_ntohs(tvb, local_offset + 4);
if (!parentTree)
return;
@@ -4650,9 +4738,9 @@ static void parse_NoticesAndTraps(proto_tree* parentTree, tvbuff_t* tvb, gint *o
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static void parse_NodeDescription(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static void parse_NodeDescription(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_tree *NodeDescription_header_tree;
if (!parentTree)
@@ -4666,9 +4754,9 @@ static void parse_NodeDescription(proto_tree* parentTree, tvbuff_t* tvb, gint *o
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static int parse_NodeInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static int parse_NodeInfo(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_tree *NodeInfo_header_tree;
if (!parentTree)
@@ -4709,9 +4797,9 @@ static int parse_NodeInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static int parse_SwitchInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static int parse_SwitchInfo(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_tree *SwitchInfo_header_tree;
if (!parentTree)
@@ -4755,12 +4843,12 @@ static int parse_SwitchInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static int parse_GUIDInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static int parse_GUIDInfo(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_tree *GUIDInfo_header_tree;
proto_item *tempItemLow;
- gint i;
+ int i;
if (!parentTree)
return *offset;
@@ -4780,14 +4868,14 @@ static int parse_GUIDInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static int parse_PortInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static int parse_PortInfo(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_tree *PortInfo_header_tree;
proto_item *PortInfo_CapabilityMask_item;
proto_tree *PortInfo_CapabilityMask_tree;
proto_item *temp_item;
- guint16 temp_val;
+ uint16_t temp_val;
if (!parentTree)
return *offset;
@@ -4849,7 +4937,7 @@ static int parse_PortInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
/* LinkWidthEnabled */
temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkWidthEnabled, tvb, local_offset, 1, ENC_BIG_ENDIAN);
- temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
+ temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset);
proto_item_append_text(temp_item, ", %s", val_to_str_const(temp_val, LinkWidthEnabled, "Reserved LinkWidthEnabled Value! Possible Error"));
local_offset += 1;
@@ -4857,7 +4945,7 @@ static int parse_PortInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
/* LinkWidthSupported */
temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkWidthSupported, tvb, local_offset, 1, ENC_BIG_ENDIAN);
- temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
+ temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset);
proto_item_append_text(temp_item, ", %s", val_to_str_const(temp_val, LinkWidthSupported, "Reserved LinkWidthSupported Value! Possible Error"));
local_offset += 1;
@@ -4865,7 +4953,7 @@ static int parse_PortInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
/* LinkWidthActive */
temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkWidthActive, tvb, local_offset, 1, ENC_BIG_ENDIAN);
- temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
+ temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset);
proto_item_append_text(temp_item, ", %s", val_to_str_const(temp_val, LinkWidthActive, "Reserved LinkWidthActive Value! Possible Error"));
local_offset += 1;
@@ -4873,7 +4961,7 @@ static int parse_PortInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
/* LinkSpeedSupported */
temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkSpeedSupported, tvb, local_offset, 1, ENC_BIG_ENDIAN);
- temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
+ temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset);
/* 4 bit values = mask and shift */
temp_val = temp_val & 0x00F0;
@@ -4884,7 +4972,7 @@ static int parse_PortInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
/* PortState */
temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_PortState, tvb, local_offset, 1, ENC_BIG_ENDIAN);
- temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
+ temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset);
/* 4 bit values = mask and shift */
temp_val = temp_val & 0x000F;
@@ -4896,7 +4984,7 @@ static int parse_PortInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
/* PortPhysicalState */
temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_PortPhysicalState, tvb, local_offset, 1, ENC_BIG_ENDIAN);
- temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
+ temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset);
/* 4 bit values = mask and shift */
temp_val = temp_val & 0x00F0;
@@ -4907,7 +4995,7 @@ static int parse_PortInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
/* LinkDownDefaultState */
temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkDownDefaultState, tvb, local_offset, 1, ENC_BIG_ENDIAN);
- temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
+ temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset);
/* 4 bit values = mask and shift */
temp_val = temp_val & 0x000F;
@@ -4923,7 +5011,7 @@ static int parse_PortInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
/* LinkSpeedActive */
temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkSpeedActive, tvb, local_offset, 1, ENC_BIG_ENDIAN);
- temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
+ temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset);
/* 4 bit values = mask and shift */
temp_val = temp_val & 0x00F0;
@@ -4934,7 +5022,7 @@ static int parse_PortInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
/* LinkSpeedEnabled */
temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkSpeedEnabled, tvb, local_offset, 1, ENC_BIG_ENDIAN);
- temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
+ temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset);
/* 4 bit values = mask and shift */
temp_val = temp_val & 0x000F;
@@ -4946,7 +5034,7 @@ static int parse_PortInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
/* NeighborMTU */
temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_NeighborMTU, tvb, local_offset, 1, ENC_BIG_ENDIAN);
- temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
+ temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset);
/* 4 bit values = mask and shift */
temp_val = temp_val & 0x00F0;
@@ -4961,7 +5049,7 @@ static int parse_PortInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
/* VLCap */
temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_VLCap, tvb, local_offset, 1, ENC_BIG_ENDIAN);
- temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
+ temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset);
/* 4 bit values = mask and shift */
temp_val = temp_val & 0x00F0;
@@ -4983,7 +5071,7 @@ static int parse_PortInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
/* MTUCap */
temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_MTUCap, tvb, local_offset, 1, ENC_BIG_ENDIAN);
- temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
+ temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset);
/* 4 bit values = mask and shift */
temp_val = temp_val & 0x000F;
@@ -4999,7 +5087,7 @@ static int parse_PortInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
/* OperationalVLs */
temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_OperationalVLs, tvb, local_offset, 1, ENC_BIG_ENDIAN);
- temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
+ temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset);
/* 4 bit values = mask and shift */
temp_val = temp_val & 0x00F0;
@@ -5041,10 +5129,10 @@ static int parse_PortInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static void parse_P_KeyTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static void parse_P_KeyTable(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint local_offset = *offset;
- gint i;
+ int local_offset = *offset;
+ int i;
proto_item *P_KeyTable_header_item;
proto_tree *P_KeyTable_header_tree;
proto_item *tempItemLow;
@@ -5071,14 +5159,14 @@ static void parse_P_KeyTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static void parse_SLtoVLMappingTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static void parse_SLtoVLMappingTable(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_item *SLtoVLMappingTable_header_item;
proto_tree *SLtoVLMappingTable_header_tree;
proto_item *tempItemLow;
proto_item *tempItemHigh;
- gint i;
+ int i;
if (!parentTree)
return;
@@ -5101,10 +5189,10 @@ static void parse_SLtoVLMappingTable(proto_tree* parentTree, tvbuff_t* tvb, gint
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static void parse_VLArbitrationTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static void parse_VLArbitrationTable(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint local_offset = *offset;
- gint i;
+ int local_offset = *offset;
+ int i;
proto_item *VLArbitrationTable_header_item;
proto_tree *VLArbitrationTable_header_tree;
proto_item *tempItemLow;
@@ -5132,10 +5220,10 @@ static void parse_VLArbitrationTable(proto_tree* parentTree, tvbuff_t* tvb, gint
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static void parse_LinearForwardingTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static void parse_LinearForwardingTable(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint i;
- gint local_offset = *offset;
+ int i;
+ int local_offset = *offset;
proto_item *LinearForwardingTable_header_item;
proto_tree *LinearForwardingTable_header_tree;
proto_item *tempItemLow;
@@ -5159,10 +5247,10 @@ static void parse_LinearForwardingTable(proto_tree* parentTree, tvbuff_t* tvb, g
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static void parse_RandomForwardingTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static void parse_RandomForwardingTable(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint i;
- gint local_offset = *offset;
+ int i;
+ int local_offset = *offset;
proto_item *RandomForwardingTable_header_item;
proto_tree *RandomForwardingTable_header_tree;
proto_item *tempItemLow;
@@ -5194,10 +5282,10 @@ static void parse_RandomForwardingTable(proto_tree* parentTree, tvbuff_t* tvb, g
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static void parse_MulticastForwardingTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static void parse_MulticastForwardingTable(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint i;
- gint local_offset = *offset;
+ int i;
+ int local_offset = *offset;
proto_item *MulticastForwardingTable_header_item;
proto_tree *MulticastForwardingTable_header_tree;
proto_item *tempItemLow;
@@ -5222,9 +5310,9 @@ static void parse_MulticastForwardingTable(proto_tree* parentTree, tvbuff_t* tvb
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static int parse_SMInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static int parse_SMInfo(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_item *SMInfo_header_item;
proto_tree *SMInfo_header_tree;
@@ -5251,9 +5339,9 @@ static int parse_SMInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static int parse_VendorDiag(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static int parse_VendorDiag(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_item *VendorDiag_header_item;
proto_tree *VendorDiag_header_tree;
@@ -5276,9 +5364,9 @@ static int parse_VendorDiag(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static void parse_LedInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static void parse_LedInfo(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_item *LedInfo_header_item;
proto_tree *LedInfo_header_tree;
@@ -5296,9 +5384,9 @@ static void parse_LedInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static int parse_LinkSpeedWidthPairsTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static int parse_LinkSpeedWidthPairsTable(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_item *LinkSpeedWidthPairsTable_header_item;
proto_tree *LinkSpeedWidthPairsTable_header_tree;
@@ -5328,9 +5416,9 @@ static int parse_LinkSpeedWidthPairsTable(proto_tree* parentTree, tvbuff_t* tvb,
* tvb - the packet buffer
* MadHeader - the Common MAD header from this packet.
* IN/OUT: offset - the current and updated offset in the packet buffer */
-static void parse_RID(proto_tree* SA_header_tree, tvbuff_t* tvb, gint *offset, MAD_Data* MadHeader)
+static void parse_RID(proto_tree* SA_header_tree, tvbuff_t* tvb, int *offset, MAD_Data* MadHeader)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
if (!SA_header_tree)
{
@@ -5482,9 +5570,9 @@ static void parse_RID(proto_tree* SA_header_tree, tvbuff_t* tvb, gint *offset, M
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static int parse_InformInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static int parse_InformInfo(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_item *InformInfo_header_item;
proto_tree *InformInfo_header_tree;
@@ -5527,9 +5615,9 @@ static int parse_InformInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static int parse_LinkRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static int parse_LinkRecord(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_item *LinkRecord_header_item;
proto_tree *LinkRecord_header_tree;
@@ -5554,9 +5642,9 @@ static int parse_LinkRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static int parse_ServiceRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static int parse_ServiceRecord(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_item *ServiceRecord_header_item;
proto_tree *ServiceRecord_header_tree;
proto_item *tempData;
@@ -5597,9 +5685,9 @@ static int parse_ServiceRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offs
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static int parse_PathRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static int parse_PathRecord(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_item *PathRecord_header_item;
proto_tree *PathRecord_header_tree;
@@ -5654,9 +5742,9 @@ static int parse_PathRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static int parse_MCMemberRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static int parse_MCMemberRecord(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_item *MCMemberRecord_header_item;
proto_tree *MCMemberRecord_header_tree;
@@ -5704,9 +5792,9 @@ static int parse_MCMemberRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *off
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static int parse_TraceRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static int parse_TraceRecord(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_item *TraceRecord_header_item;
proto_tree *TraceRecord_header_tree;
@@ -5746,15 +5834,15 @@ static int parse_TraceRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static int parse_MultiPathRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static int parse_MultiPathRecord(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_item *MultiPathRecord_header_item;
proto_tree *MultiPathRecord_header_tree;
proto_item *SDGID;
- guint8 SDGIDCount;
- guint8 DGIDCount;
- guint32 i;
+ uint8_t SDGIDCount;
+ uint8_t DGIDCount;
+ uint32_t i;
if (!parentTree)
{
@@ -5794,10 +5882,10 @@ static int parse_MultiPathRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *of
proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_GIDScope, tvb, local_offset, 1, ENC_BIG_ENDIAN);
local_offset += 1;
- SDGIDCount = tvb_get_guint8(tvb, local_offset);
+ SDGIDCount = tvb_get_uint8(tvb, local_offset);
proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_SGIDCount, tvb, local_offset, 1, ENC_BIG_ENDIAN);
local_offset += 1;
- DGIDCount = tvb_get_guint8(tvb, local_offset);
+ DGIDCount = tvb_get_uint8(tvb, local_offset);
proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_DGIDCount, tvb, local_offset, 1, ENC_BIG_ENDIAN);
local_offset += 1;
proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_reserved, tvb, local_offset, 7, ENC_NA);
@@ -5822,9 +5910,9 @@ static int parse_MultiPathRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *of
* IN: parentTree - The tree to add the dissection to
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins */
-static int parse_ServiceAssociationRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
+static int parse_ServiceAssociationRecord(proto_tree* parentTree, tvbuff_t* tvb, int *offset)
{
- gint local_offset = *offset;
+ int local_offset = *offset;
proto_item *ServiceAssociationRecord_header_item;
proto_tree *ServiceAssociationRecord_header_tree;
@@ -5850,11 +5938,11 @@ static int parse_ServiceAssociationRecord(proto_tree* parentTree, tvbuff_t* tvb,
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins
* pinfo - The packet info structure with column information */
-static int parse_PERF_PortCounters(proto_tree* parentTree, tvbuff_t* tvb, packet_info *pinfo, gint *offset)
+static int parse_PERF_PortCounters(proto_tree* parentTree, tvbuff_t* tvb, packet_info *pinfo, int *offset)
{
proto_item *perf_item;
proto_tree *perf_tree;
- gint local_offset = *offset;
+ int local_offset = *offset;
col_set_str(pinfo->cinfo, COL_INFO, "PERF (PortCounters)");
@@ -5914,11 +6002,11 @@ static int parse_PERF_PortCounters(proto_tree* parentTree, tvbuff_t* tvb, packet
* tvb - The tvbbuff of packet data
* offset - The offset in TVB where the attribute begins
* pinfo - The packet info structure with column information */
-static int parse_PERF_PortCountersExtended(proto_tree* parentTree, tvbuff_t* tvb, packet_info *pinfo, gint *offset)
+static int parse_PERF_PortCountersExtended(proto_tree* parentTree, tvbuff_t* tvb, packet_info *pinfo, int *offset)
{
proto_item *perf_item;
proto_tree *perf_tree;
- gint local_offset = *offset;
+ int local_offset = *offset;
col_set_str(pinfo->cinfo, COL_INFO, "PERF (PortCountersExtended)");
@@ -5964,19 +6052,19 @@ static int parse_PERF_PortCountersExtended(proto_tree* parentTree, tvbuff_t* tvb
* pinfo - The packet info structure with column information
* starts_with - regular IB packet starts with LRH, ROCE starts with GRH and RROCE starts with BTH,
* this tells the parser what headers of (LRH/GRH) to skip. */
-static void dissect_general_info(tvbuff_t *tvb, gint offset, packet_info *pinfo, ib_packet_start_header starts_with)
+static void dissect_general_info(tvbuff_t *tvb, int offset, packet_info *pinfo, ib_packet_start_header starts_with)
{
- guint8 lnh_val = 0; /* The Link Next Header Value. Tells us which headers are coming */
- gboolean bthFollows = FALSE; /* Tracks if we are parsing a BTH. This is a significant decision point */
- guint8 virtualLane = 0; /* The Virtual Lane of the current Packet */
- gint32 nextHeaderSequence = -1; /* defined by this dissector. #define which indicates the upcoming header sequence from OpCode */
- guint8 nxtHdr = 0; /* that must be available for that header. */
- guint8 management_class = 0;
+ uint8_t lnh_val = 0; /* The Link Next Header Value. Tells us which headers are coming */
+ bool bthFollows = false; /* Tracks if we are parsing a BTH. This is a significant decision point */
+ uint8_t virtualLane = 0; /* The Virtual Lane of the current Packet */
+ int32_t nextHeaderSequence = -1; /* defined by this dissector. #define which indicates the upcoming header sequence from OpCode */
+ uint8_t nxtHdr = 0; /* that must be available for that header. */
+ uint8_t management_class = 0;
MAD_Data MadData;
/* BTH - Base Trasport Header */
- struct infinibandinfo info = { NULL, 0, 0, 0, 0, 0, 0, 0, FALSE};
- gint bthSize = 12;
+ struct infinibandinfo info = { NULL, 0, 0, 0, 0, 0, 0, 0, false};
+ int bthSize = 12;
void *src_addr, /* the address to be displayed in the source/destination columns */
*dst_addr; /* (lid/gid number) will be stored here */
@@ -5991,26 +6079,26 @@ static void dissect_general_info(tvbuff_t *tvb, gint offset, packet_info *pinfo,
goto skip_lrh;
}
- virtualLane = tvb_get_guint8(tvb, offset);
+ virtualLane = tvb_get_uint8(tvb, offset);
virtualLane = virtualLane & 0xF0;
offset += 1;
/* Save Link Next Header... This tells us what the next header is. */
- lnh_val = tvb_get_guint8(tvb, offset);
+ lnh_val = tvb_get_uint8(tvb, offset);
lnh_val = lnh_val & 0x03;
offset += 1;
/* Set destination in packet view. */
- dst_addr = wmem_alloc(pinfo->pool, sizeof(guint16));
- *((guint16*) dst_addr) = tvb_get_ntohs(tvb, offset);
- set_address(&pinfo->dst, AT_IB, sizeof(guint16), dst_addr);
+ dst_addr = wmem_alloc(pinfo->pool, sizeof(uint16_t));
+ *((uint16_t*) dst_addr) = tvb_get_ntohs(tvb, offset);
+ set_address(&pinfo->dst, AT_IB, sizeof(uint16_t), dst_addr);
offset += 4;
/* Set Source in packet view. */
- src_addr = wmem_alloc(pinfo->pool, sizeof(guint16));
- *((guint16*) src_addr) = tvb_get_ntohs(tvb, offset);
- set_address(&pinfo->src, AT_IB, sizeof(guint16), src_addr);
+ src_addr = wmem_alloc(pinfo->pool, sizeof(uint16_t));
+ *((uint16_t*) src_addr) = tvb_get_ntohs(tvb, offset);
+ set_address(&pinfo->src, AT_IB, sizeof(uint16_t), src_addr);
offset += 2;
@@ -6020,7 +6108,7 @@ skip_lrh:
{
case IBA_GLOBAL:
offset += 6;
- nxtHdr = tvb_get_guint8(tvb, offset);
+ nxtHdr = tvb_get_uint8(tvb, offset);
offset += 2;
/* Set source GID in packet view. */
@@ -6043,15 +6131,15 @@ skip_lrh:
*/
/* FALL THROUGH */
case IBA_LOCAL:
- bthFollows = TRUE;
+ bthFollows = true;
/* Get the OpCode - this tells us what headers are following */
- info.opCode = tvb_get_guint8(tvb, offset);
+ info.opCode = tvb_get_uint8(tvb, offset);
if ((info.opCode >> 5) == 0x2) {
- info.dctConnect = !(tvb_get_guint8(tvb, offset + 1) & 0x80);
+ info.dctConnect = !(tvb_get_uint8(tvb, offset + 1) & 0x80);
bthSize += 8;
}
- col_append_str(pinfo->cinfo, COL_INFO, val_to_str_const(info.opCode, OpCodeMap, "Unknown OpCode"));
+ col_append_str(pinfo->cinfo, COL_INFO, val_to_str_const((uint32_t)info.opCode, OpCodeMap, "Unknown OpCode "));
offset += bthSize;
break;
case IP_NON_IBA:
@@ -6164,25 +6252,37 @@ skip_lrh:
case DCCETH:
offset += 16; /* DCCETH */
break;
+ case FETH_RETH:
+ offset += 4; /* FETH */
+ offset += 16; /* RETH */
+ break;
+ case RDETH_FETH_RETH:
+ offset += 4; /* RDETH */
+ offset += 4; /* FETH */
+ offset += 16; /* RETH */
+ break;
+ case RDETH_RETH_PAYLD:
+ offset += 4; /* RDETH */
+ offset += 16; /* RETH */
default:
break;
}
}
if (virtualLane == 0xF0)
{
- management_class = tvb_get_guint8(tvb, offset + 1);
- if (((management_class >= (guint8)VENDOR_1_START) && (management_class <= (guint8)VENDOR_1_END))
- || ((management_class >= (guint8)VENDOR_2_START) && (management_class <= (guint8)VENDOR_2_END)))
+ management_class = tvb_get_uint8(tvb, offset + 1);
+ if (((management_class >= (uint8_t)VENDOR_1_START) && (management_class <= (uint8_t)VENDOR_1_END))
+ || ((management_class >= (uint8_t)VENDOR_2_START) && (management_class <= (uint8_t)VENDOR_2_END)))
{
return;
}
- else if ((management_class >= (guint8)APPLICATION_START) && (management_class <= (guint8)APPLICATION_END))
+ else if ((management_class >= (uint8_t)APPLICATION_START) && (management_class <= (uint8_t)APPLICATION_END))
{
return;
}
- else if (((management_class == (guint8)0x00) || (management_class == (guint8)0x02))
- || ((management_class >= (guint8)0x50) && (management_class <= (guint8)0x80))
- || ((management_class >= (guint8)0x82)))
+ else if (((management_class == (uint8_t)0x00) || (management_class == (uint8_t)0x02))
+ || ((management_class >= (uint8_t)0x50) && (management_class <= (uint8_t)0x80))
+ || ((management_class >= (uint8_t)0x82)))
{
return;
}
@@ -6502,6 +6602,24 @@ void proto_register_infiniband(void)
FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
},
+ /* FLUSH Extended Transport Header (FETH) */
+ { &hf_infiniband_FETH, {
+ "FLUSH Extended Transport Header", "infiniband.feth",
+ FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
+ },
+ { &hf_infiniband_reserved27, {
+ "Reserved (27bits)", "infiniband.feth.reserved27",
+ FT_UINT32, BASE_DEC, NULL, 0xFFFFFFE0, NULL, HFILL}
+ },
+ { &hf_infiniband_selectivity_level, {
+ "Selectivity Level", "infiniband.feth.sel",
+ FT_UINT8, BASE_DEC, NULL, 0x18, NULL, HFILL}
+ },
+ { &hf_infiniband_placement_type, {
+ "Placement Type", "infiniband.feth.plt",
+ FT_UINT8, BASE_DEC, NULL, 0x07, NULL, HFILL}
+ },
+
/* Payload */
{ &hf_infiniband_payload, {
"Payload", "infiniband.payload",
@@ -8578,7 +8696,7 @@ void proto_register_infiniband(void)
};
/* Array to hold expansion options between dissections */
- static gint *ett[] = {
+ static int *ett[] = {
/* &ett_infiniband, */
&ett_all_headers,
&ett_lrh,
@@ -8658,7 +8776,7 @@ void proto_register_infiniband(void)
}
};
- static gint *ett_link_array[] = {
+ static int *ett_link_array[] = {
&ett_link
};
@@ -8694,7 +8812,7 @@ void proto_register_infiniband(void)
},
};
- static gint *ett_eoib_array[] = {
+ static int *ett_eoib_array[] = {
&ett_eoib
};
@@ -8705,8 +8823,8 @@ void proto_register_infiniband(void)
proto_register_subtree_array(ett, array_length(ett));
/* register the subdissector tables */
- heur_dissectors_payload = register_heur_dissector_list("infiniband.payload", proto_infiniband);
- heur_dissectors_cm_private = register_heur_dissector_list("infiniband.mad.cm.private", proto_infiniband);
+ heur_dissectors_payload = register_heur_dissector_list_with_description("infiniband.payload", "InfiniBand payload", proto_infiniband);
+ heur_dissectors_cm_private = register_heur_dissector_list_with_description("infiniband.mad.cm.private", "InfiniBand CM private data", proto_infiniband);
/* register dissection preferences */
infiniband_module = prefs_register_protocol(proto_infiniband, proto_reg_handoff_infiniband);
@@ -8744,8 +8862,8 @@ void proto_register_infiniband(void)
/* Reg Handoff. Register dissectors we'll need for IPoIB and RoCE */
void proto_reg_handoff_infiniband(void)
{
- static gboolean initialized = FALSE;
- static guint prev_rroce_udp_port;
+ static bool initialized = false;
+ static unsigned prev_rroce_udp_port;
static dissector_handle_t rroce_handle;
if (!initialized)
@@ -8799,7 +8917,7 @@ void proto_reg_handoff_infiniband(void)
proto_ethertype = proto_get_id_by_filter_name("ethertype");
heur_dissector_add("infiniband.payload", dissect_eth_over_ib, "Ethernet over IB", "eth_over_ib", proto_ethertype, HEURISTIC_ENABLE);
- initialized = TRUE;
+ initialized = true;
}
else
{