2 * Routines for Infiniband/ERF Dissection
3 * Copyright 2008 Endace Technology Limited
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * Modified 2010 by Mellanox Technologies Ltd.
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
33 #include <epan/packet.h>
34 #include <epan/proto.h>
35 #include <epan/emem.h>
36 #include <epan/conversation.h>
37 #include <epan/dissectors/packet-frame.h>
38 #include <epan/prefs.h>
39 #include <epan/etypes.h>
41 #include "packet-infiniband.h"
43 #define PROTO_TAG_INFINIBAND "Infiniband"
46 static int proto_infiniband = -1;
47 static int proto_infiniband_link = -1;
49 /* Variables to hold expansion values between packets */
50 /* static gint ett_infiniband = -1; */
51 static gint ett_all_headers = -1;
52 static gint ett_lrh = -1;
53 static gint ett_grh = -1;
54 static gint ett_bth = -1;
55 static gint ett_rwh = -1;
56 static gint ett_rawdata = -1;
57 static gint ett_rdeth = -1;
58 static gint ett_deth = -1;
59 static gint ett_reth = -1;
60 static gint ett_atomiceth = -1;
61 static gint ett_aeth = -1;
62 static gint ett_atomicacketh = -1;
63 static gint ett_immdt = -1;
64 static gint ett_ieth = -1;
65 static gint ett_payload = -1;
66 static gint ett_vendor = -1;
67 static gint ett_subn_lid_routed = -1;
68 static gint ett_subn_directed_route = -1;
69 static gint ett_subnadmin = -1;
70 static gint ett_mad = -1;
71 static gint ett_cm = -1;
72 static gint ett_rmpp = -1;
73 static gint ett_subm_attribute = -1;
74 static gint ett_suba_attribute = -1;
75 static gint ett_datadetails = -1;
76 static gint ett_noticestraps = -1;
77 /* static gint ett_nodedesc = -1; */
78 /* static gint ett_nodeinfo = -1; */
79 /* static gint ett_switchinfo = -1; */
80 /* static gint ett_guidinfo = -1; */
81 /* static gint ett_portinfo = -1; */
82 static gint ett_portinfo_capmask = -1;
83 static gint ett_pkeytable = -1;
84 static gint ett_sltovlmapping = -1;
85 static gint ett_vlarbitrationtable = -1;
86 static gint ett_linearforwardingtable = -1;
87 static gint ett_randomforwardingtable = -1;
88 static gint ett_multicastforwardingtable = -1;
89 static gint ett_sminfo = -1;
90 static gint ett_vendordiag = -1;
91 static gint ett_ledinfo = -1;
92 static gint ett_linkspeedwidthpairs = -1;
93 static gint ett_informinfo = -1;
94 static gint ett_linkrecord = -1;
95 static gint ett_servicerecord = -1;
96 static gint ett_pathrecord = -1;
97 static gint ett_mcmemberrecord = -1;
98 static gint ett_tracerecord = -1;
99 static gint ett_multipathrecord = -1;
100 static gint ett_serviceassocrecord = -1;
101 static gint ett_perfclass = -1;
102 static gint ett_eoib = -1;
103 static gint ett_link = -1;
105 /* Global ref to highest level tree should we find other protocols encapsulated in IB */
106 static proto_tree *top_tree = NULL;
108 /* Dissector Declarations */
109 static dissector_handle_t ipv6_handle;
110 static dissector_handle_t data_handle;
111 static dissector_handle_t eth_handle;
112 static dissector_table_t ethertype_dissector_table;
115 * Structure to hold information from the common MAD header.
116 * This is necessary because the MAD header contains information which significantly changes the dissection algorithm. */
118 guint8 managementClass;
122 guint16 classSpecific;
123 guint64 transactionID;
125 guint32 attributeModifier;
129 /* Forward-declarations */
131 static void dissect_roce(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
132 static void dissect_infiniband(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
133 static void dissect_infiniband_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean starts_with_grh);
134 static void dissect_infiniband_link(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
135 static gint32 find_next_header_sequence(guint32 OpCode);
136 static gboolean contains(guint32 value, guint32* arr, int length);
137 static void dissect_general_info(tvbuff_t *tvb, gint offset, packet_info *pinfo, gboolean starts_with_grh);
139 /* Parsing Methods for specific IB headers. */
141 static void parse_VENDOR(proto_tree *, tvbuff_t *, gint *);
142 static void parse_PAYLOAD(proto_tree *, packet_info *, tvbuff_t *, gint *, gint length);
143 static void parse_IETH(proto_tree *, tvbuff_t *, gint *);
144 static void parse_IMMDT(proto_tree *, tvbuff_t *, gint *offset);
145 static void parse_ATOMICACKETH(proto_tree *, tvbuff_t *, gint *offset);
146 static void parse_AETH(proto_tree *, tvbuff_t *, gint *offset);
147 static void parse_ATOMICETH(proto_tree *, tvbuff_t *, gint *offset);
148 static void parse_RETH(proto_tree *, tvbuff_t *, gint *offset);
149 static void parse_DETH(proto_tree *, packet_info *, tvbuff_t *, gint *offset);
150 static void parse_RDETH(proto_tree *, tvbuff_t *, gint *offset);
151 static void parse_IPvSix(proto_tree *, tvbuff_t *, gint *offset, packet_info *);
152 static void parse_RWH(proto_tree *, tvbuff_t *, gint *offset, packet_info *);
153 static gboolean parse_EoIB(proto_tree *, tvbuff_t *, gint offset, packet_info *);
155 static void parse_SUBN_LID_ROUTED(proto_tree *, packet_info *, tvbuff_t *, gint *offset);
156 static void parse_SUBN_DIRECTED_ROUTE(proto_tree *, packet_info *, tvbuff_t *, gint *offset);
157 static void parse_SUBNADMN(proto_tree *, packet_info *, tvbuff_t *, gint *offset);
158 static void parse_PERF(proto_tree *, tvbuff_t *, packet_info *, gint *offset);
159 static void parse_BM(proto_tree *, tvbuff_t *, gint *offset);
160 static void parse_DEV_MGT(proto_tree *, tvbuff_t *, gint *offset);
161 static void parse_COM_MGT(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, gint *offset);
162 static void parse_SNMP(proto_tree *, tvbuff_t *, gint *offset);
163 static void parse_VENDOR_MANAGEMENT(proto_tree *, tvbuff_t *, gint *offset);
164 static void parse_APPLICATION_MANAGEMENT(proto_tree *, tvbuff_t *, gint *offset);
165 static void parse_RESERVED_MANAGEMENT(proto_tree *, tvbuff_t *, gint *offset);
167 static gboolean parse_MAD_Common(proto_tree*, tvbuff_t*, gint *offset, MAD_Data*);
168 static gboolean parse_RMPP(proto_tree* , tvbuff_t* , gint *offset);
169 static void label_SUBM_Method(proto_item*, MAD_Data*, packet_info*);
170 static void label_SUBM_Attribute(proto_item*, MAD_Data*, packet_info*);
171 static void label_SUBA_Method(proto_item*, MAD_Data*, packet_info*);
172 static void label_SUBA_Attribute(proto_item*, MAD_Data*, packet_info*);
174 /* Class Attribute Parsing Routines */
175 static gboolean parse_SUBM_Attribute(proto_tree*, tvbuff_t*, gint *offset, MAD_Data*);
176 static gboolean parse_SUBA_Attribute(proto_tree*, tvbuff_t*, gint *offset, MAD_Data*);
178 /* These methods parse individual attributes
179 * Naming convention FunctionHandle = "parse_" + [Attribute Name];
180 * Where [Attribute Name] is the attribute identifier from chapter 14 of the IB Specification
181 * Subnet Management */
182 static void parse_NoticesAndTraps(proto_tree*, tvbuff_t*, gint *offset);
183 static void parse_NodeDescription(proto_tree*, tvbuff_t*, gint *offset);
184 static void parse_NodeInfo(proto_tree*, tvbuff_t*, gint *offset);
185 static void parse_SwitchInfo(proto_tree*, tvbuff_t*, gint *offset);
186 static void parse_GUIDInfo(proto_tree*, tvbuff_t*, gint *offset);
187 static void parse_PortInfo(proto_tree*, tvbuff_t*, gint *offset);
188 static void parse_P_KeyTable(proto_tree*, tvbuff_t*, gint *offset);
189 static void parse_SLtoVLMappingTable(proto_tree*, tvbuff_t*, gint *offset);
190 static void parse_VLArbitrationTable(proto_tree*, tvbuff_t*, gint *offset);
191 static void parse_LinearForwardingTable(proto_tree*, tvbuff_t*, gint *offset);
192 static void parse_RandomForwardingTable(proto_tree*, tvbuff_t*, gint *offset);
193 static void parse_MulticastForwardingTable(proto_tree*, tvbuff_t*, gint *offset);
194 static void parse_SMInfo(proto_tree*, tvbuff_t*, gint *offset);
195 static void parse_VendorDiag(proto_tree*, tvbuff_t*, gint *offset);
196 static void parse_LedInfo(proto_tree*, tvbuff_t*, gint *offset);
197 static void parse_LinkSpeedWidthPairsTable(proto_tree*, tvbuff_t*, gint *offset);
199 /* These methods parse individual attributes for specific MAD management classes.
200 * Naming convention FunctionHandle = "parse_" + [Management Class] + "_" + [Attribute Name];
201 * Where [Management Class] is the shorthand name for the management class as defined
202 * in the MAD Management Classes section below in this file, and [Attribute Name] is the
203 * attribute identifier from the corresponding chapter of the IB Specification */
204 static void parse_PERF_PortCounters(proto_tree* parentTree, tvbuff_t* tvb, packet_info *pinfo, gint *offset);
205 static void parse_PERF_PortCountersExtended(proto_tree* parentTree, tvbuff_t* tvb, packet_info *pinfo, gint *offset);
207 /* Subnet Administration */
208 static void parse_InformInfo(proto_tree*, tvbuff_t*, gint *offset);
209 static void parse_LinkRecord(proto_tree*, tvbuff_t*, gint *offset);
210 static void parse_ServiceRecord(proto_tree*, tvbuff_t*, gint *offset);
211 static void parse_PathRecord(proto_tree*, tvbuff_t*, gint *offset);
212 static void parse_MCMemberRecord(proto_tree*, tvbuff_t*, gint *offset);
213 static void parse_TraceRecord(proto_tree*, tvbuff_t*, gint *offset);
214 static void parse_MultiPathRecord(proto_tree*, tvbuff_t*, gint *offset);
215 static void parse_ServiceAssociationRecord(proto_tree*, tvbuff_t*, gint *offset);
217 /* Subnet Administration */
218 static void parse_RID(proto_tree*, tvbuff_t*, gint *offset, MAD_Data*);
221 static const value_string SUBM_Methods[] = {
224 { 0x81, "SubnGetResp("},
225 { 0x05, "SubnTrap("},
226 { 0x07, "SubnTrapResp("},
230 static const value_string SUBM_Attributes[] = {
231 { 0x0001, "Attribute (ClassPortInfo)"},
232 { 0x0002, "Attribute (Notice)"},
233 { 0x0003, "Attribute (InformInfo)"},
234 { 0x0010, "Attribute (NodeDescription)"},
235 { 0x0011, "Attribute (NodeInfo)"},
236 { 0x0012, "Attribute (SwitchInfo)"},
237 { 0x0014, "Attribute (GUIDInfo)"},
238 { 0x0015, "Attribute (PortInfo)"},
239 { 0x0016, "Attribute (P_KeyTable)"},
240 { 0x0017, "Attribute (SLtoVLMapptingTable)"},
241 { 0x0018, "Attribute (VLArbitrationTable)"},
242 { 0x0019, "Attribute (LinearForwardingTable)"},
243 { 0x001A, "Attribute (RandomForwardingTable)"},
244 { 0x001B, "Attribute (MulticastForwardingTable)"},
245 { 0x001C, "Attribute (LinkSpeedWidthPairsTable)"},
246 { 0x0020, "Attribute (SMInfo)"},
247 { 0x0030, "Attribute (VendorDiag)"},
248 { 0x0031, "Attribute (LedInfo)"},
253 static const value_string SUBA_Methods[] = {
254 { 0x01, "SubnAdmGet("},
255 { 0x81, "SubnAdmGetResp("},
256 { 0x02, "SubnAdmSet("},
257 { 0x06, "SubnAdmReport("},
258 { 0x86, "SubnAdmReportResp("},
259 { 0x12, "SubnAdmGetTable("},
260 { 0x92, "SubnAdmGetTableResp("},
261 { 0x13, "SubnAdmGetTraceTable("},
262 { 0x14, "SubnAdmGetMulti("},
263 { 0x94, "SubnAdmGetMultiResp("},
264 { 0x15, "SubnAdmDelete("},
265 { 0x95, "SubnAdmDeleteResp("},
269 static const value_string SUBA_Attributes[] = {
270 { 0x0001, "Attribute (ClassPortInfo)"},
271 { 0x0002, "Attribute (Notice)"},
272 { 0x0003, "Attribute (InformInfo)"},
273 { 0x0011, "Attribute (NodeRecord)"},
274 { 0x0012, "Attribute (PortInfoRecord)"},
275 { 0x0013, "Attribute (SLtoVLMappingTableRecord)"},
276 { 0x0014, "Attribute (SwitchInfoRecord)"},
277 { 0x0015, "Attribute (LinearForwardingTableRecord)"},
278 { 0x0016, "Attribute (RandomForwardingTableRecord)"},
279 { 0x0017, "Attribute (MulticastForwardingTableRecord)"},
280 { 0x0018, "Attribute (SMInfoRecord)"},
281 { 0x0019, "Attribute (LinkSpeedWidthPairsTableRecord)"},
282 { 0x00F3, "Attribute (InformInfoRecord)"},
283 { 0x0020, "Attribute (LinkRecord)"},
284 { 0x0030, "Attribute (GuidInfoRecord)"},
285 { 0x0031, "Attribute (ServiceRecord)"},
286 { 0x0033, "Attribute (P_KeyTableRecord)"},
287 { 0x0035, "Attribute (PathRecord)"},
288 { 0x0036, "Attribute (VLArbitrationTableRecord)"},
289 { 0x0038, "Attribute (MCMembersRecord)"},
290 { 0x0039, "Attribute (TraceRecord)"},
291 { 0x003A, "Attribute (MultiPathRecord)"},
292 { 0x003B, "Attribute (ServiceAssociationRecord)"},
297 static const value_string CM_Attributes[] = {
298 { 0x0001, "ClassPortInfo"},
299 { 0x0010, "ConnectRequest"},
300 { 0x0011, "MsgRcptAck"},
301 { 0x0012, "ConnectReject"},
302 { 0x0013, "ConnectReply"},
303 { 0x0014, "ReadyToUse"},
304 { 0x0015, "DisconnectRequest"},
305 { 0x0016, "DisconnectReply"},
306 { 0x0017, "ServiceIDResReq"},
307 { 0x0018, "ServiceIDResReqResp"},
308 { 0x0019, "LoadAlternatePath"},
309 { 0x001A, "AlternatePathResponse"},
315 #define RMPP_ILLEGAL 0
321 static const value_string RMPP_Packet_Types[] = {
322 { RMPP_ILLEGAL, " Illegal RMPP Type (0)! " },
323 { RMPP_DATA, "RMPP (DATA)" },
324 { RMPP_ACK, "RMPP (ACK)" },
325 { RMPP_STOP, "RMPP (STOP)" },
326 { RMPP_ABORT, "RMPP (ABORT)" },
330 static const value_string RMPP_Flags[] = {
331 { 3, " (Transmission Sequence - First Packet)"},
332 { 5, " (Transmission Sequence - Last Packet)"},
333 { 1, " (Transmission Sequence) " },
337 static const value_string RMPP_Status[]= {
339 { 1, " (Resources Exhausted)"},
340 { 118, " (Total Time Too Long)"},
341 { 119, " (Inconsistent Last and PayloadLength)"},
342 { 120, " (Inconsistent First and Segment Number)"},
343 { 121, " (Bad RMPPType)"},
344 { 122, " (NewWindowLast Too Small)"},
345 { 123, " (SegmentNumber Too Big)"},
346 { 124, " (Illegal Status)"},
347 { 125, " (Unsupported Version)"},
348 { 126, " (Too Many Retries)"},
349 { 127, " (Unspecified - Unknown Error Code on ABORT)"},
353 static const value_string DiagCode[]= {
354 {0x0000, "Function Ready"},
355 {0x0001, "Performing Self Test"},
356 {0x0002, "Initializing"},
357 {0x0003, "Soft Error - Function has non-fatal error"},
358 {0x0004, "Hard Error - Function has fatal error"},
361 static const value_string LinkWidthEnabled[]= {
362 {0x0000, "No State Change"},
365 {0x0003, "1x or 4x"},
367 {0x0005, "1x or 8x"},
368 {0x0006, "4x or 8x"},
369 {0x0007, "1x or 4x or 8x"},
371 {0x0009, "1x or 12x"},
372 {0x000A, "4x or 12x"},
373 {0x000B, "1x or 4x or 12x"},
374 {0x000C, "8x or 12x"},
375 {0x000D, "1x or 8x or 12x"},
376 {0x000E, "4x or 8x or 12x"},
377 {0x000E, "1x or 4x or 8x or 12x"},
378 {0x00FF, "Set to LinkWidthSupported Value - Response contains actual LinkWidthSupported"},
382 static const value_string LinkWidthSupported[]= {
384 {0x0003, "1x or 4x"},
385 {0x0007, "1x or 4x or 8x"},
386 {0x000B, "1x or 4x or 12x"},
387 {0x000F, "1x or 4x or 8x or 12x"},
390 static const value_string LinkWidthActive[]= {
397 static const value_string LinkSpeedSupported[]= {
398 {0x0001, "2.5 Gbps"},
399 {0x0003, "2.5 or 5.0 Gbps"},
400 {0x0005, "2.5 or 10.0 Gbps"},
401 {0x0007, "2.5 or 5.0 or 10.0 Gbps"},
404 static const value_string PortState[]= {
405 {0x0000, "No State Change"},
406 {0x0001, "Down (includes failed links)"},
407 {0x0002, "Initialized"},
412 static const value_string PortPhysicalState[]= {
413 {0x0000, "No State Change"},
416 {0x0003, "Disabled"},
417 {0x0004, "PortConfigurationTraining"},
419 {0x0006, "LinkErrorRecovery"},
420 {0x0007, "Phy Test"},
423 static const value_string LinkDownDefaultState[]= {
424 {0x0000, "No State Change"},
429 static const value_string LinkSpeedActive[]= {
430 {0x0001, "2.5 Gbps"},
431 {0x0002, "5.0 Gbps"},
432 {0x0004, "10.0 Gbps"},
435 static const value_string LinkSpeedEnabled[]= {
436 {0x0000, "No State Change"},
437 {0x0001, "2.5 Gbps"},
438 {0x0003, "2.5 or 5.0 Gbps"},
439 {0x0005, "2.5 or 10.0 Gbps"},
440 {0x0007, "2.5 or 5.0 or 10.0 Gbps"},
441 {0x000F, "Set to LinkSpeedSupported value - response contains actual LinkSpeedSupported"},
444 static const value_string NeighborMTU[]= {
452 static const value_string VLCap[]= {
454 {0x0002, "VL0, VL1"},
455 {0x0003, "VL0 - VL3"},
456 {0x0004, "VL0 - VL7"},
457 {0x0005, "VL0 - VL14"},
460 static const value_string MTUCap[]= {
468 static const value_string OperationalVLs[]= {
469 {0x0000, "No State Change"},
471 {0x0002, "VL0, VL1"},
472 {0x0003, "VL0 - VL3"},
473 {0x0004, "VL0 - VL7"},
474 {0x0005, "VL0 - VL14"},
478 /* Local Route Header (LRH) */
479 static int hf_infiniband_LRH = -1;
480 static int hf_infiniband_virtual_lane = -1;
481 static int hf_infiniband_link_version = -1;
482 static int hf_infiniband_service_level = -1;
483 static int hf_infiniband_reserved2 = -1;
484 static int hf_infiniband_link_next_header = -1;
485 static int hf_infiniband_destination_local_id = -1;
486 static int hf_infiniband_reserved5 = -1;
487 static int hf_infiniband_packet_length = -1;
488 static int hf_infiniband_source_local_id = -1;
489 /* Global Route Header (GRH) */
490 static int hf_infiniband_GRH = -1;
491 static int hf_infiniband_ip_version = -1;
492 static int hf_infiniband_traffic_class = -1;
493 static int hf_infiniband_flow_label = -1;
494 static int hf_infiniband_payload_length = -1;
495 static int hf_infiniband_next_header = -1;
496 static int hf_infiniband_hop_limit = -1;
497 static int hf_infiniband_source_gid = -1;
498 static int hf_infiniband_destination_gid = -1;
499 /* Base Transport Header (BTH) */
500 static int hf_infiniband_BTH = -1;
501 static int hf_infiniband_opcode = -1;
502 static int hf_infiniband_solicited_event = -1;
503 static int hf_infiniband_migreq = -1;
504 static int hf_infiniband_pad_count = -1;
505 static int hf_infiniband_transport_header_version = -1;
506 static int hf_infiniband_partition_key = -1;
507 static int hf_infiniband_reserved8 = -1;
508 static int hf_infiniband_destination_qp = -1;
509 static int hf_infiniband_acknowledge_request = -1;
510 static int hf_infiniband_reserved7 = -1;
511 static int hf_infiniband_packet_sequence_number = -1;
512 /* Raw Header (RWH) */
513 static int hf_infiniband_RWH = -1;
514 static int hf_infiniband_reserved16_RWH = -1;
515 static int hf_infiniband_etype = -1;
516 /* Reliable Datagram Extended Transport Header (RDETH) */
517 static int hf_infiniband_RDETH = -1;
518 static int hf_infiniband_reserved8_RDETH = -1;
519 static int hf_infiniband_ee_context = -1;
520 /* Datagram Extended Transport Header (DETH) */
521 static int hf_infiniband_DETH = -1;
522 static int hf_infiniband_queue_key = -1;
523 static int hf_infiniband_reserved8_DETH = -1;
524 static int hf_infiniband_source_qp = -1;
525 /* RDMA Extended Transport Header (RETH) */
526 static int hf_infiniband_RETH = -1;
527 static int hf_infiniband_virtual_address = -1;
528 static int hf_infiniband_remote_key = -1;
529 static int hf_infiniband_dma_length = -1;
530 /* Atomic Extended Transport Header (AtomicETH) */
531 static int hf_infiniband_AtomicETH = -1;
532 /* static int hf_infiniband_virtual_address_AtomicETH = -1; */
533 /* static int hf_infiniband_remote_key_AtomicETH = -1; */
534 static int hf_infiniband_swap_or_add_data = -1;
535 static int hf_infiniband_compare_data = -1;
536 /* ACK Extended Transport Header (AETH) */
537 static int hf_infiniband_AETH = -1;
538 static int hf_infiniband_syndrome = -1;
539 static int hf_infiniband_message_sequence_number = -1;
540 /* Atomic ACK Extended Transport Header (AtomicAckETH) */
541 static int hf_infiniband_AtomicAckETH = -1;
542 static int hf_infiniband_original_remote_data = -1;
543 /* Immediate Extended Transport Header (ImmDt) */
544 static int hf_infiniband_IMMDT = -1;
545 /* Invalidate Extended Transport Header (IETH) */
546 static int hf_infiniband_IETH = -1;
548 static int hf_infiniband_payload = -1;
549 static int hf_infiniband_invariant_crc = -1;
550 static int hf_infiniband_variant_crc = -1;
551 /* Unknown or Vendor Specific */
552 static int hf_infiniband_raw_data = -1;
553 static int hf_infiniband_vendor = -1;
555 static int hf_cm_req_local_comm_id = -1;
556 static int hf_cm_req_service_id = -1;
557 static int hf_cm_req_local_ca_guid = -1;
558 static int hf_cm_req_local_qkey = -1;
559 static int hf_cm_req_local_qpn = -1;
560 static int hf_cm_req_respo_res = -1;
561 static int hf_cm_req_local_eecn = -1;
562 static int hf_cm_req_init_depth = -1;
563 static int hf_cm_req_remote_eecn = -1;
564 static int hf_cm_req_remote_cm_resp_to = -1;
565 static int hf_cm_req_transp_serv_type = -1;
566 static int hf_cm_req_e2e_flow_ctrl = -1;
567 static int hf_cm_req_start_psn = -1;
568 static int hf_cm_req_local_cm_resp_to = -1;
569 static int hf_cm_req_retry_count = -1;
570 static int hf_cm_req_pkey = -1;
571 static int hf_cm_req_path_pp_mtu = -1;
572 static int hf_cm_req_rdc_exists = -1;
573 static int hf_cm_req_rnr_retry_count = -1;
574 static int hf_cm_req_max_cm_retries = -1;
575 static int hf_cm_req_srq = -1;
576 static int hf_cm_req_primary_local_lid = -1;
577 static int hf_cm_req_primary_remote_lid = -1;
578 static int hf_cm_req_primary_local_gid = -1;
579 static int hf_cm_req_primary_remote_gid = -1;
580 static int hf_cm_req_primary_flow_label = -1;
581 static int hf_cm_req_primary_packet_rate = -1;
582 static int hf_cm_req_primary_traffic_class = -1;
583 static int hf_cm_req_primary_hop_limit = -1;
584 static int hf_cm_req_primary_sl = -1;
585 static int hf_cm_req_primary_subnet_local = -1;
586 static int hf_cm_req_primary_local_ack_to = -1;
587 static int hf_cm_req_alt_local_lid = -1;
588 static int hf_cm_req_alt_remote_lid = -1;
589 static int hf_cm_req_alt_local_gid = -1;
590 static int hf_cm_req_alt_remote_gid = -1;
591 static int hf_cm_req_flow_label = -1;
592 static int hf_cm_req_packet_rate = -1;
593 static int hf_cm_req_alt_traffic_class = -1;
594 static int hf_cm_req_alt_hop_limit = -1;
595 static int hf_cm_req_SL = -1;
596 static int hf_cm_req_subnet_local = -1;
597 static int hf_cm_req_local_ACK_timeout = -1;
598 static int hf_cm_req_private_data = -1;
600 static int hf_cm_rep_localcommid = -1;
601 static int hf_cm_rep_remotecommid = -1;
602 static int hf_cm_rep_localqkey = -1;
603 static int hf_cm_rep_localqpn = -1;
604 static int hf_cm_rep_localeecontnum = -1;
605 static int hf_cm_rep_startingpsn = -1;
606 static int hf_cm_rep_responderres = -1;
607 static int hf_cm_rep_initiatordepth = -1;
608 static int hf_cm_rep_tgtackdelay = -1;
609 static int hf_cm_rep_failoveracc = -1;
610 static int hf_cm_rep_e2eflowctl = -1;
611 static int hf_cm_rep_rnrretrycount = -1;
612 static int hf_cm_rep_srq = -1;
613 static int hf_cm_rep_localcaguid = -1;
614 static int hf_cm_rep_privatedata = -1;
616 static int hf_cm_rtu_localcommid = -1;
617 static int hf_cm_rtu_remotecommid = -1;
618 static int hf_cm_rtu_privatedata = -1;
620 static int hf_cm_rej_local_commid = -1;
621 static int hf_cm_rej_remote_commid = -1;
622 static int hf_cm_rej_msg_rej = -1;
623 static int hf_cm_rej_rej_info_len = -1;
624 static int hf_cm_rej_reason = -1;
625 static int hf_cm_rej_add_rej_info = -1;
626 static int hf_cm_rej_private_data = -1;
627 /* MAD Base Header */
628 static int hf_infiniband_MAD = -1;
629 static int hf_infiniband_base_version = -1;
630 static int hf_infiniband_mgmt_class = -1;
631 static int hf_infiniband_class_version = -1;
632 /* static int hf_infiniband_reserved1 = -1; */
633 static int hf_infiniband_method = -1;
634 static int hf_infiniband_status = -1;
635 static int hf_infiniband_class_specific = -1;
636 static int hf_infiniband_transaction_id = -1;
637 static int hf_infiniband_attribute_id = -1;
638 static int hf_infiniband_reserved16 = -1;
639 static int hf_infiniband_attribute_modifier = -1;
640 static int hf_infiniband_data = -1;
642 static int hf_infiniband_RMPP = -1;
643 static int hf_infiniband_rmpp_version = -1;
644 static int hf_infiniband_rmpp_type = -1;
645 static int hf_infiniband_r_resp_time = -1;
646 static int hf_infiniband_rmpp_flags = -1;
647 static int hf_infiniband_rmpp_status = -1;
648 static int hf_infiniband_rmpp_data1 = -1;
649 static int hf_infiniband_rmpp_data2 = -1;
651 /* static int hf_infiniband_RMPP_DATA = -1; */
652 static int hf_infiniband_segment_number = -1;
653 static int hf_infiniband_payload_length32 = -1;
654 static int hf_infiniband_transferred_data = -1;
656 static int hf_infiniband_new_window_last = -1;
657 static int hf_infiniband_reserved220 = -1;
658 /* RMPP ABORT and STOP */
659 static int hf_infiniband_reserved32 = -1;
660 static int hf_infiniband_optional_extended_error_data = -1;
661 /* SMP Data LID Routed */
662 static int hf_infiniband_SMP_LID = -1;
663 static int hf_infiniband_m_key = -1;
664 static int hf_infiniband_smp_data = -1;
665 static int hf_infiniband_reserved1024 = -1;
666 static int hf_infiniband_reserved256 = -1;
667 /* SMP Data Directed Route */
668 static int hf_infiniband_SMP_DIRECTED = -1;
669 static int hf_infiniband_smp_status = -1;
670 static int hf_infiniband_hop_pointer = -1;
671 static int hf_infiniband_hop_count = -1;
672 static int hf_infiniband_dr_slid = -1;
673 static int hf_infiniband_dr_dlid = -1;
674 static int hf_infiniband_reserved28 = -1;
675 static int hf_infiniband_d = -1;
676 static int hf_infiniband_initial_path = -1;
677 static int hf_infiniband_return_path = -1;
679 static int hf_infiniband_SA = -1;
680 static int hf_infiniband_sm_key = -1;
681 static int hf_infiniband_attribute_offset = -1;
682 static int hf_infiniband_component_mask = -1;
683 static int hf_infiniband_subnet_admin_data = -1;
684 /* Mellanox EoIB encapsulation header */
685 static int hf_infiniband_EOIB = -1;
686 static int hf_infiniband_ver = -1;
687 static int hf_infiniband_tcp_chk = -1;
688 static int hf_infiniband_ip_chk = -1;
689 static int hf_infiniband_fcs = -1;
690 static int hf_infiniband_ms = -1;
691 static int hf_infiniband_seg_off = -1;
692 static int hf_infiniband_seg_id = -1;
695 * Additional Structures for individuala attribute decoding.
696 * Since they are not headers the naming convention is slightly modified
697 * Convention: hf_infiniband_[attribute name]_[field]
698 * This was not entirely necessary but I felt the previous convention
699 * did not provide adequate readability for the granularity of attribute/attribute fields. */
701 /* NodeDescription */
702 static int hf_infiniband_NodeDescription_NodeString = -1;
704 static int hf_infiniband_NodeInfo_BaseVersion = -1;
705 static int hf_infiniband_NodeInfo_ClassVersion = -1;
706 static int hf_infiniband_NodeInfo_NodeType = -1;
707 static int hf_infiniband_NodeInfo_NumPorts = -1;
708 static int hf_infiniband_NodeInfo_SystemImageGUID = -1;
709 static int hf_infiniband_NodeInfo_NodeGUID = -1;
710 static int hf_infiniband_NodeInfo_PortGUID = -1;
711 static int hf_infiniband_NodeInfo_PartitionCap = -1;
712 static int hf_infiniband_NodeInfo_DeviceID = -1;
713 static int hf_infiniband_NodeInfo_Revision = -1;
714 static int hf_infiniband_NodeInfo_LocalPortNum = -1;
715 static int hf_infiniband_NodeInfo_VendorID = -1;
717 static int hf_infiniband_SwitchInfo_LinearFDBCap = -1;
718 static int hf_infiniband_SwitchInfo_RandomFDBCap = -1;
719 static int hf_infiniband_SwitchInfo_MulticastFDBCap = -1;
720 static int hf_infiniband_SwitchInfo_LinearFDBTop = -1;
721 static int hf_infiniband_SwitchInfo_DefaultPort = -1;
722 static int hf_infiniband_SwitchInfo_DefaultMulticastPrimaryPort = -1;
723 static int hf_infiniband_SwitchInfo_DefaultMulticastNotPrimaryPort = -1;
724 static int hf_infiniband_SwitchInfo_LifeTimeValue = -1;
725 static int hf_infiniband_SwitchInfo_PortStateChange = -1;
726 static int hf_infiniband_SwitchInfo_OptimizedSLtoVLMappingProgramming = -1;
727 static int hf_infiniband_SwitchInfo_LIDsPerPort = -1;
728 static int hf_infiniband_SwitchInfo_PartitionEnforcementCap = -1;
729 static int hf_infiniband_SwitchInfo_InboundEnforcementCap = -1;
730 static int hf_infiniband_SwitchInfo_OutboundEnforcementCap = -1;
731 static int hf_infiniband_SwitchInfo_FilterRawInboundCap = -1;
732 static int hf_infiniband_SwitchInfo_FilterRawOutboundCap = -1;
733 static int hf_infiniband_SwitchInfo_EnhancedPortZero = -1;
735 /* static int hf_infiniband_GUIDInfo_GUIDBlock = -1; */
736 static int hf_infiniband_GUIDInfo_GUID = -1;
738 static int hf_infiniband_PortInfo_GidPrefix = -1;
739 static int hf_infiniband_PortInfo_LID = -1;
740 static int hf_infiniband_PortInfo_MasterSMLID = -1;
741 static int hf_infiniband_PortInfo_CapabilityMask = -1;
743 /* Capability Mask Flags */
744 static int hf_infiniband_PortInfo_CapabilityMask_SM = -1;
745 static int hf_infiniband_PortInfo_CapabilityMask_NoticeSupported = -1;
746 static int hf_infiniband_PortInfo_CapabilityMask_TrapSupported = -1;
747 static int hf_infiniband_PortInfo_CapabilityMask_OptionalPDSupported = -1;
748 static int hf_infiniband_PortInfo_CapabilityMask_AutomaticMigrationSupported = -1;
749 static int hf_infiniband_PortInfo_CapabilityMask_SLMappingSupported = -1;
750 static int hf_infiniband_PortInfo_CapabilityMask_MKeyNVRAM = -1;
751 static int hf_infiniband_PortInfo_CapabilityMask_PKeyNVRAM = -1;
752 static int hf_infiniband_PortInfo_CapabilityMask_LEDInfoSupported = -1;
753 static int hf_infiniband_PortInfo_CapabilityMask_SMdisabled = -1;
754 static int hf_infiniband_PortInfo_CapabilityMask_SystemImageGUIDSupported = -1;
755 static int hf_infiniband_PortInfo_CapabilityMask_PKeySwitchExternalPortTrapSupported = -1;
756 static int hf_infiniband_PortInfo_CapabilityMask_CommunicationsManagementSupported = -1;
757 static int hf_infiniband_PortInfo_CapabilityMask_SNMPTunnelingSupported = -1;
758 static int hf_infiniband_PortInfo_CapabilityMask_ReinitSupported = -1;
759 static int hf_infiniband_PortInfo_CapabilityMask_DeviceManagementSupported = -1;
760 static int hf_infiniband_PortInfo_CapabilityMask_VendorClassSupported = -1;
761 static int hf_infiniband_PortInfo_CapabilityMask_DRNoticeSupported = -1;
762 static int hf_infiniband_PortInfo_CapabilityMask_CapabilityMaskNoticeSupported = -1;
763 static int hf_infiniband_PortInfo_CapabilityMask_BootManagementSupported = -1;
764 static int hf_infiniband_PortInfo_CapabilityMask_LinkRoundTripLatencySupported = -1;
765 static int hf_infiniband_PortInfo_CapabilityMask_ClientRegistrationSupported = -1;
766 static int hf_infiniband_PortInfo_CapabilityMask_OtherLocalChangesNoticeSupported = -1;
767 static int hf_infiniband_PortInfo_CapabilityMask_LinkSpeedWIdthPairsTableSupported = -1;
768 /* End Capability Mask Flags */
771 static int hf_infiniband_PortInfo_DiagCode = -1;
772 static int hf_infiniband_PortInfo_M_KeyLeasePeriod = -1;
773 static int hf_infiniband_PortInfo_LocalPortNum = -1;
774 static int hf_infiniband_PortInfo_LinkWidthEnabled = -1;
775 static int hf_infiniband_PortInfo_LinkWidthSupported = -1;
776 static int hf_infiniband_PortInfo_LinkWidthActive = -1;
777 static int hf_infiniband_PortInfo_LinkSpeedSupported = -1;
778 static int hf_infiniband_PortInfo_PortState = -1;
779 static int hf_infiniband_PortInfo_PortPhysicalState = -1;
780 static int hf_infiniband_PortInfo_LinkDownDefaultState = -1;
781 static int hf_infiniband_PortInfo_M_KeyProtectBits = -1;
782 static int hf_infiniband_PortInfo_LMC = -1;
783 static int hf_infiniband_PortInfo_LinkSpeedActive = -1;
784 static int hf_infiniband_PortInfo_LinkSpeedEnabled = -1;
785 static int hf_infiniband_PortInfo_NeighborMTU = -1;
786 static int hf_infiniband_PortInfo_MasterSMSL = -1;
787 static int hf_infiniband_PortInfo_VLCap = -1;
788 static int hf_infiniband_PortInfo_M_Key = -1;
789 static int hf_infiniband_PortInfo_InitType = -1;
790 static int hf_infiniband_PortInfo_VLHighLimit = -1;
791 static int hf_infiniband_PortInfo_VLArbitrationHighCap = -1;
792 static int hf_infiniband_PortInfo_VLArbitrationLowCap = -1;
793 static int hf_infiniband_PortInfo_InitTypeReply = -1;
794 static int hf_infiniband_PortInfo_MTUCap = -1;
795 static int hf_infiniband_PortInfo_VLStallCount = -1;
796 static int hf_infiniband_PortInfo_HOQLife = -1;
797 static int hf_infiniband_PortInfo_OperationalVLs = -1;
798 static int hf_infiniband_PortInfo_PartitionEnforcementInbound = -1;
799 static int hf_infiniband_PortInfo_PartitionEnforcementOutbound = -1;
800 static int hf_infiniband_PortInfo_FilterRawInbound = -1;
801 static int hf_infiniband_PortInfo_FilterRawOutbound = -1;
802 static int hf_infiniband_PortInfo_M_KeyViolations = -1;
803 static int hf_infiniband_PortInfo_P_KeyViolations = -1;
804 static int hf_infiniband_PortInfo_Q_KeyViolations = -1;
805 static int hf_infiniband_PortInfo_GUIDCap = -1;
806 static int hf_infiniband_PortInfo_ClientReregister = -1;
807 static int hf_infiniband_PortInfo_SubnetTimeOut = -1;
808 static int hf_infiniband_PortInfo_RespTimeValue = -1;
809 static int hf_infiniband_PortInfo_LocalPhyErrors = -1;
810 static int hf_infiniband_PortInfo_OverrunErrors = -1;
811 static int hf_infiniband_PortInfo_MaxCreditHint = -1;
812 static int hf_infiniband_PortInfo_LinkRoundTripLatency = -1;
815 static int hf_infiniband_P_KeyTable_P_KeyTableBlock = -1;
816 static int hf_infiniband_P_KeyTable_MembershipType = -1;
817 static int hf_infiniband_P_KeyTable_P_KeyBase = -1;
819 /* SLtoVLMappingTable */
820 static int hf_infiniband_SLtoVLMappingTable_SLtoVL_HighBits = -1;
821 static int hf_infiniband_SLtoVLMappingTable_SLtoVL_LowBits = -1;
823 /* VLArbitrationTable */
824 /* static int hf_infiniband_VLArbitrationTable_VLWeightPairs = -1; */
825 static int hf_infiniband_VLArbitrationTable_VL = -1;
826 static int hf_infiniband_VLArbitrationTable_Weight = -1;
828 /* LinearForwardingTable */
829 /* static int hf_infiniband_LinearForwardingTable_LinearForwardingTableBlock = -1; */
830 static int hf_infiniband_LinearForwardingTable_Port = -1;
832 /* RandomForwardingTable */
833 /* static int hf_infiniband_RandomForwardingTable_RandomForwardingTableBlock = -1; */
834 static int hf_infiniband_RandomForwardingTable_LID = -1;
835 static int hf_infiniband_RandomForwardingTable_Valid = -1;
836 static int hf_infiniband_RandomForwardingTable_LMC = -1;
837 static int hf_infiniband_RandomForwardingTable_Port = -1;
839 /* MulticastForwardingTable */
840 /* static int hf_infiniband_MulticastForwardingTable_MulticastForwardingTableBlock = -1; */
841 static int hf_infiniband_MulticastForwardingTable_PortMask = -1;
844 static int hf_infiniband_SMInfo_GUID = -1;
845 static int hf_infiniband_SMInfo_SM_Key = -1;
846 static int hf_infiniband_SMInfo_ActCount = -1;
847 static int hf_infiniband_SMInfo_Priority = -1;
848 static int hf_infiniband_SMInfo_SMState = -1;
851 static int hf_infiniband_VendorDiag_NextIndex = -1;
852 static int hf_infiniband_VendorDiag_DiagData = -1;
855 static int hf_infiniband_LedInfo_LedMask = -1;
857 /* LinkSpeedWidthPairsTable */
858 static int hf_infiniband_LinkSpeedWidthPairsTable_NumTables = -1;
859 static int hf_infiniband_LinkSpeedWidthPairsTable_PortMask = -1;
860 static int hf_infiniband_LinkSpeedWidthPairsTable_SpeedTwoFive = -1;
861 static int hf_infiniband_LinkSpeedWidthPairsTable_SpeedFive = -1;
862 static int hf_infiniband_LinkSpeedWidthPairsTable_SpeedTen = -1;
864 /* Attributes for Subnet Administration.
865 * Mostly we have "Records" here which are just structures of SM attributes.
866 * There are some unique attributes though that we will want to have a structure for. */
870 /* SLtoVLMappingTableRecord */
871 /* SwitchInfoRecord */
872 /* LinearForwardingTableRecord */
873 /* RandomForwardingTableRecord */
874 /* MulticastForwardingTableRecord */
875 /* VLArbitrationTableRecord */
877 static int hf_infiniband_SA_LID = -1;
878 static int hf_infiniband_SA_EndportLID = -1;
879 static int hf_infiniband_SA_PortNum = -1;
880 static int hf_infiniband_SA_InputPortNum = -1;
881 static int hf_infiniband_SA_OutputPortNum = -1;
882 static int hf_infiniband_SA_BlockNum_EightBit = -1;
883 static int hf_infiniband_SA_BlockNum_NineBit = -1;
884 static int hf_infiniband_SA_BlockNum_SixteenBit = -1;
885 static int hf_infiniband_SA_Position = -1;
886 /* static int hf_infiniband_SA_Index = -1; */
888 /* InformInfoRecord */
889 static int hf_infiniband_InformInfoRecord_SubscriberGID = -1;
890 static int hf_infiniband_InformInfoRecord_Enum = -1;
893 static int hf_infiniband_InformInfo_GID = -1;
894 static int hf_infiniband_InformInfo_LIDRangeBegin = -1;
895 static int hf_infiniband_InformInfo_LIDRangeEnd = -1;
896 static int hf_infiniband_InformInfo_IsGeneric = -1;
897 static int hf_infiniband_InformInfo_Subscribe = -1;
898 static int hf_infiniband_InformInfo_Type = -1;
899 static int hf_infiniband_InformInfo_TrapNumberDeviceID = -1;
900 static int hf_infiniband_InformInfo_QPN = -1;
901 static int hf_infiniband_InformInfo_RespTimeValue = -1;
902 static int hf_infiniband_InformInfo_ProducerTypeVendorID = -1;
905 static int hf_infiniband_LinkRecord_FromLID = -1;
906 static int hf_infiniband_LinkRecord_FromPort = -1;
907 static int hf_infiniband_LinkRecord_ToPort = -1;
908 static int hf_infiniband_LinkRecord_ToLID = -1;
911 static int hf_infiniband_ServiceRecord_ServiceID = -1;
912 static int hf_infiniband_ServiceRecord_ServiceGID = -1;
913 static int hf_infiniband_ServiceRecord_ServiceP_Key = -1;
914 static int hf_infiniband_ServiceRecord_ServiceLease = -1;
915 static int hf_infiniband_ServiceRecord_ServiceKey = -1;
916 static int hf_infiniband_ServiceRecord_ServiceName = -1;
917 static int hf_infiniband_ServiceRecord_ServiceData = -1;
919 /* ServiceAssociationRecord */
920 static int hf_infiniband_ServiceAssociationRecord_ServiceKey = -1;
921 static int hf_infiniband_ServiceAssociationRecord_ServiceName = -1;
924 static int hf_infiniband_PathRecord_DGID = -1;
925 static int hf_infiniband_PathRecord_SGID = -1;
926 static int hf_infiniband_PathRecord_DLID = -1;
927 static int hf_infiniband_PathRecord_SLID = -1;
928 static int hf_infiniband_PathRecord_RawTraffic = -1;
929 static int hf_infiniband_PathRecord_FlowLabel = -1;
930 static int hf_infiniband_PathRecord_HopLimit = -1;
931 static int hf_infiniband_PathRecord_TClass = -1;
932 static int hf_infiniband_PathRecord_Reversible = -1;
933 static int hf_infiniband_PathRecord_NumbPath = -1;
934 static int hf_infiniband_PathRecord_P_Key = -1;
935 static int hf_infiniband_PathRecord_SL = -1;
936 static int hf_infiniband_PathRecord_MTUSelector = -1;
937 static int hf_infiniband_PathRecord_MTU = -1;
938 static int hf_infiniband_PathRecord_RateSelector = -1;
939 static int hf_infiniband_PathRecord_Rate = -1;
940 static int hf_infiniband_PathRecord_PacketLifeTimeSelector = -1;
941 static int hf_infiniband_PathRecord_PacketLifeTime = -1;
942 static int hf_infiniband_PathRecord_Preference = -1;
945 static int hf_infiniband_MCMemberRecord_MGID = -1;
946 static int hf_infiniband_MCMemberRecord_PortGID = -1;
947 static int hf_infiniband_MCMemberRecord_Q_Key = -1;
948 static int hf_infiniband_MCMemberRecord_MLID = -1;
949 static int hf_infiniband_MCMemberRecord_MTUSelector = -1;
950 static int hf_infiniband_MCMemberRecord_MTU = -1;
951 static int hf_infiniband_MCMemberRecord_TClass = -1;
952 static int hf_infiniband_MCMemberRecord_P_Key = -1;
953 static int hf_infiniband_MCMemberRecord_RateSelector = -1;
954 static int hf_infiniband_MCMemberRecord_Rate = -1;
955 static int hf_infiniband_MCMemberRecord_PacketLifeTimeSelector = -1;
956 static int hf_infiniband_MCMemberRecord_PacketLifeTime = -1;
957 static int hf_infiniband_MCMemberRecord_SL = -1;
958 static int hf_infiniband_MCMemberRecord_FlowLabel = -1;
959 static int hf_infiniband_MCMemberRecord_HopLimit = -1;
960 static int hf_infiniband_MCMemberRecord_Scope = -1;
961 static int hf_infiniband_MCMemberRecord_JoinState = -1;
962 static int hf_infiniband_MCMemberRecord_ProxyJoin = -1;
965 static int hf_infiniband_TraceRecord_GIDPrefix = -1;
966 static int hf_infiniband_TraceRecord_IDGeneration = -1;
967 static int hf_infiniband_TraceRecord_NodeType = -1;
968 static int hf_infiniband_TraceRecord_NodeID = -1;
969 static int hf_infiniband_TraceRecord_ChassisID = -1;
970 static int hf_infiniband_TraceRecord_EntryPortID = -1;
971 static int hf_infiniband_TraceRecord_ExitPortID = -1;
972 static int hf_infiniband_TraceRecord_EntryPort = -1;
973 static int hf_infiniband_TraceRecord_ExitPort = -1;
975 /* MultiPathRecord */
976 static int hf_infiniband_MultiPathRecord_RawTraffic = -1;
977 static int hf_infiniband_MultiPathRecord_FlowLabel = -1;
978 static int hf_infiniband_MultiPathRecord_HopLimit = -1;
979 static int hf_infiniband_MultiPathRecord_TClass = -1;
980 static int hf_infiniband_MultiPathRecord_Reversible = -1;
981 static int hf_infiniband_MultiPathRecord_NumbPath = -1;
982 static int hf_infiniband_MultiPathRecord_P_Key = -1;
983 static int hf_infiniband_MultiPathRecord_SL = -1;
984 static int hf_infiniband_MultiPathRecord_MTUSelector = -1;
985 static int hf_infiniband_MultiPathRecord_MTU = -1;
986 static int hf_infiniband_MultiPathRecord_RateSelector = -1;
987 static int hf_infiniband_MultiPathRecord_Rate = -1;
988 static int hf_infiniband_MultiPathRecord_PacketLifeTimeSelector = -1;
989 static int hf_infiniband_MultiPathRecord_PacketLifeTime = -1;
990 static int hf_infiniband_MultiPathRecord_IndependenceSelector = -1;
991 static int hf_infiniband_MultiPathRecord_GIDScope = -1;
992 static int hf_infiniband_MultiPathRecord_SGIDCount = -1;
993 static int hf_infiniband_MultiPathRecord_DGIDCount = -1;
994 static int hf_infiniband_MultiPathRecord_SDGID = -1;
997 static int hf_infiniband_Notice_IsGeneric = -1;
998 static int hf_infiniband_Notice_Type = -1;
999 static int hf_infiniband_Notice_ProducerTypeVendorID = -1;
1000 static int hf_infiniband_Notice_TrapNumberDeviceID = -1;
1001 static int hf_infiniband_Notice_IssuerLID = -1;
1002 static int hf_infiniband_Notice_NoticeToggle = -1;
1003 static int hf_infiniband_Notice_NoticeCount = -1;
1004 static int hf_infiniband_Notice_DataDetails = -1;
1005 /* static int hf_infiniband_Notice_IssuerGID = -1; */
1006 /* static int hf_infiniband_Notice_ClassTrapSpecificData = -1; */
1008 /* PortCounters attribute in Performance class */
1009 static int hf_infiniband_PortCounters = -1;
1010 static int hf_infiniband_PortCounters_PortSelect = -1;
1011 static int hf_infiniband_PortCounters_CounterSelect = -1;
1012 static int hf_infiniband_PortCounters_SymbolErrorCounter = -1;
1013 static int hf_infiniband_PortCounters_LinkErrorRecoveryCounter = -1;
1014 static int hf_infiniband_PortCounters_LinkDownedCounter = -1;
1015 static int hf_infiniband_PortCounters_PortRcvErrors = -1;
1016 static int hf_infiniband_PortCounters_PortRcvRemotePhysicalErrors = -1;
1017 static int hf_infiniband_PortCounters_PortRcvSwitchRelayErrors = -1;
1018 static int hf_infiniband_PortCounters_PortXmitDiscards = -1;
1019 static int hf_infiniband_PortCounters_PortXmitConstraintErrors = -1;
1020 static int hf_infiniband_PortCounters_PortRcvConstraintErrors = -1;
1021 static int hf_infiniband_PortCounters_LocalLinkIntegrityErrors = -1;
1022 static int hf_infiniband_PortCounters_ExcessiveBufferOverrunErrors = -1;
1023 static int hf_infiniband_PortCounters_VL15Dropped = -1;
1024 static int hf_infiniband_PortCounters_PortXmitData = -1;
1025 static int hf_infiniband_PortCounters_PortRcvData = -1;
1026 static int hf_infiniband_PortCounters_PortXmitPkts = -1;
1027 static int hf_infiniband_PortCounters_PortRcvPkts = -1;
1029 /* Extended PortCounters attribute in Performance class */
1030 static int hf_infiniband_PortCountersExt = -1;
1031 static int hf_infiniband_PortCountersExt_PortSelect = -1;
1032 static int hf_infiniband_PortCountersExt_CounterSelect = -1;
1033 static int hf_infiniband_PortCountersExt_PortXmitData = -1;
1034 static int hf_infiniband_PortCountersExt_PortRcvData = -1;
1035 static int hf_infiniband_PortCountersExt_PortXmitPkts = -1;
1036 static int hf_infiniband_PortCountersExt_PortRcvPkts = -1;
1037 static int hf_infiniband_PortCountersExt_PortUnicastXmitPkts = -1;
1038 static int hf_infiniband_PortCountersExt_PortUnicastRcvPkts = -1;
1039 static int hf_infiniband_PortCountersExt_PortMulticastXmitPkts = -1;
1040 static int hf_infiniband_PortCountersExt_PortMulticastRcvPkts = -1;
1042 /* Notice DataDetails and ClassTrapSpecific Data for certain traps
1043 * Note that traps reuse many fields, so they are only declared once under the first trap that they appear.
1044 * There is no need to redeclare them for specific Traps (as with other SA Attributes) because they are uniform between Traps. */
1046 /* Parse DataDetails for a given Trap */
1047 static void parse_NoticeDataDetails(proto_tree*, tvbuff_t*, gint *offset, guint16 trapNumber);
1049 /* Traps 64,65,66,67 */
1050 static int hf_infiniband_Trap_GIDADDR = -1;
1054 static int hf_infiniband_Trap_COMP_MASK = -1;
1055 static int hf_infiniband_Trap_WAIT_FOR_REPATH = -1;
1056 /* ClassTrapSpecificData */
1057 /* static int hf_infiniband_Trap_PATH_REC = -1; */
1060 static int hf_infiniband_Trap_LIDADDR = -1;
1062 /* Trap 129, 130, 131 */
1063 static int hf_infiniband_Trap_PORTNO = -1;
1066 static int hf_infiniband_Trap_OtherLocalChanges = -1;
1067 static int hf_infiniband_Trap_CAPABILITYMASK = -1;
1068 static int hf_infiniband_Trap_LinkSpeecEnabledChange = -1;
1069 static int hf_infiniband_Trap_LinkWidthEnabledChange = -1;
1070 static int hf_infiniband_Trap_NodeDescriptionChange = -1;
1073 static int hf_infiniband_Trap_SYSTEMIMAGEGUID = -1;
1076 static int hf_infiniband_Trap_DRSLID = -1;
1077 static int hf_infiniband_Trap_METHOD = -1;
1078 static int hf_infiniband_Trap_ATTRIBUTEID = -1;
1079 static int hf_infiniband_Trap_ATTRIBUTEMODIFIER = -1;
1080 static int hf_infiniband_Trap_MKEY = -1;
1081 static int hf_infiniband_Trap_DRNotice = -1;
1082 static int hf_infiniband_Trap_DRPathTruncated = -1;
1083 static int hf_infiniband_Trap_DRHopCount = -1;
1084 static int hf_infiniband_Trap_DRNoticeReturnPath = -1;
1087 static int hf_infiniband_Trap_LIDADDR1 = -1;
1088 static int hf_infiniband_Trap_LIDADDR2 = -1;
1089 static int hf_infiniband_Trap_KEY = -1;
1090 static int hf_infiniband_Trap_SL = -1;
1091 static int hf_infiniband_Trap_QP1 = -1;
1092 static int hf_infiniband_Trap_QP2 = -1;
1093 static int hf_infiniband_Trap_GIDADDR1 = -1;
1094 static int hf_infiniband_Trap_GIDADDR2 = -1;
1097 static int hf_infiniband_Trap_DataValid = -1;
1098 static int hf_infiniband_Trap_PKEY = -1;
1099 static int hf_infiniband_Trap_SWLIDADDR = -1;
1101 /* Infiniband Link */
1102 static int hf_infiniband_link_op = -1;
1103 static int hf_infiniband_link_fctbs = -1;
1104 static int hf_infiniband_link_vl = -1;
1105 static int hf_infiniband_link_fccl = -1;
1106 static int hf_infiniband_link_lpcrc = -1;
1108 /* Trap Type/Descriptions for dissection */
1109 static const value_string Operand_Description[]= {
1110 { 0, " Normal Flow Control"},
1111 { 1, " Flow Control Init"},
1115 /* Trap Type/Descriptions for dissection */
1116 static const value_string Trap_Description[]= {
1117 { 64, " (Informational) <GIDADDR> is now in service"},
1118 { 65, " (Informational) <GIDADDR> is out of service"},
1119 { 66, " (Informational) New Multicast Group with multicast address <GIDADDR> is now created"},
1120 { 67, " (Informational) Multicast Group with multicast address <GIDADDR> is now deleted"},
1121 { 68, " (Informational) Paths indicated by <PATH_REC> and <COMP_MASK> are no longer valid"},
1122 { 69, " (Informational) Paths indicated by <PATH_REC> and <COMP_MASK> have been recomputed"},
1123 { 128, " (Urgent) Link State of at least one port of switch at <LIDADDR> has changed"},
1124 { 129, " (Urgent) Local Link Integrity threshold reached at <LIDADDR><PORTNO>"},
1125 { 130, " (Urgent) Excessive Buffer OVerrun threshold reached at <LIDADDR><PORTNO>"},
1126 { 131, " (Urgent) Flow Control Update watchdog timer expired at <LIDADDR><PORTNO>"},
1127 { 144, " (Informational) CapMask, NodeDesc, LinkWidthEnabled or LinkSpeedEnabled at <LIDADDR> has been modified"},
1128 { 145, " (Informational) SystemImageGUID at <LIDADDR> has been modified. New value is <SYSTEMIMAGEGUID>"},
1129 { 256, " (Security) Bad M_Key, <M_KEY> from <LIDADDR> attempted <METHOD> with <ATTRIBUTEID> and <ATTRIBUTEMODIFIER>"},
1130 { 257, " (Security) Bad P_Key, <KEY> from <LIDADDR1><GIDADDR1><QP1> to <LIDADDR2><GIDADDR2><QP2> on <SL>"},
1131 { 258, " (Security) Bad Q_Key, <KEY> from <LIDADDR1><GIDADDR1><QP1> to <LIDADDR2><GIDADDR2><QP2> on <SL>"},
1132 { 259, " (Security) Bad P_Key, <KEY> from <LIDADDR1><GIDADDR1><QP1> to <LIDADDR2><GIDADDR2><QP2> on <SL> at switch <LIDADDR><PORTNO>"},
1139 /* MAD Management Classes
1140 * Classes from the Common MAD Header
1142 * Management Class Name Class Description
1143 * ------------------------------------------------------------------------------------------------------------ */
1144 #define SUBN_LID_ROUTED 0x01 /* Subnet Management LID Route */
1145 #define SUBN_DIRECTED_ROUTE 0x81 /* Subnet Management Directed Route */
1146 #define SUBNADMN 0x03 /* Subnet Administration */
1147 #define PERF 0x04 /* Performance Management */
1148 #define BM 0x05 /* Baseboard Management (Tunneling of IB-ML commands through the IBA subnet) */
1149 #define DEV_MGT 0x06 /* Device Management */
1150 #define COM_MGT 0x07 /* Communications Management */
1151 #define SNMP 0x08 /* SNMP Tunneling (tunneling of the SNMP protocol through the IBA fabric) */
1152 #define VENDOR_1_START 0x09 /* Start of first Vendor Specific Range */
1153 #define VENDOR_1_END 0x0F /* End of first Vendor Specific Range */
1154 #define VENDOR_2_START 0x30 /* Start of second Vendor Specific Range */
1155 #define VENDOR_2_END 0x4F /* End of the second Vendor Specific Range */
1156 #define APPLICATION_START 0x10 /* Start of Application Specific Range */
1157 #define APPLICATION_END 0x2F /* End of Application Specific Range */
1159 /* Performance class Attributes */
1160 #define ATTR_PORT_COUNTERS 0x0012
1161 #define ATTR_PORT_COUNTERS_EXT 0x001D
1163 /* ComMgt class Attributes*/
1164 #define ATTR_CM_REQ 0x0010
1165 #define ATTR_CM_REP 0x0013
1166 #define ATTR_CM_RTU 0x0014
1167 #define ATTR_CM_REJ 0x0012
1169 /* Link Next Header Values */
1170 #define IBA_GLOBAL 3
1172 #define IP_NON_IBA 1
1176 * Code Bits [7-5] Connection Type
1177 * [4-0] Message Type
1179 * Reliable Connection (RC)
1181 #define RC_SEND_FIRST 0 /*0x00000000 */
1182 #define RC_SEND_MIDDLE 1 /*0x00000001 */
1183 #define RC_SEND_LAST 2 /*0x00000010 */
1184 #define RC_SEND_LAST_IMM 3 /*0x00000011 */
1185 #define RC_SEND_ONLY 4 /*0x00000100 */
1186 #define RC_SEND_ONLY_IMM 5 /*0x00000101 */
1187 #define RC_RDMA_WRITE_FIRST 6 /*0x00000110 */
1188 #define RC_RDMA_WRITE_MIDDLE 7 /*0x00000111 */
1189 #define RC_RDMA_WRITE_LAST 8 /*0x00001000 */
1190 #define RC_RDMA_WRITE_LAST_IMM 9 /*0x00001001 */
1191 #define RC_RDMA_WRITE_ONLY 10 /*0x00001010 */
1192 #define RC_RDMA_WRITE_ONLY_IMM 11 /*0x00001011 */
1193 #define RC_RDMA_READ_REQUEST 12 /*0x00001100 */
1194 #define RC_RDMA_READ_RESPONSE_FIRST 13 /*0x00001101 */
1195 #define RC_RDMA_READ_RESPONSE_MIDDLE 14 /*0x00001110 */
1196 #define RC_RDMA_READ_RESPONSE_LAST 15 /*0x00001111 */
1197 #define RC_RDMA_READ_RESPONSE_ONLY 16 /*0x00010000 */
1198 #define RC_ACKNOWLEDGE 17 /*0x00010001 */
1199 #define RC_ATOMIC_ACKNOWLEDGE 18 /*0x00010010 */
1200 #define RC_CMP_SWAP 19 /*0x00010011 */
1201 #define RC_FETCH_ADD 20 /*0x00010100 */
1202 #define RC_SEND_LAST_INVAL 22 /*0x00010110 */
1203 #define RC_SEND_ONLY_INVAL 23 /*0x00010111 */
1205 /* Reliable Datagram (RD)
1207 #define RD_SEND_FIRST 64 /*0x01000000 */
1208 #define RD_SEND_MIDDLE 65 /*0x01000001 */
1209 #define RD_SEND_LAST 66 /*0x01000010 */
1210 #define RD_SEND_LAST_IMM 67 /*0x01000011 */
1211 #define RD_SEND_ONLY 68 /*0x01000100 */
1212 #define RD_SEND_ONLY_IMM 69 /*0x01000101 */
1213 #define RD_RDMA_WRITE_FIRST 70 /*0x01000110 */
1214 #define RD_RDMA_WRITE_MIDDLE 71 /*0x01000111 */
1215 #define RD_RDMA_WRITE_LAST 72 /*0x01001000 */
1216 #define RD_RDMA_WRITE_LAST_IMM 73 /*0x01001001 */
1217 #define RD_RDMA_WRITE_ONLY 74 /*0x01001010 */
1218 #define RD_RDMA_WRITE_ONLY_IMM 75 /*0x01001011 */
1219 #define RD_RDMA_READ_REQUEST 76 /*0x01001100 */
1220 #define RD_RDMA_READ_RESPONSE_FIRST 77 /*0x01001101 */
1221 #define RD_RDMA_READ_RESPONSE_MIDDLE 78 /*0x01001110 */
1222 #define RD_RDMA_READ_RESPONSE_LAST 79 /*0x01001111 */
1223 #define RD_RDMA_READ_RESPONSE_ONLY 80 /*0x01010000 */
1224 #define RD_ACKNOWLEDGE 81 /*0x01010001 */
1225 #define RD_ATOMIC_ACKNOWLEDGE 82 /*0x01010010 */
1226 #define RD_CMP_SWAP 83 /*0x01010011 */
1227 #define RD_FETCH_ADD 84 /*0x01010100 */
1228 #define RD_RESYNC 85 /*0x01010101 */
1230 /* Unreliable Datagram (UD)
1232 #define UD_SEND_ONLY 100 /*0x01100100 */
1233 #define UD_SEND_ONLY_IMM 101 /*0x01100101 */
1235 /* Unreliable Connection (UC)
1237 #define UC_SEND_FIRST 32 /*0x00100000 */
1238 #define UC_SEND_MIDDLE 33 /*0x00100001 */
1239 #define UC_SEND_LAST 34 /*0x00100010 */
1240 #define UC_SEND_LAST_IMM 35 /*0x00100011 */
1241 #define UC_SEND_ONLY 36 /*0x00100100 */
1242 #define UC_SEND_ONLY_IMM 37 /*0x00100101 */
1243 #define UC_RDMA_WRITE_FIRST 38 /*0x00100110 */
1244 #define UC_RDMA_WRITE_MIDDLE 39 /*0x00100111 */
1245 #define UC_RDMA_WRITE_LAST 40 /*0x00101000 */
1246 #define UC_RDMA_WRITE_LAST_IMM 41 /*0x00101001 */
1247 #define UC_RDMA_WRITE_ONLY 42 /*0x00101010 */
1248 #define UC_RDMA_WRITE_ONLY_IMM 43 /*0x00101011 */
1250 static const value_string OpCodeMap[] =
1252 { RC_SEND_FIRST, "RC Send First " },
1253 { RC_SEND_MIDDLE, "RC Send Middle "},
1254 { RC_SEND_LAST, "RC Send Last " },
1255 { RC_SEND_LAST_IMM, "RC Send Last Immediate "},
1256 { RC_SEND_ONLY, "RC Send Only "},
1257 { RC_SEND_ONLY_IMM, "RC Send Only Immediate "},
1258 { RC_RDMA_WRITE_FIRST, "RC RDMA Write First " },
1259 { RC_RDMA_WRITE_MIDDLE, "RC RDMA Write Middle "},
1260 { RC_RDMA_WRITE_LAST, "RC RDMA Write Last "},
1261 { RC_RDMA_WRITE_LAST_IMM, "RC RDMA Write Last Immediate " },
1262 { RC_RDMA_WRITE_ONLY, "RC RDMA Write Only " },
1263 { RC_RDMA_WRITE_ONLY_IMM, "RC RDMA Write Only Immediate "},
1264 { RC_RDMA_READ_REQUEST, "RC RDMA Read Request " },
1265 { RC_RDMA_READ_RESPONSE_FIRST, "RC RDMA Read Response First " },
1266 { RC_RDMA_READ_RESPONSE_MIDDLE, "RC RDMA Read Response Middle "},
1267 { RC_RDMA_READ_RESPONSE_LAST, "RC RDMA Read Response Last " },
1268 { RC_RDMA_READ_RESPONSE_ONLY, "RC RDMA Read Response Only "},
1269 { RC_ACKNOWLEDGE, "RC Acknowledge " },
1270 { RC_ATOMIC_ACKNOWLEDGE, "RC Atomic Acknowledge " },
1271 { RC_CMP_SWAP, "RC Compare Swap " },
1272 { RC_FETCH_ADD, "RC Fetch Add "},
1273 { RC_SEND_LAST_INVAL, "RC Send Last Invalidate "},
1274 { RC_SEND_ONLY_INVAL, "RC Send Only Invalidate " },
1277 { RD_SEND_FIRST, "RD Send First "},
1278 { RD_SEND_MIDDLE,"RD Send Middle " },
1279 { RD_SEND_LAST, "RD Send Last "},
1280 { RD_SEND_LAST_IMM, "RD Last Immediate " },
1281 { RD_SEND_ONLY,"RD Send Only "},
1282 { RD_SEND_ONLY_IMM,"RD Send Only Immediate "},
1283 { RD_RDMA_WRITE_FIRST,"RD RDMA Write First "},
1284 { RD_RDMA_WRITE_MIDDLE, "RD RDMA Write Middle "},
1285 { RD_RDMA_WRITE_LAST,"RD RDMA Write Last "},
1286 { RD_RDMA_WRITE_LAST_IMM,"RD RDMA Write Last Immediate "},
1287 { RD_RDMA_WRITE_ONLY,"RD RDMA Write Only "},
1288 { RD_RDMA_WRITE_ONLY_IMM,"RD RDMA Write Only Immediate "},
1289 { RD_RDMA_READ_REQUEST,"RD RDMA Read Request "},
1290 { RD_RDMA_READ_RESPONSE_FIRST,"RD RDMA Read Response First "},
1291 { RD_RDMA_READ_RESPONSE_MIDDLE,"RD RDMA Read Response Middle "},
1292 { RD_RDMA_READ_RESPONSE_LAST,"RD RDMA Read Response Last "},
1293 { RD_RDMA_READ_RESPONSE_ONLY,"RD RDMA Read Response Only "},
1294 { RD_ACKNOWLEDGE,"RD Acknowledge "},
1295 { RD_ATOMIC_ACKNOWLEDGE,"RD Atomic Acknowledge "},
1296 { RD_CMP_SWAP,"RD Compare Swap "},
1297 { RD_FETCH_ADD, "RD Fetch Add "},
1298 { RD_RESYNC,"RD RESYNC "},
1301 { UD_SEND_ONLY, "UD Send Only "},
1302 { UD_SEND_ONLY_IMM, "UD Send Only Immediate "},
1305 { UC_SEND_FIRST,"UC Send First "},
1306 { UC_SEND_MIDDLE,"UC Send Middle "},
1307 { UC_SEND_LAST,"UC Send Last "},
1308 { UC_SEND_LAST_IMM,"UC Send Last Immediate "},
1309 { UC_SEND_ONLY,"UC Send Only "},
1310 { UC_SEND_ONLY_IMM,"UC Send Only Immediate "},
1311 { UC_RDMA_WRITE_FIRST,"UC RDMA Write First"},
1312 { UC_RDMA_WRITE_MIDDLE,"Unreliable Connection RDMA Write Middle "},
1313 { UC_RDMA_WRITE_LAST,"UC RDMA Write Last "},
1314 { UC_RDMA_WRITE_LAST_IMM,"UC RDMA Write Last Immediate "},
1315 { UC_RDMA_WRITE_ONLY,"UC RDMA Write Only "},
1316 { UC_RDMA_WRITE_ONLY_IMM,"UC RDMA Write Only Immediate "},
1323 /* Header Ordering Based on OPCODES
1324 * These are simply an enumeration of the possible header combinations defined by the IB Spec.
1325 * These enumerations
1326 * #DEFINE [HEADER_ORDER] [ENUM]
1327 * __________________________________ */
1328 #define RDETH_DETH_PAYLD 0
1329 /* __________________________________ */
1330 #define RDETH_DETH_RETH_PAYLD 1
1331 /* __________________________________ */
1332 #define RDETH_DETH_IMMDT_PAYLD 2
1333 /* __________________________________ */
1334 #define RDETH_DETH_RETH_IMMDT_PAYLD 3
1335 /* __________________________________ */
1336 #define RDETH_DETH_RETH 4
1337 /* __________________________________ */
1338 #define RDETH_AETH_PAYLD 5
1339 /* __________________________________ */
1340 #define RDETH_PAYLD 6
1341 /* __________________________________ */
1342 #define RDETH_AETH 7
1343 /* __________________________________ */
1344 #define RDETH_AETH_ATOMICACKETH 8
1345 /* __________________________________ */
1346 #define RDETH_DETH_ATOMICETH 9
1347 /* ___________________________________ */
1348 #define RDETH_DETH 10
1349 /* ___________________________________ */
1350 #define DETH_PAYLD 11
1351 /* ___________________________________ */
1352 #define DETH_IMMDT_PAYLD 12
1353 /* ___________________________________ */
1355 /* ___________________________________ */
1356 #define IMMDT_PAYLD 14
1357 /* ___________________________________ */
1358 #define RETH_PAYLD 15
1359 /* ___________________________________ */
1360 #define RETH_IMMDT_PAYLD 16
1361 /* ___________________________________ */
1363 /* ___________________________________ */
1364 #define AETH_PAYLD 18
1365 /* ___________________________________ */
1367 /* ___________________________________ */
1368 #define AETH_ATOMICACKETH 20
1369 /* ___________________________________ */
1370 #define ATOMICETH 21
1371 /* ___________________________________ */
1372 #define IETH_PAYLD 22
1373 /* ___________________________________ */
1376 /* Infiniband transport services
1377 These are an enumeration of the transport services over which an IB packet
1378 might be sent. The values match the corresponding 3 bits of the opCode field
1380 #define TRANSPORT_RC 0
1381 #define TRANSPORT_UC 1
1382 #define TRANSPORT_RD 2
1383 #define TRANSPORT_UD 3
1386 /* Array of all availavle OpCodes to make matching a bit easier.
1387 * The OpCodes dictate the header sequence following in the packet.
1388 * These arrays tell the dissector which headers must be decoded for the given OpCode. */
1389 static guint32 opCode_RDETH_DETH_ATOMICETH[] = {
1393 static guint32 opCode_IETH_PAYLD[] = {
1397 static guint32 opCode_ATOMICETH[] = {
1401 static guint32 opCode_RDETH_DETH_RETH_PAYLD[] = {
1402 RD_RDMA_WRITE_FIRST,
1405 static guint32 opCode_RETH_IMMDT_PAYLD[] = {
1406 RC_RDMA_WRITE_ONLY_IMM,
1407 UC_RDMA_WRITE_ONLY_IMM
1409 static guint32 opCode_RDETH_DETH_IMMDT_PAYLD[] = {
1412 RD_RDMA_WRITE_LAST_IMM
1415 static guint32 opCode_RDETH_AETH_PAYLD[] = {
1416 RD_RDMA_READ_RESPONSE_FIRST,
1417 RD_RDMA_READ_RESPONSE_LAST,
1418 RD_RDMA_READ_RESPONSE_ONLY
1420 static guint32 opCode_AETH_PAYLD[] = {
1421 RC_RDMA_READ_RESPONSE_FIRST,
1422 RC_RDMA_READ_RESPONSE_LAST,
1423 RC_RDMA_READ_RESPONSE_ONLY
1425 static guint32 opCode_RETH_PAYLD[] = {
1426 RC_RDMA_WRITE_FIRST,
1428 UC_RDMA_WRITE_FIRST,
1432 static guint32 opCode_RDETH_DETH_PAYLD[] = {
1437 RD_RDMA_WRITE_MIDDLE,
1441 static guint32 opCode_IMMDT_PAYLD[] = {
1444 RC_RDMA_WRITE_LAST_IMM,
1447 UC_RDMA_WRITE_LAST_IMM
1450 static guint32 opCode_PAYLD[] = {
1455 RC_RDMA_WRITE_MIDDLE,
1457 RC_RDMA_READ_RESPONSE_MIDDLE,
1462 UC_RDMA_WRITE_MIDDLE,
1466 /* It is not necessary to create arrays for these OpCodes since they indicate only one further header.
1467 * We can just decode it directly
1469 * static guint32 opCode_DETH_IMMDT_PAYLD[] = {
1472 * static guint32 opCode_DETH_PAYLD[] = {
1475 * static guint32 opCode_RDETH_DETH[] = {
1478 * static guint32 opCode_RDETH_DETH_RETH[] = {
1479 * RD_RDMA_READ_REQUEST
1481 * static guint32 opCode_RDETH_DETH_RETH_IMMDT_PAYLD[] = {
1482 * RD_RDMA_WRITE_ONLY_IMM
1484 * static guint32 opCode_RDETH_AETH_ATOMICACKETH[] = {
1485 * RD_ATOMIC_ACKNOWLEDGE
1487 * static guint32 opCode_RDETH_AETH[] = {
1490 * static guint32 opCode_RDETH_PAYLD[] = {
1491 * RD_RDMA_READ_RESPONSE_MIDDLE
1493 * static guint32 opCode_AETH_ATOMICACKETH[] = {
1494 * RC_ATOMIC_ACKNOWLEDGE
1496 * static guint32 opCode_RETH[] = {
1497 * RC_RDMA_READ_REQUEST
1499 * static guint32 opCode_AETH[] = {
1503 static gchar *src_addr = NULL, /* the address to be displayed in the source/destination columns */
1504 *dst_addr = NULL; /* (lid/gid number) will be stored here */
1506 #define ADDR_MAX_LEN sizeof("IPv6 over IB Packet") /* maximum length of src_addr and dst_addr is for IPoIB
1507 where we print an explanation string */
1509 static gint8 transport_type = -1; /* reflects the transport type of the packet being parsed.
1510 only use one of the TRANSPORT_* values for this field */
1512 /* settings to be set by the user via the preferences dialog */
1513 static gboolean pref_dissect_eoib = TRUE;
1514 static gboolean pref_identify_iba_payload = TRUE;
1516 /* saves information about connections that have been/are in the process of being
1517 negotiated via ConnectionManagement packets */
1519 guint8 req_gid[GID_SIZE],
1520 resp_gid[GID_SIZE]; /* GID of requester/responder, respectively */
1522 resp_lid; /* LID of requester/responder, respectively */
1524 resp_qp; /* QP number of requester/responder, respectively */
1525 guint64 service_id; /* service id for this connection */
1526 } connection_context;
1528 /* holds a table of connection contexts being negotiated by CM. the key is a obtained
1529 using ADD_ADDRESS_TO_HASH(initiator address, TransactionID) [remember that the 1st
1530 argument to ADD_ADDRESS_TO_HASH must be an lvalue. */
1531 GHashTable *CM_context_table = NULL;
1533 /* heuristics sub-dissectors list for dissecting the data payload of IB packets */
1534 static heur_dissector_list_t heur_dissectors_payload;
1535 /* heuristics sub-dissectors list for dissecting the PrivateData of CM packets */
1536 static heur_dissector_list_t heur_dissectors_cm_private;
1538 /* ----- This sections contains various utility functions indirectly related to Infiniband dissection ---- */
1540 /* g_int64_hash, g_int64_equal are defined starting glib 2.22 - otherwise, we'll have to
1541 provide them ourselves! */
1542 #if !GLIB_CHECK_VERSION(2,22,0)
1544 g_int64_hash (gconstpointer v)
1546 return (guint) *(const gint64*) v;
1550 g_int64_equal (gconstpointer v1,
1553 return *((const gint64*) v1) == *((const gint64*) v2);
1557 void table_destroy_notify(gpointer data) {
1561 /* --------------------------------------------------------------------------------------------------------*/
1563 /* Helper dissector for correctly dissecting RoCE packets (encapsulated within an Ethernet */
1564 /* frame). The only difference from regular IB packets is that RoCE packets do not contain */
1565 /* a LRH, and always start with a GRH. */
1567 dissect_roce(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1569 /* this is a RoCE packet, so signal the IB dissector not to look for LRH */
1570 dissect_infiniband_common(tvb, pinfo, tree, TRUE);
1574 dissect_infiniband(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1576 dissect_infiniband_common(tvb, pinfo, tree, FALSE);
1579 /* Common Dissector for both InfiniBand and RoCE packets
1581 * tvb - The tvbbuff of packet data
1582 * pinfo - The packet info structure with column information
1583 * tree - The tree structure under which field nodes are to be added
1584 * starts_with_grh - If true this packets start with a GRH header (RoCE), otherwise with LRH as usual
1586 * 1.) Floating "offset+=" statements should probably be "functionized" but they are inline
1587 * Offset is only passed by reference in specific places, so do not be confused when following code
1588 * In any code path, adding up "offset+=" statements will tell you what byte you are at */
1590 dissect_infiniband_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean starts_with_grh)
1592 /* Top Level Item */
1593 proto_item *infiniband_packet = NULL;
1595 /* The Headers Subtree */
1596 proto_tree *all_headers_tree = NULL;
1598 /* LRH - Local Route Header */
1599 proto_tree *local_route_header_tree = NULL;
1600 proto_item *local_route_header_item = NULL;
1602 /* GRH - Global Route Header */
1603 proto_tree *global_route_header_tree = NULL;
1604 proto_item *global_route_header_item = NULL;
1606 /* BTH - Base Transport header */
1607 proto_tree *base_transport_header_tree = NULL;
1608 proto_item *base_transport_header_item = NULL;
1611 proto_tree *RAWDATA_header_tree;
1612 proto_item *RAWDATA_header_item;
1613 guint8 lnh_val = 0; /* Link Next Header Value */
1614 gint offset = 0; /* Current Offset */
1616 /* General Variables */
1617 gboolean bthFollows = 0; /* Tracks if we are parsing a BTH. This is a significant decision point */
1618 guint8 virtualLane = 0; /* IB VirtualLane. Keyed off of for detecting subnet admin/management */
1619 guint8 opCode = 0; /* OpCode from BTH header. */
1620 gint32 nextHeaderSequence = -1; /* defined by this dissector. #define which indicates the upcoming header sequence from OpCode */
1621 guint16 payloadLength = 0; /* Payload Length should it exist */
1622 guint8 nxtHdr = 0; /* Keyed off for header dissection order */
1623 guint16 packetLength = 0; /* Packet Length. We track this as tvb->length - offset. */
1624 /* It provides the parsing methods a known size */
1625 /* that must be available for that header. */
1626 struct e_in6_addr SRCgid; /* Structures to hold GIDs should we need them */
1627 struct e_in6_addr DSTgid;
1628 gint crc_length = 0;
1630 /* allocate space for source/destination addresses. we will fill them in later */
1631 src_addr = ep_alloc(ADDR_MAX_LEN);
1632 dst_addr = ep_alloc(ADDR_MAX_LEN);
1634 pinfo->srcport = pinfo->destport = 0xffffffff; /* set the src/dest QPN to something impossible instead of the default 0,
1635 so we don't mistake it for a MAD. (QP is only 24bit, so can't be 0xffffffff)*/
1637 /* add any code that should only run the first time the packet is dissected here: */
1638 if (!pinfo->fd->flags.visited)
1640 pinfo->ptype = PT_IBQP; /* set the port-type for this packet to be Infiniband QP number */
1643 /* Mark the Packet type as Infiniband in the wireshark UI */
1644 /* Clear other columns */
1645 col_set_str(pinfo->cinfo, COL_PROTOCOL, "InfiniBand");
1646 col_clear(pinfo->cinfo, COL_INFO);
1648 /* Get the parent tree from the ERF dissector. We don't want to nest under ERF */
1649 if(tree && tree->parent)
1651 /* Set the normal tree outside of ERF */
1652 tree = tree->parent;
1653 /* Set a global reference for nested protocols */
1657 /* The "quick-dissection" code in dissect_general_info skips lots of the recently-added code
1658 for saving context etc. It is no longer viable to maintain two code branches, so we have
1659 (temporarily?) disabled the second one. All dissection now goes through the full branch,
1660 using a NULL tree pointer if this is not a full dissection call. Take care not to dereference
1661 the tree pointer or any subtree pointers you create using it and you'll be fine. */
1664 /* If no packet details are being dissected, extract some high level info for the packet view */
1665 /* Assigns column values rather than full tree population */
1666 dissect_general_info(tvb, offset, pinfo, starts_with_grh);
1670 /* Top Level Packet */
1671 infiniband_packet = proto_tree_add_item(tree, proto_infiniband, tvb, offset, -1, FALSE);
1673 /* Headers Level Tree */
1674 all_headers_tree = proto_item_add_subtree(infiniband_packet, ett_all_headers);
1676 if (starts_with_grh) {
1677 /* this is a RoCE packet, skip LRH parsing */
1678 lnh_val = IBA_GLOBAL;
1679 packetLength = tvb_get_ntohs(tvb, 4); /* since we have no LRH to get PktLen from, use that of the GRH */
1683 /* Local Route Header Subtree */
1684 local_route_header_item = proto_tree_add_item(all_headers_tree, hf_infiniband_LRH, tvb, offset, 8, FALSE);
1685 proto_item_set_text(local_route_header_item, "%s", "Local Route Header");
1686 local_route_header_tree = proto_item_add_subtree(local_route_header_item, ett_lrh);
1688 proto_tree_add_item(local_route_header_tree, hf_infiniband_virtual_lane, tvb, offset, 1, FALSE);
1691 /* Get the Virtual Lane. We'll use this to identify Subnet Management and Subnet Administration Packets. */
1692 virtualLane = tvb_get_guint8(tvb, offset);
1693 virtualLane = virtualLane & 0xF0;
1696 proto_tree_add_item(local_route_header_tree, hf_infiniband_link_version, tvb, offset, 1, FALSE); offset+=1;
1697 proto_tree_add_item(local_route_header_tree, hf_infiniband_service_level, tvb, offset, 1, FALSE);
1699 proto_tree_add_item(local_route_header_tree, hf_infiniband_reserved2, tvb, offset, 1, FALSE);
1700 proto_tree_add_item(local_route_header_tree, hf_infiniband_link_next_header, tvb, offset, 1, FALSE);
1703 /* Save Link Next Header... This tells us what the next header is. */
1704 lnh_val = tvb_get_guint8(tvb, offset);
1705 lnh_val = lnh_val & 0x03;
1709 proto_tree_add_item(local_route_header_tree, hf_infiniband_destination_local_id, tvb, offset, 2, FALSE);
1712 /* Set destination in packet view. */
1713 *((guint16*) dst_addr) = tvb_get_ntohs(tvb, offset);
1714 SET_ADDRESS(&pinfo->dst, AT_IB, sizeof(guint16), dst_addr);
1718 proto_tree_add_item(local_route_header_tree, hf_infiniband_reserved5, tvb, offset, 2, FALSE);
1720 packetLength = tvb_get_ntohs(tvb, offset); /* Get the Packet Length. This will determine payload size later on. */
1721 packetLength = packetLength & 0x07FF; /* Mask off top 5 bits, they are reserved */
1722 packetLength = packetLength * 4; /* Multiply by 4 to get true byte length. This is by specification. */
1723 /* PktLen is size in 4 byte words (byteSize /4). */
1725 proto_tree_add_item(local_route_header_tree, hf_infiniband_packet_length, tvb, offset, 2, FALSE); offset+=2;
1726 proto_tree_add_item(local_route_header_tree, hf_infiniband_source_local_id, tvb, offset, 2, FALSE);
1728 /* Set Source in packet view. */
1729 *((guint16*) src_addr) = tvb_get_ntohs(tvb, offset);
1730 SET_ADDRESS(&pinfo->src, AT_IB, sizeof(guint16), src_addr);
1733 packetLength -= 8; /* Shave 8 bytes for the LRH. */
1737 /* Key off Link Next Header. This tells us what High Level Data Format we have */
1741 global_route_header_item = proto_tree_add_item(all_headers_tree, hf_infiniband_GRH, tvb, offset, 40, FALSE);
1742 proto_item_set_text(global_route_header_item, "%s", "Global Route Header");
1743 global_route_header_tree = proto_item_add_subtree(global_route_header_item, ett_grh);
1745 proto_tree_add_item(global_route_header_tree, hf_infiniband_ip_version, tvb, offset, 1, FALSE);
1746 proto_tree_add_item(global_route_header_tree, hf_infiniband_traffic_class, tvb, offset, 2, FALSE);
1747 proto_tree_add_item(global_route_header_tree, hf_infiniband_flow_label, tvb, offset, 4, FALSE); offset += 4;
1749 payloadLength = tvb_get_ntohs(tvb, offset);
1751 proto_tree_add_item(global_route_header_tree, hf_infiniband_payload_length, tvb, offset, 2, FALSE); offset += 2;
1753 nxtHdr = tvb_get_guint8(tvb, offset);
1755 proto_tree_add_item(global_route_header_tree, hf_infiniband_next_header, tvb, offset, 1, FALSE); offset +=1;
1756 proto_tree_add_item(global_route_header_tree, hf_infiniband_hop_limit, tvb, offset, 1, FALSE); offset +=1;
1757 proto_tree_add_item(global_route_header_tree, hf_infiniband_source_gid, tvb, offset, 16, FALSE);
1759 tvb_get_ipv6(tvb, offset, &SRCgid);
1761 /* set source GID in packet view*/
1762 memcpy(src_addr, &SRCgid, GID_SIZE);
1763 SET_ADDRESS(&pinfo->src, AT_IB, GID_SIZE, src_addr);
1767 proto_tree_add_item(global_route_header_tree, hf_infiniband_destination_gid, tvb, offset, 16, FALSE);
1769 tvb_get_ipv6(tvb, offset, &DSTgid);
1771 /* set destination GID in packet view*/
1772 memcpy(dst_addr, &DSTgid, GID_SIZE);
1773 SET_ADDRESS(&pinfo->dst, AT_IB, GID_SIZE, dst_addr);
1776 packetLength -= 40; /* Shave 40 bytes for GRH */
1780 /* Some kind of packet being transported globally with IBA, but locally it is not IBA - no BTH following. */
1783 /* otherwise fall through and start parsing BTH */
1786 base_transport_header_item = proto_tree_add_item(all_headers_tree, hf_infiniband_BTH, tvb, offset, 12, FALSE);
1787 proto_item_set_text(base_transport_header_item, "%s", "Base Transport Header");
1788 base_transport_header_tree = proto_item_add_subtree(base_transport_header_item, ett_bth);
1789 proto_tree_add_item(base_transport_header_tree, hf_infiniband_opcode, tvb, offset, 1, FALSE);
1791 /* Get the OpCode - this tells us what headers are following */
1792 opCode = tvb_get_guint8(tvb, offset);
1793 col_append_str(pinfo->cinfo, COL_INFO, val_to_str((guint32)opCode, OpCodeMap, "Unknown OpCode"));
1796 proto_tree_add_item(base_transport_header_tree, hf_infiniband_solicited_event, tvb, offset, 1, FALSE);
1797 proto_tree_add_item(base_transport_header_tree, hf_infiniband_migreq, tvb, offset, 1, FALSE);
1798 proto_tree_add_item(base_transport_header_tree, hf_infiniband_pad_count, tvb, offset, 1, FALSE);
1799 proto_tree_add_item(base_transport_header_tree, hf_infiniband_transport_header_version, tvb, offset, 1, FALSE); offset +=1;
1800 proto_tree_add_item(base_transport_header_tree, hf_infiniband_partition_key, tvb, offset, 2, FALSE); offset +=2;
1801 proto_tree_add_item(base_transport_header_tree, hf_infiniband_reserved8, tvb, offset, 1, FALSE); offset +=1;
1802 proto_tree_add_item(base_transport_header_tree, hf_infiniband_destination_qp, tvb, offset, 3, FALSE);
1803 pinfo->destport = tvb_get_ntoh24(tvb, offset); offset +=3;
1804 proto_tree_add_item(base_transport_header_tree, hf_infiniband_acknowledge_request, tvb, offset, 1, FALSE);
1805 proto_tree_add_item(base_transport_header_tree, hf_infiniband_reserved7, tvb, offset, 1, FALSE); offset +=1;
1806 proto_tree_add_item(base_transport_header_tree, hf_infiniband_packet_sequence_number, tvb, offset, 3, FALSE); offset +=3;
1809 packetLength -= 12; /* Shave 12 for Base Transport Header */
1813 /* Raw IPv6 Packet */
1814 g_snprintf(dst_addr, ADDR_MAX_LEN, "IPv6 over IB Packet");
1815 SET_ADDRESS(&pinfo->dst, AT_STRINGZ, (int)strlen(dst_addr)+1, dst_addr);
1817 parse_IPvSix(all_headers_tree, tvb, &offset, pinfo);
1820 parse_RWH(all_headers_tree, tvb, &offset, pinfo);
1823 /* Unknown Packet */
1824 RAWDATA_header_item = proto_tree_add_item(all_headers_tree, hf_infiniband_raw_data, tvb, offset, -1, FALSE);
1825 proto_item_set_text(RAWDATA_header_item, "%s", "Unknown Raw Data - IB Encapsulated");
1826 RAWDATA_header_tree = proto_item_add_subtree(RAWDATA_header_item, ett_rawdata);
1830 /* Base Transport header is hit quite often, however it is alone since it is the exception not the rule */
1831 /* Only IBA Local packets use it */
1834 /* Find our next header sequence based on the Opcode
1835 * Each case decrements the packetLength by the amount of bytes consumed by each header.
1836 * The find_next_header_sequence method could be used to automate this.
1837 * We need to keep track of this so we know much data to mark as payload/ICRC/VCRC values. */
1839 transport_type = (opCode & 0xE0) >> 5; /* save transport type for identifying EoIB payloads later... */
1840 nextHeaderSequence = find_next_header_sequence((guint32) opCode);
1842 /* find_next_header_sequence gives us the DEFINE value corresponding to the header order following */
1843 /* Enumerations are named intuitively, e.g. RDETH DETH PAYLOAD means there is an RDETH Header, DETH Header, and a packet payload */
1844 switch(nextHeaderSequence)
1846 case RDETH_DETH_PAYLD:
1847 parse_RDETH(all_headers_tree, tvb, &offset);
1848 parse_DETH(all_headers_tree, pinfo, tvb, &offset);
1850 packetLength -= 4; /* RDETH */
1851 packetLength -= 8; /* DETH */
1853 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength);
1855 case RDETH_DETH_RETH_PAYLD:
1856 parse_RDETH(all_headers_tree, tvb, &offset);
1857 parse_DETH(all_headers_tree, pinfo, tvb, &offset);
1858 parse_RETH(all_headers_tree, tvb, &offset);
1860 packetLength -= 4; /* RDETH */
1861 packetLength -= 8; /* DETH */
1862 packetLength -= 16; /* RETH */
1864 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength);
1866 case RDETH_DETH_IMMDT_PAYLD:
1867 parse_RDETH(all_headers_tree, tvb, &offset);
1868 parse_DETH(all_headers_tree, pinfo, tvb, &offset);
1869 parse_IMMDT(all_headers_tree, tvb, &offset);
1871 packetLength -= 4; /* RDETH */
1872 packetLength -= 8; /* DETH */
1873 packetLength -= 4; /* IMMDT */
1875 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength);
1877 case RDETH_DETH_RETH_IMMDT_PAYLD:
1878 parse_RDETH(all_headers_tree, tvb, &offset);
1879 parse_DETH(all_headers_tree, pinfo, tvb, &offset);
1880 parse_RETH(all_headers_tree, tvb, &offset);
1881 parse_IMMDT(all_headers_tree, tvb, &offset);
1883 packetLength -= 4; /* RDETH */
1884 packetLength -= 8; /* DETH */
1885 packetLength -= 16; /* RETH */
1886 packetLength -= 4; /* IMMDT */
1888 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength);
1890 case RDETH_DETH_RETH:
1891 parse_RDETH(all_headers_tree, tvb, &offset);
1892 parse_DETH(all_headers_tree, pinfo, tvb, &offset);
1893 parse_RETH(all_headers_tree, tvb, &offset);
1895 packetLength -= 4; /* RDETH */
1896 packetLength -= 8; /* DETH */
1897 packetLength -= 16; /* RETH */
1900 case RDETH_AETH_PAYLD:
1901 parse_RDETH(all_headers_tree, tvb, &offset);
1902 parse_AETH(all_headers_tree, tvb, &offset);
1904 packetLength -= 4; /* RDETH */
1905 packetLength -= 4; /* AETH */
1907 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength);
1910 parse_RDETH(all_headers_tree, tvb, &offset);
1912 packetLength -= 4; /* RDETH */
1914 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength);
1917 parse_AETH(all_headers_tree, tvb, &offset);
1919 packetLength -= 4; /* RDETH */
1920 packetLength -= 4; /* AETH */
1924 case RDETH_AETH_ATOMICACKETH:
1925 parse_RDETH(all_headers_tree, tvb, &offset);
1926 parse_AETH(all_headers_tree, tvb, &offset);
1927 parse_ATOMICACKETH(all_headers_tree, tvb, &offset);
1929 packetLength -= 4; /* RDETH */
1930 packetLength -= 4; /* AETH */
1931 packetLength -= 8; /* AtomicAckETH */
1935 case RDETH_DETH_ATOMICETH:
1936 parse_RDETH(all_headers_tree, tvb, &offset);
1937 parse_DETH(all_headers_tree, pinfo, tvb, &offset);
1938 parse_ATOMICETH(all_headers_tree, tvb, &offset);
1940 packetLength -= 4; /* RDETH */
1941 packetLength -= 8; /* DETH */
1942 packetLength -= 28; /* AtomicETH */
1946 parse_RDETH(all_headers_tree, tvb, &offset);
1947 parse_DETH(all_headers_tree, pinfo, tvb, &offset);
1949 packetLength -= 4; /* RDETH */
1950 packetLength -= 8; /* DETH */
1954 parse_DETH(all_headers_tree, pinfo, tvb, &offset);
1956 packetLength -= 8; /* DETH */
1958 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength);
1962 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength);
1965 parse_IMMDT(all_headers_tree, tvb, &offset);
1967 packetLength -= 4; /* IMMDT */
1969 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength);
1972 parse_RETH(all_headers_tree, tvb, &offset);
1974 packetLength -= 16; /* RETH */
1976 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength);
1979 parse_RETH(all_headers_tree, tvb, &offset);
1981 packetLength -= 16; /* RETH */
1985 parse_AETH(all_headers_tree, tvb, &offset);
1987 packetLength -= 4; /* AETH */
1989 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength);
1992 parse_AETH(all_headers_tree, tvb, &offset);
1994 packetLength -= 4; /* AETH */
1997 case AETH_ATOMICACKETH:
1998 parse_AETH(all_headers_tree, tvb, &offset);
1999 parse_ATOMICACKETH(all_headers_tree, tvb, &offset);
2001 packetLength -= 4; /* AETH */
2002 packetLength -= 8; /* AtomicAckETH */
2006 parse_ATOMICETH(all_headers_tree, tvb, &offset);
2008 packetLength -= 28; /* AtomicETH */
2012 parse_IETH(all_headers_tree, tvb, &offset);
2014 packetLength -= 4; /* IETH */
2016 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength);
2018 case DETH_IMMDT_PAYLD:
2019 parse_DETH(all_headers_tree, pinfo, tvb, &offset);
2020 parse_IMMDT(all_headers_tree, tvb, &offset);
2022 packetLength -= 8; /* DETH */
2023 packetLength -= 4; /* IMMDT */
2025 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength);
2028 parse_VENDOR(all_headers_tree, tvb, &offset);
2034 /* Display the ICRC/VCRC */
2035 /* Doing it this way rather than in a variety of places according to the specific packet */
2036 /* If we've already displayed it crc_length comes out 0 */
2037 crc_length = tvb_reported_length_remaining(tvb, offset);
2040 proto_tree_add_item(all_headers_tree, hf_infiniband_invariant_crc, tvb, offset, 4, FALSE); offset +=4;
2041 proto_tree_add_item(all_headers_tree, hf_infiniband_variant_crc, tvb, offset, 2, FALSE); offset+=2;
2043 else if(crc_length == 4)
2045 proto_tree_add_item(all_headers_tree, hf_infiniband_invariant_crc, tvb, offset, 4, FALSE); offset +=4;
2047 else if(crc_length == 2)
2049 proto_tree_add_item(all_headers_tree, hf_infiniband_variant_crc, tvb, offset, 2, FALSE); offset+=2;
2055 dissect_infiniband_link(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
2057 /* Top Level Item */
2058 proto_item *infiniband_link_packet = NULL;
2060 /* The Link Subtree */
2061 proto_tree *link_tree = NULL;
2063 proto_item *operand_item = NULL;
2064 gint offset = 0; /* Current Offset */
2065 guint8 operand; /* Link packet Operand */
2067 operand = tvb_get_guint8(tvb, offset);
2068 operand = (operand & 0xF0) >> 4;
2070 /* Mark the Packet type as Infiniband in the wireshark UI */
2071 /* Clear other columns */
2072 col_set_str(pinfo->cinfo, COL_PROTOCOL, "InfiniBand Link");
2073 col_clear(pinfo->cinfo, COL_INFO);
2074 col_add_fstr(pinfo->cinfo, COL_INFO, "%s",
2075 val_to_str(operand, Operand_Description, "Unknown (0x%1x)"));
2077 /* Get the parent tree from the ERF dissector. We don't want to nest under ERF */
2078 if(tree && tree->parent)
2080 /* Set the normal tree outside of ERF */
2081 tree = tree->parent;
2082 /* Set a global reference for nested protocols */
2088 /* If no packet details are being dissected, extract some high level info for the packet view */
2089 /* Assigns column values rather than full tree population */
2090 dissect_general_info(tvb, offset, pinfo, FALSE);
2094 /* Top Level Packet */
2095 infiniband_link_packet = proto_tree_add_item(tree, proto_infiniband_link, tvb, offset, -1, FALSE);
2097 /* Headers Level Tree */
2098 link_tree = proto_item_add_subtree(infiniband_link_packet, ett_link);
2100 operand_item = proto_tree_add_item(link_tree, hf_infiniband_link_op, tvb, offset, 2, FALSE);
2103 proto_item_set_text(operand_item, "%s", "Reserved");
2104 call_dissector(data_handle, tvb, pinfo, link_tree);
2106 proto_tree_add_item(link_tree, hf_infiniband_link_fctbs, tvb, offset, 2, FALSE);
2109 proto_tree_add_item(link_tree, hf_infiniband_link_vl, tvb, offset, 2, FALSE);
2110 proto_tree_add_item(link_tree, hf_infiniband_link_fccl, tvb, offset, 2, FALSE);
2113 proto_tree_add_item(link_tree, hf_infiniband_link_lpcrc, tvb, offset, 2, FALSE);
2120 /* Description: Finds the header sequence that follows the Base Transport Header.
2121 * Somwhat inefficient (should be using a single key,value pair data structure)
2122 * But uses pure probablity to take a stab at better efficiency.
2123 * Searches largest header sequence groups first, and then finally resorts to single matches for unique header sequences
2124 * IN: OpCode: The OpCode from the Base Transport Header.
2125 * OUT: The Header Sequence enumeration. See Declarations for #defines from (0-22) */
2127 find_next_header_sequence(guint32 OpCode)
2129 if(contains(OpCode, &opCode_PAYLD[0], (gint32)sizeof(opCode_PAYLD)))
2132 if(contains(OpCode, &opCode_IMMDT_PAYLD[0], (gint32)sizeof(opCode_IMMDT_PAYLD)))
2135 if(contains(OpCode, &opCode_RDETH_DETH_PAYLD[0], (gint32)sizeof(opCode_RDETH_DETH_PAYLD)))
2136 return RDETH_DETH_PAYLD;
2138 if(contains(OpCode, &opCode_RETH_PAYLD[0], (gint32)sizeof(opCode_RETH_PAYLD)))
2141 if(contains(OpCode, &opCode_RDETH_AETH_PAYLD[0], (gint32)sizeof(opCode_RDETH_AETH_PAYLD)))
2142 return RDETH_AETH_PAYLD;
2144 if(contains(OpCode, &opCode_AETH_PAYLD[0], (gint32)sizeof(opCode_AETH_PAYLD)))
2147 if(contains(OpCode, &opCode_RDETH_DETH_IMMDT_PAYLD[0], (gint32)sizeof(opCode_RDETH_DETH_IMMDT_PAYLD)))
2148 return RDETH_DETH_IMMDT_PAYLD;
2150 if(contains(OpCode, &opCode_RETH_IMMDT_PAYLD[0], (gint32)sizeof(opCode_RETH_IMMDT_PAYLD)))
2151 return RETH_IMMDT_PAYLD;
2153 if(contains(OpCode, &opCode_RDETH_DETH_RETH_PAYLD[0], (gint32)sizeof(opCode_RDETH_DETH_RETH_PAYLD)))
2154 return RDETH_DETH_RETH_PAYLD;
2156 if(contains(OpCode, &opCode_ATOMICETH[0], (gint32)sizeof(opCode_ATOMICETH)))
2159 if(contains(OpCode, &opCode_IETH_PAYLD[0], (gint32)sizeof(opCode_IETH_PAYLD)))
2162 if(contains(OpCode, &opCode_RDETH_DETH_ATOMICETH[0], (gint32)sizeof(opCode_RDETH_DETH_ATOMICETH)))
2163 return RDETH_DETH_ATOMICETH;
2165 if((OpCode ^ RC_ACKNOWLEDGE) == 0)
2168 if((OpCode ^ RC_RDMA_READ_REQUEST) == 0)
2171 if((OpCode ^ RC_ATOMIC_ACKNOWLEDGE) == 0)
2172 return AETH_ATOMICACKETH;
2174 if((OpCode ^ RD_RDMA_READ_RESPONSE_MIDDLE) == 0)
2177 if((OpCode ^ RD_ACKNOWLEDGE) == 0)
2180 if((OpCode ^ RD_ATOMIC_ACKNOWLEDGE) == 0)
2181 return RDETH_AETH_ATOMICACKETH;
2183 if((OpCode ^ RD_RDMA_WRITE_ONLY_IMM) == 0)
2184 return RDETH_DETH_RETH_IMMDT_PAYLD;
2186 if((OpCode ^ RD_RDMA_READ_REQUEST) == 0)
2187 return RDETH_DETH_RETH;
2189 if((OpCode ^ RD_RESYNC) == 0)
2192 if((OpCode ^ UD_SEND_ONLY) == 0)
2195 if((OpCode ^ UD_SEND_ONLY_IMM) == 0)
2196 return DETH_IMMDT_PAYLD;
2201 /* Description: Finds if a given value is present in an array. This is probably in a standard library somewhere,
2202 * But I'd rather define my own.
2203 * IN: OpCode: The OpCode you are looking for
2204 * IN: Codes: The organized array of OpCodes to look through
2205 * IN: Array length, because we're in C++...
2206 * OUT: Boolean indicating if that OpCode was found in OpCodes */
2208 contains(guint32 OpCode, guint32* Codes, gint32 length)
2211 for(i = 0; i < length; i++)
2213 if((OpCode ^ Codes[i]) == 0)
2219 /* Parse RDETH - Reliable Datagram Extended Transport Header
2220 * IN: parentTree to add the dissection to - in this code the all_headers_tree
2221 * IN: tvb - the data buffer from wireshark
2222 * IN/OUT: The current and updated offset */
2224 parse_RDETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
2226 gint local_offset = *offset;
2227 /* RDETH - Reliable Datagram Extended Transport Header */
2228 proto_tree *RDETH_header_tree = NULL;
2229 proto_item *RDETH_header_item = NULL;
2231 RDETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_RDETH, tvb, local_offset, 4, FALSE);
2232 proto_item_set_text(RDETH_header_item, "%s", "RDETH - Reliable Datagram Extended Transport Header");
2233 RDETH_header_tree = proto_item_add_subtree(RDETH_header_item, ett_rdeth);
2235 proto_tree_add_item(RDETH_header_tree, hf_infiniband_reserved8_RDETH, tvb, local_offset, 1, FALSE); local_offset+=1;
2236 proto_tree_add_item(RDETH_header_tree, hf_infiniband_ee_context, tvb, local_offset, 3, FALSE); local_offset+=3;
2237 *offset = local_offset;
2240 /* Parse DETH - Datagram Extended Transport Header
2241 * IN: parentTree to add the dissection to - in this code the all_headers_tree
2242 * IN: tvb - the data buffer from wireshark
2243 * IN/OUT: The current and updated offset */
2245 parse_DETH(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, gint *offset)
2247 gint local_offset = *offset;
2248 /* DETH - Datagram Extended Transport Header */
2249 proto_tree *DETH_header_tree = NULL;
2250 proto_item *DETH_header_item = NULL;
2252 DETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_DETH, tvb, local_offset, 8, FALSE);
2253 proto_item_set_text(DETH_header_item, "%s", "DETH - Datagram Extended Transport Header");
2254 DETH_header_tree = proto_item_add_subtree(DETH_header_item, ett_deth);
2256 proto_tree_add_item(DETH_header_tree, hf_infiniband_queue_key, tvb, local_offset, 4, FALSE); local_offset+=4;
2257 proto_tree_add_item(DETH_header_tree, hf_infiniband_reserved8_DETH, tvb, local_offset, 1, FALSE); local_offset+=1;
2258 proto_tree_add_item(DETH_header_tree, hf_infiniband_source_qp, tvb, local_offset, 3, FALSE);
2259 pinfo->srcport = tvb_get_ntoh24(tvb, local_offset); local_offset+=3;
2261 *offset = local_offset;
2264 /* Parse RETH - RDMA Extended Transport Header
2265 * IN: parentTree to add the dissection to - in this code the all_headers_tree
2266 * IN: tvb - the data buffer from wireshark
2267 * IN/OUT: The current and updated offset */
2269 parse_RETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
2271 gint local_offset = *offset;
2272 /* RETH - RDMA Extended Transport Header */
2273 proto_tree *RETH_header_tree = NULL;
2274 proto_item *RETH_header_item = NULL;
2276 RETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_RETH, tvb, local_offset, 16, FALSE);
2277 proto_item_set_text(RETH_header_item, "%s", "RETH - RDMA Extended Transport Header");
2278 RETH_header_tree = proto_item_add_subtree(RETH_header_item, ett_reth);
2280 proto_tree_add_item(RETH_header_tree, hf_infiniband_virtual_address, tvb, local_offset, 8, FALSE); local_offset+=8;
2281 proto_tree_add_item(RETH_header_tree, hf_infiniband_remote_key, tvb, local_offset, 4, FALSE); local_offset+=4;
2282 proto_tree_add_item(RETH_header_tree, hf_infiniband_dma_length, tvb, local_offset, 4, FALSE); local_offset+=4;
2284 *offset = local_offset;
2287 /* Parse AtomicETH - Atomic Extended Transport Header
2288 * IN: parentTree to add the dissection to - in this code the all_headers_tree
2289 * IN: tvb - the data buffer from wireshark
2290 * IN/OUT: The current and updated offset */
2292 parse_ATOMICETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
2294 gint local_offset = *offset;
2295 /* AtomicETH - Atomic Extended Transport Header */
2296 proto_tree *ATOMICETH_header_tree = NULL;
2297 proto_item *ATOMICETH_header_item = NULL;
2299 ATOMICETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_AtomicETH, tvb, local_offset, 28, FALSE);
2300 proto_item_set_text(ATOMICETH_header_item, "%s", "AtomicETH - Atomic Extended Transport Header");
2301 ATOMICETH_header_tree = proto_item_add_subtree(ATOMICETH_header_item, ett_atomiceth);
2303 proto_tree_add_item(ATOMICETH_header_tree, hf_infiniband_virtual_address, tvb, local_offset, 8, FALSE); local_offset+=8;
2304 proto_tree_add_item(ATOMICETH_header_tree, hf_infiniband_remote_key, tvb, local_offset, 4, FALSE); local_offset+=4;
2305 proto_tree_add_item(ATOMICETH_header_tree, hf_infiniband_swap_or_add_data, tvb, local_offset, 8, FALSE); local_offset+=8;
2306 proto_tree_add_item(ATOMICETH_header_tree, hf_infiniband_compare_data, tvb, local_offset, 8, FALSE); local_offset+=8;
2307 *offset = local_offset;
2310 /* Parse AETH - ACK Extended Transport Header
2311 * IN: parentTree to add the dissection to - in this code the all_headers_tree
2312 * IN: tvb - the data buffer from wireshark
2313 * IN/OUT: The current and updated offset */
2315 parse_AETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
2317 gint local_offset = *offset;
2318 /* AETH - ACK Extended Transport Header */
2319 proto_tree *AETH_header_tree = NULL;
2320 proto_item *AETH_header_item = NULL;
2322 AETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_AETH, tvb, local_offset, 4, FALSE);
2323 proto_item_set_text(AETH_header_item, "%s", "AETH - ACK Extended Transport Header");
2324 AETH_header_tree = proto_item_add_subtree(AETH_header_item, ett_aeth);
2326 proto_tree_add_item(AETH_header_tree, hf_infiniband_syndrome, tvb, local_offset, 1, FALSE); local_offset+=1;
2327 proto_tree_add_item(AETH_header_tree, hf_infiniband_message_sequence_number, tvb, local_offset, 3, FALSE); local_offset+=3;
2329 *offset = local_offset;
2332 /* Parse AtomicAckEth - Atomic ACK Extended Transport Header
2333 * IN: parentTree to add the dissection to - in this code the all_headers_tree
2334 * IN: tvb - the data buffer from wireshark
2335 * IN/OUT: The current and updated offset */
2337 parse_ATOMICACKETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
2339 gint local_offset = *offset;
2340 /* AtomicAckEth - Atomic ACK Extended Transport Header */
2341 proto_tree *ATOMICACKETH_header_tree = NULL;
2342 proto_item *ATOMICACKETH_header_item = NULL;
2344 ATOMICACKETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_AtomicAckETH, tvb, local_offset, 8, FALSE);
2345 proto_item_set_text(ATOMICACKETH_header_item, "%s", "ATOMICACKETH - Atomic ACK Extended Transport Header");
2346 ATOMICACKETH_header_tree = proto_item_add_subtree(ATOMICACKETH_header_item, ett_atomicacketh);
2347 proto_tree_add_item(ATOMICACKETH_header_tree, hf_infiniband_original_remote_data, tvb, local_offset, 8, FALSE); local_offset+=8;
2348 *offset = local_offset;
2351 /* Parse IMMDT - Immediate Data Extended Transport Header
2352 * IN: parentTree to add the dissection to - in this code the all_headers_tree
2353 * IN: tvb - the data buffer from wireshark
2354 * IN/OUT: The current and updated offset */
2356 parse_IMMDT(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
2358 gint local_offset = *offset;
2359 /* IMMDT - Immediate Data Extended Transport Header */
2360 proto_tree *IMMDT_header_tree = NULL;
2361 proto_item *IMMDT_header_item = NULL;
2363 IMMDT_header_item = proto_tree_add_item(parentTree, hf_infiniband_IMMDT, tvb, local_offset, 4, FALSE);
2364 proto_item_set_text(IMMDT_header_item, "%s", "IMMDT - Immediate Data Extended Transport Header");
2365 IMMDT_header_tree = proto_item_add_subtree(IMMDT_header_item, ett_immdt);
2366 proto_tree_add_item(IMMDT_header_tree, hf_infiniband_IMMDT, tvb, local_offset, 4, FALSE); local_offset+=4;
2367 *offset = local_offset;
2370 /* Parse IETH - Invalidate Extended Transport Header
2371 * IN: parentTree to add the dissection to - in this code the all_headers_tree
2372 * IN: tvb - the data buffer from wireshark
2373 * IN/OUT: The current and updated offset */
2375 parse_IETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
2377 gint local_offset = *offset;
2378 /* IETH - Invalidate Extended Transport Header */
2379 proto_tree *IETH_header_tree = NULL;
2380 proto_item *IETH_header_item = NULL;
2382 IETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_IETH, tvb, local_offset, 4, FALSE);
2383 proto_item_set_text(IETH_header_item, "%s", "IETH - Invalidate Extended Transport Header");
2384 IETH_header_tree = proto_item_add_subtree(IETH_header_item, ett_ieth);
2386 proto_tree_add_item(IETH_header_tree, hf_infiniband_IETH, tvb, local_offset, 4, FALSE); local_offset+=4;
2388 *offset = local_offset;
2391 /* Parse Payload - Packet Payload / Invariant CRC / Variant CRC
2392 * IN: parentTree to add the dissection to - in this code the all_headers_tree
2393 * IN: pinfo - packet info from wireshark
2394 * IN: tvb - the data buffer from wireshark
2395 * IN/OUT: offset - The current and updated offset
2396 * IN: length - Length of Payload */
2397 static void parse_PAYLOAD(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, gint *offset, gint length)
2399 gint local_offset = *offset;
2400 /* Payload - Packet Payload */
2401 proto_tree *PAYLOAD_header_tree = NULL;
2402 proto_item *PAYLOAD_header_item = NULL;
2403 guint8 management_class;
2404 tvbuff_t *volatile next_tvb;
2405 gint captured_length, reported_length;
2406 guint16 etype, reserved;
2407 const char *saved_proto;
2408 volatile gboolean dissector_found = FALSE;
2410 if(!tvb_bytes_exist(tvb, *offset, length)) /* previously consumed bytes + offset was all the data - none or corrupt payload */
2412 col_set_str(pinfo->cinfo, COL_INFO, "Invalid Packet Length from LRH! [Malformed Packet]");
2413 col_set_fence(pinfo->cinfo, COL_INFO);
2417 /* management datagrams are determined by the source/destination QPs */
2418 if (pinfo->srcport == 0 || pinfo->srcport == 1 || pinfo->destport == 0 || pinfo->destport == 1) /* management datagram */
2420 management_class = tvb_get_guint8(tvb, (*offset) + 1);
2422 if(((management_class >= (guint8)VENDOR_1_START) && (management_class <= (guint8)VENDOR_1_END))
2423 || ((management_class >= (guint8)VENDOR_2_START) && (management_class <= (guint8)VENDOR_2_END)))
2425 /* parse vendor specific */
2426 parse_VENDOR_MANAGEMENT(parentTree, tvb, offset);
2428 else if((management_class >= (guint8)APPLICATION_START) && (management_class <= (guint8)APPLICATION_END))
2430 /* parse application specific */
2431 parse_APPLICATION_MANAGEMENT(parentTree, tvb, offset);
2433 else if(((management_class == (guint8)0x00) || (management_class == (guint8)0x02))
2434 || ((management_class >= (guint8)0x50) && (management_class <= (guint8)0x80))
2435 || ((management_class >= (guint8)0x82)))
2437 /* parse reserved classes */
2438 parse_RESERVED_MANAGEMENT(parentTree, tvb, offset);
2440 else /* we have a normal management_class */
2442 switch(management_class)
2444 case SUBN_LID_ROUTED:
2445 /* parse subn man lid routed */
2446 parse_SUBN_LID_ROUTED(parentTree, pinfo, tvb, &local_offset);
2448 case SUBN_DIRECTED_ROUTE:
2449 /* parse subn directed route */
2450 parse_SUBN_DIRECTED_ROUTE(parentTree, pinfo, tvb, &local_offset);
2453 /* parse sub admin */
2454 parse_SUBNADMN(parentTree, pinfo, tvb, &local_offset);
2457 /* parse performance */
2458 parse_PERF(parentTree, tvb, pinfo, &local_offset);
2461 /* parse baseboard mgmt */
2462 parse_BM(parentTree, tvb, &local_offset);
2465 /* parse device management */
2466 parse_DEV_MGT(parentTree, tvb, &local_offset);
2469 /* parse communication management */
2470 parse_COM_MGT(parentTree, pinfo, tvb, &local_offset);
2473 /* parse snmp tunneling */
2474 parse_SNMP(parentTree, tvb, &local_offset);
2481 else /* Normal Data Packet - Parse as such */
2484 /* Calculation for Payload:
2485 * (tvb->length) Length of entire packet - (local_offset) Starting byte of Payload Data
2486 * offset addition is more complex for the payload.
2487 * We need the total length of the packet, - length of previous headers, + offset where payload started.
2488 * We also need to reserve 6 bytes for the CRCs which are not actually part of the payload. */
2490 etype = tvb_get_ntohs(tvb, local_offset);
2491 reserved = tvb_get_ntohs(tvb, local_offset + 2);
2493 /* try to recognize whether or not this is a Mellanox EoIB packet by the
2494 transport type and the 4 first bits of the payload */
2495 if (pref_dissect_eoib &&
2496 transport_type == TRANSPORT_UD &&
2497 tvb_get_bits8(tvb, local_offset*8, 4) == 0xC) {
2498 dissector_found = parse_EoIB(parentTree, tvb, local_offset, pinfo);
2501 /* IBA packet data could be anything in principle, however it is common
2502 * practice to carry non-IBA data encapsulated with an EtherType header,
2503 * similar to the RWH header. There is no way to identify these frames
2506 * If the appropriate option is set in protocol preferences,
2507 * We see if the first few bytes look like an EtherType header, and if so
2508 * call the appropriate dissector. If not we call the "data" dissector.
2510 if (!dissector_found && pref_identify_iba_payload && reserved == 0) {
2513 /* Get the captured length and reported length of the data
2514 after the Ethernet type. */
2515 captured_length = tvb_length_remaining(tvb, local_offset+4);
2516 reported_length = tvb_reported_length_remaining(tvb,
2519 next_tvb = tvb_new_subset(tvb, local_offset+4, captured_length,
2522 pinfo->ethertype = etype;
2524 /* Look for sub-dissector, and call it if found.
2525 Catch exceptions, so that if the reported length of "next_tvb"
2526 was reduced by some dissector before an exception was thrown,
2527 we can still put in an item for the trailer. */
2528 saved_proto = pinfo->current_proto;
2529 pd_save = pinfo->private_data;
2532 dissector_found = dissector_try_port(ethertype_dissector_table,
2533 etype, next_tvb, pinfo, top_tree);
2535 CATCH(BoundsError) {
2536 /* Somebody threw BoundsError, which means that:
2538 1) a dissector was found, so we don't need to
2539 dissect the payload as data or update the
2540 protocol or info columns;
2542 2) dissecting the payload found that the packet was
2543 cut off by a snapshot length before the end of
2544 the payload. The trailer comes after the payload,
2545 so *all* of the trailer is cut off, and we'll
2546 just get another BoundsError if we add the trailer.
2548 Therefore, we just rethrow the exception so it gets
2549 reported; we don't dissect the trailer or do anything
2553 CATCH(OutOfMemoryError) {
2557 /* Somebody threw an exception other than BoundsError, which
2558 means that a dissector was found, so we don't need to
2559 dissect the payload as data or update the protocol or info
2560 columns. We just show the exception and then drive on
2561 to show the trailer, after noting that a dissector was
2562 found and restoring the protocol value that was in effect
2563 before we called the subdissector. */
2565 /* Restore the private_data structure in case one of the
2566 * called dissectors modified it (and, due to the exception,
2567 * was unable to restore it).
2569 pinfo->private_data = pd_save;
2571 show_exception(next_tvb, pinfo, top_tree, EXCEPT_CODE, GET_MESSAGE);
2572 dissector_found = TRUE;
2573 pinfo->current_proto = saved_proto;
2577 if (dissector_found) {
2578 /* now create payload entry to show Ethertype */
2579 PAYLOAD_header_item = proto_tree_add_item(parentTree, hf_infiniband_payload, tvb, local_offset, tvb_reported_length_remaining(tvb, local_offset)-6, FALSE);
2580 proto_item_set_text(PAYLOAD_header_item, "%s", "IBA Payload - appears to be EtherType encapsulated");
2581 PAYLOAD_header_tree = proto_item_add_subtree(PAYLOAD_header_item, ett_payload);
2582 proto_tree_add_uint(PAYLOAD_header_tree, hf_infiniband_etype, tvb,
2583 local_offset, 2, tvb_get_ntohs(tvb, local_offset));
2587 proto_tree_add_uint(PAYLOAD_header_tree, hf_infiniband_reserved16_RWH, tvb,
2588 local_offset, 2, tvb_get_ntohs(tvb, local_offset));
2594 captured_length = tvb_length_remaining(tvb, local_offset);
2595 reported_length = tvb_reported_length_remaining(tvb,
2598 if (reported_length >= 6)
2599 reported_length -= 6;
2600 if (captured_length > reported_length)
2601 captured_length = reported_length;
2603 next_tvb = tvb_new_subset(tvb, local_offset,
2607 /* Try any heuristic dissectors that requested a chance to try and dissect IB payloads */
2608 if (!dissector_found) {
2609 dissector_found = dissector_try_heuristic(heur_dissectors_payload, next_tvb, pinfo, parentTree);
2612 if (!dissector_found) {
2613 /* No sub-dissector found.
2614 Label rest of packet as "Data" */
2615 call_dissector(data_handle, next_tvb, pinfo, top_tree);
2620 /*parse_RWH(parentTree, tvb, &local_offset, pinfo);*/
2622 /* Will contain ICRC and VCRC = 4+2 */
2623 local_offset = tvb_reported_length(tvb) - 6;
2626 *offset = local_offset;
2629 /* Parse VENDOR - Parse a vendor specific or unknown header sequence
2630 * IN: parentTree to add the dissection to - in this code the all_headers_tree
2631 * IN: tvb - the data buffer from wireshark
2632 * IN/OUT: The current and updated offset */
2633 static void parse_VENDOR(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
2635 gint local_offset = *offset;
2636 proto_tree *VENDOR_header_tree = NULL;
2637 proto_item *VENDOR_header_item = NULL;
2639 VENDOR_header_item = proto_tree_add_item(parentTree, hf_infiniband_vendor, tvb, local_offset, 4, FALSE);
2640 proto_item_set_text(VENDOR_header_item, "%s", "Vendor Specific or Unknown Header Sequence");
2641 VENDOR_header_tree = proto_item_add_subtree(VENDOR_header_item, ett_vendor);
2642 proto_tree_add_item(VENDOR_header_tree, hf_infiniband_vendor, tvb, local_offset, -1, FALSE);
2643 *offset = local_offset;
2646 /* Parse IPv6 - Parse an IPv6 Packet
2647 * IN: parentTree to add the dissection to - in this code the all_headers_tree
2648 * IN: tvb - the data buffer from wireshark
2649 * IN/OUT: The current and updated offset
2650 * IN: pinfo - packet info from wireshark */
2651 static void parse_IPvSix(proto_tree *parentTree, tvbuff_t *tvb, gint *offset, packet_info *pinfo)
2655 /* (- 2) for VCRC which lives at the end of the packet */
2656 ipv6_tvb = tvb_new_subset(tvb, *offset,
2657 tvb_length_remaining(tvb, *offset) - 2,
2658 tvb_reported_length_remaining(tvb, *offset) - 2);
2659 call_dissector(ipv6_handle, ipv6_tvb, pinfo, parentTree);
2660 *offset = tvb_reported_length(tvb) - 2;
2662 /* Display the VCRC */
2663 proto_tree_add_item(parentTree, hf_infiniband_variant_crc, tvb, *offset, 2, FALSE);
2666 /* Parse EtherType - Parse a generic IP packaet with an EtherType of IP or ARP
2667 * IN: parentTree to add the dissection to - in this code the all_headers_tree
2668 * IN: tvb - the data buffer from wireshark
2669 * IN/OUT: The current and updated offset
2670 * IN: pinfo - packet info from wireshark */
2671 static void parse_RWH(proto_tree *ah_tree, tvbuff_t *tvb, gint *offset, packet_info *pinfo)
2676 /* RWH - Raw Header */
2677 proto_tree *RWH_header_tree = NULL;
2678 proto_item *RWH_header_item = NULL;
2680 gint captured_length, reported_length;
2682 RWH_header_item = proto_tree_add_item(ah_tree, hf_infiniband_RWH, tvb, *offset, 4, FALSE);
2683 proto_item_set_text(RWH_header_item, "%s", "RWH - Raw Header");
2684 RWH_header_tree = proto_item_add_subtree(RWH_header_item, ett_rwh);
2686 ether_type = tvb_get_ntohs(tvb, *offset);
2688 ether_type = ether_type & 0x0F; /* mask off reserved bits just in case. */
2690 proto_tree_add_uint(RWH_header_tree, hf_infiniband_etype, tvb, *offset, 2,
2694 proto_tree_add_item(RWH_header_tree, hf_infiniband_reserved16_RWH, tvb,
2699 /* Get the captured length and reported length of the data
2700 * after the Ethernet type. */
2701 captured_length = tvb_length_remaining(tvb, *offset);
2702 reported_length = tvb_reported_length_remaining(tvb, *offset);
2704 /* Construct a tvbuff for the payload after the Ethernet type,
2705 * not including the FCS. */
2706 if (captured_length >= 0 && reported_length >= 0) {
2707 if (reported_length >= 2)
2708 reported_length -= 2;
2709 if (captured_length > reported_length)
2710 captured_length = reported_length;
2713 next_tvb = tvb_new_subset(tvb, *offset, captured_length, reported_length);
2714 if (!dissector_try_port(ethertype_dissector_table, ether_type,
2715 next_tvb, pinfo, top_tree))
2716 call_dissector(data_handle, next_tvb, pinfo, top_tree);
2718 *offset = tvb_reported_length(tvb) - 2;
2719 /* Display the VCRC */
2720 proto_tree_add_item(ah_tree, hf_infiniband_variant_crc, tvb, *offset, 2, FALSE);
2724 /* Parse a Mellanox EoIB Encapsulation Header and the associated Ethernet frame
2725 * IN: parentTree to add the dissection to - in this code the all_headers_tree
2726 * IN: tvb - the data buffer from wireshark
2727 * IN: The current offset
2728 * IN: pinfo - packet info from wireshark */
2729 static gboolean parse_EoIB(proto_tree *tree, tvbuff_t *tvb, gint offset, packet_info *pinfo)
2731 proto_item *header_item;
2732 proto_tree *header_subtree;
2735 tvbuff_t *encap_tvb;
2736 /* the encapsulated eoib size (including the header!) is remaining length-6 bytes of CRC */
2737 int encap_size = tvb_reported_length_remaining(tvb, offset) - 6;
2739 if (encap_size < 4) {
2740 /* not even large enough to contain the eoib encap header. error! */
2744 encap_tvb = tvb_new_subset(tvb, offset + 4, tvb_length_remaining(tvb, offset + 4), encap_size - 4);
2746 header_item = proto_tree_add_item(tree, hf_infiniband_EOIB, tvb, offset, 4, FALSE);
2747 header_subtree = proto_item_add_subtree(header_item, ett_eoib);
2749 proto_tree_add_item(header_subtree, hf_infiniband_ver, tvb, offset, 2, FALSE);
2750 proto_tree_add_item(header_subtree, hf_infiniband_tcp_chk, tvb, offset, 2, FALSE);
2751 proto_tree_add_item(header_subtree, hf_infiniband_ip_chk, tvb, offset, 2, FALSE);
2752 proto_tree_add_item(header_subtree, hf_infiniband_fcs, tvb, offset, 2, FALSE);
2754 ms = tvb_get_bits8(tvb, (offset + 1)*8 + 2, 1);
2755 seg_offset = tvb_get_bits8(tvb, (offset + 1)*8 + 3, 5);
2757 proto_tree_add_item(header_subtree, hf_infiniband_ms, tvb, offset, 2, FALSE);
2758 proto_tree_add_item(header_subtree, hf_infiniband_seg_off, tvb, offset, 2, FALSE); offset += 2;
2759 proto_tree_add_item(header_subtree, hf_infiniband_seg_id, tvb, offset, 2, FALSE); offset += 2;
2761 if (seg_offset || ms) {
2762 /* this is a fragment of an encapsulated Ethernet jumbo frame, parse as data */
2763 call_dissector(data_handle, encap_tvb, pinfo, top_tree);
2765 /* non-fragmented frames can be fully parsed */
2766 call_dissector(eth_handle, encap_tvb, pinfo, top_tree);
2773 /* Parse Subnet Management (LID Routed)
2774 * IN: parentTree to add the dissection to
2775 * IN: pinfo - packet info from wireshark
2776 * IN: tvb - the data buffer from wireshark
2777 * IN/OUT: The current and updated offset */
2778 static void parse_SUBN_LID_ROUTED(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, gint *offset)
2780 /* Parse the Common MAD Header */
2783 proto_tree *SUBN_LID_ROUTED_header_tree = NULL;
2784 proto_item *SUBN_LID_ROUTED_header_item = NULL;
2786 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
2788 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
2792 local_offset = *offset;
2794 /* local_offset - 24 here because when we come out of parse_MAD_Common, the offset it sitting at the data section. */
2795 SUBN_LID_ROUTED_header_item = proto_tree_add_item(parentTree, hf_infiniband_SMP_LID, tvb, local_offset - 24, 256, FALSE);
2796 proto_item_set_text(SUBN_LID_ROUTED_header_item, "%s", "SMP (LID Routed) ");
2797 SUBN_LID_ROUTED_header_tree = proto_item_add_subtree(SUBN_LID_ROUTED_header_item, ett_subn_lid_routed);
2798 proto_tree_add_item(SUBN_LID_ROUTED_header_tree, hf_infiniband_m_key, tvb, local_offset, 8, FALSE); local_offset +=8;
2799 proto_tree_add_item(SUBN_LID_ROUTED_header_tree, hf_infiniband_reserved256, tvb, local_offset, 32, FALSE); local_offset +=32;
2801 label_SUBM_Method(SUBN_LID_ROUTED_header_item, &MadData, pinfo);
2802 label_SUBM_Attribute(SUBN_LID_ROUTED_header_item, &MadData, pinfo);
2804 /* Try to do the detail parse of the attribute. If there is an error, or the attribute is unknown, we'll just highlight the generic data. */
2805 if(!parse_SUBM_Attribute(SUBN_LID_ROUTED_header_tree, tvb, &local_offset, &MadData))
2807 proto_tree_add_item(SUBN_LID_ROUTED_header_tree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE); local_offset +=64;
2810 proto_tree_add_item(SUBN_LID_ROUTED_header_tree, hf_infiniband_reserved1024, tvb, local_offset, 128, FALSE); local_offset +=128;
2811 *offset = local_offset;
2814 /* Parse Subnet Management (Directed Route)
2815 * IN: parentTree to add the dissection to
2816 * IN: tvb - the data buffer from wireshark
2817 * IN/OUT: The current and updated offset */
2818 static void parse_SUBN_DIRECTED_ROUTE(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, gint *offset)
2820 /* Parse the Common MAD Header */
2823 proto_tree *SUBN_DIRECTED_ROUTE_header_tree = NULL;
2824 proto_item *SUBN_DIRECTED_ROUTE_header_item = NULL;
2826 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
2828 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
2832 local_offset = *offset;
2834 /* local_offset - 24 here because when we come out of parse_MAD_Common, the offset it sitting at the data section.
2835 * We need to go backwards because this particular SMP uses the class specific portion of the Common MAD Header */
2836 SUBN_DIRECTED_ROUTE_header_item = proto_tree_add_item(parentTree, hf_infiniband_SMP_DIRECTED, tvb, local_offset - 24, 256, FALSE);
2837 proto_item_set_text(SUBN_DIRECTED_ROUTE_header_item, "%s", "SMP (Directed Route) ");
2838 SUBN_DIRECTED_ROUTE_header_tree = proto_item_add_subtree(SUBN_DIRECTED_ROUTE_header_item, ett_subn_directed_route);
2840 label_SUBM_Method(SUBN_DIRECTED_ROUTE_header_item, &MadData, pinfo);
2841 label_SUBM_Attribute(SUBN_DIRECTED_ROUTE_header_item, &MadData, pinfo);
2843 /* Place us at offset 4, the "D" Bit (Direction bit for Directed Route SMPs) */
2845 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_d, tvb, local_offset, 1, FALSE);
2846 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_smp_status, tvb, local_offset, 2, FALSE); local_offset +=2;
2847 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_hop_pointer, tvb, local_offset, 1, FALSE); local_offset +=1;
2848 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_hop_count, tvb, local_offset, 1, FALSE); local_offset +=1;
2849 local_offset += 16; /* Skip over the rest of the Common MAD Header... It's already dissected by parse_MAD_Common */
2850 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_m_key, tvb, local_offset, 8, FALSE); local_offset +=8;
2851 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_dr_slid, tvb, local_offset, 2, FALSE); local_offset +=2;
2852 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_dr_dlid, tvb, local_offset, 2, FALSE); local_offset +=2;
2853 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_reserved28, tvb, local_offset, 28, FALSE); local_offset +=28;
2855 /* Try to do the detail parse of the attribute. If there is an error, or the attribute is unknown, we'll just highlight the generic data. */
2856 if(!parse_SUBM_Attribute(SUBN_DIRECTED_ROUTE_header_tree, tvb, &local_offset, &MadData))
2858 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE); local_offset +=64;
2861 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_initial_path, tvb, local_offset, 64, FALSE); local_offset +=64;
2862 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_return_path, tvb, local_offset, 64, FALSE); local_offset +=64;
2863 *offset = local_offset;
2866 /* Parse Subnet Administration
2867 * IN: parentTree to add the dissection to
2868 * IN: pinfo - packet info from wireshark
2869 * IN: tvb - the data buffer from wireshark
2870 * IN/OUT: The current and updated offset */
2871 static void parse_SUBNADMN(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, gint *offset)
2873 /* Parse the Common MAD Header */
2876 proto_tree *SUBNADMN_header_tree = NULL;
2877 proto_item *SUBNADMN_header_item = NULL;
2879 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
2881 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
2884 if(!parse_RMPP(parentTree, tvb, offset))
2886 /* TODO: Mark Corrupt Packet */
2889 local_offset = *offset;
2891 SUBNADMN_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset - 36, 256, FALSE);
2892 proto_item_set_text(SUBNADMN_header_item, "%s", "SMA");
2893 SUBNADMN_header_tree = proto_item_add_subtree(SUBNADMN_header_item, ett_subnadmin);
2895 proto_tree_add_item(SUBNADMN_header_tree, hf_infiniband_sm_key, tvb, local_offset, 8, FALSE); local_offset+=8;
2896 proto_tree_add_item(SUBNADMN_header_tree, hf_infiniband_attribute_offset, tvb, local_offset, 2, FALSE); local_offset+=4;
2897 proto_tree_add_item(SUBNADMN_header_tree, hf_infiniband_reserved16, tvb, local_offset, 2, FALSE); local_offset+=4;
2898 proto_tree_add_item(SUBNADMN_header_tree, hf_infiniband_component_mask, tvb, local_offset, 8, FALSE); local_offset+=8;
2900 label_SUBA_Method(SUBNADMN_header_item, &MadData, pinfo);
2901 label_SUBA_Attribute(SUBNADMN_header_item, &MadData, pinfo);
2903 if(!parse_SUBA_Attribute(SUBNADMN_header_tree, tvb, &local_offset, &MadData))
2905 proto_tree_add_item(SUBNADMN_header_tree, hf_infiniband_subnet_admin_data, tvb, local_offset, 200, FALSE); local_offset+=200;
2907 *offset = local_offset;
2910 /* Parse Performance Management
2911 * IN: parentTree to add the dissection to
2912 * IN: tvb - the data buffer from wireshark
2913 * IN: pinfo - the pinfo struct from wireshark
2914 * IN/OUT: The current and updated offset */
2915 static void parse_PERF(proto_tree *parentTree, tvbuff_t *tvb, packet_info *pinfo, gint *offset)
2917 /* Parse the Common MAD Header */
2920 proto_item *PERF_header_item = NULL;
2922 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
2924 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
2928 local_offset = *offset; /* offset now points to the start of the MAD data field */
2930 switch (MadData.attributeID) {
2931 case ATTR_PORT_COUNTERS:
2932 parse_PERF_PortCounters(parentTree, tvb, pinfo, &local_offset);
2934 case ATTR_PORT_COUNTERS_EXT:
2935 parse_PERF_PortCountersExtended(parentTree, tvb, pinfo, &local_offset);
2938 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, MAD_DATA_SIZE, FALSE); local_offset += MAD_DATA_SIZE;
2939 proto_item_set_text(PERF_header_item, "%s", "PERF - Performance Management MAD (Dissector Not Implemented)");
2943 *offset = local_offset;
2946 /* Parse Baseboard Management
2947 * IN: parentTree to add the dissection to
2948 * IN: tvb - the data buffer from wireshark
2949 * IN/OUT: The current and updated offset */
2950 static void parse_BM(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
2952 /* Parse the Common MAD Header */
2955 proto_item *PERF_header_item = NULL;
2957 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
2959 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
2962 local_offset = *offset;
2964 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, MAD_DATA_SIZE, FALSE); local_offset += MAD_DATA_SIZE;
2965 proto_item_set_text(PERF_header_item, "%s", "BM - Baseboard Management MAD (Dissector Not Implemented)");
2966 *offset = local_offset;
2969 /* Parse Device Management
2970 * IN: parentTree to add the dissection to
2971 * IN: tvb - the data buffer from wireshark
2972 * IN/OUT: The current and updated offset */
2973 static void parse_DEV_MGT(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
2975 /* Parse the Common MAD Header */
2978 proto_item *PERF_header_item = NULL;
2980 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
2982 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
2985 local_offset = *offset;
2986 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, MAD_DATA_SIZE, FALSE); local_offset += MAD_DATA_SIZE;
2987 proto_item_set_text(PERF_header_item, "%s", "DEV_MGT - Device Management MAD (Dissector Not Implemented)");
2988 *offset = local_offset;
2991 /* Parse Communications Management
2992 * IN: parentTree to add the dissection to
2993 * IN: tvb - the data buffer from wireshark
2994 * IN/OUT: The current and updated offset */
2995 static void parse_COM_MGT(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, gint *offset)
2999 guint32 local_qpn = 0, remote_qpn = 0;
3000 guint8 *local_gid, *remote_gid;
3001 guint32 local_lid, remote_lid;
3003 const char *label = NULL;
3004 proto_item *CM_header_item = NULL;
3005 proto_tree *CM_header_tree = NULL;
3006 connection_context *connection = NULL; /* we'll use this to store new connections this CM packet is establishing*/
3009 local_gid = ep_alloc(GID_SIZE);
3010 remote_gid = ep_alloc(GID_SIZE);
3012 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
3014 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
3017 local_offset = *offset;
3019 CM_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 140, FALSE);
3021 label = val_to_str(MadData.attributeID, CM_Attributes, "(Unknown CM Attribute)");
3023 proto_item_set_text(CM_header_item, "CM %s", label);
3024 col_clear(pinfo->cinfo, COL_INFO);
3025 col_append_fstr(pinfo->cinfo, COL_INFO, "CM: %s", label);
3027 CM_header_tree = proto_item_add_subtree(CM_header_item, ett_cm);
3029 switch (MadData.attributeID) {
3031 proto_tree_add_item(CM_header_tree, hf_cm_req_local_comm_id, tvb, local_offset, 4, FALSE); local_offset += 4;
3032 local_offset += 4; /* skip reserved */
3033 proto_tree_add_item(CM_header_tree, hf_cm_req_service_id, tvb, local_offset, 8, FALSE);
3034 serviceid = tvb_get_ntoh64(tvb, local_offset); local_offset += 8;
3035 proto_tree_add_item(CM_header_tree, hf_cm_req_local_ca_guid, tvb, local_offset, 8, FALSE); local_offset += 8;
3036 local_offset += 4; /* skip reserved */
3037 proto_tree_add_item(CM_header_tree, hf_cm_req_local_qkey, tvb, local_offset, 4, FALSE); local_offset += 4;
3038 proto_tree_add_item(CM_header_tree, hf_cm_req_local_qpn, tvb, local_offset, 3, FALSE);
3039 local_qpn = tvb_get_ntoh24(tvb, local_offset); local_offset += 3;
3040 proto_tree_add_item(CM_header_tree, hf_cm_req_respo_res, tvb, local_offset, 1, FALSE); local_offset += 1;
3041 proto_tree_add_item(CM_header_tree, hf_cm_req_local_eecn, tvb, local_offset, 3, FALSE); local_offset += 3;
3042 proto_tree_add_item(CM_header_tree, hf_cm_req_init_depth, tvb, local_offset, 1, FALSE); local_offset += 1;
3043 proto_tree_add_item(CM_header_tree, hf_cm_req_remote_eecn, tvb, local_offset, 3, FALSE); local_offset += 3;
3044 proto_tree_add_item(CM_header_tree, hf_cm_req_remote_cm_resp_to, tvb, local_offset, 1, FALSE);
3045 proto_tree_add_item(CM_header_tree, hf_cm_req_transp_serv_type, tvb, local_offset, 1, FALSE);
3046 proto_tree_add_item(CM_header_tree, hf_cm_req_e2e_flow_ctrl, tvb, local_offset, 1, FALSE); local_offset += 1;
3047 proto_tree_add_item(CM_header_tree, hf_cm_req_start_psn, tvb, local_offset, 3, FALSE); local_offset += 3;
3048 proto_tree_add_item(CM_header_tree, hf_cm_req_local_cm_resp_to, tvb, local_offset, 1, FALSE);
3049 proto_tree_add_item(CM_header_tree, hf_cm_req_retry_count, tvb, local_offset, 1, FALSE); local_offset += 1;
3050 proto_tree_add_item(CM_header_tree, hf_cm_req_pkey, tvb, local_offset, 2, FALSE); local_offset += 2;
3051 proto_tree_add_item(CM_header_tree, hf_cm_req_path_pp_mtu, tvb, local_offset, 1, FALSE);
3052 proto_tree_add_item(CM_header_tree, hf_cm_req_rdc_exists, tvb, local_offset, 1, FALSE);
3053 proto_tree_add_item(CM_header_tree, hf_cm_req_rnr_retry_count, tvb, local_offset, 1, FALSE); local_offset += 1;
3054 proto_tree_add_item(CM_header_tree, hf_cm_req_max_cm_retries, tvb, local_offset, 1, FALSE);
3055 proto_tree_add_item(CM_header_tree, hf_cm_req_srq, tvb, local_offset, 1, FALSE);
3056 local_offset += 1; /* skip reserved */
3057 proto_tree_add_item(CM_header_tree, hf_cm_req_primary_local_lid, tvb, local_offset, 2, FALSE);
3058 local_lid = tvb_get_ntohs(tvb, local_offset); local_offset += 2;
3059 proto_tree_add_item(CM_header_tree, hf_cm_req_primary_remote_lid, tvb, local_offset, 2, FALSE);
3060 remote_lid = tvb_get_ntohs(tvb, local_offset); local_offset += 2;
3061 proto_tree_add_item(CM_header_tree, hf_cm_req_primary_local_gid, tvb, local_offset, 16, FALSE);
3062 tvb_get_ipv6(tvb, local_offset, (struct e_in6_addr*)local_gid); local_offset += 16;
3063 proto_tree_add_item(CM_header_tree, hf_cm_req_primary_remote_gid, tvb, local_offset, 16, FALSE);
3064 tvb_get_ipv6(tvb, local_offset, (struct e_in6_addr*)remote_gid); local_offset += 16;
3065 proto_tree_add_item(CM_header_tree, hf_cm_req_primary_flow_label, tvb, local_offset, 2, FALSE); local_offset += 2;
3066 local_offset += 1; /* skip reserved */
3067 proto_tree_add_item(CM_header_tree, hf_cm_req_primary_packet_rate, tvb, local_offset, 1, FALSE); local_offset += 1;
3068 proto_tree_add_item(CM_header_tree, hf_cm_req_primary_traffic_class, tvb, local_offset, 1, FALSE); local_offset += 1;
3069 proto_tree_add_item(CM_header_tree, hf_cm_req_primary_hop_limit, tvb, local_offset, 1, FALSE); local_offset += 1;
3070 proto_tree_add_item(CM_header_tree, hf_cm_req_primary_sl, tvb, local_offset, 1, FALSE);
3071 proto_tree_add_item(CM_header_tree, hf_cm_req_primary_subnet_local, tvb, local_offset, 1, FALSE);
3072 local_offset += 1; /* skip reserved */
3073 proto_tree_add_item(CM_header_tree, hf_cm_req_primary_local_ack_to, tvb, local_offset, 1, FALSE);
3074 local_offset += 1; /* skip reserved */
3075 proto_tree_add_item(CM_header_tree, hf_cm_req_alt_local_lid, tvb, local_offset, 2, FALSE); local_offset += 2;
3076 proto_tree_add_item(CM_header_tree, hf_cm_req_alt_remote_lid, tvb, local_offset, 2, FALSE); local_offset += 2;
3077 proto_tree_add_item(CM_header_tree, hf_cm_req_alt_local_gid, tvb, local_offset, 16, FALSE); local_offset += 16;
3078 proto_tree_add_item(CM_header_tree, hf_cm_req_alt_remote_gid, tvb, local_offset, 16, FALSE); local_offset += 16;
3079 proto_tree_add_item(CM_header_tree, hf_cm_req_flow_label, tvb, local_offset, 2, FALSE); local_offset += 2;
3080 local_offset += 1; /* skip reserved */
3081 proto_tree_add_item(CM_header_tree, hf_cm_req_packet_rate, tvb, local_offset, 1, FALSE); local_offset += 1;
3082 proto_tree_add_item(CM_header_tree, hf_cm_req_alt_traffic_class, tvb, local_offset, 1, FALSE); local_offset += 1;
3083 proto_tree_add_item(CM_header_tree, hf_cm_req_alt_hop_limit, tvb, local_offset, 1, FALSE); local_offset += 1;
3084 proto_tree_add_item(CM_header_tree, hf_cm_req_SL, tvb, local_offset, 1, FALSE);
3085 proto_tree_add_item(CM_header_tree, hf_cm_req_subnet_local, tvb, local_offset, 1, FALSE);
3086 local_offset += 1; /* skip reserved */
3087 proto_tree_add_item(CM_header_tree, hf_cm_req_local_ACK_timeout, tvb, local_offset, 1, FALSE);
3088 local_offset += 1; /* skip reserved */
3090 /* the following saves information about the conversation this packet defines,
3091 so there's no point in doing it more than once per packet */
3092 if(!pinfo->fd->flags.visited)
3094 conversation_t *conv;
3095 conversation_infiniband_data *proto_data = NULL;
3096 guint64 *hash_key = g_malloc(sizeof(hash_key));
3098 /* create a new connection context and store it in the hash table */
3099 connection = g_malloc(sizeof(connection_context));
3100 memcpy(&(connection->req_gid), local_gid, GID_SIZE);
3101 memcpy(&(connection->resp_gid), remote_gid, GID_SIZE);
3102 connection->req_lid = local_lid;
3103 connection->resp_lid = remote_lid;
3104 connection->req_qp = local_qpn;
3105 connection->resp_qp = 0; /* not currently known. we'll fill this in later */
3106 connection->service_id = serviceid;
3108 /* save the context to the context hash table, for retrieval when the corresponding
3109 CM REP message arrives*/
3110 *hash_key = MadData.transactionID;
3111 ADD_ADDRESS_TO_HASH(*hash_key, &pinfo->src);
3112 g_hash_table_replace(CM_context_table, hash_key, connection);
3114 /* Now we create a conversation for the CM exchange. This uses both
3115 sides of the conversation since CM packets also include the source
3117 proto_data = se_alloc(sizeof(conversation_infiniband_data));
3118 proto_data->service_id = connection->service_id;
3120 conv = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst,
3121 PT_IBQP, pinfo->srcport, pinfo->destport, 0);
3122 conversation_add_proto_data(conv, proto_infiniband, proto_data);
3125 /* give a chance for subdissectors to analyze the private data */
3126 next_tvb = tvb_new_subset(tvb, local_offset, 92, -1);
3127 if (! dissector_try_heuristic(heur_dissectors_cm_private, next_tvb, pinfo, parentTree) )
3128 /* if none reported success, add this as raw "data" */
3129 proto_tree_add_item(CM_header_tree, hf_cm_req_private_data, tvb, local_offset, 92, FALSE);
3134 proto_tree_add_item(CM_header_tree, hf_cm_rep_localcommid, tvb, local_offset, 4, FALSE); local_offset += 4;
3135 proto_tree_add_item(CM_header_tree, hf_cm_rep_remotecommid, tvb, local_offset, 4, FALSE); local_offset += 4;
3136 proto_tree_add_item(CM_header_tree, hf_cm_rep_localqkey, tvb, local_offset, 4, FALSE); local_offset += 4;
3137 proto_tree_add_item(CM_header_tree, hf_cm_rep_localqpn, tvb, local_offset, 3, FALSE);
3138 remote_qpn = tvb_get_ntoh24(tvb, local_offset); local_offset += 3;
3139 local_offset += 1; /* skip reserved */
3140 proto_tree_add_item(CM_header_tree, hf_cm_rep_localeecontnum, tvb, local_offset, 3, FALSE); local_offset += 3;
3141 local_offset += 1; /* skip reserved */
3142 proto_tree_add_item(CM_header_tree, hf_cm_rep_startingpsn, tvb, local_offset, 3, FALSE); local_offset += 3;
3143 local_offset += 1; /* skip reserved */
3144 proto_tree_add_item(CM_header_tree, hf_cm_rep_responderres, tvb, local_offset, 1, FALSE); local_offset += 1;
3145 proto_tree_add_item(CM_header_tree, hf_cm_rep_initiatordepth, tvb, local_offset, 1, FALSE); local_offset += 1;
3146 proto_tree_add_item(CM_header_tree, hf_cm_rep_tgtackdelay, tvb, local_offset, 1, FALSE);
3147 proto_tree_add_item(CM_header_tree, hf_cm_rep_failoveracc, tvb, local_offset, 1, FALSE);
3148 proto_tree_add_item(CM_header_tree, hf_cm_rep_e2eflowctl, tvb, local_offset, 1, FALSE); local_offset += 1;
3149 proto_tree_add_item(CM_header_tree, hf_cm_rep_rnrretrycount, tvb, local_offset, 1, FALSE);
3150 proto_tree_add_item(CM_header_tree, hf_cm_rep_srq, tvb, local_offset, 1, FALSE);
3151 local_offset += 1; /* skip reserved */
3152 proto_tree_add_item(CM_header_tree, hf_cm_rep_localcaguid, tvb, local_offset, 8, FALSE); local_offset += 8;
3154 /* the following saves information about the conversation this packet defines,
3155 so there's no point in doing it more than once per packet */
3156 if(!pinfo->fd->flags.visited)
3158 /* get the previously saved context for this connection */
3160 hash_key = MadData.transactionID;
3161 ADD_ADDRESS_TO_HASH(hash_key, &pinfo->dst);
3162 connection = g_hash_table_lookup(CM_context_table, &hash_key);
3164 /* if an appropriate connection was not found there's something wrong, but nothing we can
3165 do about it here - so just skip saving the context */
3169 resp_addr; /* we'll fill these in and pass them to conversation_new */
3170 conversation_t *conv;
3171 conversation_infiniband_data *proto_data = NULL;
3173 connection->resp_qp = remote_qpn;
3175 proto_data = se_alloc(sizeof(conversation_infiniband_data));
3176 proto_data->service_id = connection->service_id;
3178 /* RC traffic never(?) includes a field indicating the source QPN, so
3179 the destination host knows it only from previous context (a single
3180 QPN on the host that is part of an RC can only receive traffic from
3181 that RC). For this reason we do not register conversations with both
3182 sides, but rather we register the same conversation twice - once for
3183 each side of the Reliable Connection. */
3185 /* first register the conversation using the GIDs */
3186 SET_ADDRESS(&req_addr, AT_IB, GID_SIZE, connection->req_gid);
3187 SET_ADDRESS(&resp_addr, AT_IB, GID_SIZE, connection->resp_gid);
3189 conv = conversation_new(pinfo->fd->num, &req_addr, &req_addr,
3190 PT_IBQP, connection->req_qp, connection->req_qp, NO_ADDR2|NO_PORT2);
3191 conversation_add_proto_data(conv, proto_infiniband, proto_data);
3192 conv = conversation_new(pinfo->fd->num, &resp_addr, &resp_addr,
3193 PT_IBQP, connection->resp_qp, connection->resp_qp, NO_ADDR2|NO_PORT2);
3194 conversation_add_proto_data(conv, proto_infiniband, proto_data);
3196 /* next, register the conversation using the LIDs */
3197 SET_ADDRESS(&req_addr, AT_IB, sizeof(guint16), &(connection->req_lid));
3198 SET_ADDRESS(&resp_addr, AT_IB, sizeof(guint16), &(connection->resp_lid));
3200 conv = conversation_new(pinfo->fd->num, &req_addr, &req_addr,
3201 PT_IBQP, connection->req_qp, connection->req_qp, NO_ADDR2|NO_PORT2);
3202 conversation_add_proto_data(conv, proto_infiniband, proto_data);
3203 conv = conversation_new(pinfo->fd->num, &resp_addr, &resp_addr,
3204 PT_IBQP, connection->resp_qp, connection->resp_qp, NO_ADDR2|NO_PORT2);
3205 conversation_add_proto_data(conv, proto_infiniband, proto_data);
3207 g_hash_table_remove(CM_context_table, &hash_key);
3211 /* give a chance for subdissectors to get the private data */
3212 next_tvb = tvb_new_subset(tvb, local_offset, 196, -1);
3213 if (! dissector_try_heuristic(heur_dissectors_cm_private, next_tvb, pinfo, parentTree) )
3214 /* if none reported success, add this as raw "data" */
3215 proto_tree_add_item(CM_header_tree, hf_cm_rep_privatedata, tvb, local_offset, 196, FALSE);
3217 local_offset += 196;
3220 proto_tree_add_item(CM_header_tree, hf_cm_rtu_localcommid, tvb, local_offset, 4, FALSE); local_offset += 4;
3221 proto_tree_add_item(CM_header_tree, hf_cm_rtu_remotecommid, tvb, local_offset, 4, FALSE); local_offset += 4;
3222 /* currently only REQ/REP call subdissectors for the private data */
3223 proto_tree_add_item(CM_header_tree, hf_cm_rtu_privatedata, tvb, local_offset, 224, FALSE); local_offset += 224;
3226 proto_tree_add_item(CM_header_tree, hf_cm_rej_local_commid, tvb, local_offset, 4, FALSE); local_offset += 4;
3227 proto_tree_add_item(CM_header_tree, hf_cm_rej_remote_commid, tvb, local_offset, 4, FALSE); local_offset += 4;
3228 proto_tree_add_item(CM_header_tree, hf_cm_rej_msg_rej, tvb, local_offset, 1, FALSE);
3229 local_offset += 1; /* skip reserved */
3230 proto_tree_add_item(CM_header_tree, hf_cm_rej_rej_info_len, tvb, local_offset, 1, FALSE);
3231 local_offset += 1; /* skip reserved */
3232 proto_tree_add_item(CM_header_tree, hf_cm_rej_reason, tvb, local_offset, 2, FALSE); local_offset += 2;
3233 proto_tree_add_item(CM_header_tree, hf_cm_rej_add_rej_info, tvb, local_offset, 72, FALSE); local_offset += 72;
3234 /* currently only REQ/REP call subdissectors for the private data */
3235 proto_tree_add_item(CM_header_tree, hf_cm_rej_private_data, tvb, local_offset, 148, FALSE); local_offset += 148;
3238 proto_item_append_text(CM_header_item, " (Dissector Not Implemented)"); local_offset += MAD_DATA_SIZE;
3242 *offset = local_offset;
3245 /* Parse SNMP Tunneling
3246 * IN: parentTree to add the dissection to
3247 * IN: tvb - the data buffer from wireshark
3248 * IN/OUT: The current and updated offset */
3249 static void parse_SNMP(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
3251 /* Parse the Common MAD Header */
3254 proto_item *PERF_header_item = NULL;
3256 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
3258 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
3261 local_offset = *offset;
3263 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, MAD_DATA_SIZE, FALSE); local_offset += MAD_DATA_SIZE;
3264 proto_item_set_text(PERF_header_item, "%s", "SNMP - SNMP Tunneling MAD (Dissector Not Implemented)");
3265 *offset = local_offset;
3268 /* Parse Vendor Specific Management Packets
3269 * IN: parentTree to add the dissection to
3270 * IN: tvb - the data buffer from wireshark
3271 * IN/OUT: The current and updated offset */
3272 static void parse_VENDOR_MANAGEMENT(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
3274 /* Parse the Common MAD Header */
3277 proto_item *PERF_header_item = NULL;
3279 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
3281 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
3284 local_offset = *offset;
3286 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, MAD_DATA_SIZE, FALSE); local_offset += MAD_DATA_SIZE;
3287 proto_item_set_text(PERF_header_item, "%s", "VENDOR - Vendor Specific Management MAD (Dissector Not Implemented)");
3288 *offset = local_offset;
3291 /* Parse Application Specific Management Packets
3292 * IN: parentTree to add the dissection to
3293 * IN: tvb - the data buffer from wireshark
3294 * IN/OUT: The current and updated offset */
3295 static void parse_APPLICATION_MANAGEMENT(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
3297 /* Parse the Common MAD Header */
3300 proto_item *PERF_header_item = NULL;
3302 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
3304 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
3307 local_offset = *offset;
3308 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, MAD_DATA_SIZE, FALSE); local_offset += MAD_DATA_SIZE;
3309 proto_item_set_text(PERF_header_item, "%s", "APP - Application Specific MAD (Dissector Not Implemented)");
3310 *offset = local_offset;
3313 /* Parse Reserved Management Packets.
3315 * This is an !ERROR CONDITION!
3316 * It means that the Management Class value used was defined as a reserved value for furture use.
3317 * This method is here since we will want to report this information directly to the UI without blowing up Wireshark.
3319 * IN: parentTree to add the dissection to
3320 * IN: tvb - the data buffer from wireshark
3321 * IN/OUT: The current and updated offset */
3322 static void parse_RESERVED_MANAGEMENT(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
3324 /* Parse the Common MAD Header */
3327 proto_item *PERF_header_item = NULL;
3329 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
3331 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
3334 local_offset = *offset;
3335 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 256, FALSE); local_offset += 256;
3336 proto_item_set_text(PERF_header_item, "%s", "RESERVED - Reserved MAD Type (Possible Device Error)");
3337 *offset = local_offset;
3340 /* Parse the common MAD Header
3341 * IN: parentTree to add the dissection to
3342 * IN: tvb - the data buffer from wireshark
3343 * IN/OUT: The current and updated offset
3344 * IN/OUT: MadData - the data from the MAD header */
3345 static gboolean parse_MAD_Common(proto_tree *parentTree, tvbuff_t *tvb, gint *offset, MAD_Data* MadData)
3347 gint local_offset = *offset;
3348 proto_tree *MAD_header_tree = NULL;
3349 proto_item *MAD_header_item = NULL;
3353 if(!tvb_bytes_exist(tvb, *offset, 256))
3356 /* Get the Management Class to decide between LID Routed and Direct Route */
3357 MadData->managementClass = tvb_get_guint8(tvb, local_offset + 1);
3358 MadData->classVersion = tvb_get_guint8(tvb, local_offset + 2);
3359 MadData->method = tvb_get_guint8(tvb, local_offset + 3);
3360 MadData->status = tvb_get_guint8(tvb, local_offset + 4);
3361 MadData->classSpecific = tvb_get_ntohs(tvb, local_offset + 6);
3362 MadData->transactionID = tvb_get_ntoh64(tvb, local_offset + 8);
3363 MadData->attributeID = tvb_get_ntohs(tvb, local_offset + 16);
3364 MadData->attributeModifier = tvb_get_ntohl(tvb, local_offset + 20);
3365 tvb_memcpy(tvb, MadData->data, local_offset + 24, MAD_DATA_SIZE);
3367 /* Populate the Dissector Tree */
3369 MAD_header_item = proto_tree_add_item(parentTree, hf_infiniband_MAD, tvb, local_offset, 256, FALSE);
3370 proto_item_set_text(MAD_header_item, "%s", "MAD Header - Common Management Datagram");
3371 MAD_header_tree = proto_item_add_subtree(MAD_header_item, ett_mad);
3373 proto_tree_add_item(MAD_header_tree, hf_infiniband_base_version, tvb, local_offset, 1, FALSE); local_offset+=1;
3374 proto_tree_add_item(MAD_header_tree, hf_infiniband_mgmt_class, tvb, local_offset, 1, FALSE); local_offset+=1;
3375 proto_tree_add_item(MAD_header_tree, hf_infiniband_class_version, tvb, local_offset, 1, FALSE); local_offset+=1;
3376 proto_tree_add_item(MAD_header_tree, hf_infiniband_method, tvb, local_offset, 1, FALSE); local_offset+=1;
3377 proto_tree_add_item(MAD_header_tree, hf_infiniband_status, tvb, local_offset, 2, FALSE); local_offset+=2;
3378 proto_tree_add_item(MAD_header_tree, hf_infiniband_class_specific, tvb, local_offset, 2, FALSE); local_offset+=2;
3379 proto_tree_add_item(MAD_header_tree, hf_infiniband_transaction_id, tvb, local_offset, 8, FALSE); local_offset+=8;
3380 proto_tree_add_item(MAD_header_tree, hf_infiniband_attribute_id, tvb, local_offset, 2, FALSE); local_offset+=2;
3381 proto_tree_add_item(MAD_header_tree, hf_infiniband_reserved16, tvb, local_offset, 2, FALSE); local_offset+=2;
3382 proto_tree_add_item(MAD_header_tree, hf_infiniband_attribute_modifier, tvb, local_offset, 4, FALSE); local_offset+=4;
3383 proto_tree_add_item(MAD_header_tree, hf_infiniband_data, tvb, local_offset, MAD_DATA_SIZE, FALSE);
3384 *offset = local_offset; /* Move the offset to the start of the Data field - this will be where the other parsers start. */
3389 /* Parse the RMPP (Reliable Multi-Packet Transaction Protocol
3390 * IN: parentTree to add the dissection to
3391 * IN: tvb - the data buffer from wireshark
3392 * IN/OUT: The current and updated offset */
3393 static gboolean parse_RMPP(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
3395 gint local_offset = *offset;
3396 guint8 RMPP_Type = tvb_get_guint8(tvb, local_offset + 1);
3397 proto_tree *RMPP_header_tree = NULL;
3398 proto_item *RMPP_header_item = NULL;
3400 RMPP_header_item = proto_tree_add_item(parentTree, hf_infiniband_RMPP, tvb, local_offset, 12, FALSE);
3401 proto_item_set_text(RMPP_header_item, "%s", val_to_str(RMPP_Type, RMPP_Packet_Types, "Reserved RMPP Type! (0x%02x)"));
3402 RMPP_header_tree = proto_item_add_subtree(RMPP_header_item, ett_rmpp);
3404 proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_version, tvb, local_offset, 1, FALSE); local_offset+=1;
3405 proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_type, tvb, local_offset, 1, FALSE); local_offset+=1;
3406 proto_tree_add_item(RMPP_header_tree, hf_infiniband_r_resp_time, tvb, local_offset, 1, FALSE);
3407 proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_flags, tvb, local_offset, 1, FALSE); local_offset+=1;
3408 proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_status, tvb, local_offset, 1, FALSE); local_offset+=1;
3412 proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_data1, tvb, local_offset, 4, FALSE); local_offset+=4;
3413 proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_data2, tvb, local_offset, 4, FALSE); local_offset+=4;
3416 proto_tree_add_item(RMPP_header_tree, hf_infiniband_segment_number, tvb, local_offset, 4, FALSE); local_offset+=4;
3417 proto_tree_add_item(RMPP_header_tree, hf_infiniband_payload_length32, tvb, local_offset, 4, FALSE); local_offset+=4;
3418 proto_tree_add_item(RMPP_header_tree, hf_infiniband_transferred_data, tvb, local_offset, 220, FALSE);
3421 proto_tree_add_item(RMPP_header_tree, hf_infiniband_segment_number, tvb, local_offset, 4, FALSE); local_offset+=4;
3422 proto_tree_add_item(RMPP_header_tree, hf_infiniband_new_window_last, tvb, local_offset, 4, FALSE); local_offset+=4;
3423 proto_tree_add_item(RMPP_header_tree, hf_infiniband_reserved220, tvb, local_offset, 220, FALSE);
3427 proto_tree_add_item(RMPP_header_tree, hf_infiniband_reserved32, tvb, local_offset, 4, FALSE); local_offset+=4;
3428 proto_tree_add_item(RMPP_header_tree, hf_infiniband_reserved32, tvb, local_offset, 4, FALSE); local_offset+=4;
3429 proto_tree_add_item(RMPP_header_tree, hf_infiniband_optional_extended_error_data, tvb, local_offset, 220, FALSE);
3434 *offset = local_offset;
3438 /* Parse the Method from the MAD Common Header.
3439 * Simply used to generate the identifier.
3440 * IN: SubMItem - the item to append the method label to.
3441 * IN: MadHeader - the MadData structure that contains the information from the Common MAD header.
3442 * IN: pinfo - packet info from wireshark. */
3443 static void label_SUBM_Method(proto_item *SubMItem, MAD_Data *MadHeader, packet_info *pinfo)
3445 const char *label = val_to_str(MadHeader->method, SUBM_Methods, "(Unknown SubManagement Method!)");
3447 proto_item_append_text(SubMItem, "%s", label);
3448 col_append_str(pinfo->cinfo, COL_INFO, label);
3451 /* Parse the SA Method from the MAD Common Header.
3452 * Simply used to generate the identifier.
3453 * IN: SubAItem - the item to append the method label to.
3454 * IN: MadHeader - the MadData structure that contains the information from the Common MAD header.
3455 * IN: pinfo - packet info from wireshark. */
3456 static void label_SUBA_Method(proto_item *SubAItem, MAD_Data *MadHeader, packet_info *pinfo)
3458 const char *label = val_to_str(MadHeader->method, SUBA_Methods, "(Unknown SubAdministration Method!)");
3460 proto_item_append_text(SubAItem, "%s", label);
3461 col_append_str(pinfo->cinfo, COL_INFO, label);
3464 /* Parse the Attribute from the MAD Common Header
3465 * Simply used to generate the identifier.
3466 * IN: SubMItem - the item to append the Attribute label to.
3467 * IN: MadHeader - the MadData structure that contains the information from the Common MAD header.
3468 * IN: pinfo - packet info from wireshark. */
3469 static void label_SUBM_Attribute(proto_item *SubMItem, MAD_Data *MadHeader, packet_info *pinfo)
3471 const char *label = val_to_str(MadHeader->attributeID, SUBM_Attributes, "(Unknown SubManagement Attribute!)");
3473 proto_item_append_text(SubMItem, "%s", &label[11]);
3474 col_append_str(pinfo->cinfo, COL_INFO, &label[11]);
3477 /* Parse the SA Attribute from the MAD Common Header
3478 * Simply used to generate the identifier.
3479 * IN: SubAItem - the item to append the Attribute label to.
3480 * IN: MadHeader - the MadData structure that contains the information from the Common MAD header.
3481 * IN: pinfo - packet info from wireshark. */
3482 static void label_SUBA_Attribute(proto_item *SubAItem, MAD_Data *MadHeader, packet_info *pinfo)
3484 const char *label = val_to_str(MadHeader->attributeID, SUBA_Attributes, "(Unknown SubAdministration Attribute!)");
3486 proto_item_append_text(SubAItem, "%s", &label[11]);
3487 col_append_str(pinfo->cinfo, COL_INFO, &label[11]);
3490 /* Parse the attribute from a Subnet Management Packet.
3491 * IN: Parent Tree to add the item to in the dissection tree
3492 * IN: tvbuff, offset - the data and where it is.
3493 * IN: MAD_Data the data from the Common MAD Header that provides the information we need */
3494 static gboolean parse_SUBM_Attribute(proto_tree *parentTree, tvbuff_t *tvb, gint *offset, MAD_Data *MadHeader)
3496 guint16 attributeID = MadHeader->attributeID;
3497 proto_tree *SUBM_Attribute_header_tree = NULL;
3498 proto_item *SUBM_Attribute_header_item = NULL;
3500 SUBM_Attribute_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, *offset, 64, FALSE);
3501 proto_item_set_text(SUBM_Attribute_header_item, "%s", val_to_str(attributeID, SUBM_Attributes, "Unknown Attribute Type! (0x%02x)"));
3502 SUBM_Attribute_header_tree = proto_item_add_subtree(SUBM_Attribute_header_item, ett_subm_attribute);
3508 parse_NoticesAndTraps(SUBM_Attribute_header_tree , tvb, offset);
3511 parse_NodeDescription(SUBM_Attribute_header_tree , tvb, offset);
3514 parse_NodeInfo(SUBM_Attribute_header_tree , tvb, offset);
3517 parse_SwitchInfo(SUBM_Attribute_header_tree , tvb, offset);
3520 parse_GUIDInfo(SUBM_Attribute_header_tree , tvb, offset);
3523 parse_PortInfo(SUBM_Attribute_header_tree , tvb, offset);
3526 parse_P_KeyTable(SUBM_Attribute_header_tree , tvb, offset);
3529 parse_SLtoVLMappingTable(SUBM_Attribute_header_tree , tvb, offset);
3532 parse_VLArbitrationTable(SUBM_Attribute_header_tree , tvb, offset);
3535 parse_LinearForwardingTable(SUBM_Attribute_header_tree , tvb, offset);
3538 parse_RandomForwardingTable(SUBM_Attribute_header_tree , tvb, offset);
3541 parse_MulticastForwardingTable(SUBM_Attribute_header_tree , tvb, offset);
3544 parse_SMInfo(SUBM_Attribute_header_tree , tvb, offset);
3547 parse_VendorDiag(SUBM_Attribute_header_tree , tvb, offset);
3550 parse_LedInfo(SUBM_Attribute_header_tree , tvb, offset);
3553 parse_LinkSpeedWidthPairsTable(SUBM_Attribute_header_tree , tvb, offset);
3564 /* Parse the attribute from a Subnet Administration Packet.
3565 * IN: Parent Tree to add the item to in the dissection tree
3566 * IN: tvbuff, offset - the data and where it is.
3567 * IN: MAD_Data the data from the Common MAD Header that provides the information we need */
3568 static gboolean parse_SUBA_Attribute(proto_tree *parentTree, tvbuff_t *tvb, gint *offset, MAD_Data *MadHeader)
3570 guint16 attributeID = MadHeader->attributeID;
3571 proto_tree *SUBA_Attribute_header_tree = NULL;
3572 proto_item *SUBA_Attribute_header_item = NULL;
3574 SUBA_Attribute_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, *offset, 200, FALSE);
3575 proto_item_set_text(SUBA_Attribute_header_item, "%s", val_to_str(attributeID, SUBA_Attributes, "Unknown Attribute Type! (0x%02x)"));
3576 SUBA_Attribute_header_tree = proto_item_add_subtree(SUBA_Attribute_header_item, ett_suba_attribute);
3578 /* Skim off the RID fields should they be present */
3579 parse_RID(SUBA_Attribute_header_tree, tvb, offset, MadHeader);
3581 /* Parse the rest of the attributes */
3582 switch(MadHeader->attributeID)
3584 case 0x0001: /* (ClassPortInfo) */
3585 parse_PortInfo(SUBA_Attribute_header_tree, tvb, offset);
3587 case 0x0002: /* (Notice) */
3588 parse_NoticesAndTraps(SUBA_Attribute_header_tree, tvb, offset);
3590 case 0x0003: /* (InformInfo) */
3591 parse_InformInfo(SUBA_Attribute_header_tree, tvb, offset);
3593 case 0x0011: /* (NodeRecord) */
3594 parse_NodeInfo(SUBA_Attribute_header_tree, tvb, offset);
3596 parse_NodeDescription(SUBA_Attribute_header_tree, tvb, offset);
3598 case 0x0012: /* (PortInfoRecord) */
3599 parse_PortInfo(SUBA_Attribute_header_tree, tvb, offset);
3601 case 0x0013: /* (SLtoVLMappingTableRecord) */
3602 parse_SLtoVLMappingTable(SUBA_Attribute_header_tree, tvb, offset);
3604 case 0x0014: /* (SwitchInfoRecord) */
3605 parse_SwitchInfo(SUBA_Attribute_header_tree, tvb, offset);
3607 case 0x0015: /*(LinearForwardingTableRecord) */
3608 parse_LinearForwardingTable(SUBA_Attribute_header_tree, tvb, offset);
3610 case 0x0016: /* (RandomForwardingTableRecord) */
3611 parse_RandomForwardingTable(SUBA_Attribute_header_tree, tvb, offset);
3613 case 0x0017: /* (MulticastForwardingTableRecord) */
3614 parse_MulticastForwardingTable(SUBA_Attribute_header_tree, tvb, offset);
3616 case 0x0018: /* (SMInfoRecord) */
3617 parse_SMInfo(SUBA_Attribute_header_tree, tvb, offset);
3619 case 0x0019: /* (LinkSpeedWidthPairsTableRecord) */
3620 parse_LinkSpeedWidthPairsTable(SUBA_Attribute_header_tree, tvb, offset);
3622 case 0x00F3: /*(InformInfoRecord) */
3623 parse_InformInfo(SUBA_Attribute_header_tree, tvb, offset);
3625 case 0x0020: /* (LinkRecord) */
3626 parse_LinkRecord(SUBA_Attribute_header_tree, tvb, offset);
3628 case 0x0030: /* (GuidInforecord) */
3629 parse_GUIDInfo(SUBA_Attribute_header_tree, tvb, offset);
3631 case 0x0031: /*(ServiceRecord) */
3632 parse_ServiceRecord(SUBA_Attribute_header_tree, tvb, offset);
3634 case 0x0033: /* (P_KeyTableRecord) */
3635 parse_P_KeyTable(SUBA_Attribute_header_tree, tvb, offset);
3637 case 0x0035: /* (PathRecord) */
3638 parse_PathRecord(SUBA_Attribute_header_tree, tvb, offset);
3640 case 0x0036: /* (VLArbitrationTableRecord) */
3641 parse_VLArbitrationTable(SUBA_Attribute_header_tree, tvb, offset);
3643 case 0x0038: /* (MCMemberRecord) */
3644 parse_MCMemberRecord(SUBA_Attribute_header_tree, tvb, offset);
3646 case 0x0039: /* (TraceRecord) */
3647 parse_TraceRecord(SUBA_Attribute_header_tree, tvb, offset);
3649 case 0x003A: /* (MultiPathRecord) */
3650 parse_MultiPathRecord(SUBA_Attribute_header_tree, tvb, offset);
3652 case 0x003B: /* (ServiceAssociationRecord) */
3653 parse_ServiceAssociationRecord(SUBA_Attribute_header_tree, tvb, offset);
3655 default: /* (Unknown SubAdministration Attribute!) */
3656 /* We've already labeled as unknown in item construction */
3664 /* Subnet Management Attribute Parsing Methods.
3665 * Also Parsing for Attributes common to both SM/SA.
3666 * The Subnet Admin Parsing methods will call some of these methods when an attribute is present within an SA MAD
3670 /* Parse NoticeDataDetails Attribute Field
3671 * IN: parentTree - The tree to add the dissection to
3672 * tvb - The tvbbuff of packet data
3673 * offset - The offset in TVB where the attribute begins
3674 * trapNumber - The Trap ID of the Trap Data being Dissected */
3676 static void parse_NoticeDataDetails(proto_tree* parentTree, tvbuff_t* tvb, gint *offset, guint16 trapNumber)
3678 gint local_offset = *offset;
3679 proto_tree *DataDetails_header_tree = NULL;
3680 proto_item *DataDetails_header_item = NULL;
3685 DataDetails_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 54, FALSE);
3686 DataDetails_header_tree = proto_item_add_subtree(DataDetails_header_item, ett_datadetails);
3692 proto_item_set_text(DataDetails_header_item, "%s", "Trap 64 DataDetails");
3694 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR, tvb, local_offset, 16, FALSE); local_offset+=16;
3697 proto_item_set_text(DataDetails_header_item, "%s", "Trap 65 DataDetails");
3699 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR, tvb, local_offset, 16, FALSE); local_offset+=16;
3702 proto_item_set_text(DataDetails_header_item, "%s", "Trap 66 DataDetails");
3704 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR, tvb, local_offset, 16, FALSE); local_offset+=16;
3707 proto_item_set_text(DataDetails_header_item, "%s", "Trap 67 DataDetails");
3709 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR, tvb, local_offset, 16, FALSE); local_offset+=16;
3712 proto_item_set_text(DataDetails_header_item, "%s", "Trap 68 DataDetails");
3713 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_COMP_MASK, tvb, local_offset, 8, FALSE); local_offset+=8;
3714 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_WAIT_FOR_REPATH, tvb, local_offset, 1, FALSE);
3717 proto_item_set_text(DataDetails_header_item, "%s", "Trap 69 DataDetails");
3718 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_COMP_MASK, tvb, local_offset, 8, FALSE); local_offset+=8;
3719 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_WAIT_FOR_REPATH, tvb, local_offset, 1, FALSE);
3722 proto_item_set_text(DataDetails_header_item, "%s", "Trap 128 DataDetails");
3723 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
3726 proto_item_set_text(DataDetails_header_item, "%s", "Trap 129 DataDetails");
3728 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
3729 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_PORTNO, tvb, local_offset, 1, FALSE); local_offset+=1;
3732 proto_item_set_text(DataDetails_header_item, "%s", "Trap 130 DataDetails");
3734 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
3735 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_PORTNO, tvb, local_offset, 1, FALSE); local_offset+=1;
3738 proto_item_set_text(DataDetails_header_item, "%s", "Trap 131 DataDetails");
3740 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
3741 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_PORTNO, tvb, local_offset, 1, FALSE); local_offset+=1;
3744 proto_item_set_text(DataDetails_header_item, "%s", "Trap 144 DataDetails");
3746 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
3748 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_OtherLocalChanges, tvb, local_offset, 1, FALSE); local_offset+=1;
3749 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_CAPABILITYMASK, tvb, local_offset, 4, FALSE); local_offset+=4;
3751 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LinkSpeecEnabledChange, tvb, local_offset, 1, FALSE);
3752 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LinkWidthEnabledChange, tvb, local_offset, 1, FALSE);
3753 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_NodeDescriptionChange, tvb, local_offset, 1, FALSE);
3756 proto_item_set_text(DataDetails_header_item, "%s", "Trap 145 DataDetails");
3758 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
3760 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_SYSTEMIMAGEGUID, tvb, local_offset, 8, FALSE); local_offset+=8;
3763 proto_item_set_text(DataDetails_header_item, "%s", "Trap 256 DataDetails");
3765 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
3766 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DRSLID, tvb, local_offset, 2, FALSE); local_offset+=2;
3767 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_METHOD, tvb, local_offset, 1, FALSE); local_offset+=1;
3769 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_ATTRIBUTEID, tvb, local_offset, 2, FALSE); local_offset+=2;
3770 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_ATTRIBUTEMODIFIER, tvb, local_offset, 4, FALSE); local_offset+=4;
3771 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_MKEY, tvb, local_offset, 8, FALSE); local_offset+=8;
3773 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DRNotice, tvb, local_offset, 1, FALSE);
3774 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DRPathTruncated, tvb, local_offset, 1, FALSE);
3775 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DRHopCount, tvb, local_offset, 1, FALSE); local_offset+=1;
3776 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DRNoticeReturnPath, tvb, local_offset, 30, FALSE); local_offset+=30;
3779 proto_item_set_text(DataDetails_header_item, "%s", "Trap 257 DataDetails");
3781 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR1, tvb, local_offset, 2, FALSE); local_offset+=2;
3782 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR2, tvb, local_offset, 2, FALSE); local_offset+=2;
3783 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_KEY, tvb, local_offset, 4, FALSE); local_offset+=4;
3784 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_SL, tvb, local_offset, 1, FALSE); local_offset+=1;
3785 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP1, tvb, local_offset, 3, FALSE); local_offset+=3;
3787 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP2, tvb, local_offset, 3, FALSE); local_offset+=3;
3788 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR1, tvb, local_offset, 16, FALSE); local_offset+=16;
3789 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR2, tvb, local_offset, 16, FALSE); local_offset+=16;
3792 proto_item_set_text(DataDetails_header_item, "%s", "Trap 258 DataDetails");
3794 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR1, tvb, local_offset, 2, FALSE); local_offset+=2;
3795 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR2, tvb, local_offset, 2, FALSE); local_offset+=2;
3796 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_KEY, tvb, local_offset, 4, FALSE); local_offset+=4;
3797 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_SL, tvb, local_offset, 1, FALSE); local_offset +=1;
3798 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP1, tvb, local_offset, 3, FALSE); local_offset+=3;
3800 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP2, tvb, local_offset, 3, FALSE); local_offset+=3;
3801 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR1, tvb, local_offset, 16, FALSE); local_offset+=16;
3802 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR2, tvb, local_offset, 16, FALSE); local_offset+=16;
3805 proto_item_set_text(DataDetails_header_item, "%s", "Trap 259 DataDetails");
3806 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DataValid, tvb, local_offset, 2, FALSE); local_offset+=2;
3807 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR1, tvb, local_offset, 2, FALSE); local_offset+=2;
3808 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR2, tvb, local_offset, 2, FALSE); local_offset+=2;
3809 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_PKEY, tvb, local_offset, 2, FALSE); local_offset+=2;
3810 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_SL, tvb, local_offset, 1, FALSE); local_offset+=1;
3811 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP1, tvb, local_offset, 3, FALSE); local_offset+=3;
3813 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP2, tvb, local_offset, 3, FALSE); local_offset+=3;
3814 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR1, tvb, local_offset, 16, FALSE); local_offset+=16;
3815 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR2, tvb, local_offset, 16, FALSE); local_offset+=16;
3816 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_SWLIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
3817 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_PORTNO, tvb, local_offset, 1, FALSE); local_offset+=1;
3820 proto_item_set_text(DataDetails_header_item, "%s", "Vendor Specific Subnet Management Trap"); local_offset +=54;
3826 /* Parse NoticesAndTraps Attribute
3827 * IN: parentTree - The tree to add the dissection to
3828 * tvb - The tvbbuff of packet data
3829 * offset - The offset in TVB where the attribute begins
3830 * MadHeader - The common MAD header of the current SMP/SMA */
3831 static void parse_NoticesAndTraps(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
3833 gint local_offset = *offset;
3834 proto_tree *NoticesAndTraps_header_tree = NULL;
3835 proto_item *NoticesAndTraps_header_item = NULL;
3836 guint16 trapNumber = tvb_get_ntohs(tvb, local_offset + 4);
3841 NoticesAndTraps_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
3842 proto_item_set_text(NoticesAndTraps_header_item, "%s", val_to_str(trapNumber, Trap_Description, "Unknown or Vendor Specific Trap Number! (0x%02x)"));
3843 NoticesAndTraps_header_tree = proto_item_add_subtree(NoticesAndTraps_header_item, ett_noticestraps);
3845 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_IsGeneric, tvb, local_offset, 1, FALSE);
3846 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_Type, tvb, local_offset, 1, FALSE); local_offset+=1;
3847 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_ProducerTypeVendorID, tvb, local_offset, 3, FALSE); local_offset+=3;
3848 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_TrapNumberDeviceID, tvb, local_offset, 2, FALSE); local_offset+=2;
3849 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_IssuerLID, tvb, local_offset, 2, FALSE); local_offset+=2;
3850 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_NoticeToggle, tvb, local_offset, 1, FALSE);
3851 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_NoticeCount, tvb, local_offset, 2, FALSE); local_offset+=2;
3853 parse_NoticeDataDetails(NoticesAndTraps_header_tree, tvb, &local_offset, trapNumber);
3854 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_DataDetails, tvb, local_offset, 54, FALSE); local_offset+=54;
3856 /* Only Defined For GMPs not SMPs which is not part of this dissector phase
3857 *proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_IssuerGID, tvb, local_offset, 16, FALSE); local_offset+=16;
3858 *proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_ClassTrapSpecificData, tvb, local_offset, 1, FALSE); local_offset+=1; */
3862 /* Parse NodeDescription Attribute
3863 * IN: parentTree - The tree to add the dissection to
3864 * tvb - The tvbbuff of packet data
3865 * offset - The offset in TVB where the attribute begins
3866 * MadHeader - The common MAD header of the current SMP/SMA */
3867 static void parse_NodeDescription(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
3869 gint local_offset = *offset;
3870 proto_tree *NodeDescription_header_tree = NULL;
3875 NodeDescription_header_tree = parentTree;
3876 proto_tree_add_item(NodeDescription_header_tree, hf_infiniband_NodeDescription_NodeString, tvb, local_offset, 64, FALSE);
3879 /* Parse NodeInfo Attribute
3880 * IN: parentTree - The tree to add the dissection to
3881 * tvb - The tvbbuff of packet data
3882 * offset - The offset in TVB where the attribute begins
3883 * MadHeader - The common MAD header of the current SMP/SMA */
3884 static void parse_NodeInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
3886 gint local_offset = *offset;
3887 proto_tree *NodeInfo_header_tree = NULL;
3892 NodeInfo_header_tree = parentTree;
3894 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_BaseVersion, tvb, local_offset, 1, FALSE); local_offset +=1;
3895 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_ClassVersion, tvb, local_offset, 1, FALSE); local_offset +=1;
3896 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_NodeType, tvb, local_offset, 1, FALSE); local_offset +=1;
3897 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_NumPorts, tvb, local_offset, 1, FALSE); local_offset +=1;
3898 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_SystemImageGUID, tvb, local_offset, 8, FALSE); local_offset +=8;
3899 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_NodeGUID, tvb, local_offset, 8, FALSE); local_offset +=8;
3900 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_PortGUID, tvb, local_offset, 8, FALSE); local_offset +=8;
3901 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_PartitionCap, tvb, local_offset, 2, FALSE); local_offset +=2;
3902 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_DeviceID, tvb, local_offset, 2, FALSE); local_offset +=2;
3903 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_Revision, tvb, local_offset, 4, FALSE); local_offset +=4;
3904 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_LocalPortNum, tvb, local_offset, 1, FALSE); local_offset +=1;
3905 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_VendorID, tvb, local_offset, 3, FALSE); local_offset +=3;
3909 /* Parse SwitchInfo Attribute
3910 * IN: parentTree - The tree to add the dissection to
3911 * tvb - The tvbbuff of packet data
3912 * offset - The offset in TVB where the attribute begins
3913 * MadHeader - The common MAD header of the current SMP/SMA */
3914 static void parse_SwitchInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
3916 gint local_offset = *offset;
3917 proto_tree *SwitchInfo_header_tree = NULL;
3922 SwitchInfo_header_tree = parentTree;
3924 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_LinearFDBCap, tvb, local_offset, 2, FALSE); local_offset +=2;
3925 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_RandomFDBCap, tvb, local_offset, 2, FALSE); local_offset +=2;
3926 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_MulticastFDBCap, tvb, local_offset, 2, FALSE); local_offset +=2;
3927 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_LinearFDBTop, tvb, local_offset, 2, FALSE); local_offset +=2;
3928 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_DefaultPort, tvb, local_offset, 1, FALSE); local_offset +=1;
3929 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_DefaultMulticastPrimaryPort, tvb, local_offset, 1, FALSE); local_offset +=1;
3930 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_DefaultMulticastNotPrimaryPort, tvb, local_offset, 1, FALSE); local_offset +=1;
3931 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_LifeTimeValue, tvb, local_offset, 1, FALSE);
3932 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_PortStateChange, tvb, local_offset, 1, FALSE);
3933 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_OptimizedSLtoVLMappingProgramming, tvb, local_offset, 1, FALSE); local_offset +=1;
3934 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_LIDsPerPort, tvb, local_offset, 2, FALSE); local_offset +=2;
3935 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_PartitionEnforcementCap, tvb, local_offset, 2, FALSE); local_offset +=2;
3936 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_InboundEnforcementCap, tvb, local_offset, 1, FALSE);
3937 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_OutboundEnforcementCap, tvb, local_offset, 1, FALSE);
3938 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_FilterRawInboundCap, tvb, local_offset, 1, FALSE);
3939 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_FilterRawOutboundCap, tvb, local_offset, 1, FALSE);
3940 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_EnhancedPortZero, tvb, local_offset, 1, FALSE); local_offset +=1;
3943 /* Parse GUIDInfo Attribute
3944 * IN: parentTree - The tree to add the dissection to
3945 * tvb - The tvbbuff of packet data
3946 * offset - The offset in TVB where the attribute begins
3947 * MadHeader - The common MAD header of the current SMP/SMA */
3948 static void parse_GUIDInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
3950 gint local_offset = *offset;
3951 proto_tree *GUIDInfo_header_tree = NULL;
3952 proto_item *tempItemLow = NULL;
3958 GUIDInfo_header_tree = parentTree;
3960 for(i = 0; i < 8; i++)
3962 proto_tree_add_item(GUIDInfo_header_tree, hf_infiniband_GUIDInfo_GUID, tvb, local_offset, 8, FALSE); local_offset +=8;
3963 proto_item_append_text(tempItemLow, "(%u)", i);
3968 /* Parse PortInfo Attribute
3969 * IN: parentTree - The tree to add the dissection to
3970 * tvb - The tvbbuff of packet data
3971 * offset - The offset in TVB where the attribute begins
3972 * MadHeader - The common MAD header of the current SMP/SMA */
3973 static void parse_PortInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
3975 gint local_offset = *offset;
3976 proto_tree *PortInfo_header_tree = NULL;
3977 proto_tree *PortInfo_CapabilityMask_tree = NULL;
3978 proto_item *PortInfo_CapabilityMask_item = NULL;
3979 proto_item *temp_item = NULL;
3980 guint16 temp_val = 0;
3985 PortInfo_header_tree = parentTree;
3987 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_M_Key, tvb, local_offset, 8, FALSE); local_offset +=8;
3988 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_GidPrefix, tvb, local_offset, 8, FALSE); local_offset +=8;
3989 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LID, tvb, local_offset, 2, FALSE); local_offset +=2;
3990 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_MasterSMLID, tvb, local_offset, 2, FALSE); local_offset +=2;
3992 /* Capability Mask Flags */
3993 PortInfo_CapabilityMask_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_CapabilityMask, tvb, local_offset, 4, FALSE);
3994 PortInfo_CapabilityMask_tree = proto_item_add_subtree(PortInfo_CapabilityMask_item, ett_portinfo_capmask);
3996 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_SM, tvb, local_offset, 4, FALSE);
3997 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_NoticeSupported, tvb, local_offset, 4, FALSE);
3998 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_TrapSupported, tvb, local_offset, 4, FALSE);
3999 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_OptionalPDSupported, tvb, local_offset, 4, FALSE);
4000 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_AutomaticMigrationSupported, tvb, local_offset, 4, FALSE);
4001 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_SLMappingSupported, tvb, local_offset, 4, FALSE);
4002 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_MKeyNVRAM, tvb, local_offset, 4, FALSE);
4003 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_PKeyNVRAM, tvb, local_offset, 4, FALSE);
4004 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_LEDInfoSupported, tvb, local_offset, 4, FALSE);
4005 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_SMdisabled, tvb, local_offset, 4, FALSE);
4006 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_SystemImageGUIDSupported, tvb, local_offset, 4, FALSE);
4007 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_PKeySwitchExternalPortTrapSupported, tvb, local_offset, 4, FALSE);
4008 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_CommunicationsManagementSupported, tvb, local_offset, 4, FALSE);
4009 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_SNMPTunnelingSupported, tvb, local_offset, 4, FALSE);
4010 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_ReinitSupported, tvb, local_offset, 4, FALSE);
4011 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_DeviceManagementSupported, tvb, local_offset, 4, FALSE);
4012 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_VendorClassSupported, tvb, local_offset, 4, FALSE);
4013 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_DRNoticeSupported, tvb, local_offset, 4, FALSE);
4014 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_CapabilityMaskNoticeSupported, tvb, local_offset, 4, FALSE);
4015 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_BootManagementSupported, tvb, local_offset, 4, FALSE);
4016 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_LinkRoundTripLatencySupported, tvb, local_offset, 4, FALSE);
4017 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_ClientRegistrationSupported, tvb, local_offset, 4, FALSE);
4018 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_OtherLocalChangesNoticeSupported, tvb, local_offset, 4, FALSE);
4019 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_LinkSpeedWIdthPairsTableSupported, tvb, local_offset, 4, FALSE);
4021 /* End Capability Mask Flags */
4024 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_DiagCode, tvb, local_offset, 2, FALSE);
4025 temp_val = tvb_get_ntohs(tvb, local_offset);
4027 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, DiagCode, "Reserved DiagCode! Possible Error"));
4031 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_M_KeyLeasePeriod, tvb, local_offset, 2, FALSE); local_offset +=2;
4032 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LocalPortNum, tvb, local_offset, 1, FALSE); local_offset +=1;
4034 /* LinkWidthEnabled */
4035 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkWidthEnabled, tvb, local_offset, 1, FALSE);
4036 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
4038 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, LinkWidthEnabled, "Reserved LinkWidthEnabled Value! Possible Error"));
4040 /* End LinkWidthEnabled */
4042 /* LinkWidthSupported */
4043 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkWidthSupported, tvb, local_offset, 1, FALSE);
4044 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
4046 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, LinkWidthSupported, "Reserved LinkWidthSupported Value! Possible Error"));
4048 /* End LinkWidthSupported */
4050 /* LinkWidthActive */
4051 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkWidthActive, tvb, local_offset, 1, FALSE);
4052 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
4054 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, LinkWidthActive, "Reserved LinkWidthActive Value! Possible Error"));
4056 /* End LinkWidthActive */
4058 /* LinkSpeedSupported */
4059 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkSpeedSupported, tvb, local_offset, 1, FALSE);
4060 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
4062 /* 4 bit values = mask and shift */
4063 temp_val = temp_val & 0x00F0;
4064 temp_val = temp_val >> 4;
4066 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, LinkSpeedSupported, "Reserved LinkWidthSupported Value! Possible Error"));
4067 /* End LinkSpeedSupported */
4070 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_PortState, tvb, local_offset, 1, FALSE);
4071 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
4073 /* 4 bit values = mask and shift */
4074 temp_val = temp_val & 0x000F;
4075 /*temp_val = temp_val >> 4 */
4077 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, PortState, "Reserved PortState Value! Possible Error"));
4081 /* PortPhysicalState */
4082 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_PortPhysicalState, tvb, local_offset, 1, FALSE);
4083 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
4085 /* 4 bit values = mask and shift */
4086 temp_val = temp_val & 0x00F0;
4087 temp_val = temp_val >> 4;
4089 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, PortPhysicalState, "Reserved PortPhysicalState Value! Possible Error"));
4090 /* End PortPhysicalState */
4092 /* LinkDownDefaultState */
4093 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkDownDefaultState, tvb, local_offset, 1, FALSE);
4094 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
4096 /* 4 bit values = mask and shift */
4097 temp_val = temp_val & 0x000F;
4098 /*temp_val = temp_val >> 4 */
4100 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, LinkDownDefaultState, "Reserved LinkDownDefaultState Value! Possible Error"));
4102 /* End LinkDownDefaultState */
4104 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_M_KeyProtectBits, tvb, local_offset, 1, FALSE);
4105 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LMC, tvb, local_offset, 1, FALSE); local_offset +=1;
4107 /* LinkSpeedActive */
4108 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkSpeedActive, tvb, local_offset, 1, FALSE);
4109 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
4111 /* 4 bit values = mask and shift */
4112 temp_val = temp_val & 0x00F0;
4113 temp_val = temp_val >> 4;
4115 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, LinkSpeedActive, "Reserved LinkSpeedActive Value! Possible Error"));
4116 /* End LinkSpeedActive */
4118 /* LinkSpeedEnabled */
4119 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkSpeedEnabled, tvb, local_offset, 1, FALSE);
4120 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
4122 /* 4 bit values = mask and shift */
4123 temp_val = temp_val & 0x000F;
4124 /*temp_val = temp_val >> 4 */
4126 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, LinkSpeedEnabled, "Reserved LinkSpeedEnabled Value! Possible Error"));
4128 /* End LinkSpeedEnabled */
4131 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_NeighborMTU, tvb, local_offset, 1, FALSE);
4132 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
4134 /* 4 bit values = mask and shift */
4135 temp_val = temp_val & 0x00F0;
4136 temp_val = temp_val >> 4;
4138 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, NeighborMTU, "Reserved NeighborMTU Value! Possible Error"));
4140 /* End NeighborMTU */
4142 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_MasterSMSL, tvb, local_offset, 1, FALSE); local_offset +=1;
4145 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_VLCap, tvb, local_offset, 1, FALSE);
4146 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
4148 /* 4 bit values = mask and shift */
4149 temp_val = temp_val & 0x00F0;
4150 temp_val = temp_val >> 4;
4152 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, VLCap, "Reserved VLCap Value! Possible Error"));
4156 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_InitType, tvb, local_offset, 1, FALSE); local_offset +=1;
4157 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_VLHighLimit, tvb, local_offset, 1, FALSE); local_offset +=1;
4158 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_VLArbitrationHighCap, tvb, local_offset, 1, FALSE); local_offset +=1;
4159 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_VLArbitrationLowCap, tvb, local_offset, 1, FALSE); local_offset +=1;
4160 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_InitTypeReply, tvb, local_offset, 1, FALSE);
4163 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_MTUCap, tvb, local_offset, 1, FALSE);
4164 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
4166 /* 4 bit values = mask and shift */
4167 temp_val = temp_val & 0x000F;
4168 /*temp_val = temp_val >> 4 */
4170 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, MTUCap, "Reserved MTUCap Value! Possible Error"));
4174 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_VLStallCount, tvb, local_offset, 1, FALSE);
4175 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_HOQLife, tvb, local_offset, 1, FALSE); local_offset +=1;
4177 /* OperationalVLs */
4178 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_OperationalVLs, tvb, local_offset, 1, FALSE);
4179 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
4181 /* 4 bit values = mask and shift */
4182 temp_val = temp_val & 0x00F0;
4183 temp_val = temp_val >> 4;
4185 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, OperationalVLs, "Reserved OperationalVLs Value! Possible Error"));
4186 /* End OperationalVLs */
4188 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_PartitionEnforcementInbound, tvb, local_offset, 1, FALSE);
4189 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_PartitionEnforcementOutbound, tvb, local_offset, 1, FALSE);
4190 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_FilterRawInbound, tvb, local_offset, 1, FALSE);
4191 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_FilterRawOutbound, tvb, local_offset, 1, FALSE); local_offset +=1;
4192 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_M_KeyViolations, tvb, local_offset, 2, FALSE); local_offset +=2;
4193 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_P_KeyViolations, tvb, local_offset, 2, FALSE); local_offset +=2;
4194 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_Q_KeyViolations, tvb, local_offset, 2, FALSE); local_offset +=2;
4195 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_GUIDCap, tvb, local_offset, 1, FALSE); local_offset +=1;
4196 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_ClientReregister, tvb, local_offset, 1, FALSE);
4197 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_SubnetTimeOut, tvb, local_offset, 1, FALSE); local_offset +=1;
4198 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_RespTimeValue, tvb, local_offset, 1, FALSE); local_offset +=1;
4199 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LocalPhyErrors, tvb, local_offset, 1, FALSE);
4200 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_OverrunErrors, tvb, local_offset, 1, FALSE); local_offset +=1;
4201 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_MaxCreditHint, tvb, local_offset, 2, FALSE); local_offset +=3; /* 2 + 1 Reserved */
4202 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkRoundTripLatency, tvb, local_offset, 3, FALSE); local_offset +=3;
4205 /* Parse P_KeyTable Attribute
4206 * IN: parentTree - The tree to add the dissection to
4207 * tvb - The tvbbuff of packet data
4208 * offset - The offset in TVB where the attribute begins
4209 * MadHeader - The common MAD header of the current SMP/SMA */
4210 static void parse_P_KeyTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
4212 gint local_offset = *offset;
4214 proto_tree *P_KeyTable_header_tree = NULL;
4215 proto_item *P_KeyTable_header_item = NULL;
4216 proto_item *tempItemLow = NULL;
4217 proto_item *tempItemHigh = NULL;
4222 P_KeyTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_P_KeyTable_P_KeyTableBlock, tvb, local_offset, 64, FALSE);
4223 proto_item_set_text(P_KeyTable_header_item, "%s", "P_KeyTable");
4224 P_KeyTable_header_tree = proto_item_add_subtree(P_KeyTable_header_item, ett_pkeytable);
4226 for(i = 0; i < 32; i++)
4228 tempItemLow = proto_tree_add_item(P_KeyTable_header_tree, hf_infiniband_P_KeyTable_MembershipType, tvb, local_offset, 1, FALSE);
4229 tempItemHigh = proto_tree_add_item(P_KeyTable_header_tree, hf_infiniband_P_KeyTable_P_KeyBase, tvb, local_offset, 2, FALSE); local_offset +=2;
4230 proto_item_append_text(tempItemLow, "(%u)", i);
4231 proto_item_append_text(tempItemHigh,"(%u)", i+1);
4235 /* Parse SLtoVLMappingTable Attribute
4236 * IN: parentTree - The tree to add the dissection to
4237 * tvb - The tvbbuff of packet data
4238 * offset - The offset in TVB where the attribute begins
4239 * MadHeader - The common MAD header of the current SMP/SMA */
4240 static void parse_SLtoVLMappingTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
4242 gint local_offset = *offset;
4243 proto_tree *SLtoVLMappingTable_header_tree = NULL;
4244 proto_item *SLtoVLMappingTable_header_item = NULL;
4245 proto_item *tempItemLow = NULL;
4246 proto_item *tempItemHigh = NULL;
4252 SLtoVLMappingTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
4253 proto_item_set_text(SLtoVLMappingTable_header_item, "%s", "SLtoVLMappingTable");
4254 SLtoVLMappingTable_header_tree = proto_item_add_subtree(SLtoVLMappingTable_header_item, ett_sltovlmapping);
4256 for(i = 0; i < 8; i++)
4258 tempItemLow = proto_tree_add_item(SLtoVLMappingTable_header_tree, hf_infiniband_SLtoVLMappingTable_SLtoVL_HighBits, tvb, local_offset, 1, FALSE);
4259 tempItemHigh = proto_tree_add_item(SLtoVLMappingTable_header_tree, hf_infiniband_SLtoVLMappingTable_SLtoVL_LowBits, tvb, local_offset, 1, FALSE); local_offset +=1;
4260 proto_item_append_text(tempItemLow, "(%u)", i);
4261 proto_item_append_text(tempItemHigh,"(%u)", i+1);
4265 /* Parse VLArbitrationTable Attribute
4266 * IN: parentTree - The tree to add the dissection to
4267 * tvb - The tvbbuff of packet data
4268 * offset - The offset in TVB where the attribute begins
4269 * MadHeader - The common MAD header of the current SMP/SMA */
4270 static void parse_VLArbitrationTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
4272 gint local_offset = *offset;
4274 proto_tree *VLArbitrationTable_header_tree = NULL;
4275 proto_item *VLArbitrationTable_header_item = NULL;
4276 proto_item *tempItemLow = NULL;
4277 proto_item *tempItemHigh = NULL;
4282 VLArbitrationTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
4283 proto_item_set_text(VLArbitrationTable_header_item, "%s", "VLArbitrationTable");
4284 VLArbitrationTable_header_tree = proto_item_add_subtree(VLArbitrationTable_header_item, ett_vlarbitrationtable);
4286 for(i = 0; i < 32; i++)
4288 tempItemLow = proto_tree_add_item(VLArbitrationTable_header_tree, hf_infiniband_VLArbitrationTable_VL, tvb, local_offset, 1, FALSE); local_offset +=1;
4289 tempItemHigh = proto_tree_add_item(VLArbitrationTable_header_tree, hf_infiniband_VLArbitrationTable_Weight, tvb, local_offset, 1, FALSE); local_offset +=1;
4290 proto_item_append_text(tempItemLow, "(%u)", i);
4291 proto_item_append_text(tempItemHigh,"(%u)", i);
4295 /* Parse LinearForwardingTable Attribute
4296 * IN: parentTree - The tree to add the dissection to
4297 * tvb - The tvbbuff of packet data
4298 * offset - The offset in TVB where the attribute begins
4299 * MadHeader - The common MAD header of the current SMP/SMA */
4300 static void parse_LinearForwardingTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
4303 gint local_offset = *offset;
4304 proto_tree *LinearForwardingTable_header_tree = NULL;
4305 proto_item *LinearForwardingTable_header_item = NULL;
4306 proto_item *tempItemLow = NULL;
4311 LinearForwardingTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
4312 proto_item_set_text(LinearForwardingTable_header_item, "%s", "LinearForwardingTable");
4313 LinearForwardingTable_header_tree = proto_item_add_subtree(LinearForwardingTable_header_item, ett_linearforwardingtable);
4315 for(i = 0; i < 64; i++)
4317 tempItemLow = proto_tree_add_item(LinearForwardingTable_header_tree, hf_infiniband_LinearForwardingTable_Port, tvb, local_offset, 1, FALSE); local_offset +=1;
4318 proto_item_append_text(tempItemLow, "(%u)", i);
4322 /* Parse RandomForwardingTable Attribute
4323 * IN: parentTree - The tree to add the dissection to
4324 * tvb - The tvbbuff of packet data
4325 * offset - The offset in TVB where the attribute begins
4326 * MadHeader - The common MAD header of the current SMP/SMA */
4327 static void parse_RandomForwardingTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
4330 gint local_offset = *offset;
4331 proto_tree *RandomForwardingTable_header_tree = NULL;
4332 proto_item *RandomForwardingTable_header_item = NULL;
4333 proto_item *tempItemLow = NULL;
4338 RandomForwardingTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
4339 proto_item_set_text(RandomForwardingTable_header_item, "%s", "RandomForwardingTable");
4340 RandomForwardingTable_header_tree = proto_item_add_subtree(RandomForwardingTable_header_item, ett_randomforwardingtable);
4342 for(i = 0; i < 16; i++)
4344 tempItemLow = proto_tree_add_item(RandomForwardingTable_header_tree, hf_infiniband_RandomForwardingTable_LID, tvb, local_offset, 2, FALSE); local_offset +=2;
4345 proto_item_append_text(tempItemLow, "(%u)", i);
4346 tempItemLow = proto_tree_add_item(RandomForwardingTable_header_tree, hf_infiniband_RandomForwardingTable_Valid, tvb, local_offset, 1, FALSE);
4347 proto_item_append_text(tempItemLow, "(%u)", i);
4348 tempItemLow = proto_tree_add_item(RandomForwardingTable_header_tree, hf_infiniband_RandomForwardingTable_LMC, tvb, local_offset, 1, FALSE); local_offset +=1;
4349 proto_item_append_text(tempItemLow, "(%u)", i);
4350 tempItemLow = proto_tree_add_item(RandomForwardingTable_header_tree, hf_infiniband_RandomForwardingTable_Port, tvb, local_offset, 1, FALSE); local_offset +=1;
4351 proto_item_append_text(tempItemLow, "(%u)", i);
4355 /* Parse NoticesAndTraps Attribute
4356 * IN: parentTree - The tree to add the dissection to
4357 * tvb - The tvbbuff of packet data
4358 * offset - The offset in TVB where the attribute begins
4359 * MadHeader - The common MAD header of the current SMP/SMA */
4360 static void parse_MulticastForwardingTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
4363 gint local_offset = *offset;
4364 proto_tree *MulticastForwardingTable_header_tree = NULL;
4365 proto_item *MulticastForwardingTable_header_item = NULL;
4366 proto_item *tempItemLow = NULL;
4371 MulticastForwardingTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
4372 proto_item_set_text(MulticastForwardingTable_header_item, "%s", "MulticastForwardingTable");
4373 MulticastForwardingTable_header_tree = proto_item_add_subtree(MulticastForwardingTable_header_item, ett_multicastforwardingtable);
4375 for(i = 0; i < 16; i++)
4377 tempItemLow = proto_tree_add_item(MulticastForwardingTable_header_tree, hf_infiniband_MulticastForwardingTable_PortMask, tvb, local_offset, 2, FALSE); local_offset +=2;
4378 proto_item_append_text(tempItemLow, "(%u)", i);
4383 /* Parse SMInfo Attribute
4384 * IN: parentTree - The tree to add the dissection to
4385 * tvb - The tvbbuff of packet data
4386 * offset - The offset in TVB where the attribute begins
4387 * MadHeader - The common MAD header of the current SMP/SMA */
4388 static void parse_SMInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
4390 gint local_offset = *offset;
4391 proto_tree *SMInfo_header_tree = NULL;
4392 proto_item *SMInfo_header_item = NULL;
4397 SMInfo_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
4398 proto_item_set_text(SMInfo_header_item, "%s", "SMInfo");
4399 SMInfo_header_tree = proto_item_add_subtree(SMInfo_header_item, ett_sminfo);
4401 proto_tree_add_item(SMInfo_header_tree, hf_infiniband_SMInfo_GUID, tvb, local_offset, 8, FALSE); local_offset +=8;
4402 proto_tree_add_item(SMInfo_header_tree, hf_infiniband_SMInfo_SM_Key, tvb, local_offset, 8, FALSE); local_offset +=8;
4403 proto_tree_add_item(SMInfo_header_tree, hf_infiniband_SMInfo_ActCount, tvb, local_offset, 4, FALSE); local_offset +=4;
4404 proto_tree_add_item(SMInfo_header_tree, hf_infiniband_SMInfo_Priority, tvb, local_offset, 1, FALSE);
4405 proto_tree_add_item(SMInfo_header_tree, hf_infiniband_SMInfo_SMState, tvb, local_offset, 1, FALSE); local_offset +=1;
4408 /* Parse VendorDiag Attribute
4409 * IN: parentTree - The tree to add the dissection to
4410 * tvb - The tvbbuff of packet data
4411 * offset - The offset in TVB where the attribute begins
4412 * MadHeader - The common MAD header of the current SMP/SMA */
4413 static void parse_VendorDiag(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
4415 gint local_offset = *offset;
4416 proto_tree *VendorDiag_header_tree = NULL;
4417 proto_item *VendorDiag_header_item = NULL;
4422 VendorDiag_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
4423 proto_item_set_text(VendorDiag_header_item, "%s", "VendorDiag");
4424 VendorDiag_header_tree = proto_item_add_subtree(VendorDiag_header_item, ett_vendordiag);
4426 proto_tree_add_item(VendorDiag_header_tree, hf_infiniband_VendorDiag_NextIndex, tvb, local_offset, 2, FALSE); local_offset +=2;
4427 proto_tree_add_item(VendorDiag_header_tree, hf_infiniband_VendorDiag_DiagData, tvb, local_offset, 62, FALSE); local_offset +=62;
4430 /* Parse LedInfo Attribute
4431 * IN: parentTree - The tree to add the dissection to
4432 * tvb - The tvbbuff of packet data
4433 * offset - The offset in TVB where the attribute begins
4434 * MadHeader - The common MAD header of the current SMP/SMA */
4435 static void parse_LedInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
4437 gint local_offset = *offset;
4438 proto_tree *LedInfo_header_tree = NULL;
4439 proto_item *LedInfo_header_item = NULL;
4444 LedInfo_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
4445 proto_item_set_text(LedInfo_header_item, "%s", "LedInfo");
4446 LedInfo_header_tree = proto_item_add_subtree(LedInfo_header_item, ett_ledinfo);
4448 proto_tree_add_item(LedInfo_header_tree, hf_infiniband_LedInfo_LedMask, tvb, local_offset, 1, FALSE);
4451 /* Parse LinkSpeedWidthPairsTable Attribute
4452 * IN: parentTree - The tree to add the dissection to
4453 * tvb - The tvbbuff of packet data
4454 * offset - The offset in TVB where the attribute begins
4455 * MadHeader - The common MAD header of the current SMP/SMA */
4456 static void parse_LinkSpeedWidthPairsTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
4458 gint local_offset = *offset;
4459 proto_tree *LinkSpeedWidthPairsTable_header_tree = NULL;
4460 proto_item *LinkSpeedWidthPairsTable_header_item = NULL;
4465 LinkSpeedWidthPairsTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
4466 proto_item_set_text(LinkSpeedWidthPairsTable_header_item, "%s", "LinkSpeedWidthPairsTable");
4467 LinkSpeedWidthPairsTable_header_tree = proto_item_add_subtree(LinkSpeedWidthPairsTable_header_item, ett_linkspeedwidthpairs);
4469 proto_tree_add_item(LinkSpeedWidthPairsTable_header_tree, hf_infiniband_LinkSpeedWidthPairsTable_NumTables, tvb, local_offset, 1, FALSE); local_offset +=1;
4470 proto_tree_add_item(LinkSpeedWidthPairsTable_header_tree, hf_infiniband_LinkSpeedWidthPairsTable_PortMask, tvb, local_offset, 32, FALSE); local_offset +=32;
4471 proto_tree_add_item(LinkSpeedWidthPairsTable_header_tree, hf_infiniband_LinkSpeedWidthPairsTable_SpeedTwoFive, tvb, local_offset, 1, FALSE); local_offset +=1;
4472 proto_tree_add_item(LinkSpeedWidthPairsTable_header_tree, hf_infiniband_LinkSpeedWidthPairsTable_SpeedFive, tvb, local_offset, 1, FALSE); local_offset +=1;
4473 proto_tree_add_item(LinkSpeedWidthPairsTable_header_tree, hf_infiniband_LinkSpeedWidthPairsTable_SpeedTen, tvb, local_offset, 1, FALSE); local_offset +=1;
4476 /* Parse RID Field from Subnet Administraiton Packets.
4477 * IN: SA_header_tree - the dissection tree of the subnet admin attribute.
4478 * tvb - the packet buffer
4479 * MadHeader - the Common MAD header from this packet.
4480 * IN/OUT: offset - the current and updated offset in the packet buffer */
4481 static void parse_RID(proto_tree* SA_header_tree, tvbuff_t* tvb, gint *offset, MAD_Data* MadHeader)
4483 gint local_offset = *offset;
4488 switch(MadHeader->attributeID)
4492 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
4493 local_offset+=2; /* Reserved bits */
4496 /* PortInfoRecord */
4497 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_EndportLID, tvb, local_offset, 2, FALSE); local_offset+=2;
4498 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_PortNum, tvb, local_offset, 1, FALSE); local_offset+=1;
4499 local_offset+=1; /* Reserved bits */
4502 /* SLtoVLMappingTableRecord */
4503 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
4504 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_InputPortNum, tvb, local_offset, 1, FALSE); local_offset+=1;
4505 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_OutputPortNum, tvb, local_offset, 1, FALSE); local_offset+=1;
4506 local_offset+=4; /* Reserved bits */
4509 /* SwitchInfoRecord */
4510 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
4511 local_offset+=2; /* Reserved bits */
4514 /* LinearForwardingTableRecord */
4515 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
4516 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_SixteenBit, tvb, local_offset, 2, FALSE); local_offset+=2;
4517 local_offset+=4; /* Reserved bits */
4520 /* RandomForwardingTableRecord */
4521 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
4522 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_SixteenBit, tvb, local_offset, 2, FALSE); local_offset+=2;
4523 local_offset+=4; /* Reserved bits */
4526 /* MulticastForwardingTableRecord */
4527 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
4528 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_Position, tvb, local_offset, 1, FALSE);
4529 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_NineBit, tvb, local_offset, 2, FALSE); local_offset+=2;
4530 local_offset+=4; /* Reserved bits */
4533 /*VLArbitrationTableRecord */
4534 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
4535 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_OutputPortNum, tvb, local_offset, 1, FALSE); local_offset+=1;
4536 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_EightBit, tvb, local_offset, 1, FALSE); local_offset+=1;
4537 local_offset+=4; /* Reserved bits */
4541 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
4542 local_offset+=2; /* Reserved bits */
4545 /* P_KeyTableRecord */
4546 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
4547 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_SixteenBit, tvb, local_offset, 2, FALSE); local_offset+=2;
4548 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_PortNum, tvb, local_offset, 1, FALSE); local_offset+=1;
4549 local_offset+=3; /* Reserved bits */
4552 /* InformInfoRecord */
4553 proto_tree_add_item(SA_header_tree, hf_infiniband_InformInfoRecord_SubscriberGID, tvb, local_offset, 16, FALSE); local_offset+=16;
4554 proto_tree_add_item(SA_header_tree, hf_infiniband_InformInfoRecord_Enum, tvb, local_offset, 2, FALSE); local_offset+=2;
4555 local_offset+=6; /* Reserved bits */
4559 proto_tree_add_item(SA_header_tree, hf_infiniband_LinkRecord_FromLID, tvb, local_offset, 2, FALSE); local_offset+=2;
4560 proto_tree_add_item(SA_header_tree, hf_infiniband_LinkRecord_FromPort, tvb, local_offset, 1, FALSE); local_offset+=1;
4564 proto_tree_add_item(SA_header_tree, hf_infiniband_ServiceRecord_ServiceID, tvb, local_offset, 8, FALSE); local_offset+=8;
4565 proto_tree_add_item(SA_header_tree, hf_infiniband_ServiceRecord_ServiceGID, tvb, local_offset, 16, FALSE); local_offset+=16;
4566 proto_tree_add_item(SA_header_tree, hf_infiniband_ServiceRecord_ServiceP_Key, tvb, local_offset, 2, FALSE); local_offset+=2;
4570 /* MCMemberRecord */
4571 proto_tree_add_item(SA_header_tree, hf_infiniband_MCMemberRecord_MGID, tvb, local_offset, 16, FALSE); local_offset+=16;
4572 proto_tree_add_item(SA_header_tree, hf_infiniband_MCMemberRecord_PortGID, tvb, local_offset, 16, FALSE); local_offset+=16;
4575 /* GuidInfoRecord */
4576 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
4577 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_EightBit, tvb, local_offset, 1, FALSE); local_offset+=2;
4584 *offset = local_offset;
4587 /* Parse InformInfo Attribute
4588 * IN: parentTree - The tree to add the dissection to
4589 * tvb - The tvbbuff of packet data
4590 * offset - The offset in TVB where the attribute begins
4591 * MadHeader - The common MAD header of the current SMP/SMA */
4592 static void parse_InformInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
4594 gint local_offset = *offset;
4595 proto_tree *InformInfo_header_tree = NULL;
4596 proto_item *InformInfo_header_item = NULL;
4601 InformInfo_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 36, FALSE);
4602 proto_item_set_text(InformInfo_header_item, "%s", "InformInfo");
4603 InformInfo_header_tree = proto_item_add_subtree(InformInfo_header_item, ett_informinfo);
4605 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_GID, tvb, local_offset, 16, FALSE); local_offset+=16;
4606 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_LIDRangeBegin, tvb, local_offset, 2, FALSE); local_offset+=2;
4607 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_LIDRangeEnd, tvb, local_offset, 2, FALSE); local_offset+=2;
4608 local_offset+=2; /* Reserved Bits */
4609 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_IsGeneric, tvb, local_offset, 1, FALSE); local_offset+=1;
4610 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_Subscribe, tvb, local_offset, 1, FALSE); local_offset+=1;
4611 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_Type, tvb, local_offset, 2, FALSE); local_offset+=2;
4612 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_TrapNumberDeviceID, tvb, local_offset, 2, FALSE); local_offset+=2;
4613 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_QPN, tvb, local_offset, 3, FALSE); local_offset+=3;
4614 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_RespTimeValue, tvb, local_offset, 1, FALSE); local_offset+=1;
4616 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_ProducerTypeVendorID, tvb, local_offset, 3, FALSE); local_offset+=3;
4619 /* Parse LinkRecord Attribute
4620 * IN: parentTree - The tree to add the dissection to
4621 * tvb - The tvbbuff of packet data
4622 * offset - The offset in TVB where the attribute begins
4623 * MadHeader - The common MAD header of the current SMP/SMA */
4624 static void parse_LinkRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
4626 gint local_offset = *offset;
4627 proto_tree *LinkRecord_header_tree = NULL;
4628 proto_item *LinkRecord_header_item = NULL;
4635 LinkRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 3, FALSE);
4636 proto_item_set_text(LinkRecord_header_item, "%s", "LinkRecord");
4637 LinkRecord_header_tree = proto_item_add_subtree(LinkRecord_header_item, ett_linkrecord);
4639 proto_tree_add_item(LinkRecord_header_tree, hf_infiniband_LinkRecord_ToPort, tvb, local_offset, 1, FALSE); local_offset+=1;
4640 proto_tree_add_item(LinkRecord_header_tree, hf_infiniband_LinkRecord_ToLID, tvb, local_offset, 2, FALSE); local_offset +=2;
4643 /* Parse ServiceRecord Attribute
4644 * IN: parentTree - The tree to add the dissection to
4645 * tvb - The tvbbuff of packet data
4646 * offset - The offset in TVB where the attribute begins
4647 * MadHeader - The common MAD header of the current SMP/SMA */
4648 static void parse_ServiceRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
4650 gint local_offset = *offset;
4651 proto_tree *ServiceRecord_header_tree = NULL;
4652 proto_item *ServiceRecord_header_item = NULL;
4653 proto_item *tempData = NULL;
4660 ServiceRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 176, FALSE);
4661 proto_item_set_text(ServiceRecord_header_item, "%s", "ServiceRecord");
4662 ServiceRecord_header_tree = proto_item_add_subtree(ServiceRecord_header_item, ett_servicerecord);
4664 proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceLease, tvb, local_offset, 4, FALSE); local_offset+=4;
4665 proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceKey, tvb, local_offset, 16, FALSE); local_offset+=16;
4666 proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceName, tvb, local_offset, 64, FALSE); local_offset+=64;
4668 tempData = proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceData, tvb, local_offset, 16, FALSE); local_offset+=16;
4669 proto_item_append_text(tempData, "%s", "(ServiceData 8.1, 8.16)");
4670 tempData = proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceData, tvb, local_offset, 16, FALSE); local_offset+=16;
4671 proto_item_append_text(tempData, "%s", "(ServiceData 16.1, 16.8)");
4672 tempData = proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceData, tvb, local_offset, 16, FALSE); local_offset+=16;
4673 proto_item_append_text(tempData, "%s", "(ServiceData 32.1, 32.4)");
4674 tempData = proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceData, tvb, local_offset, 16, FALSE); local_offset+=16;
4675 proto_item_append_text(tempData, "%s", "(ServiceData 64.1, 64.2)");
4678 /* Parse PathRecord Attribute
4679 * IN: parentTree - The tree to add the dissection to
4680 * tvb - The tvbbuff of packet data
4681 * offset - The offset in TVB where the attribute begins
4682 * MadHeader - The common MAD header of the current SMP/SMA */
4683 static void parse_PathRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
4685 gint local_offset = *offset;
4686 proto_tree *PathRecord_header_tree = NULL;
4687 proto_item *PathRecord_header_item = NULL;
4694 PathRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 64, FALSE);
4695 proto_item_set_text(PathRecord_header_item, "%s", "PathRecord");
4696 PathRecord_header_tree = proto_item_add_subtree(PathRecord_header_item, ett_pathrecord);
4697 local_offset += 8; /* Reserved Bits */
4699 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_DGID, tvb, local_offset, 16, FALSE); local_offset+=16;
4700 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_SGID, tvb, local_offset, 16, FALSE); local_offset+=16;
4701 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_DLID, tvb, local_offset, 2, FALSE); local_offset+=2;
4702 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_SLID, tvb, local_offset, 2, FALSE); local_offset+=2;
4703 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_RawTraffic, tvb, local_offset, 1, FALSE);
4704 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_FlowLabel, tvb, local_offset, 3, FALSE); local_offset+=3;
4705 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_HopLimit, tvb, local_offset, 1, FALSE); local_offset+=1;
4706 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_TClass, tvb, local_offset, 1, FALSE); local_offset+=1;
4707 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_Reversible, tvb, local_offset, 1, FALSE);
4708 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_NumbPath, tvb, local_offset, 1, FALSE); local_offset+=1;
4709 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_P_Key, tvb, local_offset, 2, FALSE); local_offset+=2;
4710 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_SL, tvb, local_offset, 2, FALSE); local_offset+=2;
4711 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_MTUSelector, tvb, local_offset, 1, FALSE);
4712 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_MTU, tvb, local_offset, 1, FALSE); local_offset+=1;
4713 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_RateSelector, tvb, local_offset, 1, FALSE);
4714 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_Rate, tvb, local_offset, 1, FALSE); local_offset+=1;
4715 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_PacketLifeTimeSelector, tvb, local_offset, 1, FALSE);
4716 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_PacketLifeTime, tvb, local_offset, 1, FALSE); local_offset+=1;
4717 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_Preference, tvb, local_offset, 1, FALSE); local_offset+=1;
4719 /* Parse MCMemberRecord Attribute
4720 * IN: parentTree - The tree to add the dissection to
4721 * tvb - The tvbbuff of packet data
4722 * offset - The offset in TVB where the attribute begins
4723 * MadHeader - The common MAD header of the current SMP/SMA */
4724 static void parse_MCMemberRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
4726 gint local_offset = *offset;
4727 proto_tree *MCMemberRecord_header_tree = NULL;
4728 proto_item *MCMemberRecord_header_item = NULL;
4735 MCMemberRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 64, FALSE);
4736 proto_item_set_text(MCMemberRecord_header_item, "%s", "MCMemberRecord");
4737 MCMemberRecord_header_tree = proto_item_add_subtree(MCMemberRecord_header_item, ett_mcmemberrecord);
4739 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_Q_Key, tvb, local_offset, 4, FALSE); local_offset+=4;
4740 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_MLID, tvb, local_offset, 2, FALSE); local_offset+=2;
4741 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_MTUSelector, tvb, local_offset, 1, FALSE);
4742 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_MTU, tvb, local_offset, 1, FALSE); local_offset+=1;
4743 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_TClass, tvb, local_offset, 1, FALSE); local_offset+=1;
4744 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_P_Key, tvb, local_offset, 2, FALSE); local_offset+=2;
4745 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_RateSelector, tvb, local_offset, 1, FALSE);
4746 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_Rate, tvb, local_offset, 1, FALSE); local_offset+=1;
4747 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_PacketLifeTimeSelector, tvb, local_offset, 1, FALSE);
4748 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_PacketLifeTime, tvb, local_offset, 1, FALSE); local_offset+=1;
4749 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_SL, tvb, local_offset, 1, FALSE);
4750 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_FlowLabel, tvb, local_offset, 3, FALSE); local_offset+=3;
4751 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_HopLimit, tvb, local_offset, 1, FALSE); local_offset+=1;
4752 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_Scope, tvb, local_offset, 1, FALSE);
4753 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_JoinState, tvb, local_offset, 1, FALSE); local_offset+=1;
4754 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_ProxyJoin, tvb, local_offset, 1, FALSE); local_offset+=3;
4757 /* Parse TraceRecord Attribute
4758 * IN: parentTree - The tree to add the dissection to
4759 * tvb - The tvbbuff of packet data
4760 * offset - The offset in TVB where the attribute begins
4761 * MadHeader - The common MAD header of the current SMP/SMA */
4762 static void parse_TraceRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
4764 gint local_offset = *offset;
4765 proto_tree *TraceRecord_header_tree = NULL;
4766 proto_item *TraceRecord_header_item = NULL;
4773 TraceRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 46, FALSE);
4774 proto_item_set_text(TraceRecord_header_item, "%s", "TraceRecord");
4775 TraceRecord_header_tree = proto_item_add_subtree(TraceRecord_header_item, ett_tracerecord);
4777 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_GIDPrefix, tvb, local_offset, 8, FALSE); local_offset+=8;
4778 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_IDGeneration, tvb, local_offset, 2, FALSE); local_offset+=2;
4779 local_offset+=1; /* Reserved Bits */
4780 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_NodeType, tvb, local_offset, 1, FALSE); local_offset+=1;
4781 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_NodeID, tvb, local_offset, 8, FALSE); local_offset+=8;
4782 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_ChassisID, tvb, local_offset, 8, FALSE); local_offset+=8;
4783 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_EntryPortID, tvb, local_offset, 8, FALSE); local_offset+=8;
4784 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_ExitPortID, tvb, local_offset, 8, FALSE); local_offset+=8;
4785 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_EntryPort, tvb, local_offset, 1, FALSE); local_offset+=1;
4786 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_ExitPort, tvb, local_offset, 1, FALSE); local_offset+=1;
4788 /* Parse MultiPathRecord Attribute
4789 * IN: parentTree - The tree to add the dissection to
4790 * tvb - The tvbbuff of packet data
4791 * offset - The offset in TVB where the attribute begins
4792 * MadHeader - The common MAD header of the current SMP/SMA */
4793 static void parse_MultiPathRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
4795 gint local_offset = *offset;
4796 proto_tree *MultiPathRecord_header_tree = NULL;
4797 proto_item *MultiPathRecord_header_item = NULL;
4798 proto_item *SDGID = NULL;
4799 guint8 SDGIDCount = 0;
4800 guint8 DGIDCount = 0;
4808 MultiPathRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 200, FALSE);
4809 proto_item_set_text(MultiPathRecord_header_item, "%s", "MultiPathRecord");
4810 MultiPathRecord_header_tree = proto_item_add_subtree(MultiPathRecord_header_item, ett_multipathrecord);
4812 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_RawTraffic, tvb, local_offset, 1, FALSE);
4813 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_FlowLabel, tvb, local_offset, 3, FALSE); local_offset+=3;
4814 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_HopLimit, tvb, local_offset, 1, FALSE); local_offset+=1;
4815 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_TClass, tvb, local_offset, 1, FALSE); local_offset+=1;
4816 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_Reversible, tvb, local_offset, 1, FALSE);
4817 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_NumbPath, tvb, local_offset, 1, FALSE); local_offset+=1;
4818 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_P_Key, tvb, local_offset, 2, FALSE); local_offset+=2;
4819 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_SL, tvb, local_offset, 2, FALSE); local_offset+=2;
4820 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_MTUSelector, tvb, local_offset, 1, FALSE);
4821 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_MTU, tvb, local_offset, 1, FALSE); local_offset+=1;
4822 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_RateSelector, tvb, local_offset, 1, FALSE);
4823 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_Rate, tvb, local_offset, 1, FALSE); local_offset+=1;
4824 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_PacketLifeTimeSelector, tvb, local_offset, 1, FALSE);
4825 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_PacketLifeTime, tvb, local_offset, 1, FALSE); local_offset+=1;
4826 local_offset+=1; /* Reserved Bits */
4827 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_IndependenceSelector, tvb, local_offset, 1, FALSE);
4828 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_GIDScope, tvb, local_offset, 1, FALSE); local_offset+=1;
4830 SDGIDCount = tvb_get_guint8(tvb, local_offset);
4831 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_SGIDCount, tvb, local_offset, 1, FALSE); local_offset+=1;
4832 DGIDCount = tvb_get_guint8(tvb, local_offset);
4833 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_DGIDCount, tvb, local_offset, 1, FALSE); local_offset+=1;
4834 local_offset+=7; /*Reserved Bits */
4836 for(i = 0; i < SDGIDCount; i++)
4838 SDGID = proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_SDGID, tvb, local_offset, 16, FALSE); local_offset+=16;
4839 proto_item_set_text(SDGID, "(%s%u)","SGID", i);
4841 for(i = 0; i < DGIDCount; i++)
4843 SDGID = proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_SDGID, tvb, local_offset, 16, FALSE); local_offset+=16;
4844 proto_item_set_text(SDGID, "(%s%u)","DGID", i);
4847 /* Parse ServiceAssociationRecord Attribute
4848 * IN: parentTree - The tree to add the dissection to
4849 * tvb - The tvbbuff of packet data
4850 * offset - The offset in TVB where the attribute begins
4851 * MadHeader - The common MAD header of the current SMP/SMA */
4852 static void parse_ServiceAssociationRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
4854 gint local_offset = *offset;
4855 proto_tree *ServiceAssociationRecord_header_tree = NULL;
4856 proto_item *ServiceAssociationRecord_header_item = NULL;
4863 ServiceAssociationRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 80, FALSE);
4864 proto_item_set_text(ServiceAssociationRecord_header_item, "%s", "ServiceAssociationRecord");
4865 ServiceAssociationRecord_header_tree = proto_item_add_subtree(ServiceAssociationRecord_header_item, ett_serviceassocrecord);
4867 proto_tree_add_item(ServiceAssociationRecord_header_tree, hf_infiniband_ServiceAssociationRecord_ServiceKey, tvb, local_offset, 16, FALSE); local_offset +=16;
4868 proto_tree_add_item(ServiceAssociationRecord_header_tree, hf_infiniband_ServiceAssociationRecord_ServiceName, tvb, local_offset, 64, FALSE); local_offset +=64;
4871 /* Parse PortCounters MAD from the Performance management class.
4872 * IN: parentTree - The tree to add the dissection to
4873 * tvb - The tvbbuff of packet data
4874 * offset - The offset in TVB where the attribute begins
4875 * pinfo - The packet info structure with column information */
4876 static void parse_PERF_PortCounters(proto_tree* parentTree, tvbuff_t* tvb, packet_info *pinfo, gint *offset)
4878 proto_item *perf_item = NULL;
4879 proto_tree *perf_tree = NULL;
4880 gint local_offset = *offset;
4882 col_set_str(pinfo->cinfo, COL_INFO, "PERF (PortCounters)");
4884 perf_item = proto_tree_add_item(parentTree, hf_infiniband_PortCounters, tvb, local_offset, 40, FALSE);
4885 perf_tree = proto_item_add_subtree(perf_item, ett_perfclass);
4887 local_offset += 40; /* skip reserved field */
4888 local_offset += 1; /* skip reserved field */
4889 proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_PortSelect, tvb, local_offset, 1, FALSE); local_offset += 1;
4890 proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_CounterSelect, tvb, local_offset, 2, FALSE); local_offset += 2;
4891 proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_SymbolErrorCounter, tvb, local_offset, 2, FALSE); local_offset += 2;
4892 proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_LinkErrorRecoveryCounter, tvb, local_offset, 1, FALSE); local_offset += 1;
4893 proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_LinkDownedCounter, tvb, local_offset, 1, FALSE); local_offset += 1;
4894 proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_PortRcvErrors, tvb, local_offset, 2, FALSE); local_offset += 2;
4895 proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_PortRcvRemotePhysicalErrors, tvb, local_offset, 2, FALSE); local_offset += 2;
4896 proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_PortRcvSwitchRelayErrors, tvb, local_offset, 2, FALSE); local_offset += 2;
4897 proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_PortXmitDiscards, tvb, local_offset, 2, FALSE); local_offset += 2;
4898 proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_PortXmitConstraintErrors, tvb, local_offset, 1, FALSE); local_offset += 1;
4899 proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_PortRcvConstraintErrors, tvb, local_offset, 1, FALSE); local_offset += 1;
4900 local_offset += 1; /* skip reserved field */
4901 proto_tree_add_bits_item(perf_tree, hf_infiniband_PortCounters_LocalLinkIntegrityErrors, tvb, local_offset*8, 4, FALSE);
4902 proto_tree_add_bits_item(perf_tree, hf_infiniband_PortCounters_ExcessiveBufferOverrunErrors, tvb, local_offset*8 + 4, 4, FALSE); local_offset += 1;
4903 local_offset += 2; /* skip reserved field */
4904 proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_VL15Dropped, tvb, local_offset, 2, FALSE); local_offset += 2;
4905 proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_PortXmitData, tvb, local_offset, 4, FALSE); local_offset += 4;
4906 proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_PortRcvData, tvb, local_offset, 4, FALSE); local_offset += 4;
4907 proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_PortXmitPkts, tvb, local_offset, 4, FALSE); local_offset += 4;
4908 proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_PortRcvPkts, tvb, local_offset, 4, FALSE); local_offset += 4;
4910 *offset = local_offset; /* update caller's offset to point to end of the PortCounters payload */
4914 /* Parse PortCountersExtended MAD from the Performance management class.
4915 * IN: parentTree - The tree to add the dissection to
4916 * tvb - The tvbbuff of packet data
4917 * offset - The offset in TVB where the attribute begins
4918 * pinfo - The packet info structure with column information */
4919 static void parse_PERF_PortCountersExtended(proto_tree* parentTree, tvbuff_t* tvb, packet_info *pinfo, gint *offset)
4921 proto_item *perf_item = NULL;
4922 proto_tree *perf_tree = NULL;
4923 gint local_offset = *offset;
4925 col_set_str(pinfo->cinfo, COL_INFO, "PERF (PortCountersExtended)");
4927 perf_item = proto_tree_add_item(parentTree, hf_infiniband_PortCountersExt, tvb, local_offset, 72, FALSE);
4928 perf_tree = proto_item_add_subtree(perf_item, ett_perfclass);
4930 local_offset += 40; /* skip reserved field */
4931 local_offset += 1; /* skip reserved field */
4932 proto_tree_add_item(perf_tree, hf_infiniband_PortCountersExt_PortSelect, tvb, local_offset, 1, FALSE); local_offset += 1;
4933 proto_tree_add_item(perf_tree, hf_infiniband_PortCountersExt_CounterSelect, tvb, local_offset, 2, FALSE); local_offset += 2;
4934 local_offset += 4; /* skip reserved field */
4935 proto_tree_add_item(perf_tree, hf_infiniband_PortCountersExt_PortXmitData, tvb, local_offset, 8, FALSE); local_offset += 8;
4936 proto_tree_add_item(perf_tree, hf_infiniband_PortCountersExt_PortRcvData, tvb, local_offset, 8, FALSE); local_offset += 8;
4937 proto_tree_add_item(perf_tree, hf_infiniband_PortCountersExt_PortXmitPkts, tvb, local_offset, 8, FALSE); local_offset += 8;
4938 proto_tree_add_item(perf_tree, hf_infiniband_PortCountersExt_PortRcvPkts, tvb, local_offset, 8, FALSE); local_offset += 8;
4939 proto_tree_add_item(perf_tree, hf_infiniband_PortCountersExt_PortUnicastXmitPkts, tvb, local_offset, 8, FALSE); local_offset += 8;
4940 proto_tree_add_item(perf_tree, hf_infiniband_PortCountersExt_PortUnicastRcvPkts, tvb, local_offset, 8, FALSE); local_offset += 8;
4941 proto_tree_add_item(perf_tree, hf_infiniband_PortCountersExt_PortMulticastXmitPkts, tvb, local_offset, 8, FALSE); local_offset += 8;
4942 proto_tree_add_item(perf_tree, hf_infiniband_PortCountersExt_PortMulticastRcvPkts, tvb, local_offset, 8, FALSE); local_offset += 8;
4944 *offset = local_offset; /* update caller's offset to point to end of the PortCountersExt payload */
4948 /* dissect_general_info
4949 * Used to extract very few values from the packet in the case that full dissection is disabled by the user.
4951 * tvb - The tvbbuff of packet data
4952 * offset - The offset in TVB where the attribute begins
4953 * pinfo - The packet info structure with column information
4954 * starts_with_grh - If true this packets start with a GRH header, otherwise with LRH */
4955 static void dissect_general_info(tvbuff_t *tvb, gint offset, packet_info *pinfo, gboolean starts_with_grh)
4957 guint8 lnh_val = 0; /* The Link Next Header Value. Tells us which headers are coming */
4958 gboolean bthFollows = 0; /* Tracks if we are parsing a BTH. This is a significant decision point */
4959 guint8 virtualLane = 0; /* The Virtual Lane of the current Packet */
4960 guint8 opCode = 0; /* OpCode from BTH header. */
4961 gint32 nextHeaderSequence = -1; /* defined by this dissector. #define which indicates the upcoming header sequence from OpCode */
4962 guint8 nxtHdr = 0; /* that must be available for that header. */
4963 struct e_in6_addr SRCgid; /* Struct to display ipv6 Address */
4964 struct e_in6_addr DSTgid; /* Struct to display ipv6 Address */
4965 guint8 management_class = 0;
4968 if (starts_with_grh) {
4969 /* this is a RoCE packet, skip LRH parsing */
4970 lnh_val = IBA_GLOBAL;
4974 virtualLane = tvb_get_guint8(tvb, offset);
4975 virtualLane = virtualLane & 0xF0;
4978 /* Save Link Next Header... This tells us what the next header is. */
4979 lnh_val = tvb_get_guint8(tvb, offset);
4980 lnh_val = lnh_val & 0x03;
4983 /* Set destination in packet view. */
4984 *((guint16*) dst_addr) = tvb_get_ntohs(tvb, offset);
4985 SET_ADDRESS(&pinfo->dst, AT_IB, sizeof(guint16), dst_addr);
4989 /* Set Source in packet view. */
4990 *((guint16*) src_addr) = tvb_get_ntohs(tvb, offset);
4991 SET_ADDRESS(&pinfo->src, AT_IB, sizeof(guint16), src_addr);
5001 nxtHdr = tvb_get_guint8(tvb, offset);
5004 tvb_get_ipv6(tvb, offset, &SRCgid);
5006 /* Set source GID in packet view. */
5007 memcpy(src_addr, &SRCgid, GID_SIZE);
5008 SET_ADDRESS(&pinfo->src, AT_IB, GID_SIZE, src_addr);
5012 tvb_get_ipv6(tvb, offset, &DSTgid);
5014 /* Set destination GID in packet view. */
5015 memcpy(dst_addr, &DSTgid, GID_SIZE);
5016 SET_ADDRESS(&pinfo->dst, AT_IB, GID_SIZE, dst_addr);
5022 /* Some kind of packet being transported globally with IBA, but locally it is not IBA - no BTH following. */
5027 * Fall through switch and start parsing Local Headers and BTH
5033 /* Get the OpCode - this tells us what headers are following */
5034 opCode = tvb_get_guint8(tvb, offset);
5035 col_append_str(pinfo->cinfo, COL_INFO, val_to_str((guint32)opCode, OpCodeMap, "Unknown OpCode"));
5039 /* Raw IPv6 Packet */
5040 g_snprintf(dst_addr, ADDR_MAX_LEN, "IPv6 over IB Packet");
5041 SET_ADDRESS(&pinfo->dst, AT_STRINGZ, (int)strlen(dst_addr)+1, dst_addr);
5051 /* Find our next header sequence based on the Opcode
5052 * Since we're not doing dissection here, we just need the proper offsets to get our labels in packet view */
5054 nextHeaderSequence = find_next_header_sequence((guint32) opCode);
5055 switch(nextHeaderSequence)
5057 case RDETH_DETH_PAYLD:
5058 offset += 4; /* RDETH */
5059 offset += 8; /* DETH */
5061 case RDETH_DETH_RETH_PAYLD:
5062 offset += 4; /* RDETH */
5063 offset += 8; /* DETH */
5064 offset += 16; /* RETH */
5066 case RDETH_DETH_IMMDT_PAYLD:
5067 offset += 4; /* RDETH */
5068 offset += 8; /* DETH */
5069 offset += 4; /* IMMDT */
5071 case RDETH_DETH_RETH_IMMDT_PAYLD:
5072 offset += 4; /* RDETH */
5073 offset += 8; /* DETH */
5074 offset += 16; /* RETH */
5075 offset += 4; /* IMMDT */
5077 case RDETH_DETH_RETH:
5078 offset += 4; /* RDETH */
5079 offset += 8; /* DETH */
5080 offset += 16; /* RETH */
5082 case RDETH_AETH_PAYLD:
5083 offset += 4; /* RDETH */
5084 offset += 4; /* AETH */
5087 offset += 4; /* RDETH */
5090 offset += 4; /* RDETH */
5091 offset += 4; /* AETH */
5093 case RDETH_AETH_ATOMICACKETH:
5094 offset += 4; /* RDETH */
5095 offset += 4; /* AETH */
5096 offset += 8; /* AtomicAckETH */
5098 case RDETH_DETH_ATOMICETH:
5099 offset += 4; /* RDETH */
5100 offset += 8; /* DETH */
5101 offset += 28; /* AtomicETH */
5104 offset += 4; /* RDETH */
5105 offset += 8; /* DETH */
5108 offset += 8; /* DETH */
5113 offset += 4; /* IMMDT */
5116 offset += 16; /* RETH */
5119 offset += 16; /* RETH */
5122 offset += 4; /* AETH */
5125 offset += 4; /* AETH */
5127 case AETH_ATOMICACKETH:
5128 offset += 4; /* AETH */
5129 offset += 8; /* AtomicAckETH */
5132 offset += 28; /* AtomicETH */
5135 offset += 4; /* IETH */
5137 case DETH_IMMDT_PAYLD:
5138 offset += 8; /* DETH */
5139 offset += 4; /* IMMDT */
5145 if(virtualLane == 0xF0)
5147 management_class = tvb_get_guint8(tvb, offset + 1);
5148 if(((management_class >= (guint8)VENDOR_1_START) && (management_class <= (guint8)VENDOR_1_END))
5149 || ((management_class >= (guint8)VENDOR_2_START) && (management_class <= (guint8)VENDOR_2_END)))
5153 else if((management_class >= (guint8)APPLICATION_START) && (management_class <= (guint8)APPLICATION_END))
5157 else if(((management_class == (guint8)0x00) || (management_class == (guint8)0x02))
5158 || ((management_class >= (guint8)0x50) && (management_class <= (guint8)0x80))
5159 || ((management_class >= (guint8)0x82)))
5163 else /* we have a normal management_class */
5165 parse_MAD_Common(NULL, tvb, &offset, &MadData);
5166 label_SUBM_Method(NULL, &MadData, pinfo);
5167 label_SUBM_Attribute(NULL, &MadData, pinfo);
5174 /* Protocol Registration */
5175 void proto_register_infiniband(void)
5177 module_t *infiniband_module;
5179 /* Field dissector structures.
5180 * For reserved fields, reservedX denotes the reserved field is X bits in length.
5181 * e.g. reserved2 is a reserved field 2 bits in length.
5182 * The third parameter is a filter string associated for this field.
5183 * So for instance, to filter packets for a given virtual lane,
5184 * The filter (infiniband.LRH.vl == 3) or something similar would be used. */
5186 /* XXX: ToDo: Verify against Infiniband 1.2.1 Specification */
5187 /* Fields verified/corrected: Those after comment "XX: All following ..." */
5189 /* meanings for MAD method field */
5190 static const value_string mad_method_str[] = {
5193 { 0x81, "GetResp()" },
5196 { 0x06, "Report()" },
5197 { 0x86, "ReportResp()" },
5198 { 0x07, "TrapRepress()" },
5202 static hf_register_info hf[] = {
5203 /* Local Route Header (LRH) */
5204 { &hf_infiniband_LRH, {
5205 "Local Route Header", "infiniband.lrh",
5206 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5208 { &hf_infiniband_virtual_lane, {
5209 "Virtual Lane", "infiniband.lrh.vl",
5210 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
5212 { &hf_infiniband_link_version, {
5213 "Link Version", "infiniband.lrh.lver",
5214 FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL}
5216 { &hf_infiniband_service_level, {
5217 "Service Level", "infiniband.lrh.sl",
5218 FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL}
5220 { &hf_infiniband_reserved2, {
5221 "Reserved (2 bits)", "infiniband.lrh.reserved2",
5222 FT_UINT8, BASE_DEC, NULL, 0x0C, NULL, HFILL}
5224 { &hf_infiniband_link_next_header, {
5225 "Link Next Header", "infiniband.lrh.lnh",
5226 FT_UINT8, BASE_HEX, NULL, 0x03, NULL, HFILL}
5228 { &hf_infiniband_destination_local_id, {
5229 "Destination Local ID", "infiniband.lrh.dlid",
5230 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
5232 { &hf_infiniband_reserved5, {
5233 "Reserved (5 bits)", "infiniband.lrh.reserved5",
5234 FT_UINT16, BASE_DEC, NULL, 0xF800, NULL, HFILL}
5236 { &hf_infiniband_packet_length, {
5237 "Packet Length", "infiniband.lrh.pktlen",
5238 FT_UINT16, BASE_DEC, NULL, 0x07FF, NULL, HFILL}
5240 { &hf_infiniband_source_local_id, {
5241 "Source Local ID", "infiniband.lrh.slid",
5242 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
5245 /* Global Route Header (GRH) */
5246 { &hf_infiniband_GRH, {
5247 "Global Route Header", "infiniband.grh",
5248 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5250 { &hf_infiniband_ip_version, {
5251 "IP Version", "infiniband.grh.ipver",
5252 FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL}
5254 { &hf_infiniband_traffic_class, {
5255 "Traffic Class", "infiniband.grh.tclass",
5256 FT_UINT16, BASE_DEC, NULL, 0x0FF0, NULL, HFILL}
5258 { &hf_infiniband_flow_label, {
5259 "Flow Label", "infiniband.grh.flowlabel",
5260 FT_UINT32, BASE_DEC, NULL, 0x000FFFFF, NULL, HFILL}
5262 { &hf_infiniband_payload_length, {
5263 "Payload Length", "infiniband.grh.paylen",
5264 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
5266 { &hf_infiniband_next_header, {
5267 "Next Header", "infiniband.grh.nxthdr",
5268 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
5270 { &hf_infiniband_hop_limit, {
5271 "Hop Limit", "infiniband.grh.hoplmt",
5272 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
5274 { &hf_infiniband_source_gid, {
5275 "Source GID", "infiniband.grh.sgid",
5276 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
5278 { &hf_infiniband_destination_gid, {
5279 "Destination GID", "infiniband.grh.dgid",
5280 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
5283 /* Base Transport Header (BTH) */
5284 { &hf_infiniband_BTH, {
5285 "Base Transport Header", "infiniband.bth",
5286 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5288 { &hf_infiniband_opcode, {
5289 "Opcode", "infiniband.bth.opcode",
5290 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
5292 { &hf_infiniband_solicited_event, {
5293 "Solicited Event", "infiniband.bth.se",
5294 FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL}
5296 { &hf_infiniband_migreq, {
5297 "MigReq", "infiniband.bth.m",
5298 FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL}
5300 { &hf_infiniband_pad_count, {
5301 "Pad Count", "infiniband.bth.padcnt",
5302 FT_UINT8, BASE_DEC, NULL, 0x30, NULL, HFILL}
5304 { &hf_infiniband_transport_header_version, {
5305 "Header Version", "infiniband.bth.tver",
5306 FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL}
5308 { &hf_infiniband_partition_key, {
5309 "Partition Key", "infiniband.bth.p_key",
5310 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
5312 { &hf_infiniband_reserved8, {
5313 "Reserved (8 bits)", "infiniband.bth.reserved8",
5314 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
5316 { &hf_infiniband_destination_qp, {
5317 "Destination Queue Pair", "infiniband.bth.destqp",
5318 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
5320 { &hf_infiniband_acknowledge_request, {
5321 "Acknowledge Request", "infiniband.bth.a",
5322 FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL}
5324 { &hf_infiniband_reserved7, {
5325 "Reserved (7 bits)", "infiniband.bth.reserved7",
5326 FT_UINT8, BASE_DEC, NULL, 0x7F, NULL, HFILL}
5328 { &hf_infiniband_packet_sequence_number, {
5329 "Packet Sequence Number", "infiniband.bth.psn",
5330 FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL}
5333 /* Raw Header (RWH) */
5334 { &hf_infiniband_RWH, {
5335 "Raw Header", "infiniband.rwh",
5336 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5338 { &hf_infiniband_reserved16_RWH, {
5339 "Reserved (16 bits)", "infiniband.rwh.reserved",
5340 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
5342 { &hf_infiniband_etype, {
5343 "Ethertype", "infiniband.rwh.etype",
5344 FT_UINT16, BASE_HEX, NULL /*VALS(etype_vals)*/, 0x0, "Type", HFILL }
5347 /* Reliable Datagram Extended Transport Header (RDETH) */
5348 { &hf_infiniband_RDETH, {
5349 "Reliable Datagram Extended Transport Header", "infiniband.rdeth",
5350 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5352 { &hf_infiniband_reserved8_RDETH, {
5353 "Reserved (8 bits)", "infiniband.rdeth.reserved8",
5354 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
5356 { &hf_infiniband_ee_context, {
5357 "E2E Context", "infiniband.rdeth.eecnxt",
5358 FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL}
5361 /* Datagram Extended Transport Header (DETH) */
5362 { &hf_infiniband_DETH, {
5363 "Datagram Extended Transport Header", "infiniband.deth",
5364 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5366 { &hf_infiniband_queue_key, {
5367 "Queue Key", "infiniband.deth.q_key",
5368 FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL}
5370 { &hf_infiniband_reserved8_DETH, {
5371 "Reserved (8 bits)", "infiniband.deth.reserved8",
5372 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
5374 { &hf_infiniband_source_qp, {
5375 "Source Queue Pair", "infiniband.deth.srcqp",
5376 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
5379 /* RDMA Extended Transport Header (RETH) */
5380 { &hf_infiniband_RETH, {
5381 "RDMA Extended Transport Header", "infiniband.reth",
5382 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5384 { &hf_infiniband_virtual_address, {
5385 "Virtual Address", "infiniband.reth.va",
5386 FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL}
5388 { &hf_infiniband_remote_key, {
5389 "Remote Key", "infiniband.reth.r_key",
5390 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
5392 { &hf_infiniband_dma_length, {
5393 "DMA Length", "infiniband.reth.dmalen",
5394 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
5397 /* Atomic Extended Transport Header (AtomicETH) */
5398 { &hf_infiniband_AtomicETH, {
5399 "Atomic Extended Transport Header", "infiniband.atomiceth",
5400 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5403 { &hf_infiniband_virtual_address_AtomicETH, {
5404 "Virtual Address", "infiniband.atomiceth.va",
5405 FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL}
5407 { &hf_infiniband_remote_key_AtomicETH, {
5408 "Remote Key", "infiniband.atomiceth.r_key",
5409 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
5412 { &hf_infiniband_swap_or_add_data, {
5413 "Swap (Or Add) Data", "infiniband.atomiceth.swapdt",
5414 FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL}
5416 { &hf_infiniband_compare_data, {
5417 "Compare Data", "infiniband.atomiceth.cmpdt",
5418 FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL}
5421 /* ACK Extended Transport Header (AETH) */
5422 { &hf_infiniband_AETH, {
5423 "ACK Extended Transport Header", "infiniband.aeth",
5424 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5426 { &hf_infiniband_syndrome, {
5427 "Syndrome", "infiniband.aeth.syndrome",
5428 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
5430 { &hf_infiniband_message_sequence_number, {
5431 "Message Sequence Number", "infiniband.aeth.msn",
5432 FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL}
5435 /* Atomic ACK Extended Transport Header (AtomicAckETH) */
5436 { &hf_infiniband_AtomicAckETH, {
5437 "Atomic ACK Extended Transport Header", "infiniband.atomicacketh",
5438 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5440 { &hf_infiniband_original_remote_data, {
5441 "Original Remote Data", "infiniband.atomicacketh.origremdt",
5442 FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL}
5445 /* Immediate Extended Transport Header (ImmDT) */
5446 { &hf_infiniband_IMMDT, {
5447 "Immediate Data", "infiniband.immdt",
5448 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5451 /* Invalidate Extended Transport Header (IETH) */
5452 { &hf_infiniband_IETH, {
5453 "RKey", "infiniband.ieth",
5454 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5458 { &hf_infiniband_payload, {
5459 "Payload", "infiniband.payload",
5460 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5462 { &hf_infiniband_invariant_crc, {
5463 "Invariant CRC", "infiniband.invariant.crc",
5464 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
5466 { &hf_infiniband_variant_crc, {
5467 "Variant CRC", "infiniband.variant.crc",
5468 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
5470 { &hf_infiniband_raw_data, {
5471 "Raw Data", "infiniband.rawdata",
5472 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5474 /* Unknown or Vendor Specific */
5475 { &hf_infiniband_vendor, {
5476 "Unknown/Vendor Specific Data", "infiniband.vendor",
5477 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5480 {&hf_cm_req_local_comm_id, {
5481 "Local Communication ID", "infiniband.cm.req",
5482 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
5484 {&hf_cm_req_service_id, {
5485 "ServiceID", "infiniband.cm.req.serviceid",
5486 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
5488 {&hf_cm_req_local_ca_guid, {
5489 "Local CA GUID", "infiniband.cm.req.localcaguid",
5490 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
5492 {&hf_cm_req_local_qkey, {
5493 "Local Q_Key", "infiniband.cm.req.localqkey",
5494 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
5496 {&hf_cm_req_local_qpn, {
5497 "Local QPN", "infiniband.cm.req.localqpn",
5498 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
5500 {&hf_cm_req_respo_res, {
5501 "Responder Resources", "infiniband.cm.req.responderres",
5502 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
5504 {&hf_cm_req_local_eecn, {
5505 "Local EECN", "infiniband.cm.req.localeecn",
5506 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
5508 {&hf_cm_req_init_depth, {
5509 "Initiator Depth", "infiniband.cm.req.initdepth",
5510 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
5512 {&hf_cm_req_remote_eecn, {
5513 "Remote EECN", "infiniband.cm.req.remoteeecn",
5514 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
5516 {&hf_cm_req_remote_cm_resp_to, {
5517 "Remote CM Response Timeout", "infiniband.cm.req.remoteresptout",
5518 FT_UINT8, BASE_HEX, NULL, 0x1f, NULL, HFILL}
5520 {&hf_cm_req_transp_serv_type, {
5521 "Transport Service Type", "infiniband.cm.req.transpsvctype",
5522 FT_UINT8, BASE_HEX, NULL, 0x60, NULL, HFILL}
5524 {&hf_cm_req_e2e_flow_ctrl, {
5525 "End-to-End Flow Control", "infiniband.cm.req.e2eflowctrl",
5526 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
5528 {&hf_cm_req_start_psn, {
5529 "Starting PSN", "infiniband.cm.req.startpsn",
5530 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
5532 {&hf_cm_req_local_cm_resp_to, {
5533 "Local CM Response Timeout", "infiniband.cm.req.localresptout",
5534 FT_UINT8, BASE_HEX, NULL, 0x1f, NULL, HFILL}
5536 {&hf_cm_req_retry_count, {
5537 "Retry Count", "infiniband.cm.req.retrcount",
5538 FT_UINT8, BASE_HEX, NULL, 0xe0, NULL, HFILL}
5541 "Partition Key", "infiniband.cm.req.pkey",
5542 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
5544 {&hf_cm_req_path_pp_mtu, {
5545 "Path Packet Payload MTU", "infiniband.cm.req.pppmtu",
5546 FT_UINT8, BASE_HEX, NULL, 0xf, NULL, HFILL}
5548 {&hf_cm_req_rdc_exists, {
5549 "RDC Exists", "infiniband.cm.req.rdcexist",
5550 FT_UINT8, BASE_HEX, NULL, 0x10, NULL, HFILL}
5552 {&hf_cm_req_rnr_retry_count, {
5553 "RNR Retry Count", "infiniband.cm.req.rnrretrcount",
5554 FT_UINT8, BASE_HEX, NULL, 0xe0, NULL, HFILL}
5556 {&hf_cm_req_max_cm_retries, {
5557 "Max CM Retries", "infiniband.cm.req.maxcmretr",
5558 FT_UINT8, BASE_HEX, NULL, 0xf, NULL, HFILL}
5561 "SRQ", "infiniband.cm.req.srq",
5562 FT_UINT8, BASE_HEX, NULL, 0x10, NULL, HFILL}
5564 {&hf_cm_req_primary_local_lid, {
5565 "Primary Local Port LID", "infiniband.cm.req.prim_locallid",
5566 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
5568 {&hf_cm_req_primary_remote_lid, {
5569 "Primary Remote Port LID", "infiniband.cm.req.prim_remotelid",
5570 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
5572 {&hf_cm_req_primary_local_gid, {
5573 "Primary Local Port GID", "infiniband.cm.req.prim_localgid",
5574 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
5576 {&hf_cm_req_primary_remote_gid, {
5577 "Primary Remote Port GID", "infiniband.cm.req.prim_remotegid",
5578 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
5580 {&hf_cm_req_primary_flow_label, {
5581 "Primary Flow Label", "infiniband.cm.req.prim_flowlabel",
5582 FT_UINT24, BASE_HEX, NULL, 0xfffff, NULL, HFILL}
5584 {&hf_cm_req_primary_packet_rate, {
5585 "Primary Packet Rate", "infiniband.cm.req.prim_pktrate",
5586 FT_UINT8, BASE_HEX, NULL, 0xfc, NULL, HFILL}
5588 {&hf_cm_req_primary_traffic_class, {
5589 "Primary Traffic Class", "infiniband.cm.req.prim_tfcclass",
5590 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
5592 {&hf_cm_req_primary_hop_limit, {
5593 "Primary Hop Limit", "infiniband.cm.req.prim_hoplim",
5594 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
5596 {&hf_cm_req_primary_sl, {
5597 "Primary SL", "infiniband.cm.req.prim_sl",
5598 FT_UINT8, BASE_HEX, NULL, 0xf, NULL, HFILL}
5600 {&hf_cm_req_primary_subnet_local, {
5601 "Primary Subnet Local", "infiniband.cm.req.prim_subnetlocal",
5602 FT_UINT8, BASE_HEX, NULL, 0x10, NULL, HFILL}
5604 {&hf_cm_req_primary_local_ack_to, {
5605 "Primary Local ACK Timeout", "infiniband.cm.req.prim_localacktout",
5606 FT_UINT8, BASE_HEX, NULL, 0x1f, NULL, HFILL}
5608 {&hf_cm_req_alt_local_lid, {
5609 "Alternate Local Port LID", "infiniband.cm.req.alt_locallid",
5610 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
5612 {&hf_cm_req_alt_remote_lid, {
5613 "Alternate Remote Port LID", "infiniband.cm.req.alt_remotelid",
5614 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
5616 {&hf_cm_req_alt_local_gid, {
5617 "Alternate Local Port GID", "infiniband.cm.req.alt_localgid",
5618 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5620 {&hf_cm_req_alt_remote_gid, {
5621 "Alternate Remote Port GID", "infiniband.cm.req.alt_remotegid",
5622 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5624 {&hf_cm_req_flow_label, {
5625 "Alternate Flow Label", "infiniband.cm.req.alt_flowlabel",
5626 FT_UINT24, BASE_HEX, NULL, 0xfffff, NULL, HFILL}
5628 {&hf_cm_req_packet_rate, {
5629 "Alternate Packet Rate", "infiniband.cm.req.alt_pktrate",
5630 FT_UINT8, BASE_HEX, NULL, 0xfc, NULL, HFILL}
5632 {&hf_cm_req_alt_traffic_class, {
5633 "Alternate Traffic Class", "infiniband.cm.req.alt_tfcclass",
5634 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
5636 {&hf_cm_req_alt_hop_limit, {
5637 "Alternate Hop Limit", "infiniband.cm.req.alt_hoplim",
5638 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
5641 "Alternate SL", "infiniband.cm.req.alt_sl",
5642 FT_UINT8, BASE_HEX, NULL, 0xf, NULL, HFILL}
5644 {&hf_cm_req_subnet_local, {
5645 "Alternate Subnet Local", "infiniband.cm.req.alt_subnetlocal",
5646 FT_UINT8, BASE_HEX, NULL, 0x10, NULL, HFILL}
5648 {&hf_cm_req_local_ACK_timeout, {
5649 "Alternate Local ACK Timeout", "infiniband.cm.req.alt_localacktout",
5650 FT_UINT8, BASE_HEX, NULL, 0x1f, NULL, HFILL}
5652 {&hf_cm_req_private_data, {
5653 "PrivateData", "infiniband.cm.req.private",
5654 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5657 {&hf_cm_rep_localcommid, {
5658 "Local Communication ID", "infiniband.cm.rep",
5659 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
5661 {&hf_cm_rep_remotecommid, {
5662 "Remote Communication ID", "infiniband.cm.rep.remotecommid",
5663 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
5665 {&hf_cm_rep_localqkey, {
5666 "Local Q_Key", "infiniband.cm.rep.localqkey",
5667 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
5669 {&hf_cm_rep_localqpn, {
5670 "Local QPN", "infiniband.cm.rep.localqpn",
5671 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
5673 {&hf_cm_rep_localeecontnum, {
5674 "Local EE Context Number", "infiniband.cm.rep.localeecn",
5675 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
5677 {&hf_cm_rep_startingpsn, {
5678 "Starting PSN", "infiniband.cm.rep.startpsn",
5679 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
5681 {&hf_cm_rep_responderres, {
5682 "Responder Resources", "infiniband.cm.rep.respres",
5683 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
5685 {&hf_cm_rep_initiatordepth, {
5686 "Initiator Depth", "infiniband.cm.rep.initdepth",
5687 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
5689 {&hf_cm_rep_tgtackdelay, {
5690 "Target ACK Delay", "infiniband.cm.rep.tgtackdelay",
5691 FT_UINT8, BASE_HEX, NULL, 0x1f, NULL, HFILL}
5693 {&hf_cm_rep_failoveracc, {
5694 "Failover Accepted", "infiniband.cm.rep.failoveracc",
5695 FT_UINT8, BASE_HEX, NULL, 0x60, NULL, HFILL}
5697 {&hf_cm_rep_e2eflowctl, {
5698 "End-To-End Flow Control", "infiniband.cm.rep.e2eflowctrl",
5699 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
5701 {&hf_cm_rep_rnrretrycount, {
5702 "RNR Retry Count", "infiniband.cm.rep.rnrretrcount",
5703 FT_UINT8, BASE_HEX, NULL, 0x7, NULL, HFILL}
5706 "SRQ", "infiniband.cm.rep.srq",
5707 FT_UINT8, BASE_HEX, NULL, 0x8, NULL, HFILL}
5709 {&hf_cm_rep_localcaguid, {
5710 "Local CA GUID", "infiniband.cm.rep.localcaguid",
5711 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
5713 {&hf_cm_rep_privatedata, {
5714 "PrivateData", "infiniband.cm.rep.private",
5715 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5717 /* IB CM RTU Header */
5718 {&hf_cm_rtu_localcommid, {
5719 "Local Communication ID", "infiniband.cm.rtu.localcommid",
5720 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
5722 {&hf_cm_rtu_remotecommid, {
5723 "Remote Communication ID", "infiniband.cm.rtu.remotecommid",
5724 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
5726 {&hf_cm_rtu_privatedata, {
5727 "PrivateData", "infiniband.cm.rtu.private",
5728 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5731 {&hf_cm_rej_local_commid, {
5732 "Local Communication ID", "infiniband.cm.rej.localcommid",
5733 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
5735 {&hf_cm_rej_remote_commid, {
5736 "Remote Communication ID", "infiniband.cm.rej.remotecommid",
5737 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
5739 {&hf_cm_rej_msg_rej, {
5740 "Message REJected", "infiniband.cm.rej.msgrej",
5741 FT_UINT8, BASE_HEX, NULL, 0x3, NULL, HFILL}
5743 {&hf_cm_rej_rej_info_len, {
5744 "Reject Info Length", "infiniband.cm.rej.rejinfolen",
5745 FT_UINT8, BASE_HEX, NULL, 0x7f, NULL, HFILL}
5747 {&hf_cm_rej_reason, {
5748 "Reason", "infiniband.cm.rej.reason",
5749 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
5751 {&hf_cm_rej_add_rej_info, {
5752 "Additional Reject Information (ARI)", "infiniband.cm.rej.ari",
5753 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5755 {&hf_cm_rej_private_data, {
5756 "PrivateData", "infiniband.cm.rej.private",
5757 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5759 /* MAD Base Header */
5760 { &hf_infiniband_MAD, {
5761 "MAD (Management Datagram) Common Header", "infiniband.mad",
5762 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5764 { &hf_infiniband_base_version, {
5765 "Base Version", "infiniband.mad.baseversion",
5766 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
5768 { &hf_infiniband_mgmt_class, {
5769 "Management Class", "infiniband.mad.mgmtclass",
5770 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
5772 { &hf_infiniband_class_version, {
5773 "Class Version", "infiniband.mad.classversion",
5774 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
5777 { &hf_infiniband_reserved1, {
5778 "Reserved", "infiniband.mad.reserved1",
5779 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
5782 { &hf_infiniband_method, {
5783 "Method", "infiniband.mad.method",
5784 FT_UINT8, BASE_HEX, VALS(mad_method_str), 0x0, NULL, HFILL}
5786 { &hf_infiniband_status, {
5787 "Status", "infiniband.mad.status",
5788 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
5790 { &hf_infiniband_class_specific, {
5791 "Class Specific", "infiniband.mad.classspecific",
5792 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
5794 { &hf_infiniband_transaction_id, {
5795 "Transaction ID", "infiniband.mad.transactionid",
5796 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
5798 { &hf_infiniband_attribute_id, {
5799 "Attribute ID", "infiniband.mad.attributeid",
5800 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
5802 { &hf_infiniband_reserved16, {
5803 "Reserved", "infiniband.mad.reserved16",
5804 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
5806 { &hf_infiniband_attribute_modifier, {
5807 "Attribute Modifier", "infiniband.mad.attributemodifier",
5808 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
5810 { &hf_infiniband_data, {
5811 "MAD Data Payload", "infiniband.mad.data",
5812 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5816 { &hf_infiniband_RMPP, {
5817 "RMPP (Reliable Multi-Packet Transaction Protocol)", "infiniband.rmpp",
5818 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5820 { &hf_infiniband_rmpp_version, {
5821 "RMPP Type", "infiniband.rmpp.rmppversion",
5822 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
5824 { &hf_infiniband_rmpp_type, {
5825 "RMPP Type", "infiniband.rmpp.rmpptype",
5826 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
5828 { &hf_infiniband_r_resp_time, {
5829 "R Resp Time", "infiniband.rmpp.rresptime",
5830 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
5832 { &hf_infiniband_rmpp_flags, {
5833 "RMPP Flags", "infiniband.rmpp.rmppflags",
5834 FT_UINT8, BASE_HEX, VALS(RMPP_Flags), 0x0F, NULL, HFILL}
5836 { &hf_infiniband_rmpp_status, {
5837 "RMPP Status", "infiniband.rmpp.rmppstatus",
5838 FT_UINT8, BASE_HEX, VALS(RMPP_Status), 0x0, NULL, HFILL}
5840 { &hf_infiniband_rmpp_data1, {
5841 "RMPP Data 1", "infiniband.rmpp.data1",
5842 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
5844 { &hf_infiniband_rmpp_data2, {
5845 "RMPP Data 2", "infiniband.rmpp.data2",
5846 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
5851 { &hf_infiniband_RMPP_DATA, {
5852 "RMPP Data (Reliable Multi-Packet Transaction Protocol)", "infiniband.rmpp.data",
5853 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5856 { &hf_infiniband_segment_number, {
5857 "Segment Number", "infiniband.rmpp.segmentnumber",
5858 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
5860 { &hf_infiniband_payload_length32, {
5861 "Payload Length", "infiniband.rmpp.payloadlength",
5862 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
5864 { &hf_infiniband_transferred_data, {
5865 "Transferred Data", "infiniband.rmpp.transferreddata",
5866 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5870 { &hf_infiniband_new_window_last, {
5871 "New Window Last", "infiniband.rmpp.newwindowlast",
5872 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
5874 { &hf_infiniband_reserved220, {
5875 "Segment Number", "infiniband.rmpp.reserved220",
5876 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5879 /* RMPP ABORT/STOP */
5880 { &hf_infiniband_optional_extended_error_data, {
5881 "Optional Extended Error Data", "infiniband.rmpp.extendederrordata",
5882 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5885 /* SMP Data (LID Routed) */
5886 { &hf_infiniband_SMP_LID, {
5887 "Subnet Management Packet (LID Routed)", "infiniband.smplid",
5888 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5890 { &hf_infiniband_m_key, {
5891 "M_Key", "infiniband.smplid.mkey",
5892 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
5894 { &hf_infiniband_smp_data, {
5895 "SMP Data", "infiniband.smplid.smpdata",
5896 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5898 { &hf_infiniband_reserved1024, {
5899 "Reserved (1024 bits)", "infiniband.smplid.reserved1024",
5900 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5902 { &hf_infiniband_reserved256, {
5903 "Reserved (256 bits)", "infiniband.smplid.reserved256",
5904 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5907 /* XX: All following verified/corrected against Infiniband 1.2.1 Specification */
5908 /* SMP Data Directed Route */
5909 { &hf_infiniband_SMP_DIRECTED, {
5910 "Subnet Management Packet (Directed Route)", "infiniband.smpdirected",
5911 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5913 { &hf_infiniband_smp_status, {
5914 "Status", "infiniband.smpdirected.smpstatus",
5915 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
5917 { &hf_infiniband_hop_pointer, {
5918 "Hop Pointer", "infiniband.smpdirected.hoppointer",
5919 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
5921 { &hf_infiniband_hop_count, {
5922 "Hop Count", "infiniband.smpdirected.hopcount",
5923 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
5925 { &hf_infiniband_dr_slid, {
5926 "DrSLID", "infiniband.smpdirected.drslid",
5927 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
5929 { &hf_infiniband_dr_dlid, {
5930 "DrDLID", "infiniband.smpdirected.drdlid",
5931 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
5933 { &hf_infiniband_reserved28, {
5934 "Reserved (224 bits)", "infiniband.smpdirected.reserved28",
5935 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5937 { &hf_infiniband_d, {
5938 "D (Direction Bit)", "infiniband.smpdirected.d",
5939 FT_UINT64, BASE_HEX, NULL, 0x8000, NULL, HFILL}
5941 { &hf_infiniband_initial_path, {
5942 "Initial Path", "infiniband.smpdirected.initialpath",
5943 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5945 { &hf_infiniband_return_path, {
5946 "Return Path", "infiniband.smpdirected.returnpath",
5947 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5951 { &hf_infiniband_SA, {
5952 "SA Packet (Subnet Administration)", "infiniband.sa.drdlid",
5953 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5955 { &hf_infiniband_sm_key, {
5956 "SM_Key (Verification Key)", "infiniband.sa.smkey",
5957 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
5959 { &hf_infiniband_attribute_offset, {
5960 "Attribute Offset", "infiniband.sa.attributeoffset",
5961 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
5963 { &hf_infiniband_component_mask, {
5964 "Component Mask", "infiniband.sa.componentmask",
5965 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
5967 { &hf_infiniband_subnet_admin_data, {
5968 "Subnet Admin Data", "infiniband.sa.subnetadmindata",
5969 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
5972 /* Mellanox EoIB encapsulation header */
5973 { &hf_infiniband_EOIB, {
5974 "Mellanox EoIB Encapsulation Header", "infiniband.eoib",
5975 FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL}
5977 { &hf_infiniband_ver, {
5978 "Version", "infiniband.eoib.version",
5979 FT_UINT16, BASE_HEX, NULL, 0x3000, NULL, HFILL}
5981 { &hf_infiniband_tcp_chk, {
5982 "TCP Checksum", "infiniband.eoib.tcp_chk",
5983 FT_UINT16, BASE_HEX, NULL, 0x0c00, NULL, HFILL}
5985 { &hf_infiniband_ip_chk, {
5986 "IP Checksum", "infiniband.eoib.ip_chk",
5987 FT_UINT16, BASE_HEX, NULL, 0x0300, NULL, HFILL}
5989 { &hf_infiniband_fcs, {
5990 "FCS Field Present", "infiniband.eoib.fcs",
5991 FT_BOOLEAN, 16, NULL, 0x0040, NULL, HFILL}
5993 { &hf_infiniband_ms, {
5994 "More Segments to Follow", "infiniband.eoib.ms",
5995 FT_BOOLEAN, 16, NULL, 0x0020, NULL, HFILL}
5997 { &hf_infiniband_seg_off, {
5998 "Segment Offset", "infiniband.eoib.ip_seg_offset",
5999 FT_UINT16, BASE_DEC, NULL, 0x001f, NULL, HFILL}
6001 { &hf_infiniband_seg_id, {
6002 "Segment ID", "infiniband.eoib.ip_seg_id",
6003 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
6006 /* NodeDescription */
6007 { &hf_infiniband_NodeDescription_NodeString, {
6008 "NodeString", "infiniband.nodedescription.nodestring",
6009 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}
6013 { &hf_infiniband_NodeInfo_BaseVersion, {
6014 "BaseVersion", "infiniband.nodeinfo.baseversion",
6015 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6017 { &hf_infiniband_NodeInfo_ClassVersion, {
6018 "ClassVersion", "infiniband.nodeinfo.classversion",
6019 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6021 { &hf_infiniband_NodeInfo_NodeType, {
6022 "NodeType", "infiniband.nodeinfo.nodetype",
6023 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6025 { &hf_infiniband_NodeInfo_NumPorts, {
6026 "NumPorts", "infiniband.nodeinfo.numports",
6027 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6029 { &hf_infiniband_NodeInfo_SystemImageGUID, {
6030 "SystemImageGUID", "infiniband.nodeinfo.systemimageguid",
6031 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
6033 { &hf_infiniband_NodeInfo_NodeGUID, {
6034 "NodeGUID", "infiniband.nodeinfo.nodeguid",
6035 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
6037 { &hf_infiniband_NodeInfo_PortGUID, {
6038 "PortGUID", "infiniband.nodeinfo.portguid",
6039 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
6041 { &hf_infiniband_NodeInfo_PartitionCap, {
6042 "PartitionCap", "infiniband.nodeinfo.partitioncap",
6043 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6045 { &hf_infiniband_NodeInfo_DeviceID, {
6046 "DeviceID", "infiniband.nodeinfo.deviceid",
6047 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6049 { &hf_infiniband_NodeInfo_Revision, {
6050 "Revision", "infiniband.nodeinfo.revision",
6051 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
6053 { &hf_infiniband_NodeInfo_LocalPortNum, {
6054 "LocalPortNum", "infiniband.nodeinfo.localportnum",
6055 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6057 { &hf_infiniband_NodeInfo_VendorID, {
6058 "VendorID", "infiniband.nodeinfo.vendorid",
6059 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
6063 { &hf_infiniband_SwitchInfo_LinearFDBCap, {
6064 "LinearFDBCap", "infiniband.switchinfo.linearfdbcap",
6065 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6067 { &hf_infiniband_SwitchInfo_RandomFDBCap, {
6068 "RandomFDBCap", "infiniband.switchinfo.randomfdbcap",
6069 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6071 { &hf_infiniband_SwitchInfo_MulticastFDBCap, {
6072 "MulticastFDBCap", "infiniband.switchinfo.multicastfdbcap",
6073 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6075 { &hf_infiniband_SwitchInfo_LinearFDBTop, {
6076 "LinearFDBTop", "infiniband.switchinfo.linearfdbtop",
6077 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6079 { &hf_infiniband_SwitchInfo_DefaultPort, {
6080 "DefaultPort", "infiniband.switchinfo.defaultport",
6081 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6083 { &hf_infiniband_SwitchInfo_DefaultMulticastPrimaryPort, {
6084 "DefaultMulticastPrimaryPort", "infiniband.switchinfo.defaultmulticastprimaryport",
6085 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6087 { &hf_infiniband_SwitchInfo_DefaultMulticastNotPrimaryPort, {
6088 "DefaultMulticastNotPrimaryPort", "infiniband.switchinfo.defaultmulticastnotprimaryport",
6089 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6091 { &hf_infiniband_SwitchInfo_LifeTimeValue, {
6092 "LifeTimeValue", "infiniband.switchinfo.lifetimevalue",
6093 FT_UINT8, BASE_HEX, NULL, 0xF8, NULL, HFILL}
6095 { &hf_infiniband_SwitchInfo_PortStateChange, {
6096 "PortStateChange", "infiniband.switchinfo.portstatechange",
6097 FT_UINT8, BASE_HEX, NULL, 0x04, NULL, HFILL}
6099 { &hf_infiniband_SwitchInfo_OptimizedSLtoVLMappingProgramming, {
6100 "OptimizedSLtoVLMappingProgramming", "infiniband.switchinfo.optimizedsltovlmappingprogramming",
6101 FT_UINT8, BASE_HEX, NULL, 0x03, NULL, HFILL}
6103 { &hf_infiniband_SwitchInfo_LIDsPerPort, {
6104 "LIDsPerPort", "infiniband.switchinfo.lidsperport",
6105 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6107 { &hf_infiniband_SwitchInfo_PartitionEnforcementCap, {
6108 "PartitionEnforcementCap", "infiniband.switchinfo.partitionenforcementcap",
6109 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6111 { &hf_infiniband_SwitchInfo_InboundEnforcementCap, {
6112 "InboundEnforcementCap", "infiniband.switchinfo.inboundenforcementcap",
6113 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
6115 { &hf_infiniband_SwitchInfo_OutboundEnforcementCap, {
6116 "OutboundEnforcementCap", "infiniband.switchinfo.outboundenforcementcap",
6117 FT_UINT8, BASE_HEX, NULL, 0x40, NULL, HFILL}
6119 { &hf_infiniband_SwitchInfo_FilterRawInboundCap, {
6120 "FilterRawInboundCap", "infiniband.switchinfo.filterrawinboundcap",
6121 FT_UINT8, BASE_HEX, NULL, 0x20, NULL, HFILL}
6123 { &hf_infiniband_SwitchInfo_FilterRawOutboundCap, {
6124 "FilterRawOutboundCap", "infiniband.switchinfo.filterrawoutboundcap",
6125 FT_UINT8, BASE_HEX, NULL, 0x10, NULL, HFILL}
6127 { &hf_infiniband_SwitchInfo_EnhancedPortZero, {
6128 "EnhancedPortZero", "infiniband.switchinfo.enhancedportzero",
6129 FT_UINT8, BASE_HEX, NULL, 0x08, NULL, HFILL}
6134 { &hf_infiniband_GUIDInfo_GUIDBlock, {
6135 "GUIDBlock", "infiniband.switchinfo.guidblock",
6136 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
6139 { &hf_infiniband_GUIDInfo_GUID, {
6140 "GUID", "infiniband.switchinfo.guid",
6141 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
6145 { &hf_infiniband_PortInfo_M_Key, {
6146 "M_Key", "infiniband.portinfo.m_key",
6147 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
6149 { &hf_infiniband_PortInfo_GidPrefix, {
6150 "GidPrefix", "infiniband.portinfo.guid",
6151 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
6153 { &hf_infiniband_PortInfo_LID, {
6154 "LID", "infiniband.portinfo.lid",
6155 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6157 { &hf_infiniband_PortInfo_MasterSMLID, {
6158 "MasterSMLID", "infiniband.portinfo.mastersmlid",
6159 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6161 { &hf_infiniband_PortInfo_CapabilityMask, {
6162 "CapabilityMask", "infiniband.portinfo.capabilitymask",
6163 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
6166 /* Capability Mask Flags */
6167 { &hf_infiniband_PortInfo_CapabilityMask_SM, {
6168 "SM", "infiniband.portinfo.capabilitymask.issm",
6169 FT_UINT32, BASE_HEX, NULL, 0x00000002, NULL, HFILL}
6171 { &hf_infiniband_PortInfo_CapabilityMask_NoticeSupported, {
6172 "NoticeSupported", "infiniband.portinfo.capabilitymask.noticesupported",
6173 FT_UINT32, BASE_HEX, NULL, 0x00000004, NULL, HFILL}
6175 { &hf_infiniband_PortInfo_CapabilityMask_TrapSupported, {
6176 "TrapSupported", "infiniband.portinfo.capabilitymask.trapsupported",
6177 FT_UINT32, BASE_HEX, NULL, 0x00000008, NULL, HFILL}
6179 { &hf_infiniband_PortInfo_CapabilityMask_OptionalPDSupported, {
6180 "OptionalPDSupported", "infiniband.portinfo.capabilitymask.optionalpdsupported",
6181 FT_UINT32, BASE_HEX, NULL, 0x00000010, NULL, HFILL}
6183 { &hf_infiniband_PortInfo_CapabilityMask_AutomaticMigrationSupported, {
6184 "AutomaticMigrationSupported", "infiniband.portinfo.capabilitymask.automaticmigrationsupported",
6185 FT_UINT32, BASE_HEX, NULL, 0x00000020, NULL, HFILL}
6187 { &hf_infiniband_PortInfo_CapabilityMask_SLMappingSupported, {
6188 "SLMappingSupported", "infiniband.portinfo.capabilitymask.slmappingsupported",
6189 FT_UINT32, BASE_HEX, NULL, 0x00000040, NULL, HFILL}
6191 { &hf_infiniband_PortInfo_CapabilityMask_MKeyNVRAM, {
6192 "MKeyNVRAM", "infiniband.portinfo.capabilitymask.mkeynvram",
6193 FT_UINT32, BASE_HEX, NULL, 0x00000080, NULL, HFILL}
6195 { &hf_infiniband_PortInfo_CapabilityMask_PKeyNVRAM, {
6196 "PKeyNVRAM", "infiniband.portinfo.capabilitymask.pkeynvram",
6197 FT_UINT32, BASE_HEX, NULL, 0x00000100, NULL, HFILL}
6199 { &hf_infiniband_PortInfo_CapabilityMask_LEDInfoSupported, {
6200 "LEDInfoSupported", "infiniband.portinfo.capabilitymask.ledinfosupported",
6201 FT_UINT32, BASE_HEX, NULL, 0x00000200, NULL, HFILL}
6203 { &hf_infiniband_PortInfo_CapabilityMask_SMdisabled, {
6204 "SMdisabled", "infiniband.portinfo.capabilitymask.smdisabled",
6205 FT_UINT32, BASE_HEX, NULL, 0x00000400, NULL, HFILL}
6207 { &hf_infiniband_PortInfo_CapabilityMask_SystemImageGUIDSupported, {
6208 "SystemImageGUIDSupported", "infiniband.portinfo.capabilitymask.systemimageguidsupported",
6209 FT_UINT32, BASE_HEX, NULL, 0x00000800, NULL, HFILL}
6211 { &hf_infiniband_PortInfo_CapabilityMask_PKeySwitchExternalPortTrapSupported, {
6212 "PKeySwitchExternalPortTrapSupported", "infiniband.portinfo.capabilitymask.pkeyswitchexternalporttrapsupported",
6213 FT_UINT32, BASE_HEX, NULL, 0x00001000, NULL, HFILL}
6215 { &hf_infiniband_PortInfo_CapabilityMask_CommunicationsManagementSupported, {
6216 "CommunicationsManagementSupported", "infiniband.portinfo.capabilitymask.communicationsmanagementsupported",
6217 FT_UINT32, BASE_HEX, NULL, 0x00010000, NULL, HFILL}
6219 { &hf_infiniband_PortInfo_CapabilityMask_SNMPTunnelingSupported, {
6220 "SNMPTunnelingSupported", "infiniband.portinfo.capabilitymask.snmptunnelingsupported",
6221 FT_UINT32, BASE_HEX, NULL, 0x00020000, NULL, HFILL}
6223 { &hf_infiniband_PortInfo_CapabilityMask_ReinitSupported, {
6224 "ReinitSupported", "infiniband.portinfo.capabilitymask.reinitsupported",
6225 FT_UINT32, BASE_HEX, NULL, 0x00040000, NULL, HFILL}
6227 { &hf_infiniband_PortInfo_CapabilityMask_DeviceManagementSupported, {
6228 "DeviceManagementSupported", "infiniband.portinfo.capabilitymask.devicemanagementsupported",
6229 FT_UINT32, BASE_HEX, NULL, 0x00080000, NULL, HFILL}
6231 { &hf_infiniband_PortInfo_CapabilityMask_VendorClassSupported, {
6232 "VendorClassSupported", "infiniband.portinfo.capabilitymask.vendorclasssupported",
6233 FT_UINT32, BASE_HEX, NULL, 0x00100000, NULL, HFILL}
6235 { &hf_infiniband_PortInfo_CapabilityMask_DRNoticeSupported, {
6236 "DRNoticeSupported", "infiniband.portinfo.capabilitymask.drnoticesupported",
6237 FT_UINT32, BASE_HEX, NULL, 0x00200000, NULL, HFILL}
6239 { &hf_infiniband_PortInfo_CapabilityMask_CapabilityMaskNoticeSupported, {
6240 "CapabilityMaskNoticeSupported", "infiniband.portinfo.capabilitymask.capabilitymasknoticesupported",
6241 FT_UINT32, BASE_HEX, NULL, 0x00400000, NULL, HFILL}
6243 { &hf_infiniband_PortInfo_CapabilityMask_BootManagementSupported, {
6244 "BootManagementSupported", "infiniband.portinfo.capabilitymask.bootmanagementsupported",
6245 FT_UINT32, BASE_HEX, NULL, 0x00800000, NULL, HFILL}
6247 { &hf_infiniband_PortInfo_CapabilityMask_LinkRoundTripLatencySupported, {
6248 "LinkRoundTripLatencySupported", "infiniband.portinfo.capabilitymask.linkroundtriplatencysupported",
6249 FT_UINT32, BASE_HEX, NULL, 0x01000000, NULL, HFILL}
6251 { &hf_infiniband_PortInfo_CapabilityMask_ClientRegistrationSupported, {
6252 "ClientRegistrationSupported", "infiniband.portinfo.capabilitymask.clientregistrationsupported",
6253 FT_UINT32, BASE_HEX, NULL, 0x02000000, NULL, HFILL}
6255 { &hf_infiniband_PortInfo_CapabilityMask_OtherLocalChangesNoticeSupported, {
6256 "OtherLocalChangesNoticeSupported", "infiniband.portinfo.capabilitymask.otherlocalchangesnoticesupported",
6257 FT_UINT32, BASE_HEX, NULL, 0x04000000, NULL, HFILL}
6259 { &hf_infiniband_PortInfo_CapabilityMask_LinkSpeedWIdthPairsTableSupported, {
6260 "LinkSpeedWIdthPairsTableSupported", "infiniband.portinfo.capabilitymask.linkspeedwidthpairstablesupported",
6261 FT_UINT32, BASE_HEX, NULL, 0x08000000, NULL, HFILL}
6263 /* End Capability Mask Flags */
6266 { &hf_infiniband_PortInfo_DiagCode, {
6267 "DiagCode", "infiniband.portinfo.diagcode",
6268 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6270 { &hf_infiniband_PortInfo_M_KeyLeasePeriod, {
6271 "M_KeyLeasePeriod", "infiniband.portinfo.m_keyleaseperiod",
6272 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6274 { &hf_infiniband_PortInfo_LocalPortNum, {
6275 "LocalPortNum", "infiniband.portinfo.localportnum",
6276 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6278 { &hf_infiniband_PortInfo_LinkWidthEnabled, {
6279 "LinkWidthEnabled", "infiniband.portinfo.linkwidthenabled",
6280 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6282 { &hf_infiniband_PortInfo_LinkWidthSupported, {
6283 "LinkWidthSupported", "infiniband.portinfo.linkwidthsupported",
6284 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6286 { &hf_infiniband_PortInfo_LinkWidthActive, {
6287 "LinkWidthActive", "infiniband.portinfo.linkwidthactive",
6288 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6290 { &hf_infiniband_PortInfo_LinkSpeedSupported, {
6291 "LinkSpeedSupported", "infiniband.portinfo.linkspeedsupported",
6292 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
6294 { &hf_infiniband_PortInfo_PortState, {
6295 "PortState", "infiniband.portinfo.portstate",
6296 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
6298 { &hf_infiniband_PortInfo_PortPhysicalState, {
6299 "PortPhysicalState", "infiniband.portinfo.portphysicalstate",
6300 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
6302 { &hf_infiniband_PortInfo_LinkDownDefaultState, {
6303 "LinkDownDefaultState", "infiniband.portinfo.linkdowndefaultstate",
6304 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
6306 { &hf_infiniband_PortInfo_M_KeyProtectBits, {
6307 "M_KeyProtectBits", "infiniband.portinfo.m_keyprotectbits",
6308 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
6310 { &hf_infiniband_PortInfo_LMC, {
6311 "LMC", "infiniband.portinfo.lmc",
6312 FT_UINT8, BASE_HEX, NULL, 0x07, NULL, HFILL}
6314 { &hf_infiniband_PortInfo_LinkSpeedActive, {
6315 "LinkSpeedActive", "infiniband.portinfo.linkspeedactive",
6316 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
6318 { &hf_infiniband_PortInfo_LinkSpeedEnabled, {
6319 "LinkSpeedEnabled", "infiniband.portinfo.linkspeedenabled",
6320 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
6322 { &hf_infiniband_PortInfo_NeighborMTU, {
6323 "NeighborMTU", "infiniband.portinfo.neighbormtu",
6324 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
6326 { &hf_infiniband_PortInfo_MasterSMSL, {
6327 "MasterSMSL", "infiniband.portinfo.mastersmsl",
6328 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
6330 { &hf_infiniband_PortInfo_VLCap, {
6331 "VLCap", "infiniband.portinfo.vlcap",
6332 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
6334 { &hf_infiniband_PortInfo_InitType, {
6335 "InitType", "infiniband.portinfo.inittype",
6336 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
6338 { &hf_infiniband_PortInfo_VLHighLimit, {
6339 "VLHighLimit", "infiniband.portinfo.vlhighlimit",
6340 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6342 { &hf_infiniband_PortInfo_VLArbitrationHighCap, {
6343 "VLArbitrationHighCap", "infiniband.portinfo.vlarbitrationhighcap",
6344 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6346 { &hf_infiniband_PortInfo_VLArbitrationLowCap, {
6347 "VLArbitrationLowCap", "infiniband.portinfo.vlarbitrationlowcap",
6348 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6350 { &hf_infiniband_PortInfo_InitTypeReply, {
6351 "InitTypeReply", "infiniband.portinfo.inittypereply",
6352 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
6354 { &hf_infiniband_PortInfo_MTUCap, {
6355 "MTUCap", "infiniband.portinfo.mtucap",
6356 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
6358 { &hf_infiniband_PortInfo_VLStallCount, {
6359 "VLStallCount", "infiniband.portinfo.vlstallcount",
6360 FT_UINT8, BASE_HEX, NULL, 0xE0, NULL, HFILL}
6362 { &hf_infiniband_PortInfo_HOQLife, {
6363 "HOQLife", "infiniband.portinfo.hoqlife",
6364 FT_UINT8, BASE_HEX, NULL, 0x1F, NULL, HFILL}
6366 { &hf_infiniband_PortInfo_OperationalVLs, {
6367 "OperationalVLs", "infiniband.portinfo.operationalvls",
6368 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
6370 { &hf_infiniband_PortInfo_PartitionEnforcementInbound, {
6371 "PartitionEnforcementInbound", "infiniband.portinfo.partitionenforcementinbound",
6372 FT_UINT8, BASE_HEX, NULL, 0x08, NULL, HFILL}
6374 { &hf_infiniband_PortInfo_PartitionEnforcementOutbound, {
6375 "PartitionEnforcementOutbound", "infiniband.portinfo.partitionenforcementoutbound",
6376 FT_UINT8, BASE_HEX, NULL, 0x04, NULL, HFILL}
6378 { &hf_infiniband_PortInfo_FilterRawInbound, {
6379 "FilterRawInbound", "infiniband.portinfo.filterrawinbound",
6380 FT_UINT8, BASE_HEX, NULL, 0x02, NULL, HFILL}
6382 { &hf_infiniband_PortInfo_FilterRawOutbound, {
6383 "FilterRawOutbound", "infiniband.portinfo.filterrawoutbound",
6384 FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL}
6386 { &hf_infiniband_PortInfo_M_KeyViolations, {
6387 "M_KeyViolations", "infiniband.portinfo.m_keyviolations",
6388 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6390 { &hf_infiniband_PortInfo_P_KeyViolations, {
6391 "P_KeyViolations", "infiniband.portinfo.p_keyviolations",
6392 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6394 { &hf_infiniband_PortInfo_Q_KeyViolations, {
6395 "Q_KeyViolations", "infiniband.portinfo.q_keyviolations",
6396 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6398 { &hf_infiniband_PortInfo_GUIDCap, {
6399 "GUIDCap", "infiniband.portinfo.guidcap",
6400 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6402 { &hf_infiniband_PortInfo_ClientReregister, {
6403 "ClientReregister", "infiniband.portinfo.clientreregister",
6404 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
6406 { &hf_infiniband_PortInfo_SubnetTimeOut, {
6407 "SubnetTimeOut", "infiniband.portinfo.subnettimeout",
6408 FT_UINT8, BASE_HEX, NULL, 0x1F, NULL, HFILL}
6410 { &hf_infiniband_PortInfo_RespTimeValue, {
6411 "RespTimeValue", "infiniband.portinfo.resptimevalue",
6412 FT_UINT8, BASE_HEX, NULL, 0x1F, NULL, HFILL}
6414 { &hf_infiniband_PortInfo_LocalPhyErrors, {
6415 "LocalPhyErrors", "infiniband.portinfo.localphyerrors",
6416 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
6418 { &hf_infiniband_PortInfo_OverrunErrors, {
6419 "OverrunErrors", "infiniband.portinfo.overrunerrors",
6420 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
6422 { &hf_infiniband_PortInfo_MaxCreditHint, {
6423 "MaxCreditHint", "infiniband.portinfo.maxcredithint",
6424 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6426 { &hf_infiniband_PortInfo_LinkRoundTripLatency, {
6427 "LinkRoundTripLatency", "infiniband.portinfo.linkroundtriplatency",
6428 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
6432 { &hf_infiniband_P_KeyTable_P_KeyTableBlock, {
6433 "P_KeyTableBlock", "infiniband.p_keytable.p_keytableblock",
6434 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
6436 { &hf_infiniband_P_KeyTable_MembershipType, {
6437 "MembershipType", "infiniband.p_keytable.membershiptype",
6438 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
6440 { &hf_infiniband_P_KeyTable_P_KeyBase, {
6441 "P_KeyBase", "infiniband.p_keytable.p_keybase",
6442 FT_UINT16, BASE_HEX, NULL, 0x7FFF, NULL, HFILL}
6445 /* SLtoVLMappingTable */
6446 { &hf_infiniband_SLtoVLMappingTable_SLtoVL_HighBits, {
6447 "SL(x)toVL", "infiniband.sltovlmappingtable.sltovlhighbits",
6448 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
6450 { &hf_infiniband_SLtoVLMappingTable_SLtoVL_LowBits, {
6451 "SL(x)toVL", "infiniband.sltovlmappingtable.sltovllowbits",
6452 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
6455 /* VLArbitrationTable */
6457 { &hf_infiniband_VLArbitrationTable_VLWeightPairs, {
6458 "VLWeightPairs", "infiniband.vlarbitrationtable.vlweightpairs",
6459 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
6462 { &hf_infiniband_VLArbitrationTable_VL, {
6463 "VL", "infiniband.vlarbitrationtable.vl",
6464 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
6466 { &hf_infiniband_VLArbitrationTable_Weight, {
6467 "Weight", "infiniband.vlarbitrationtable.weight",
6468 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6471 /* LinearForwardingTable */
6473 { &hf_infiniband_LinearForwardingTable_LinearForwardingTableBlock, {
6474 "LinearForwardingTableBlock", "infiniband.linearforwardingtable.linearforwardingtableblock",
6475 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
6478 { &hf_infiniband_LinearForwardingTable_Port, {
6479 "Port", "infiniband.linearforwardingtable.port",
6480 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6483 /* RandomForwardingTable */
6485 { &hf_infiniband_RandomForwardingTable_RandomForwardingTableBlock, {
6486 "RandomForwardingTableBlock", "infiniband.randomforwardingtable.randomforwardingtableblock",
6487 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
6490 { &hf_infiniband_RandomForwardingTable_LID, {
6491 "LID", "infiniband.randomforwardingtable.lid",
6492 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6494 { &hf_infiniband_RandomForwardingTable_Valid, {
6495 "Valid", "infiniband.randomforwardingtable.valid",
6496 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
6498 { &hf_infiniband_RandomForwardingTable_LMC, {
6499 "LMC", "infiniband.randomforwardingtable.lmc",
6500 FT_UINT8, BASE_HEX, NULL, 0x70, NULL, HFILL}
6502 { &hf_infiniband_RandomForwardingTable_Port, {
6503 "Port", "infiniband.randomforwardingtable.port",
6504 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6507 /* MulticastForwardingTable */
6509 { &hf_infiniband_MulticastForwardingTable_MulticastForwardingTableBlock , {
6510 "MulticastForwardingTableBlock", "infiniband.multicastforwardingtable.multicastforwardingtableblock",
6511 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
6514 { &hf_infiniband_MulticastForwardingTable_PortMask, {
6515 "PortMask", "infiniband.multicastforwardingtable.portmask",
6516 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6520 { &hf_infiniband_SMInfo_GUID, {
6521 "GUID", "infiniband.sminfo.guid",
6522 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
6524 { &hf_infiniband_SMInfo_SM_Key, {
6525 "SM_Key", "infiniband.sminfo.sm_key",
6526 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
6528 { &hf_infiniband_SMInfo_ActCount, {
6529 "ActCount", "infiniband.sminfo.actcount",
6530 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
6532 { &hf_infiniband_SMInfo_Priority, {
6533 "Priority", "infiniband.sminfo.priority",
6534 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
6536 { &hf_infiniband_SMInfo_SMState, {
6537 "SMState", "infiniband.sminfo.smstate",
6538 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
6542 { &hf_infiniband_VendorDiag_NextIndex, {
6543 "NextIndex", "infiniband.vendordiag.nextindex",
6544 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6546 { &hf_infiniband_VendorDiag_DiagData, {
6547 "DiagData", "infiniband.vendordiag.diagdata",
6548 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
6552 { &hf_infiniband_LedInfo_LedMask, {
6553 "LedMask", "infiniband.ledinfo.ledmask",
6554 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
6557 /* LinkSpeedWidthPairsTable */
6558 { &hf_infiniband_LinkSpeedWidthPairsTable_NumTables, {
6559 "NumTables", "infiniband.linkspeedwidthpairstable.numtables",
6560 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6562 { &hf_infiniband_LinkSpeedWidthPairsTable_PortMask, {
6563 "PortMask", "infiniband.linkspeedwidthpairstable.portmask",
6564 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
6566 { &hf_infiniband_LinkSpeedWidthPairsTable_SpeedTwoFive, {
6567 "Speed 2.5 Gbps", "infiniband.linkspeedwidthpairstable.speedtwofive",
6568 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
6570 { &hf_infiniband_LinkSpeedWidthPairsTable_SpeedFive, {
6571 "Speed 5 Gbps", "infiniband.linkspeedwidthpairstable.speedfive",
6572 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
6574 { &hf_infiniband_LinkSpeedWidthPairsTable_SpeedTen, {
6575 "Speed 10 Gbps", "infiniband.linkspeedwidthpairstable.speedten",
6576 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
6580 /* PortInfoRecord */
6581 /* SLtoVLMappingTableRecord */
6582 /* SwitchInfoRecord */
6583 /* LinearForwardingTableRecord */
6584 /* RandomForwardingTableRecord */
6585 /* MulticastForwardingTableRecord */
6586 /* VLArbitrationTableRecord */
6587 { &hf_infiniband_SA_LID, {
6588 "LID", "infiniband.sa.lid",
6589 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6591 { &hf_infiniband_SA_EndportLID, {
6592 "EndportLID", "infiniband.sa.endportlid",
6593 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6595 { &hf_infiniband_SA_PortNum, {
6596 "PortNum", "infiniband.sa.portnum",
6597 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6599 { &hf_infiniband_SA_InputPortNum , {
6600 "InputPortNum", "infiniband.sa.inputportnum",
6601 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6603 { &hf_infiniband_SA_OutputPortNum, {
6604 "OutputPortNum", "infiniband.sa.outputportnum",
6605 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6607 { &hf_infiniband_SA_BlockNum_EightBit, {
6608 "BlockNum_EightBit", "infiniband.sa.blocknum_eightbit",
6609 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6611 { &hf_infiniband_SA_BlockNum_NineBit, {
6612 "BlockNum_NineBit", "infiniband.sa.blocknum_ninebit",
6613 FT_UINT16, BASE_HEX, NULL, 0x01FF, NULL, HFILL}
6615 { &hf_infiniband_SA_BlockNum_SixteenBit, {
6616 "BlockNum_SixteenBit", "infiniband.sa.blocknum_sixteenbit",
6617 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6619 { &hf_infiniband_SA_Position, {
6620 "Position", "infiniband.sa.position",
6621 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
6624 { &hf_infiniband_SA_Index, {
6625 "Index", "infiniband.sa.index",
6626 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6630 /* InformInfoRecord */
6631 { &hf_infiniband_InformInfoRecord_SubscriberGID, {
6632 "SubscriberGID", "infiniband.informinforecord.subscribergid",
6633 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
6635 { &hf_infiniband_InformInfoRecord_Enum, {
6636 "Enum", "infiniband.informinforecord.enum",
6637 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6641 { &hf_infiniband_InformInfo_GID, {
6642 "GID", "infiniband.informinfo.gid",
6643 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
6645 { &hf_infiniband_InformInfo_LIDRangeBegin, {
6646 "LIDRangeBegin", "infiniband.informinfo.lidrangebegin",
6647 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6649 { &hf_infiniband_InformInfo_LIDRangeEnd, {
6650 "LIDRangeEnd", "infiniband.informinfo.lidrangeend",
6651 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6653 { &hf_infiniband_InformInfo_IsGeneric, {
6654 "IsGeneric", "infiniband.informinfo.isgeneric",
6655 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6657 { &hf_infiniband_InformInfo_Subscribe, {
6658 "Subscribe", "infiniband.informinfo.subscribe",
6659 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6661 { &hf_infiniband_InformInfo_Type, {
6662 "Type", "infiniband.informinfo.type",
6663 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6665 { &hf_infiniband_InformInfo_TrapNumberDeviceID, {
6666 "TrapNumberDeviceID", "infiniband.informinfo.trapnumberdeviceid",
6667 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6669 { &hf_infiniband_InformInfo_QPN, {
6670 "QPN", "infiniband.informinfo.qpn",
6671 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
6673 { &hf_infiniband_InformInfo_RespTimeValue, {
6674 "RespTimeValue", "infiniband.informinfo.resptimevalue",
6675 FT_UINT8, BASE_HEX, NULL, 0x1F, NULL, HFILL}
6677 { &hf_infiniband_InformInfo_ProducerTypeVendorID, {
6678 "ProducerTypeVendorID", "infiniband.informinfo.producertypevendorid",
6679 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
6683 { &hf_infiniband_LinkRecord_FromLID, {
6684 "FromLID", "infiniband.linkrecord.fromlid",
6685 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6687 { &hf_infiniband_LinkRecord_FromPort, {
6688 "FromPort", "infiniband.linkrecord.fromport",
6689 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6691 { &hf_infiniband_LinkRecord_ToPort, {
6692 "ToPort", "infiniband.linkrecord.toport",
6693 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6695 { &hf_infiniband_LinkRecord_ToLID, {
6696 "ToLID", "infiniband.linkrecord.tolid",
6697 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6701 { &hf_infiniband_ServiceRecord_ServiceID, {
6702 "ServiceID", "infiniband.linkrecord.serviceid",
6703 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
6705 { &hf_infiniband_ServiceRecord_ServiceGID, {
6706 "ServiceGID", "infiniband.linkrecord.servicegid",
6707 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
6709 { &hf_infiniband_ServiceRecord_ServiceP_Key, {
6710 "ServiceP_Key", "infiniband.linkrecord.servicep_key",
6711 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6713 { &hf_infiniband_ServiceRecord_ServiceLease, {
6714 "ServiceLease", "infiniband.linkrecord.servicelease",
6715 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
6717 { &hf_infiniband_ServiceRecord_ServiceKey, {
6718 "ServiceKey", "infiniband.linkrecord.servicekey",
6719 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
6721 { &hf_infiniband_ServiceRecord_ServiceName, {
6722 "ServiceName", "infiniband.linkrecord.servicename",
6723 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
6725 { &hf_infiniband_ServiceRecord_ServiceData, {
6726 "ServiceData", "infiniband.linkrecord.servicedata",
6727 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
6730 /* ServiceAssociationRecord */
6731 { &hf_infiniband_ServiceAssociationRecord_ServiceKey, {
6732 "ServiceKey", "infiniband.serviceassociationrecord.servicekey",
6733 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
6735 { &hf_infiniband_ServiceAssociationRecord_ServiceName, {
6736 "ServiceName", "infiniband.serviceassociationrecord.servicename",
6737 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}
6741 { &hf_infiniband_PathRecord_DGID, {
6742 "DGID", "infiniband.pathrecord.dgid",
6743 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
6745 { &hf_infiniband_PathRecord_SGID, {
6746 "SGID", "infiniband.pathrecord.sgid",
6747 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
6749 { &hf_infiniband_PathRecord_DLID, {
6750 "DLID", "infiniband.pathrecord.dlid",
6751 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6753 { &hf_infiniband_PathRecord_SLID, {
6754 "SLID", "infiniband.pathrecord.slid",
6755 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6757 { &hf_infiniband_PathRecord_RawTraffic, {
6758 "RawTraffic", "infiniband.pathrecord.rawtraffic",
6759 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
6761 { &hf_infiniband_PathRecord_FlowLabel, {
6762 "FlowLabel", "infiniband.pathrecord.flowlabel",
6763 FT_UINT24, BASE_HEX, NULL, 0x0FFFFF, NULL, HFILL}
6765 { &hf_infiniband_PathRecord_HopLimit, {
6766 "HopLimit", "infiniband.pathrecord.hoplimit",
6767 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6769 { &hf_infiniband_PathRecord_TClass, {
6770 "TClass", "infiniband.pathrecord.tclass",
6771 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6773 { &hf_infiniband_PathRecord_Reversible, {
6774 "Reversible", "infiniband.pathrecord.reversible",
6775 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
6777 { &hf_infiniband_PathRecord_NumbPath, {
6778 "NumbPath", "infiniband.pathrecord.numbpath",
6779 FT_UINT8, BASE_HEX, NULL, 0x7F, NULL, HFILL}
6781 { &hf_infiniband_PathRecord_P_Key, {
6782 "P_Key", "infiniband.pathrecord.p_key",
6783 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6785 { &hf_infiniband_PathRecord_SL, {
6786 "SL", "infiniband.pathrecord.sl",
6787 FT_UINT16, BASE_HEX, NULL, 0x000F, NULL, HFILL}
6789 { &hf_infiniband_PathRecord_MTUSelector, {
6790 "MTUSelector", "infiniband.pathrecord.mtuselector",
6791 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
6793 { &hf_infiniband_PathRecord_MTU, {
6794 "MTU", "infiniband.pathrecord.mtu",
6795 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
6797 { &hf_infiniband_PathRecord_RateSelector, {
6798 "RateSelector", "infiniband.pathrecord.rateselector",
6799 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
6801 { &hf_infiniband_PathRecord_Rate, {
6802 "Rate", "infiniband.pathrecord.rate",
6803 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
6805 { &hf_infiniband_PathRecord_PacketLifeTimeSelector, {
6806 "PacketLifeTimeSelector", "infiniband.pathrecord.packetlifetimeselector",
6807 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
6809 { &hf_infiniband_PathRecord_PacketLifeTime, {
6810 "PacketLifeTime", "infiniband.pathrecord.packetlifetime",
6811 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
6813 { &hf_infiniband_PathRecord_Preference, {
6814 "Preference", "infiniband.pathrecord.preference",
6815 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6818 /* MCMemberRecord */
6819 { &hf_infiniband_MCMemberRecord_MGID, {
6820 "MGID", "infiniband.mcmemberrecord.mgid",
6821 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
6823 { &hf_infiniband_MCMemberRecord_PortGID, {
6824 "PortGID", "infiniband.mcmemberrecord.portgid",
6825 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
6827 { &hf_infiniband_MCMemberRecord_Q_Key, {
6828 "Q_Key", "infiniband.mcmemberrecord.q_key",
6829 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
6831 { &hf_infiniband_MCMemberRecord_MLID, {
6832 "MLID", "infiniband.mcmemberrecord.mlid",
6833 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6835 { &hf_infiniband_MCMemberRecord_MTUSelector, {
6836 "MTUSelector", "infiniband.mcmemberrecord.mtuselector",
6837 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
6839 { &hf_infiniband_MCMemberRecord_MTU, {
6840 "MTU", "infiniband.mcmemberrecord.mtu",
6841 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
6843 { &hf_infiniband_MCMemberRecord_TClass, {
6844 "TClass", "infiniband.mcmemberrecord.tclass",
6845 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6847 { &hf_infiniband_MCMemberRecord_P_Key, {
6848 "P_Key", "infiniband.mcmemberrecord.p_key",
6849 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6851 { &hf_infiniband_MCMemberRecord_RateSelector, {
6852 "RateSelector", "infiniband.mcmemberrecord.rateselector",
6853 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
6855 { &hf_infiniband_MCMemberRecord_Rate, {
6856 "Rate", "infiniband.mcmemberrecord.rate",
6857 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
6859 { &hf_infiniband_MCMemberRecord_PacketLifeTimeSelector, {
6860 "PacketLifeTimeSelector", "infiniband.mcmemberrecord.packetlifetimeselector",
6861 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
6863 { &hf_infiniband_MCMemberRecord_PacketLifeTime, {
6864 "PacketLifeTime", "infiniband.mcmemberrecord.packetlifetime",
6865 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
6867 { &hf_infiniband_MCMemberRecord_SL, {
6868 "SL", "infiniband.mcmemberrecord.sl",
6869 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
6871 { &hf_infiniband_MCMemberRecord_FlowLabel, {
6872 "FlowLabel", "infiniband.mcmemberrecord.flowlabel",
6873 FT_UINT24, BASE_HEX, NULL, 0x0FFFFF, NULL, HFILL}
6875 { &hf_infiniband_MCMemberRecord_HopLimit, {
6876 "HopLimit", "infiniband.mcmemberrecord.hoplimit",
6877 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6879 { &hf_infiniband_MCMemberRecord_Scope, {
6880 "Scope", "infiniband.mcmemberrecord.scope",
6881 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
6883 { &hf_infiniband_MCMemberRecord_JoinState, {
6884 "JoinState", "infiniband.mcmemberrecord.joinstate",
6885 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
6887 { &hf_infiniband_MCMemberRecord_ProxyJoin, {
6888 "ProxyJoin", "infiniband.mcmemberrecord.proxyjoin",
6889 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
6892 /* MultiPathRecord */
6893 { &hf_infiniband_MultiPathRecord_RawTraffic, {
6894 "RawTraffic", "infiniband.multipathrecord.rawtraffic",
6895 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
6897 { &hf_infiniband_MultiPathRecord_FlowLabel, {
6898 "FlowLabel", "infiniband.multipathrecord.flowlabel",
6899 FT_UINT24, BASE_HEX, NULL, 0x0FFFFF, NULL, HFILL}
6901 { &hf_infiniband_MultiPathRecord_HopLimit, {
6902 "HopLimit", "infiniband.multipathrecord.hoplimit",
6903 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6905 { &hf_infiniband_MultiPathRecord_TClass, {
6906 "TClass", "infiniband.multipathrecord.tclass",
6907 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6909 { &hf_infiniband_MultiPathRecord_Reversible, {
6910 "Reversible", "infiniband.multipathrecord.reversible",
6911 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
6913 { &hf_infiniband_MultiPathRecord_NumbPath, {
6914 "NumbPath", "infiniband.multipathrecord.numbpath",
6915 FT_UINT8, BASE_HEX, NULL, 0x7F, NULL, HFILL}
6917 { &hf_infiniband_MultiPathRecord_P_Key, {
6918 "P_Key", "infiniband.multipathrecord.p_key",
6919 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6921 { &hf_infiniband_MultiPathRecord_SL, {
6922 "SL", "infiniband.multipathrecord.sl",
6923 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
6925 { &hf_infiniband_MultiPathRecord_MTUSelector, {
6926 "MTUSelector", "infiniband.multipathrecord.mtuselector",
6927 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
6929 { &hf_infiniband_MultiPathRecord_MTU, {
6930 "MTU", "infiniband.multipathrecord.mtu",
6931 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
6933 { &hf_infiniband_MultiPathRecord_RateSelector, {
6934 "RateSelector", "infiniband.multipathrecord.rateselector",
6935 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
6937 { &hf_infiniband_MultiPathRecord_Rate, {
6938 "Rate", "infiniband.multipathrecord.rate",
6939 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
6941 { &hf_infiniband_MultiPathRecord_PacketLifeTimeSelector, {
6942 "PacketLifeTimeSelector", "infiniband.multipathrecord.packetlifetimeselector",
6943 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
6945 { &hf_infiniband_MultiPathRecord_PacketLifeTime, {
6946 "PacketLifeTime", "infiniband.multipathrecord.packetlifetime",
6947 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
6949 { &hf_infiniband_MultiPathRecord_IndependenceSelector, {
6950 "IndependenceSelector", "infiniband.multipathrecord.independenceselector",
6951 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
6953 { &hf_infiniband_MultiPathRecord_GIDScope, {
6954 "GIDScope", "infiniband.multipathrecord.gidscope",
6955 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
6957 { &hf_infiniband_MultiPathRecord_SGIDCount, {
6958 "SGIDCount", "infiniband.multipathrecord.sgidcount",
6959 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6961 { &hf_infiniband_MultiPathRecord_DGIDCount, {
6962 "DGIDCount", "infiniband.multipathrecord.dgidcount",
6963 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
6965 { &hf_infiniband_MultiPathRecord_SDGID, {
6966 "SDGID", "infiniband.multipathrecord.sdgid",
6967 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
6971 { &hf_infiniband_Notice_IsGeneric, {
6972 "IsGeneric", "infiniband.notice.isgeneric",
6973 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
6975 { &hf_infiniband_Notice_Type, {
6976 "Type", "infiniband.notice.type",
6977 FT_UINT8, BASE_HEX, NULL, 0x7F, NULL, HFILL}
6979 { &hf_infiniband_Notice_ProducerTypeVendorID, {
6980 "ProducerTypeVendorID", "infiniband.notice.producertypevendorid",
6981 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
6983 { &hf_infiniband_Notice_TrapNumberDeviceID, {
6984 "TrapNumberDeviceID", "infiniband.notice.trapnumberdeviceid",
6985 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6987 { &hf_infiniband_Notice_IssuerLID, {
6988 "IssuerLID", "infiniband.notice.issuerlid",
6989 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
6991 { &hf_infiniband_Notice_NoticeToggle, {
6992 "NoticeToggle", "infiniband.notice.noticetoggle",
6993 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
6995 { &hf_infiniband_Notice_NoticeCount, {
6996 "NoticeCount", "infiniband.notice.noticecount",
6997 FT_UINT16, BASE_HEX, NULL, 0x7FFF, NULL, HFILL}
6999 { &hf_infiniband_Notice_DataDetails, {
7000 "DataDetails", "infiniband.notice.datadetails",
7001 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
7004 { &hf_infiniband_Notice_IssuerGID, {
7005 "IssuerGID", "infiniband.notice.issuergid",
7006 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
7008 { &hf_infiniband_Notice_ClassTrapSpecificData, {
7009 "ClassTrapSpecificData", "infiniband.notice.classtrapspecificdata",
7010 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
7014 /* Traps 64,65,66,67 */
7015 { &hf_infiniband_Trap_GIDADDR, {
7016 "GIDADDR", "infiniband.trap.gidaddr",
7017 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
7020 { &hf_infiniband_Trap_COMP_MASK, {
7021 "COMP_MASK", "infiniband.trap.comp_mask",
7022 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
7024 { &hf_infiniband_Trap_WAIT_FOR_REPATH, {
7025 "WAIT_FOR_REPATH", "infiniband.trap.wait_for_repath",
7026 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
7029 { &hf_infiniband_Trap_PATH_REC, {
7030 "PATH_REC", "infiniband.trap.path_rec",
7031 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
7036 { &hf_infiniband_Trap_LIDADDR, {
7037 "LIDADDR", "infiniband.trap.lidaddr",
7038 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
7041 /* Trap 129, 130, 131 */
7042 { &hf_infiniband_Trap_PORTNO, {
7043 "PORTNO", "infiniband.trap.portno",
7044 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
7048 { &hf_infiniband_Trap_OtherLocalChanges, {
7049 "OtherLocalChanges", "infiniband.trap.otherlocalchanges",
7050 FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL}
7052 { &hf_infiniband_Trap_CAPABILITYMASK, {
7053 "CAPABILITYMASK", "infiniband.trap.capabilitymask",
7054 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
7056 { &hf_infiniband_Trap_LinkSpeecEnabledChange, {
7057 "LinkSpeecEnabledChange", "infiniband.trap.linkspeecenabledchange",
7058 FT_UINT8, BASE_HEX, NULL, 0x04, NULL, HFILL}
7060 { &hf_infiniband_Trap_LinkWidthEnabledChange, {
7061 "LinkWidthEnabledChange", "infiniband.trap.linkwidthenabledchange",
7062 FT_UINT8, BASE_HEX, NULL, 0x02, NULL, HFILL}
7064 { &hf_infiniband_Trap_NodeDescriptionChange, {
7065 "NodeDescriptionChange", "infiniband.trap.nodedescriptionchange",
7066 FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL}
7070 { &hf_infiniband_Trap_SYSTEMIMAGEGUID, {
7071 "SYSTEMIMAGEGUID", "infiniband.trap.systemimageguid",
7072 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
7076 { &hf_infiniband_Trap_DRSLID, {
7077 "DRSLID", "infiniband.trap.drslid",
7078 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
7080 { &hf_infiniband_Trap_METHOD, {
7081 "METHOD", "infiniband.trap.method",
7082 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
7084 { &hf_infiniband_Trap_ATTRIBUTEID, {
7085 "ATTRIBUTEID", "infiniband.trap.attributeid",
7086 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
7088 { &hf_infiniband_Trap_ATTRIBUTEMODIFIER, {
7089 "ATTRIBUTEMODIFIER", "infiniband.trap.attributemodifier",
7090 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
7092 { &hf_infiniband_Trap_MKEY, {
7093 "MKEY", "infiniband.trap.mkey",
7094 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
7096 { &hf_infiniband_Trap_DRNotice, {
7097 "DRNotice", "infiniband.trap.drnotice",
7098 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
7100 { &hf_infiniband_Trap_DRPathTruncated, {
7101 "DRPathTruncated", "infiniband.trap.drpathtruncated",
7102 FT_UINT8, BASE_HEX, NULL, 0x40, NULL, HFILL}
7104 { &hf_infiniband_Trap_DRHopCount, {
7105 "DRHopCount", "infiniband.trap.drhopcount",
7106 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
7108 { &hf_infiniband_Trap_DRNoticeReturnPath, {
7109 "DRNoticeReturnPath", "infiniband.trap.drnoticereturnpath",
7110 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
7114 { &hf_infiniband_Trap_LIDADDR1, {
7115 "LIDADDR1", "infiniband.trap.lidaddr1",
7116 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
7118 { &hf_infiniband_Trap_LIDADDR2, {
7119 "LIDADDR2", "infiniband.trap.lidaddr2",
7120 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
7122 { &hf_infiniband_Trap_KEY, {
7123 "KEY", "infiniband.trap.key",
7124 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
7126 { &hf_infiniband_Trap_SL, {
7127 "SL", "infiniband.trap.sl",
7128 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
7130 { &hf_infiniband_Trap_QP1, {
7131 "QP1", "infiniband.trap.qp1",
7132 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
7134 { &hf_infiniband_Trap_QP2, {
7135 "QP2", "infiniband.trap.qp2",
7136 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
7138 { &hf_infiniband_Trap_GIDADDR1, {
7139 "GIDADDR1", "infiniband.trap.gidaddr1",
7140 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
7142 { &hf_infiniband_Trap_GIDADDR2, {
7143 "GIDADDR2", "infiniband.trap.gidaddr2",
7144 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
7148 { &hf_infiniband_Trap_DataValid, {
7149 "DataValid", "infiniband.trap.datavalid",
7150 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
7152 { &hf_infiniband_Trap_PKEY, {
7153 "PKEY", "infiniband.trap.pkey",
7154 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
7156 { &hf_infiniband_Trap_SWLIDADDR, {
7157 "SWLIDADDR", "infiniband.trap.swlidaddr",
7158 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
7160 /* PortCounters in Performance class */
7161 { &hf_infiniband_PortCounters, {
7162 "Port Counters (Performance Management MAD)", "infiniband.portcounters",
7163 FT_NONE, BASE_NONE, NULL, 0x0,
7164 "Performance class PortCounters packet", HFILL}
7166 { &hf_infiniband_PortCounters_PortSelect, {
7167 "PortSelect", "infiniband.portcounters.portselect",
7168 FT_UINT8, BASE_HEX, NULL, 0x0,
7169 "Selects the port that will be accessed", HFILL}
7171 { &hf_infiniband_PortCounters_CounterSelect, {
7172 "CounterSelect", "infiniband.portcounters.counterselect",
7173 FT_UINT16, BASE_HEX, NULL, 0x0,
7174 "When writing, selects which counters are affected by the operation", HFILL}
7176 { &hf_infiniband_PortCounters_SymbolErrorCounter, {
7177 "SymbolErrorCounter", "infiniband.portcounters.symbolerrorcounter",
7178 FT_UINT16, BASE_DEC, NULL, 0x0,
7179 "Total number of minor link errors", HFILL}
7181 { &hf_infiniband_PortCounters_LinkErrorRecoveryCounter, {
7182 "LinkErrorRecoveryCounter", "infiniband.portcounters.linkerrorrecoverycounter",
7183 FT_UINT8, BASE_DEC, NULL, 0x0,
7184 "Total number of times successfully completed link error recovery process", HFILL}
7186 { &hf_infiniband_PortCounters_LinkDownedCounter, {
7187 "LinkDownedCounter", "infiniband.portcounters.linkdownedcounter",
7188 FT_UINT8, BASE_DEC, NULL, 0x0,
7189 "Total number of times failed link error recovery process", HFILL}
7191 { &hf_infiniband_PortCounters_PortRcvErrors, {
7192 "PortRcvErrors", "infiniband.portcounters.portrcverrors",
7193 FT_UINT16, BASE_DEC, NULL, 0x0,
7194 "Total number of packets containing an error received", HFILL}
7196 { &hf_infiniband_PortCounters_PortRcvRemotePhysicalErrors, {
7197 "PortRcvRemotePhysicalErrors", "infiniband.portcounters.portrcvremotephysicalerrors",
7198 FT_UINT16, BASE_DEC, NULL, 0x0,
7199 "Total number of packets marked with EBP delimiter received", HFILL}
7201 { &hf_infiniband_PortCounters_PortRcvSwitchRelayErrors, {
7202 "PortRcvSwitchRelayErrors", "infiniband.portcounters.portrcvswitchrelayerrors",
7203 FT_UINT16, BASE_DEC, NULL, 0x0,
7204 "Total number of packets discarded because they could not be forwarded by switch relay",
7207 { &hf_infiniband_PortCounters_PortXmitDiscards, {
7208 "PortXmitDiscards", "infiniband.portcounters.portxmitdiscards",
7209 FT_UINT16, BASE_DEC, NULL, 0x0,
7210 "Total number of outbound packets discarded", HFILL}
7212 { &hf_infiniband_PortCounters_PortXmitConstraintErrors, {
7213 "PortXmitConstraintErrors", "infiniband.portcounters.portxmitconstrainterrors",
7214 FT_UINT8, BASE_DEC, NULL, 0x0,
7215 "Total number of packets not transmitted from the switch physical port", HFILL}
7217 { &hf_infiniband_PortCounters_PortRcvConstraintErrors, {
7218 "PortRcvConstraintErrors", "infiniband.portcounters.portrcvconstrainterrors",
7219 FT_UINT8, BASE_DEC, NULL, 0x0,
7220 "Total number of packets received on the switch physical port that are discarded", HFILL}
7222 { &hf_infiniband_PortCounters_LocalLinkIntegrityErrors, {
7223 "LocalLinkIntegrityErrors", "infiniband.portcounters.locallinkintegrityerrors",
7224 FT_UINT8, BASE_DEC, NULL, 0x0,
7225 "The number of times the count of local physical errors exceeded the threshold specified by LocalPhyErrors",
7228 { &hf_infiniband_PortCounters_ExcessiveBufferOverrunErrors, {
7229 "ExcessiveBufferOverrunErrors", "infiniband.portcounters.excessivebufferoverrunerrors",
7230 FT_UINT8, BASE_DEC, NULL, 0x0,
7231 "The number of times that OverrunErrors consecutive flow control update periods occured",
7234 { &hf_infiniband_PortCounters_VL15Dropped, {
7235 "VL15Dropped", "infiniband.portcounters.vl15dropped",
7236 FT_UINT16, BASE_DEC, NULL, 0x0,
7237 "Number of incoming VL15 packets dropped", HFILL}
7239 { &hf_infiniband_PortCounters_PortXmitData, {
7240 "PortXmitData", "infiniband.portcounters.portxmitdata",
7241 FT_UINT32, BASE_DEC, NULL, 0x0,
7242 "Total number of data octets, divided by 4, transmitted on all VLs from the port", HFILL}
7244 { &hf_infiniband_PortCounters_PortRcvData, {
7245 "PortRcvData", "infiniband.portcounters.portrcvdata",
7246 FT_UINT32, BASE_DEC, NULL, 0x0,
7247 "Total number of data octets, divided by 4, received on all VLs at the port", HFILL}
7249 { &hf_infiniband_PortCounters_PortXmitPkts, {
7250 "PortXmitPkts", "infiniband.portcounters.portxmitpkts",
7251 FT_UINT32, BASE_DEC, NULL, 0x0,
7252 "Total number of packets transmitted on all VLs from the port", HFILL}
7254 { &hf_infiniband_PortCounters_PortRcvPkts, {
7255 "PortRcvPkts", "infiniband.portcounters.portrcvpkts",
7256 FT_UINT32, BASE_DEC, NULL, 0x0,
7257 "Total number of packets received from all VLs on the port", HFILL}
7259 /* PortCountersExtended in Performance class */
7260 { &hf_infiniband_PortCountersExt, {
7261 "Port Counters Extended (Performance Management MAD)", "infiniband.portcounters_ext",
7262 FT_NONE, BASE_NONE, NULL, 0x0,
7263 "Performance class PortCountersExtended packet", HFILL}
7265 { &hf_infiniband_PortCountersExt_PortSelect, {
7266 "PortSelect", "infiniband.portcounters_ext.portselect",
7267 FT_UINT8, BASE_HEX, NULL, 0x0,
7268 "Selects the port that will be accessed", HFILL}
7270 { &hf_infiniband_PortCountersExt_CounterSelect, {
7271 "CounterSelect", "infiniband.portcounters_ext.counterselect",
7272 FT_UINT16, BASE_HEX, NULL, 0x0,
7273 "When writing, selects which counters are affected by the operation", HFILL}
7275 { &hf_infiniband_PortCountersExt_PortXmitData, {
7276 "PortXmitData", "infiniband.portcounters_ext.portxmitdata",
7277 FT_UINT64, BASE_DEC, NULL, 0x0,
7278 "Total number of data octets, divided by 4, transmitted on all VLs from the port", HFILL}
7280 { &hf_infiniband_PortCountersExt_PortRcvData, {
7281 "PortRcvData", "infiniband.portcounters_ext.portrcvdata",
7282 FT_UINT64, BASE_DEC, NULL, 0x0,
7283 "Total number of data octets, divided by 4, received on all VLs at the port", HFILL}
7285 { &hf_infiniband_PortCountersExt_PortXmitPkts, {
7286 "PortXmitPkts", "infiniband.portcounters_ext.portxmitpkts",
7287 FT_UINT64, BASE_DEC, NULL, 0x0,
7288 "Total number of packets transmitted on all VLs from the port", HFILL}
7290 { &hf_infiniband_PortCountersExt_PortRcvPkts, {
7291 "PortRcvPkts", "infiniband.portcounters_ext.portrcvpkts",
7292 FT_UINT64, BASE_DEC, NULL, 0x0,
7293 "Total number of packets received from all VLs on the port", HFILL}
7295 { &hf_infiniband_PortCountersExt_PortUnicastXmitPkts, {
7296 "PortUnicastXmitPkts", "infiniband.portcounters_ext.portunicastxmitpkts",
7297 FT_UINT64, BASE_DEC, NULL, 0x0,
7298 "Total number of unicast packets transmitted on all VLs from the port", HFILL}
7300 { &hf_infiniband_PortCountersExt_PortUnicastRcvPkts, {
7301 "PortUnicastRcvPkts", "infiniband.portcounters_ext.portunicastrcvpkts",
7302 FT_UINT64, BASE_DEC, NULL, 0x0,
7303 "Total number of unicast packets received from all VLs on the port", HFILL}
7305 { &hf_infiniband_PortCountersExt_PortMulticastXmitPkts, {
7306 "PortMulticastXmitPkts", "infiniband.portcounters_ext.portmulticastxmitpkts",
7307 FT_UINT64, BASE_DEC, NULL, 0x0,
7308 "Total number of multicast packets transmitted on all VLs from the port", HFILL}
7310 { &hf_infiniband_PortCountersExt_PortMulticastRcvPkts, {
7311 "PortMulticastRcvPkts", "infiniband.portcounters_ext.portmulticastrcvpkts",
7312 FT_UINT64, BASE_DEC, NULL, 0x0,
7313 "Total number of multicast packets received from all VLs on the port", HFILL}
7317 /* Array to hold expansion options between dissections */
7318 static gint *ett[] = {
7319 /* &ett_infiniband, */
7336 &ett_subn_lid_routed,
7337 &ett_subn_directed_route,
7342 &ett_subm_attribute,
7343 &ett_suba_attribute,
7346 /* &ett_nodedesc, */
7347 /* &ett_nodeinfo, */
7348 /* &ett_switchinfo, */
7349 /* &ett_guidinfo, */
7350 /* &ett_portinfo, */
7351 &ett_portinfo_capmask,
7354 &ett_vlarbitrationtable,
7355 &ett_linearforwardingtable,
7356 &ett_randomforwardingtable,
7357 &ett_multicastforwardingtable,
7361 &ett_linkspeedwidthpairs,
7366 &ett_mcmemberrecord,
7368 &ett_multipathrecord,
7369 &ett_serviceassocrecord,
7374 static hf_register_info hf_link[] = {
7375 { &hf_infiniband_link_op, {
7376 "Operand", "infiniband_link.op",
7377 FT_UINT16, BASE_DEC, VALS(Operand_Description), 0xF000, NULL, HFILL}
7379 { &hf_infiniband_link_fctbs, {
7380 "Flow Control Total Blocks Sent", "infiniband_link.fctbs",
7381 FT_UINT16, BASE_DEC, NULL, 0x0FFF, NULL, HFILL}
7383 { &hf_infiniband_link_vl, {
7384 "Virtual Lane", "infiniband_link.vl",
7385 FT_UINT16, BASE_DEC, NULL, 0xF000, NULL, HFILL}
7387 { &hf_infiniband_link_fccl, {
7388 "Flow Control Credit Limit", "infiniband_link.fccl",
7389 FT_UINT16, BASE_DEC, NULL, 0x0FFF, NULL, HFILL}
7391 { &hf_infiniband_link_lpcrc, {
7392 "Link Packet CRC", "infiniband_link.lpcrc",
7393 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL}
7398 static gint *ett_link_array[] = {
7402 proto_infiniband = proto_register_protocol("InfiniBand", "InfiniBand", "infiniband");
7403 register_dissector("infiniband", dissect_infiniband, proto_infiniband);
7405 proto_register_field_array(proto_infiniband, hf, array_length(hf));
7406 proto_register_subtree_array(ett, array_length(ett));
7408 /* register the subdissector tables */
7409 register_heur_dissector_list("infiniband.payload", &heur_dissectors_payload);
7410 register_heur_dissector_list("infiniband.mad.cm.private", &heur_dissectors_cm_private);
7412 /* register dissection preferences */
7413 infiniband_module = prefs_register_protocol(proto_infiniband, NULL);
7415 prefs_register_bool_preference(infiniband_module, "identify_payload",
7416 "Attempt to identify and parse encapsulated IBA payloads",
7417 "When set, dissector will attempt to identify unknown IBA payloads "
7418 "as containing an encapsulated ethertype, and parse them accordingly",
7419 &pref_identify_iba_payload);
7420 prefs_register_bool_preference(infiniband_module, "dissect_eoib",
7421 "Attempt to identify and parse Mellanox EoIB packets",
7422 "When set, dissector will attempt to identify and parse "
7423 "Mellanox Ethernet-over-InfiniBand packets",
7424 &pref_dissect_eoib);
7426 proto_infiniband_link = proto_register_protocol("InfiniBand Link", "InfiniBand Link", "infiniband_link");
7427 register_dissector("infiniband_link", dissect_infiniband_link, proto_infiniband_link);
7429 proto_register_field_array(proto_infiniband_link, hf_link, array_length(hf_link));
7430 proto_register_subtree_array(ett_link_array, array_length(ett_link_array));
7432 /* initialize the hash table */
7433 CM_context_table = g_hash_table_new_full(g_int64_hash, g_int64_equal,
7434 table_destroy_notify, table_destroy_notify);
7437 /* Reg Handoff. Register dissectors we'll need for IPoIB and RoCE */
7438 void proto_reg_handoff_infiniband(void)
7440 dissector_handle_t roce_handle;
7442 ipv6_handle = find_dissector("ipv6");
7443 data_handle = find_dissector("data");
7444 eth_handle = find_dissector("eth");
7445 ethertype_dissector_table = find_dissector_table("ethertype");
7447 /* create and announce an anonymous RoCE dissector */
7448 roce_handle = create_dissector_handle(dissect_roce, proto_infiniband);
7449 dissector_add("ethertype", ETHERTYPE_ROCE, roce_handle);