/src/wireshark/epan/dissectors/packet-infiniband.c
Line | Count | Source |
1 | | /* packet-infiniband.c |
2 | | * Routines for Infiniband/ERF Dissection |
3 | | * Copyright 2008 Endace Technology Limited |
4 | | * |
5 | | * Wireshark - Network traffic analyzer |
6 | | * By Gerald Combs <gerald@wireshark.org> |
7 | | * Copyright 1998 Gerald Combs |
8 | | * |
9 | | * Modified 2010 by Mellanox Technologies Ltd. |
10 | | * |
11 | | * SPDX-License-Identifier: GPL-2.0-or-later |
12 | | */ |
13 | | |
14 | | #include "config.h" |
15 | | |
16 | | #include <epan/packet.h> |
17 | | #include <epan/exceptions.h> |
18 | | #include <epan/conversation.h> |
19 | | #include <epan/prefs.h> |
20 | | #include <epan/etypes.h> |
21 | | #include <epan/show_exception.h> |
22 | | #include <epan/decode_as.h> |
23 | | #include <epan/reassemble.h> |
24 | | #include <epan/proto_data.h> |
25 | | #include <wiretap/erf_record.h> |
26 | | #include <wiretap/wtap.h> |
27 | | |
28 | | #include "packet-infiniband.h" |
29 | | |
30 | | void proto_register_infiniband(void); |
31 | | void proto_reg_handoff_infiniband(void); |
32 | | |
33 | | /*Default RRoce UDP port*/ |
34 | | #define DEFAULT_RROCE_UDP_PORT 4791 |
35 | | |
36 | | /* service id prefix 0x0000000001 is designated for |
37 | | * RDMA IP CM service as per Annex A11.2 |
38 | | */ |
39 | 0 | #define RDMA_IP_CM_SID_PREFIX_MASK 0xFFFFFFFFFF000000 |
40 | 0 | #define RDMA_IP_CM_SID_PREFIX 0x0000000001000000 |
41 | | |
42 | | /* Wireshark ID */ |
43 | | static int proto_infiniband; |
44 | | static int proto_infiniband_link; |
45 | | |
46 | | /* Variables to hold expansion values between packets */ |
47 | | /* static int ett_infiniband; */ |
48 | | static int ett_all_headers; |
49 | | static int ett_lrh; |
50 | | static int ett_grh; |
51 | | static int ett_bth; |
52 | | static int ett_rwh; |
53 | | static int ett_rdeth; |
54 | | static int ett_deth; |
55 | | static int ett_reth; |
56 | | static int ett_atomiceth; |
57 | | static int ett_aeth; |
58 | | static int ett_aeth_syndrome; |
59 | | static int ett_atomicacketh; |
60 | | static int ett_immdt; |
61 | | static int ett_ieth; |
62 | | static int ett_payload; |
63 | | static int ett_vendor; |
64 | | static int ett_subn_lid_routed; |
65 | | static int ett_subn_directed_route; |
66 | | static int ett_subnadmin; |
67 | | static int ett_mad; |
68 | | static int ett_cm; |
69 | | static int ett_cm_sid; |
70 | | static int ett_cm_ipcm; |
71 | | static int ett_rmpp; |
72 | | static int ett_subm_attribute; |
73 | | static int ett_suba_attribute; |
74 | | static int ett_datadetails; |
75 | | static int ett_noticestraps; |
76 | | /* static int ett_nodedesc; */ |
77 | | /* static int ett_nodeinfo; */ |
78 | | /* static int ett_switchinfo; */ |
79 | | /* static int ett_guidinfo; */ |
80 | | /* static int ett_portinfo; */ |
81 | | static int ett_portinfo_capmask; |
82 | | static int ett_pkeytable; |
83 | | static int ett_sltovlmapping; |
84 | | static int ett_vlarbitrationtable; |
85 | | static int ett_linearforwardingtable; |
86 | | static int ett_randomforwardingtable; |
87 | | static int ett_multicastforwardingtable; |
88 | | static int ett_sminfo; |
89 | | static int ett_vendordiag; |
90 | | static int ett_ledinfo; |
91 | | static int ett_linkspeedwidthpairs; |
92 | | static int ett_informinfo; |
93 | | static int ett_linkrecord; |
94 | | static int ett_servicerecord; |
95 | | static int ett_pathrecord; |
96 | | static int ett_mcmemberrecord; |
97 | | static int ett_tracerecord; |
98 | | static int ett_multipathrecord; |
99 | | static int ett_serviceassocrecord; |
100 | | static int ett_perfclass; |
101 | | static int ett_link; |
102 | | |
103 | | /* Dissector Declaration */ |
104 | | static dissector_handle_t ib_handle; |
105 | | static dissector_handle_t ib_link_handle; |
106 | | |
107 | | /* Subdissectors Declarations */ |
108 | | static dissector_handle_t ipv6_handle; |
109 | | static dissector_handle_t eth_handle; |
110 | | static dissector_table_t ethertype_dissector_table; |
111 | | |
112 | | static dissector_table_t subdissector_table; |
113 | | |
114 | | /* MAD_Data |
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. */ |
117 | | typedef struct { |
118 | | uint8_t managementClass; |
119 | | uint8_t classVersion; |
120 | | uint8_t method; |
121 | | uint8_t status; |
122 | | uint16_t classSpecific; |
123 | | uint64_t transactionID; |
124 | | uint16_t attributeID; |
125 | | uint32_t attributeModifier; |
126 | | uint8_t data[MAD_DATA_SIZE]; |
127 | | } MAD_Data; |
128 | | |
129 | | typedef enum { |
130 | | IB_PACKET_STARTS_WITH_LRH, /* Regular IB packet */ |
131 | | IB_PACKET_STARTS_WITH_GRH, /* ROCE packet */ |
132 | | IB_PACKET_STARTS_WITH_BTH /* RROCE packet */ |
133 | | } ib_packet_start_header; |
134 | | |
135 | | /* Forward-declarations */ |
136 | | |
137 | | static void dissect_infiniband_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ib_packet_start_header starts_with); |
138 | | static int32_t find_next_header_sequence(struct infinibandinfo* ibInfo); |
139 | | static bool contains(uint32_t value, uint32_t* arr, int length); |
140 | | static void dissect_general_info(tvbuff_t *tvb, unsigned offset, packet_info *pinfo, ib_packet_start_header starts_with); |
141 | | |
142 | | /* Parsing Methods for specific IB headers. */ |
143 | | |
144 | | static void parse_VENDOR(proto_tree *, tvbuff_t *, unsigned *); |
145 | | static void parse_PAYLOAD(proto_tree *, packet_info *, struct infinibandinfo *, tvbuff_t *, unsigned *, int length, int crclen, proto_tree *); |
146 | | static void parse_IETH(proto_tree *, tvbuff_t *, unsigned *); |
147 | | static void parse_IMMDT(proto_tree *, tvbuff_t *, unsigned *offset); |
148 | | static void parse_ATOMICACKETH(proto_tree *, tvbuff_t *, unsigned *offset); |
149 | | static void parse_AETH(proto_tree *, tvbuff_t *, unsigned *offset, packet_info *pinfo); |
150 | | static void parse_ATOMICETH(proto_tree *, tvbuff_t *, unsigned *offset); |
151 | | static void parse_RETH(proto_tree *, tvbuff_t *, unsigned *offset, |
152 | | struct infinibandinfo *info); |
153 | | static void parse_DETH(proto_tree *, packet_info *, tvbuff_t *, unsigned *offset); |
154 | | static void parse_RDETH(proto_tree *, tvbuff_t *, unsigned *offset); |
155 | | static void parse_IPvSix(proto_tree *, tvbuff_t *, unsigned *offset, packet_info *); |
156 | | static void parse_RWH(proto_tree *, tvbuff_t *, unsigned *offset, packet_info *, proto_tree *); |
157 | | static void parse_DCCETH(proto_tree *parentTree, tvbuff_t *tvb, unsigned *offset); |
158 | | static void parse_FETH(proto_tree *, tvbuff_t *, unsigned *offset); |
159 | | |
160 | | static void parse_SUBN_LID_ROUTED(proto_tree *, packet_info *, tvbuff_t *, unsigned *offset); |
161 | | static void parse_SUBN_DIRECTED_ROUTE(proto_tree *, packet_info *, tvbuff_t *, unsigned *offset); |
162 | | static void parse_SUBNADMN(proto_tree *, packet_info *, tvbuff_t *, unsigned *offset); |
163 | | static void parse_PERF(proto_tree *, tvbuff_t *, packet_info *, unsigned *offset); |
164 | | static void parse_BM(proto_tree *, tvbuff_t *, unsigned *offset); |
165 | | static void parse_DEV_MGT(proto_tree *, tvbuff_t *, unsigned *offset); |
166 | | static void parse_COM_MGT(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, unsigned *offset, proto_tree* top_tree); |
167 | | static void parse_SNMP(proto_tree *, tvbuff_t *, unsigned *offset); |
168 | | static void parse_VENDOR_MANAGEMENT(proto_tree *, tvbuff_t *, unsigned *offset); |
169 | | static void parse_APPLICATION_MANAGEMENT(proto_tree *, tvbuff_t *, unsigned *offset); |
170 | | static void parse_RESERVED_MANAGEMENT(proto_tree *, tvbuff_t *, unsigned *offset); |
171 | | |
172 | | static bool parse_MAD_Common(proto_tree*, tvbuff_t*, unsigned *offset, MAD_Data*); |
173 | | static bool parse_RMPP(proto_tree* , packet_info* , tvbuff_t* , unsigned *offset); |
174 | | static void label_SUBM_Method(proto_item*, MAD_Data*, packet_info*); |
175 | | static void label_SUBM_Attribute(proto_item*, MAD_Data*, packet_info*); |
176 | | static void label_SUBA_Method(proto_item*, MAD_Data*, packet_info*); |
177 | | static void label_SUBA_Attribute(proto_item*, MAD_Data*, packet_info*); |
178 | | |
179 | | /* Class Attribute Parsing Routines */ |
180 | | static bool parse_SUBM_Attribute(proto_tree*, packet_info*, tvbuff_t*, unsigned *offset, MAD_Data*); |
181 | | static bool parse_SUBA_Attribute(proto_tree*, packet_info*, tvbuff_t*, unsigned *offset, MAD_Data*); |
182 | | |
183 | | /* These methods parse individual attributes |
184 | | * Naming convention FunctionHandle = "parse_" + [Attribute Name]; |
185 | | * Where [Attribute Name] is the attribute identifier from chapter 14 of the IB Specification |
186 | | * Subnet Management */ |
187 | | static void parse_NoticesAndTraps(proto_tree*, packet_info*, tvbuff_t*, unsigned *offset); |
188 | | static void parse_NodeDescription(proto_tree*, tvbuff_t*, unsigned *offset); |
189 | | static int parse_NodeInfo(proto_tree*, tvbuff_t*, unsigned *offset); |
190 | | static int parse_SwitchInfo(proto_tree*, tvbuff_t*, unsigned *offset); |
191 | | static int parse_GUIDInfo(proto_tree*, tvbuff_t*, unsigned *offset); |
192 | | static int parse_PortInfo(proto_tree*, tvbuff_t*, unsigned *offset); |
193 | | static void parse_P_KeyTable(proto_tree*, tvbuff_t*, unsigned *offset); |
194 | | static void parse_SLtoVLMappingTable(proto_tree*, tvbuff_t*, unsigned *offset); |
195 | | static void parse_VLArbitrationTable(proto_tree*, tvbuff_t*, unsigned *offset); |
196 | | static void parse_LinearForwardingTable(proto_tree*, tvbuff_t*, unsigned *offset); |
197 | | static void parse_RandomForwardingTable(proto_tree*, tvbuff_t*, unsigned *offset); |
198 | | static void parse_MulticastForwardingTable(proto_tree*, tvbuff_t*, unsigned *offset); |
199 | | static int parse_SMInfo(proto_tree*, tvbuff_t*, unsigned *offset); |
200 | | static int parse_VendorDiag(proto_tree*, tvbuff_t*, unsigned *offset); |
201 | | static void parse_LedInfo(proto_tree*, tvbuff_t*, unsigned *offset); |
202 | | static int parse_LinkSpeedWidthPairsTable(proto_tree*, tvbuff_t*, unsigned *offset); |
203 | | |
204 | | /* These methods parse individual attributes for specific MAD management classes. |
205 | | * Naming convention FunctionHandle = "parse_" + [Management Class] + "_" + [Attribute Name]; |
206 | | * Where [Management Class] is the shorthand name for the management class as defined |
207 | | * in the MAD Management Classes section below in this file, and [Attribute Name] is the |
208 | | * attribute identifier from the corresponding chapter of the IB Specification */ |
209 | | static int parse_PERF_PortCounters(proto_tree* parentTree, tvbuff_t* tvb, packet_info *pinfo, unsigned *offset); |
210 | | static int parse_PERF_PortCountersExtended(proto_tree* parentTree, tvbuff_t* tvb, packet_info *pinfo, unsigned *offset); |
211 | | |
212 | | /* Subnet Administration */ |
213 | | static int parse_InformInfo(proto_tree*, tvbuff_t*, unsigned *offset); |
214 | | static int parse_LinkRecord(proto_tree*, tvbuff_t*, unsigned *offset); |
215 | | static int parse_ServiceRecord(proto_tree*, tvbuff_t*, unsigned *offset); |
216 | | static int parse_PathRecord(proto_tree*, tvbuff_t*, unsigned *offset); |
217 | | static int parse_MCMemberRecord(proto_tree*, tvbuff_t*, unsigned *offset); |
218 | | static int parse_TraceRecord(proto_tree*, tvbuff_t*, unsigned *offset); |
219 | | static int parse_MultiPathRecord(proto_tree*, tvbuff_t*, unsigned *offset); |
220 | | static int parse_ServiceAssociationRecord(proto_tree*, tvbuff_t*, unsigned *offset); |
221 | | |
222 | | /* Subnet Administration */ |
223 | | static void parse_RID(proto_tree*, tvbuff_t*, unsigned *offset, MAD_Data*); |
224 | | |
225 | | /* Common */ |
226 | | static int parse_ClassPortInfo(proto_tree*, tvbuff_t*, unsigned *offset); |
227 | | |
228 | | /* SM Methods */ |
229 | | static const value_string SUBM_Methods[] = { |
230 | | { 0x01, "SubnGet("}, |
231 | | { 0x02, "SubnSet("}, |
232 | | { 0x81, "SubnGetResp("}, |
233 | | { 0x05, "SubnTrap("}, |
234 | | { 0x07, "SubnTrapResp("}, |
235 | | { 0, NULL} |
236 | | }; |
237 | | /* SM Attributes */ |
238 | | static const value_string SUBM_Attributes[] = { |
239 | | { 0x0002, "Attribute (Notice)"}, |
240 | | { 0x0010, "Attribute (NodeDescription)"}, |
241 | | { 0x0011, "Attribute (NodeInfo)"}, |
242 | | { 0x0012, "Attribute (SwitchInfo)"}, |
243 | | { 0x0014, "Attribute (GUIDInfo)"}, |
244 | | { 0x0015, "Attribute (PortInfo)"}, |
245 | | { 0x0016, "Attribute (P_KeyTable)"}, |
246 | | { 0x0017, "Attribute (SLtoVLMappingTable)"}, |
247 | | { 0x0018, "Attribute (VLArbitrationTable)"}, |
248 | | { 0x0019, "Attribute (LinearForwardingTable)"}, |
249 | | { 0x001A, "Attribute (RandomForwardingTable)"}, |
250 | | { 0x001B, "Attribute (MulticastForwardingTable)"}, |
251 | | { 0x001C, "Attribute (LinkSpeedWidthPairsTable)"}, |
252 | | { 0x0020, "Attribute (SMInfo)"}, |
253 | | { 0x0030, "Attribute (VendorDiag)"}, |
254 | | { 0x0031, "Attribute (LedInfo)"}, |
255 | | { 0, NULL} |
256 | | }; |
257 | | |
258 | | /* SA Methods */ |
259 | | static const value_string SUBA_Methods[] = { |
260 | | { 0x01, "SubnAdmGet("}, |
261 | | { 0x81, "SubnAdmGetResp("}, |
262 | | { 0x02, "SubnAdmSet("}, |
263 | | { 0x06, "SubnAdmReport("}, |
264 | | { 0x86, "SubnAdmReportResp("}, |
265 | | { 0x12, "SubnAdmGetTable("}, |
266 | | { 0x92, "SubnAdmGetTableResp("}, |
267 | | { 0x13, "SubnAdmGetTraceTable("}, |
268 | | { 0x14, "SubnAdmGetMulti("}, |
269 | | { 0x94, "SubnAdmGetMultiResp("}, |
270 | | { 0x15, "SubnAdmDelete("}, |
271 | | { 0x95, "SubnAdmDeleteResp("}, |
272 | | { 0, NULL} |
273 | | }; |
274 | | /* SA Attributes */ |
275 | | static const value_string SUBA_Attributes[] = { |
276 | | { 0x0001, "Attribute (ClassPortInfo)"}, |
277 | | { 0x0002, "Attribute (Notice)"}, |
278 | | { 0x0003, "Attribute (InformInfo)"}, |
279 | | { 0x0011, "Attribute (NodeRecord)"}, |
280 | | { 0x0012, "Attribute (PortInfoRecord)"}, |
281 | | { 0x0013, "Attribute (SLtoVLMappingTableRecord)"}, |
282 | | { 0x0014, "Attribute (SwitchInfoRecord)"}, |
283 | | { 0x0015, "Attribute (LinearForwardingTableRecord)"}, |
284 | | { 0x0016, "Attribute (RandomForwardingTableRecord)"}, |
285 | | { 0x0017, "Attribute (MulticastForwardingTableRecord)"}, |
286 | | { 0x0018, "Attribute (SMInfoRecord)"}, |
287 | | { 0x0019, "Attribute (LinkSpeedWidthPairsTableRecord)"}, |
288 | | { 0x00F3, "Attribute (InformInfoRecord)"}, |
289 | | { 0x0020, "Attribute (LinkRecord)"}, |
290 | | { 0x0030, "Attribute (GuidInfoRecord)"}, |
291 | | { 0x0031, "Attribute (ServiceRecord)"}, |
292 | | { 0x0033, "Attribute (P_KeyTableRecord)"}, |
293 | | { 0x0035, "Attribute (PathRecord)"}, |
294 | | { 0x0036, "Attribute (VLArbitrationTableRecord)"}, |
295 | | { 0x0038, "Attribute (MCMemberRecord)"}, |
296 | | { 0x0039, "Attribute (TraceRecord)"}, |
297 | | { 0x003A, "Attribute (MultiPathRecord)"}, |
298 | | { 0x003B, "Attribute (ServiceAssociationRecord)"}, |
299 | | { 0, NULL} |
300 | | }; |
301 | | |
302 | | /* CM Attributes */ |
303 | | static const value_string CM_Attributes[] = { |
304 | | { 0x0001, "ClassPortInfo"}, |
305 | | { ATTR_CM_REQ, "ConnectRequest"}, |
306 | | { 0x0011, "MsgRcptAck"}, |
307 | | { ATTR_CM_REJ, "ConnectReject"}, |
308 | | { ATTR_CM_REP, "ConnectReply"}, |
309 | | { ATTR_CM_RTU, "ReadyToUse"}, |
310 | | { ATTR_CM_DREQ, "DisconnectRequest"}, |
311 | | { ATTR_CM_DRSP, "DisconnectReply"}, |
312 | | { 0x0017, "ServiceIDResReq"}, |
313 | | { 0x0018, "ServiceIDResReqResp"}, |
314 | | { 0x0019, "LoadAlternatePath"}, |
315 | | { 0x001A, "AlternatePathResponse"}, |
316 | | { 0, NULL} |
317 | | }; |
318 | | |
319 | | /* RMPP Types */ |
320 | 2 | #define RMPP_NOT_USED 0 |
321 | 0 | #define RMPP_DATA 1 |
322 | 0 | #define RMPP_ACK 2 |
323 | 0 | #define RMPP_STOP 3 |
324 | 0 | #define RMPP_ABORT 4 |
325 | | |
326 | | static const value_string RMPP_Packet_Types[] = { |
327 | | { RMPP_NOT_USED, " Not an RMPP Packet " }, |
328 | | { RMPP_DATA, "RMPP (DATA)" }, |
329 | | { RMPP_ACK, "RMPP (ACK)" }, |
330 | | { RMPP_STOP, "RMPP (STOP)" }, |
331 | | { RMPP_ABORT, "RMPP (ABORT)" }, |
332 | | { 0, NULL} |
333 | | }; |
334 | | |
335 | | static const value_string RMPP_Flags[] = { |
336 | | { 3, " (Transmission Sequence - First Packet)"}, |
337 | | { 5, " (Transmission Sequence - Last Packet)"}, |
338 | | { 7, " (Transmission Sequence - First and Last Packet)"}, |
339 | | { 1, " (Transmission Sequence) " }, |
340 | | { 0, NULL} |
341 | | }; |
342 | | |
343 | | static const value_string RMPP_Status[]= { |
344 | | { 0, " (Normal)"}, |
345 | | { 1, " (Resources Exhausted)"}, |
346 | | { 118, " (Total Time Too Long)"}, |
347 | | { 119, " (Inconsistent Last and PayloadLength)"}, |
348 | | { 120, " (Inconsistent First and Segment Number)"}, |
349 | | { 121, " (Bad RMPPType)"}, |
350 | | { 122, " (NewWindowLast Too Small)"}, |
351 | | { 123, " (SegmentNumber Too Big)"}, |
352 | | { 124, " (Illegal Status)"}, |
353 | | { 125, " (Unsupported Version)"}, |
354 | | { 126, " (Too Many Retries)"}, |
355 | | { 127, " (Unspecified - Unknown Error Code on ABORT)"}, |
356 | | { 0, NULL} |
357 | | }; |
358 | | |
359 | | static const value_string DiagCode[]= { |
360 | | {0x0000, "Function Ready"}, |
361 | | {0x0001, "Performing Self Test"}, |
362 | | {0x0002, "Initializing"}, |
363 | | {0x0003, "Soft Error - Function has non-fatal error"}, |
364 | | {0x0004, "Hard Error - Function has fatal error"}, |
365 | | { 0, NULL} |
366 | | }; |
367 | | static const value_string LinkWidthEnabled[]= { |
368 | | {0x0000, "No State Change"}, |
369 | | {0x0001, "1x"}, |
370 | | {0x0002, "4x"}, |
371 | | {0x0003, "1x or 4x"}, |
372 | | {0x0004, "8x"}, |
373 | | {0x0005, "1x or 8x"}, |
374 | | {0x0006, "4x or 8x"}, |
375 | | {0x0007, "1x or 4x or 8x"}, |
376 | | {0x0008, "12x"}, |
377 | | {0x0009, "1x or 12x"}, |
378 | | {0x000A, "4x or 12x"}, |
379 | | {0x000B, "1x or 4x or 12x"}, |
380 | | {0x000C, "8x or 12x"}, |
381 | | {0x000D, "1x or 8x or 12x"}, |
382 | | {0x000E, "4x or 8x or 12x"}, |
383 | | {0x000F, "1x or 4x or 8x or 12x"}, |
384 | | {0x00FF, "Set to LinkWidthSupported Value - Response contains actual LinkWidthSupported"}, |
385 | | { 0, NULL} |
386 | | }; |
387 | | |
388 | | static const value_string LinkWidthSupported[]= { |
389 | | {0x0001, "1x"}, |
390 | | {0x0003, "1x or 4x"}, |
391 | | {0x0007, "1x or 4x or 8x"}, |
392 | | {0x000B, "1x or 4x or 12x"}, |
393 | | {0x000F, "1x or 4x or 8x or 12x"}, |
394 | | { 0, NULL} |
395 | | }; |
396 | | static const value_string LinkWidthActive[]= { |
397 | | {0x0001, "1x"}, |
398 | | {0x0002, "4x"}, |
399 | | {0x0004, "8x"}, |
400 | | {0x0008, "12x"}, |
401 | | { 0, NULL} |
402 | | }; |
403 | | static const value_string LinkSpeedSupported[]= { |
404 | | {0x0001, "2.5 Gbps"}, |
405 | | {0x0003, "2.5 or 5.0 Gbps"}, |
406 | | {0x0005, "2.5 or 10.0 Gbps"}, |
407 | | {0x0007, "2.5 or 5.0 or 10.0 Gbps"}, |
408 | | { 0, NULL} |
409 | | }; |
410 | | static const value_string PortState[]= { |
411 | | {0x0000, "No State Change"}, |
412 | | {0x0001, "Down (includes failed links)"}, |
413 | | {0x0002, "Initialized"}, |
414 | | {0x0003, "Armed"}, |
415 | | {0x0004, "Active"}, |
416 | | { 0, NULL} |
417 | | }; |
418 | | static const value_string PortPhysicalState[]= { |
419 | | {0x0000, "No State Change"}, |
420 | | {0x0001, "Sleep"}, |
421 | | {0x0002, "Polling"}, |
422 | | {0x0003, "Disabled"}, |
423 | | {0x0004, "PortConfigurationTraining"}, |
424 | | {0x0005, "LinkUp"}, |
425 | | {0x0006, "LinkErrorRecovery"}, |
426 | | {0x0007, "Phy Test"}, |
427 | | { 0, NULL} |
428 | | }; |
429 | | static const value_string LinkDownDefaultState[]= { |
430 | | {0x0000, "No State Change"}, |
431 | | {0x0001, "Sleep"}, |
432 | | {0x0002, "Polling"}, |
433 | | { 0, NULL} |
434 | | }; |
435 | | static const value_string LinkSpeedActive[]= { |
436 | | {0x0001, "2.5 Gbps"}, |
437 | | {0x0002, "5.0 Gbps"}, |
438 | | {0x0004, "10.0 Gbps"}, |
439 | | { 0, NULL} |
440 | | }; |
441 | | static const value_string LinkSpeedEnabled[]= { |
442 | | {0x0000, "No State Change"}, |
443 | | {0x0001, "2.5 Gbps"}, |
444 | | {0x0003, "2.5 or 5.0 Gbps"}, |
445 | | {0x0005, "2.5 or 10.0 Gbps"}, |
446 | | {0x0007, "2.5 or 5.0 or 10.0 Gbps"}, |
447 | | {0x000F, "Set to LinkSpeedSupported value - response contains actual LinkSpeedSupported"}, |
448 | | { 0, NULL} |
449 | | }; |
450 | | static const value_string NeighborMTU[]= { |
451 | | {0x0001, "256"}, |
452 | | {0x0002, "512"}, |
453 | | {0x0003, "1024"}, |
454 | | {0x0004, "2048"}, |
455 | | {0x0005, "4096"}, |
456 | | { 0, NULL} |
457 | | }; |
458 | | static const value_string VLCap[]= { |
459 | | {0x0001, "VL0"}, |
460 | | {0x0002, "VL0, VL1"}, |
461 | | {0x0003, "VL0 - VL3"}, |
462 | | {0x0004, "VL0 - VL7"}, |
463 | | {0x0005, "VL0 - VL14"}, |
464 | | { 0, NULL} |
465 | | }; |
466 | | static const value_string MTUCap[]= { |
467 | | {0x0001, "256"}, |
468 | | {0x0002, "512"}, |
469 | | {0x0003, "1024"}, |
470 | | {0x0004, "2048"}, |
471 | | {0x0005, "4096"}, |
472 | | { 0, NULL} |
473 | | }; |
474 | | static const value_string OperationalVLs[]= { |
475 | | {0x0000, "No State Change"}, |
476 | | {0x0001, "VL0"}, |
477 | | {0x0002, "VL0, VL1"}, |
478 | | {0x0003, "VL0 - VL3"}, |
479 | | {0x0004, "VL0 - VL7"}, |
480 | | {0x0005, "VL0 - VL14"}, |
481 | | { 0, NULL} |
482 | | }; |
483 | | |
484 | | /* For reserved fields in various packets */ |
485 | | static int hf_infiniband_reserved; |
486 | | /* Local Route Header (LRH) */ |
487 | | static int hf_infiniband_LRH; |
488 | | static int hf_infiniband_virtual_lane; |
489 | | static int hf_infiniband_link_version; |
490 | | static int hf_infiniband_service_level; |
491 | | static int hf_infiniband_reserved2; |
492 | | static int hf_infiniband_link_next_header; |
493 | | static int hf_infiniband_destination_local_id; |
494 | | static int hf_infiniband_reserved5; |
495 | | static int hf_infiniband_packet_length; |
496 | | static int hf_infiniband_source_local_id; |
497 | | /* Global Route Header (GRH) */ |
498 | | static int hf_infiniband_GRH; |
499 | | static int hf_infiniband_ip_version; |
500 | | static int hf_infiniband_traffic_class; |
501 | | static int hf_infiniband_flow_label; |
502 | | static int hf_infiniband_payload_length; |
503 | | static int hf_infiniband_next_header; |
504 | | static int hf_infiniband_hop_limit; |
505 | | static int hf_infiniband_source_gid; |
506 | | static int hf_infiniband_destination_gid; |
507 | | /* Base Transport Header (BTH) */ |
508 | | static int hf_infiniband_BTH; |
509 | | static int hf_infiniband_opcode; |
510 | | static int hf_infiniband_solicited_event; |
511 | | static int hf_infiniband_migreq; |
512 | | static int hf_infiniband_pad_count; |
513 | | static int hf_infiniband_transport_header_version; |
514 | | static int hf_infiniband_partition_key; |
515 | | static int hf_infiniband_destination_qp; |
516 | | static int hf_infiniband_acknowledge_request; |
517 | | static int hf_infiniband_reserved7; |
518 | | static int hf_infiniband_packet_sequence_number; |
519 | | /* Raw Header (RWH) */ |
520 | | static int hf_infiniband_RWH; |
521 | | static int hf_infiniband_etype; |
522 | | /* Reliable Datagram Extended Transport Header (RDETH) */ |
523 | | static int hf_infiniband_RDETH; |
524 | | static int hf_infiniband_ee_context; |
525 | | /* Datagram Extended Transport Header (DETH) */ |
526 | | static int hf_infiniband_DETH; |
527 | | static int hf_infiniband_queue_key; |
528 | | static int hf_infiniband_source_qp; |
529 | | /* RDMA Extended Transport Header (RETH) */ |
530 | | static int hf_infiniband_RETH; |
531 | | static int hf_infiniband_virtual_address; |
532 | | static int hf_infiniband_remote_key; |
533 | | static int hf_infiniband_dma_length; |
534 | | /* Atomic Extended Transport Header (AtomicETH) */ |
535 | | static int hf_infiniband_AtomicETH; |
536 | | /* static int hf_infiniband_virtual_address_AtomicETH; */ |
537 | | /* static int hf_infiniband_remote_key_AtomicETH; */ |
538 | | static int hf_infiniband_swap_or_add_data; |
539 | | static int hf_infiniband_compare_data; |
540 | | /* ACK Extended Transport Header (AETH) */ |
541 | | static int hf_infiniband_AETH; |
542 | | static int hf_infiniband_syndrome; |
543 | | static int hf_infiniband_syndrome_reserved; |
544 | | static int hf_infiniband_syndrome_opcode; |
545 | | static int hf_infiniband_syndrome_credit_count; |
546 | | static int hf_infiniband_syndrome_timer; |
547 | | static int hf_infiniband_syndrome_reserved_value; |
548 | | static int hf_infiniband_syndrome_error_code; |
549 | | static int hf_infiniband_message_sequence_number; |
550 | | /* Atomic ACK Extended Transport Header (AtomicAckETH) */ |
551 | | static int hf_infiniband_AtomicAckETH; |
552 | | static int hf_infiniband_original_remote_data; |
553 | | /* Immediate Extended Transport Header (ImmDt) */ |
554 | | static int hf_infiniband_IMMDT; |
555 | | /* Invalidate Extended Transport Header (IETH) */ |
556 | | static int hf_infiniband_IETH; |
557 | | /* FLUSH Extended Transport Header (FETH) */ |
558 | | static int hf_infiniband_FETH; |
559 | | static int hf_infiniband_reserved27; |
560 | | static int hf_infiniband_selectivity_level; |
561 | | static int hf_infiniband_placement_type; |
562 | | |
563 | | /* Payload */ |
564 | | static int hf_infiniband_payload; |
565 | | static int hf_infiniband_invariant_crc; |
566 | | static int hf_infiniband_variant_crc; |
567 | | /* Unknown or Vendor Specific */ |
568 | | static int hf_infiniband_raw_data; |
569 | | static int hf_infiniband_vendor; |
570 | | /* CM REQ Header */ |
571 | | static int hf_cm_req_local_comm_id; |
572 | | static int hf_cm_req_service_id; |
573 | | static int hf_cm_req_service_id_prefix; |
574 | | static int hf_cm_req_service_id_protocol; |
575 | | static int hf_cm_req_service_id_dport; |
576 | | static int hf_cm_req_local_ca_guid; |
577 | | static int hf_cm_req_local_qkey; |
578 | | static int hf_cm_req_local_qpn; |
579 | | static int hf_cm_req_respo_res; |
580 | | static int hf_cm_req_local_eecn; |
581 | | static int hf_cm_req_init_depth; |
582 | | static int hf_cm_req_remote_eecn; |
583 | | static int hf_cm_req_remote_cm_resp_to; |
584 | | static int hf_cm_req_transp_serv_type; |
585 | | static int hf_cm_req_e2e_flow_ctrl; |
586 | | static int hf_cm_req_start_psn; |
587 | | static int hf_cm_req_local_cm_resp_to; |
588 | | static int hf_cm_req_retry_count; |
589 | | static int hf_cm_req_pkey; |
590 | | static int hf_cm_req_path_pp_mtu; |
591 | | static int hf_cm_req_rdc_exists; |
592 | | static int hf_cm_req_rnr_retry_count; |
593 | | static int hf_cm_req_max_cm_retries; |
594 | | static int hf_cm_req_srq; |
595 | | static int hf_cm_req_extended_transport; |
596 | | static int hf_cm_req_primary_local_lid; |
597 | | static int hf_cm_req_primary_remote_lid; |
598 | | static int hf_cm_req_primary_local_gid; |
599 | | static int hf_cm_req_primary_remote_gid; |
600 | | static int hf_cm_req_primary_local_gid_ipv4; |
601 | | static int hf_cm_req_primary_remote_gid_ipv4; |
602 | | static int hf_cm_req_primary_flow_label; |
603 | | static int hf_cm_req_primary_reserved0; |
604 | | static int hf_cm_req_primary_packet_rate; |
605 | | static int hf_cm_req_primary_traffic_class; |
606 | | static int hf_cm_req_primary_hop_limit; |
607 | | static int hf_cm_req_primary_sl; |
608 | | static int hf_cm_req_primary_subnet_local; |
609 | | static int hf_cm_req_primary_reserved1; |
610 | | static int hf_cm_req_primary_local_ack_to; |
611 | | static int hf_cm_req_primary_reserved2; |
612 | | static int hf_cm_req_alt_local_lid; |
613 | | static int hf_cm_req_alt_remote_lid; |
614 | | static int hf_cm_req_alt_local_gid; |
615 | | static int hf_cm_req_alt_remote_gid; |
616 | | static int hf_cm_req_flow_label; |
617 | | static int hf_cm_req_alt_reserved0; |
618 | | static int hf_cm_req_packet_rate; |
619 | | static int hf_cm_req_alt_traffic_class; |
620 | | static int hf_cm_req_alt_hop_limit; |
621 | | static int hf_cm_req_SL; |
622 | | static int hf_cm_req_subnet_local; |
623 | | static int hf_cm_req_alt_reserved1; |
624 | | static int hf_cm_req_local_ACK_timeout; |
625 | | static int hf_cm_req_alt_reserved2; |
626 | | static int hf_cm_req_private_data; |
627 | | static int hf_cm_req_ip_cm_req_msg; |
628 | | static int hf_cm_req_ip_cm_majv; |
629 | | static int hf_cm_req_ip_cm_minv; |
630 | | static int hf_cm_req_ip_cm_ipv; |
631 | | static int hf_cm_req_ip_cm_res; |
632 | | static int hf_cm_req_ip_cm_sport; |
633 | | static int hf_cm_req_ip_cm_sip6; |
634 | | static int hf_cm_req_ip_cm_dip6; |
635 | | static int hf_cm_req_ip_cm_sip4; |
636 | | static int hf_cm_req_ip_cm_dip4; |
637 | | static int hf_ip_cm_req_consumer_private_data; |
638 | | |
639 | | /* CM REP Header */ |
640 | | static int hf_cm_rep_localcommid; |
641 | | static int hf_cm_rep_remotecommid; |
642 | | static int hf_cm_rep_localqkey; |
643 | | static int hf_cm_rep_localqpn; |
644 | | static int hf_cm_rep_localeecontnum; |
645 | | static int hf_cm_rep_startingpsn; |
646 | | static int hf_cm_rep_responderres; |
647 | | static int hf_cm_rep_initiatordepth; |
648 | | static int hf_cm_rep_tgtackdelay; |
649 | | static int hf_cm_rep_failoveracc; |
650 | | static int hf_cm_rep_e2eflowctl; |
651 | | static int hf_cm_rep_rnrretrycount; |
652 | | static int hf_cm_rep_srq; |
653 | | static int hf_cm_rep_reserved; |
654 | | static int hf_cm_rep_localcaguid; |
655 | | static int hf_cm_rep_privatedata; |
656 | | /* CM RTU Header */ |
657 | | static int hf_cm_rtu_localcommid; |
658 | | static int hf_cm_rtu_remotecommid; |
659 | | static int hf_cm_rtu_privatedata; |
660 | | /* CM REJ Header */ |
661 | | static int hf_cm_rej_local_commid; |
662 | | static int hf_cm_rej_remote_commid; |
663 | | static int hf_cm_rej_msg_rej; |
664 | | static int hf_cm_rej_msg_reserved0; |
665 | | static int hf_cm_rej_rej_info_len; |
666 | | static int hf_cm_rej_msg_reserved1; |
667 | | static int hf_cm_rej_reason; |
668 | | static int hf_cm_rej_add_rej_info; |
669 | | static int hf_cm_rej_private_data; |
670 | | /* CM DREQ Header */ |
671 | | static int hf_cm_dreq_localcommid; |
672 | | static int hf_cm_dreq_remotecommid; |
673 | | static int hf_cm_dreq_remote_qpn; |
674 | | static int hf_cm_dreq_privatedata; |
675 | | /* CM DRSP Header */ |
676 | | static int hf_cm_drsp_localcommid; |
677 | | static int hf_cm_drsp_remotecommid; |
678 | | static int hf_cm_drsp_privatedata; |
679 | | /* MAD Base Header */ |
680 | | static int hf_infiniband_MAD; |
681 | | static int hf_infiniband_base_version; |
682 | | static int hf_infiniband_mgmt_class; |
683 | | static int hf_infiniband_class_version; |
684 | | static int hf_infiniband_method; |
685 | | static int hf_infiniband_status; |
686 | | static int hf_infiniband_class_specific; |
687 | | static int hf_infiniband_transaction_id; |
688 | | static int hf_infiniband_attribute_id; |
689 | | static int hf_infiniband_attribute_modifier; |
690 | | static int hf_infiniband_data; |
691 | | /* RMPP Header */ |
692 | | static int hf_infiniband_RMPP; |
693 | | static int hf_infiniband_rmpp_version; |
694 | | static int hf_infiniband_rmpp_type; |
695 | | static int hf_infiniband_r_resp_time; |
696 | | static int hf_infiniband_rmpp_flags; |
697 | | static int hf_infiniband_rmpp_status; |
698 | | static int hf_infiniband_rmpp_data1; |
699 | | static int hf_infiniband_rmpp_data2; |
700 | | /* RMPP Data */ |
701 | | /* static int hf_infiniband_RMPP_DATA; */ |
702 | | static int hf_infiniband_segment_number; |
703 | | static int hf_infiniband_payload_length32; |
704 | | static int hf_infiniband_transferred_data; |
705 | | /* RMPP ACK */ |
706 | | static int hf_infiniband_new_window_last; |
707 | | /* RMPP ABORT and STOP */ |
708 | | static int hf_infiniband_optional_extended_error_data; |
709 | | /* SMP Data LID Routed */ |
710 | | static int hf_infiniband_SMP_LID; |
711 | | static int hf_infiniband_m_key; |
712 | | static int hf_infiniband_smp_data; |
713 | | /* SMP Data Directed Route */ |
714 | | static int hf_infiniband_SMP_DIRECTED; |
715 | | static int hf_infiniband_smp_status; |
716 | | static int hf_infiniband_hop_pointer; |
717 | | static int hf_infiniband_hop_count; |
718 | | static int hf_infiniband_dr_slid; |
719 | | static int hf_infiniband_dr_dlid; |
720 | | static int hf_infiniband_d; |
721 | | static int hf_infiniband_initial_path; |
722 | | static int hf_infiniband_return_path; |
723 | | /* SA MAD Header */ |
724 | | static int hf_infiniband_SA; |
725 | | static int hf_infiniband_sm_key; |
726 | | static int hf_infiniband_attribute_offset; |
727 | | static int hf_infiniband_component_mask; |
728 | | static int hf_infiniband_subnet_admin_data; |
729 | | |
730 | | /* Mellanox EoIB encapsulation header */ |
731 | | static int proto_mellanox_eoib; |
732 | | static int hf_infiniband_ver; |
733 | | static int hf_infiniband_tcp_chk; |
734 | | static int hf_infiniband_ip_chk; |
735 | | static int hf_infiniband_fcs; |
736 | | static int hf_infiniband_ms; |
737 | | static int hf_infiniband_seg_off; |
738 | | static int hf_infiniband_seg_id; |
739 | | |
740 | | static int ett_eoib; |
741 | | |
742 | 16 | #define MELLANOX_VERSION_FLAG 0x3000 |
743 | 16 | #define MELLANOX_TCP_CHECKSUM_FLAG 0x0C00 |
744 | 16 | #define MELLANOX_IP_CHECKSUM_FLAG 0x0300 |
745 | 16 | #define MELLANOX_FCS_PRESENT_FLAG 0x0040 |
746 | 20 | #define MELLANOX_MORE_SEGMENT_FLAG 0x0020 |
747 | 20 | #define MELLANOX_SEGMENT_FLAG 0x001F |
748 | | |
749 | | /* Attributes |
750 | | * Additional Structures for individual attribute decoding. |
751 | | * Since they are not headers the naming convention is slightly modified |
752 | | * Convention: hf_infiniband_[attribute name]_[field] |
753 | | * This was not entirely necessary but I felt the previous convention |
754 | | * did not provide adequate readability for the granularity of attribute/attribute fields. */ |
755 | | |
756 | | /* NodeDescription */ |
757 | | static int hf_infiniband_NodeDescription_NodeString; |
758 | | /* NodeInfo */ |
759 | | static int hf_infiniband_NodeInfo_BaseVersion; |
760 | | static int hf_infiniband_NodeInfo_ClassVersion; |
761 | | static int hf_infiniband_NodeInfo_NodeType; |
762 | | static int hf_infiniband_NodeInfo_NumPorts; |
763 | | static int hf_infiniband_NodeInfo_SystemImageGUID; |
764 | | static int hf_infiniband_NodeInfo_NodeGUID; |
765 | | static int hf_infiniband_NodeInfo_PortGUID; |
766 | | static int hf_infiniband_NodeInfo_PartitionCap; |
767 | | static int hf_infiniband_NodeInfo_DeviceID; |
768 | | static int hf_infiniband_NodeInfo_Revision; |
769 | | static int hf_infiniband_NodeInfo_LocalPortNum; |
770 | | static int hf_infiniband_NodeInfo_VendorID; |
771 | | /* SwitchInfo */ |
772 | | static int hf_infiniband_SwitchInfo_LinearFDBCap; |
773 | | static int hf_infiniband_SwitchInfo_RandomFDBCap; |
774 | | static int hf_infiniband_SwitchInfo_MulticastFDBCap; |
775 | | static int hf_infiniband_SwitchInfo_LinearFDBTop; |
776 | | static int hf_infiniband_SwitchInfo_DefaultPort; |
777 | | static int hf_infiniband_SwitchInfo_DefaultMulticastPrimaryPort; |
778 | | static int hf_infiniband_SwitchInfo_DefaultMulticastNotPrimaryPort; |
779 | | static int hf_infiniband_SwitchInfo_LifeTimeValue; |
780 | | static int hf_infiniband_SwitchInfo_PortStateChange; |
781 | | static int hf_infiniband_SwitchInfo_OptimizedSLtoVLMappingProgramming; |
782 | | static int hf_infiniband_SwitchInfo_LIDsPerPort; |
783 | | static int hf_infiniband_SwitchInfo_PartitionEnforcementCap; |
784 | | static int hf_infiniband_SwitchInfo_InboundEnforcementCap; |
785 | | static int hf_infiniband_SwitchInfo_OutboundEnforcementCap; |
786 | | static int hf_infiniband_SwitchInfo_FilterRawInboundCap; |
787 | | static int hf_infiniband_SwitchInfo_FilterRawOutboundCap; |
788 | | static int hf_infiniband_SwitchInfo_EnhancedPortZero; |
789 | | /* GUIDInfo */ |
790 | | /* static int hf_infiniband_GUIDInfo_GUIDBlock; */ |
791 | | static int hf_infiniband_GUIDInfo_GUID; |
792 | | /* PortInfo */ |
793 | | static int hf_infiniband_PortInfo_GidPrefix; |
794 | | static int hf_infiniband_PortInfo_LID; |
795 | | static int hf_infiniband_PortInfo_MasterSMLID; |
796 | | static int hf_infiniband_PortInfo_CapabilityMask; |
797 | | |
798 | | /* Capability Mask Flags */ |
799 | | static int hf_infiniband_PortInfo_CapabilityMask_SM; |
800 | | static int hf_infiniband_PortInfo_CapabilityMask_NoticeSupported; |
801 | | static int hf_infiniband_PortInfo_CapabilityMask_TrapSupported; |
802 | | static int hf_infiniband_PortInfo_CapabilityMask_OptionalIPDSupported; |
803 | | static int hf_infiniband_PortInfo_CapabilityMask_AutomaticMigrationSupported; |
804 | | static int hf_infiniband_PortInfo_CapabilityMask_SLMappingSupported; |
805 | | static int hf_infiniband_PortInfo_CapabilityMask_MKeyNVRAM; |
806 | | static int hf_infiniband_PortInfo_CapabilityMask_PKeyNVRAM; |
807 | | static int hf_infiniband_PortInfo_CapabilityMask_LEDInfoSupported; |
808 | | static int hf_infiniband_PortInfo_CapabilityMask_SMdisabled; |
809 | | static int hf_infiniband_PortInfo_CapabilityMask_SystemImageGUIDSupported; |
810 | | static int hf_infiniband_PortInfo_CapabilityMask_PKeySwitchExternalPortTrapSupported; |
811 | | static int hf_infiniband_PortInfo_CapabilityMask_CommunicationManagementSupported; |
812 | | static int hf_infiniband_PortInfo_CapabilityMask_SNMPTunnelingSupported; |
813 | | static int hf_infiniband_PortInfo_CapabilityMask_ReinitSupported; |
814 | | static int hf_infiniband_PortInfo_CapabilityMask_DeviceManagementSupported; |
815 | | static int hf_infiniband_PortInfo_CapabilityMask_VendorClassSupported; |
816 | | static int hf_infiniband_PortInfo_CapabilityMask_DRNoticeSupported; |
817 | | static int hf_infiniband_PortInfo_CapabilityMask_CapabilityMaskNoticeSupported; |
818 | | static int hf_infiniband_PortInfo_CapabilityMask_BootManagementSupported; |
819 | | static int hf_infiniband_PortInfo_CapabilityMask_LinkRoundTripLatencySupported; |
820 | | static int hf_infiniband_PortInfo_CapabilityMask_ClientRegistrationSupported; |
821 | | static int hf_infiniband_PortInfo_CapabilityMask_OtherLocalChangesNoticeSupported; |
822 | | static int hf_infiniband_PortInfo_CapabilityMask_LinkSpeedWIdthPairsTableSupported; |
823 | | /* End Capability Mask Flags */ |
824 | | |
825 | | |
826 | | static int hf_infiniband_PortInfo_DiagCode; |
827 | | static int hf_infiniband_PortInfo_M_KeyLeasePeriod; |
828 | | static int hf_infiniband_PortInfo_LocalPortNum; |
829 | | static int hf_infiniband_PortInfo_LinkWidthEnabled; |
830 | | static int hf_infiniband_PortInfo_LinkWidthSupported; |
831 | | static int hf_infiniband_PortInfo_LinkWidthActive; |
832 | | static int hf_infiniband_PortInfo_LinkSpeedSupported; |
833 | | static int hf_infiniband_PortInfo_PortState; |
834 | | static int hf_infiniband_PortInfo_PortPhysicalState; |
835 | | static int hf_infiniband_PortInfo_LinkDownDefaultState; |
836 | | static int hf_infiniband_PortInfo_M_KeyProtectBits; |
837 | | static int hf_infiniband_PortInfo_LMC; |
838 | | static int hf_infiniband_PortInfo_LinkSpeedActive; |
839 | | static int hf_infiniband_PortInfo_LinkSpeedEnabled; |
840 | | static int hf_infiniband_PortInfo_NeighborMTU; |
841 | | static int hf_infiniband_PortInfo_MasterSMSL; |
842 | | static int hf_infiniband_PortInfo_VLCap; |
843 | | static int hf_infiniband_PortInfo_M_Key; |
844 | | static int hf_infiniband_PortInfo_InitType; |
845 | | static int hf_infiniband_PortInfo_VLHighLimit; |
846 | | static int hf_infiniband_PortInfo_VLArbitrationHighCap; |
847 | | static int hf_infiniband_PortInfo_VLArbitrationLowCap; |
848 | | static int hf_infiniband_PortInfo_InitTypeReply; |
849 | | static int hf_infiniband_PortInfo_MTUCap; |
850 | | static int hf_infiniband_PortInfo_VLStallCount; |
851 | | static int hf_infiniband_PortInfo_HOQLife; |
852 | | static int hf_infiniband_PortInfo_OperationalVLs; |
853 | | static int hf_infiniband_PortInfo_PartitionEnforcementInbound; |
854 | | static int hf_infiniband_PortInfo_PartitionEnforcementOutbound; |
855 | | static int hf_infiniband_PortInfo_FilterRawInbound; |
856 | | static int hf_infiniband_PortInfo_FilterRawOutbound; |
857 | | static int hf_infiniband_PortInfo_M_KeyViolations; |
858 | | static int hf_infiniband_PortInfo_P_KeyViolations; |
859 | | static int hf_infiniband_PortInfo_Q_KeyViolations; |
860 | | static int hf_infiniband_PortInfo_GUIDCap; |
861 | | static int hf_infiniband_PortInfo_ClientReregister; |
862 | | static int hf_infiniband_PortInfo_SubnetTimeOut; |
863 | | static int hf_infiniband_PortInfo_RespTimeValue; |
864 | | static int hf_infiniband_PortInfo_LocalPhyErrors; |
865 | | static int hf_infiniband_PortInfo_OverrunErrors; |
866 | | static int hf_infiniband_PortInfo_MaxCreditHint; |
867 | | static int hf_infiniband_PortInfo_LinkRoundTripLatency; |
868 | | |
869 | | /* P_KeyTable */ |
870 | | static int hf_infiniband_P_KeyTable_P_KeyTableBlock; |
871 | | static int hf_infiniband_P_KeyTable_MembershipType; |
872 | | static int hf_infiniband_P_KeyTable_P_KeyBase; |
873 | | |
874 | | /* SLtoVLMappingTable */ |
875 | | static int hf_infiniband_SLtoVLMappingTable_SLtoVL_HighBits; |
876 | | static int hf_infiniband_SLtoVLMappingTable_SLtoVL_LowBits; |
877 | | |
878 | | /* VLArbitrationTable */ |
879 | | /* static int hf_infiniband_VLArbitrationTable_VLWeightPairs; */ |
880 | | static int hf_infiniband_VLArbitrationTable_VL; |
881 | | static int hf_infiniband_VLArbitrationTable_Weight; |
882 | | |
883 | | /* LinearForwardingTable */ |
884 | | /* static int hf_infiniband_LinearForwardingTable_LinearForwardingTableBlock; */ |
885 | | static int hf_infiniband_LinearForwardingTable_Port; |
886 | | |
887 | | /* RandomForwardingTable */ |
888 | | /* static int hf_infiniband_RandomForwardingTable_RandomForwardingTableBlock; */ |
889 | | static int hf_infiniband_RandomForwardingTable_LID; |
890 | | static int hf_infiniband_RandomForwardingTable_Valid; |
891 | | static int hf_infiniband_RandomForwardingTable_LMC; |
892 | | static int hf_infiniband_RandomForwardingTable_Port; |
893 | | |
894 | | /* MulticastForwardingTable */ |
895 | | /* static int hf_infiniband_MulticastForwardingTable_MulticastForwardingTableBlock; */ |
896 | | static int hf_infiniband_MulticastForwardingTable_PortMask; |
897 | | |
898 | | /* SMInfo */ |
899 | | static int hf_infiniband_SMInfo_GUID; |
900 | | static int hf_infiniband_SMInfo_SM_Key; |
901 | | static int hf_infiniband_SMInfo_ActCount; |
902 | | static int hf_infiniband_SMInfo_Priority; |
903 | | static int hf_infiniband_SMInfo_SMState; |
904 | | |
905 | | /* VendorDiag */ |
906 | | static int hf_infiniband_VendorDiag_NextIndex; |
907 | | static int hf_infiniband_VendorDiag_DiagData; |
908 | | |
909 | | /* LedInfo */ |
910 | | static int hf_infiniband_LedInfo_LedMask; |
911 | | |
912 | | /* LinkSpeedWidthPairsTable */ |
913 | | static int hf_infiniband_LinkSpeedWidthPairsTable_NumTables; |
914 | | static int hf_infiniband_LinkSpeedWidthPairsTable_PortMask; |
915 | | static int hf_infiniband_LinkSpeedWidthPairsTable_SpeedTwoFive; |
916 | | static int hf_infiniband_LinkSpeedWidthPairsTable_SpeedFive; |
917 | | static int hf_infiniband_LinkSpeedWidthPairsTable_SpeedTen; |
918 | | |
919 | | /* Attributes for Subnet Administration. |
920 | | * Mostly we have "Records" here which are just structures of SM attributes. |
921 | | * There are some unique attributes though that we will want to have a structure for. */ |
922 | | |
923 | | /* NodeRecord */ |
924 | | /* PortInfoRecord */ |
925 | | /* SLtoVLMappingTableRecord */ |
926 | | /* SwitchInfoRecord */ |
927 | | /* LinearForwardingTableRecord */ |
928 | | /* RandomForwardingTableRecord */ |
929 | | /* MulticastForwardingTableRecord */ |
930 | | /* VLArbitrationTableRecord */ |
931 | | |
932 | | static int hf_infiniband_SA_LID; |
933 | | static int hf_infiniband_SA_EndportLID; |
934 | | static int hf_infiniband_SA_PortNum; |
935 | | static int hf_infiniband_SA_InputPortNum; |
936 | | static int hf_infiniband_SA_OutputPortNum; |
937 | | static int hf_infiniband_SA_BlockNum_EightBit; |
938 | | static int hf_infiniband_SA_BlockNum_NineBit; |
939 | | static int hf_infiniband_SA_BlockNum_SixteenBit; |
940 | | static int hf_infiniband_SA_Position; |
941 | | /* static int hf_infiniband_SA_Index; */ |
942 | | |
943 | | /* InformInfoRecord */ |
944 | | static int hf_infiniband_InformInfoRecord_SubscriberGID; |
945 | | static int hf_infiniband_InformInfoRecord_Enum; |
946 | | |
947 | | /* InformInfo */ |
948 | | static int hf_infiniband_InformInfo_GID; |
949 | | static int hf_infiniband_InformInfo_LIDRangeBegin; |
950 | | static int hf_infiniband_InformInfo_LIDRangeEnd; |
951 | | static int hf_infiniband_InformInfo_IsGeneric; |
952 | | static int hf_infiniband_InformInfo_Subscribe; |
953 | | static int hf_infiniband_InformInfo_Type; |
954 | | static int hf_infiniband_InformInfo_TrapNumberDeviceID; |
955 | | static int hf_infiniband_InformInfo_QPN; |
956 | | static int hf_infiniband_InformInfo_RespTimeValue; |
957 | | static int hf_infiniband_InformInfo_ProducerTypeVendorID; |
958 | | |
959 | | /* LinkRecord */ |
960 | | static int hf_infiniband_LinkRecord_FromLID; |
961 | | static int hf_infiniband_LinkRecord_FromPort; |
962 | | static int hf_infiniband_LinkRecord_ToPort; |
963 | | static int hf_infiniband_LinkRecord_ToLID; |
964 | | |
965 | | /* ServiceRecord */ |
966 | | static int hf_infiniband_ServiceRecord_ServiceID; |
967 | | static int hf_infiniband_ServiceRecord_ServiceGID; |
968 | | static int hf_infiniband_ServiceRecord_ServiceP_Key; |
969 | | static int hf_infiniband_ServiceRecord_ServiceLease; |
970 | | static int hf_infiniband_ServiceRecord_ServiceKey; |
971 | | static int hf_infiniband_ServiceRecord_ServiceName; |
972 | | static int hf_infiniband_ServiceRecord_ServiceData; |
973 | | |
974 | | /* ServiceAssociationRecord */ |
975 | | static int hf_infiniband_ServiceAssociationRecord_ServiceKey; |
976 | | static int hf_infiniband_ServiceAssociationRecord_ServiceName; |
977 | | |
978 | | /* PathRecord */ |
979 | | static int hf_infiniband_PathRecord_DGID; |
980 | | static int hf_infiniband_PathRecord_SGID; |
981 | | static int hf_infiniband_PathRecord_DLID; |
982 | | static int hf_infiniband_PathRecord_SLID; |
983 | | static int hf_infiniband_PathRecord_RawTraffic; |
984 | | static int hf_infiniband_PathRecord_FlowLabel; |
985 | | static int hf_infiniband_PathRecord_HopLimit; |
986 | | static int hf_infiniband_PathRecord_TClass; |
987 | | static int hf_infiniband_PathRecord_Reversible; |
988 | | static int hf_infiniband_PathRecord_NumbPath; |
989 | | static int hf_infiniband_PathRecord_P_Key; |
990 | | static int hf_infiniband_PathRecord_SL; |
991 | | static int hf_infiniband_PathRecord_MTUSelector; |
992 | | static int hf_infiniband_PathRecord_MTU; |
993 | | static int hf_infiniband_PathRecord_RateSelector; |
994 | | static int hf_infiniband_PathRecord_Rate; |
995 | | static int hf_infiniband_PathRecord_PacketLifeTimeSelector; |
996 | | static int hf_infiniband_PathRecord_PacketLifeTime; |
997 | | static int hf_infiniband_PathRecord_Preference; |
998 | | |
999 | | /* MCMemberRecord */ |
1000 | | static int hf_infiniband_MCMemberRecord_MGID; |
1001 | | static int hf_infiniband_MCMemberRecord_PortGID; |
1002 | | static int hf_infiniband_MCMemberRecord_Q_Key; |
1003 | | static int hf_infiniband_MCMemberRecord_MLID; |
1004 | | static int hf_infiniband_MCMemberRecord_MTUSelector; |
1005 | | static int hf_infiniband_MCMemberRecord_MTU; |
1006 | | static int hf_infiniband_MCMemberRecord_TClass; |
1007 | | static int hf_infiniband_MCMemberRecord_P_Key; |
1008 | | static int hf_infiniband_MCMemberRecord_RateSelector; |
1009 | | static int hf_infiniband_MCMemberRecord_Rate; |
1010 | | static int hf_infiniband_MCMemberRecord_PacketLifeTimeSelector; |
1011 | | static int hf_infiniband_MCMemberRecord_PacketLifeTime; |
1012 | | static int hf_infiniband_MCMemberRecord_SL; |
1013 | | static int hf_infiniband_MCMemberRecord_FlowLabel; |
1014 | | static int hf_infiniband_MCMemberRecord_HopLimit; |
1015 | | static int hf_infiniband_MCMemberRecord_Scope; |
1016 | | static int hf_infiniband_MCMemberRecord_JoinState; |
1017 | | static int hf_infiniband_MCMemberRecord_ProxyJoin; |
1018 | | |
1019 | | /* TraceRecord */ |
1020 | | static int hf_infiniband_TraceRecord_GIDPrefix; |
1021 | | static int hf_infiniband_TraceRecord_IDGeneration; |
1022 | | static int hf_infiniband_TraceRecord_NodeType; |
1023 | | static int hf_infiniband_TraceRecord_NodeID; |
1024 | | static int hf_infiniband_TraceRecord_ChassisID; |
1025 | | static int hf_infiniband_TraceRecord_EntryPortID; |
1026 | | static int hf_infiniband_TraceRecord_ExitPortID; |
1027 | | static int hf_infiniband_TraceRecord_EntryPort; |
1028 | | static int hf_infiniband_TraceRecord_ExitPort; |
1029 | | |
1030 | | /* MultiPathRecord */ |
1031 | | static int hf_infiniband_MultiPathRecord_RawTraffic; |
1032 | | static int hf_infiniband_MultiPathRecord_FlowLabel; |
1033 | | static int hf_infiniband_MultiPathRecord_HopLimit; |
1034 | | static int hf_infiniband_MultiPathRecord_TClass; |
1035 | | static int hf_infiniband_MultiPathRecord_Reversible; |
1036 | | static int hf_infiniband_MultiPathRecord_NumbPath; |
1037 | | static int hf_infiniband_MultiPathRecord_P_Key; |
1038 | | static int hf_infiniband_MultiPathRecord_SL; |
1039 | | static int hf_infiniband_MultiPathRecord_MTUSelector; |
1040 | | static int hf_infiniband_MultiPathRecord_MTU; |
1041 | | static int hf_infiniband_MultiPathRecord_RateSelector; |
1042 | | static int hf_infiniband_MultiPathRecord_Rate; |
1043 | | static int hf_infiniband_MultiPathRecord_PacketLifeTimeSelector; |
1044 | | static int hf_infiniband_MultiPathRecord_PacketLifeTime; |
1045 | | static int hf_infiniband_MultiPathRecord_IndependenceSelector; |
1046 | | static int hf_infiniband_MultiPathRecord_GIDScope; |
1047 | | static int hf_infiniband_MultiPathRecord_SGIDCount; |
1048 | | static int hf_infiniband_MultiPathRecord_DGIDCount; |
1049 | | static int hf_infiniband_MultiPathRecord_SDGID; |
1050 | | |
1051 | | /* ClassPortInfo */ |
1052 | | static int hf_infiniband_ClassPortInfo_BaseVersion; |
1053 | | static int hf_infiniband_ClassPortInfo_ClassVersion; |
1054 | | static int hf_infiniband_ClassPortInfo_CapabilityMask; |
1055 | | static int hf_infiniband_ClassPortInfo_CapabilityMask2; |
1056 | | static int hf_infiniband_ClassPortInfo_RespTimeValue; |
1057 | | static int hf_infiniband_ClassPortInfo_RedirectGID; |
1058 | | static int hf_infiniband_ClassPortInfo_RedirectTC; |
1059 | | static int hf_infiniband_ClassPortInfo_RedirectSL; |
1060 | | static int hf_infiniband_ClassPortInfo_RedirectFL; |
1061 | | static int hf_infiniband_ClassPortInfo_RedirectLID; |
1062 | | static int hf_infiniband_ClassPortInfo_RedirectP_Key; |
1063 | | static int hf_infiniband_ClassPortInfo_Reserved; |
1064 | | static int hf_infiniband_ClassPortInfo_RedirectQP; |
1065 | | static int hf_infiniband_ClassPortInfo_RedirectQ_Key; |
1066 | | static int hf_infiniband_ClassPortInfo_TrapGID; |
1067 | | static int hf_infiniband_ClassPortInfo_TrapTC; |
1068 | | static int hf_infiniband_ClassPortInfo_TrapSL; |
1069 | | static int hf_infiniband_ClassPortInfo_TrapFL; |
1070 | | static int hf_infiniband_ClassPortInfo_TrapLID; |
1071 | | static int hf_infiniband_ClassPortInfo_TrapP_Key; |
1072 | | static int hf_infiniband_ClassPortInfo_TrapQP; |
1073 | | static int hf_infiniband_ClassPortInfo_TrapQ_Key; |
1074 | | |
1075 | | /* Notice */ |
1076 | | static int hf_infiniband_Notice_IsGeneric; |
1077 | | static int hf_infiniband_Notice_Type; |
1078 | | static int hf_infiniband_Notice_ProducerTypeVendorID; |
1079 | | static int hf_infiniband_Notice_TrapNumberDeviceID; |
1080 | | static int hf_infiniband_Notice_IssuerLID; |
1081 | | static int hf_infiniband_Notice_NoticeToggle; |
1082 | | static int hf_infiniband_Notice_NoticeCount; |
1083 | | static int hf_infiniband_Notice_DataDetails; |
1084 | | /* static int hf_infiniband_Notice_IssuerGID; */ |
1085 | | /* static int hf_infiniband_Notice_ClassTrapSpecificData; */ |
1086 | | |
1087 | | /* ClassPortInfo attribute in Performance class */ |
1088 | | static int hf_infiniband_PerfMgt_ClassPortInfo; |
1089 | | |
1090 | | /* PortCounters attribute in Performance class */ |
1091 | | static int hf_infiniband_PortCounters; |
1092 | | static int hf_infiniband_PortCounters_PortSelect; |
1093 | | static int hf_infiniband_PortCounters_CounterSelect; |
1094 | | static int hf_infiniband_PortCounters_SymbolErrorCounter; |
1095 | | static int hf_infiniband_PortCounters_LinkErrorRecoveryCounter; |
1096 | | static int hf_infiniband_PortCounters_LinkDownedCounter; |
1097 | | static int hf_infiniband_PortCounters_PortRcvErrors; |
1098 | | static int hf_infiniband_PortCounters_PortRcvRemotePhysicalErrors; |
1099 | | static int hf_infiniband_PortCounters_PortRcvSwitchRelayErrors; |
1100 | | static int hf_infiniband_PortCounters_PortXmitDiscards; |
1101 | | static int hf_infiniband_PortCounters_PortXmitConstraintErrors; |
1102 | | static int hf_infiniband_PortCounters_PortRcvConstraintErrors; |
1103 | | static int hf_infiniband_PortCounters_LocalLinkIntegrityErrors; |
1104 | | static int hf_infiniband_PortCounters_ExcessiveBufferOverrunErrors; |
1105 | | static int hf_infiniband_PortCounters_VL15Dropped; |
1106 | | static int hf_infiniband_PortCounters_PortXmitData; |
1107 | | static int hf_infiniband_PortCounters_PortRcvData; |
1108 | | static int hf_infiniband_PortCounters_PortXmitPkts; |
1109 | | static int hf_infiniband_PortCounters_PortRcvPkts; |
1110 | | |
1111 | | /* Extended PortCounters attribute in Performance class */ |
1112 | | static int hf_infiniband_PortCountersExt; |
1113 | | static int hf_infiniband_PortCountersExt_PortSelect; |
1114 | | static int hf_infiniband_PortCountersExt_CounterSelect; |
1115 | | static int hf_infiniband_PortCountersExt_PortXmitData; |
1116 | | static int hf_infiniband_PortCountersExt_PortRcvData; |
1117 | | static int hf_infiniband_PortCountersExt_PortXmitPkts; |
1118 | | static int hf_infiniband_PortCountersExt_PortRcvPkts; |
1119 | | static int hf_infiniband_PortCountersExt_PortUnicastXmitPkts; |
1120 | | static int hf_infiniband_PortCountersExt_PortUnicastRcvPkts; |
1121 | | static int hf_infiniband_PortCountersExt_PortMulticastXmitPkts; |
1122 | | static int hf_infiniband_PortCountersExt_PortMulticastRcvPkts; |
1123 | | |
1124 | | /* Notice DataDetails and ClassTrapSpecific Data for certain traps |
1125 | | * Note that traps reuse many fields, so they are only declared once under the first trap that they appear. |
1126 | | * There is no need to redeclare them for specific Traps (as with other SA Attributes) because they are uniform between Traps. */ |
1127 | | |
1128 | | /* Parse DataDetails for a given Trap */ |
1129 | | static int parse_NoticeDataDetails(proto_tree*, tvbuff_t*, unsigned *offset, uint16_t trapNumber); |
1130 | | |
1131 | | /* Traps 64,65,66,67 */ |
1132 | | static int hf_infiniband_Trap_GIDADDR; |
1133 | | |
1134 | | /* Traps 68,69 */ |
1135 | | /* DataDetails */ |
1136 | | static int hf_infiniband_Trap_COMP_MASK; |
1137 | | static int hf_infiniband_Trap_WAIT_FOR_REPATH; |
1138 | | /* ClassTrapSpecificData */ |
1139 | | /* static int hf_infiniband_Trap_PATH_REC; */ |
1140 | | |
1141 | | /* Trap 128 */ |
1142 | | static int hf_infiniband_Trap_LIDADDR; |
1143 | | |
1144 | | /* Trap 129, 130, 131 */ |
1145 | | static int hf_infiniband_Trap_PORTNO; |
1146 | | |
1147 | | /* Trap 144 */ |
1148 | | static int hf_infiniband_Trap_OtherLocalChanges; |
1149 | | static int hf_infiniband_Trap_CAPABILITYMASK; |
1150 | | static int hf_infiniband_Trap_LinkSpeecEnabledChange; |
1151 | | static int hf_infiniband_Trap_LinkWidthEnabledChange; |
1152 | | static int hf_infiniband_Trap_NodeDescriptionChange; |
1153 | | |
1154 | | /* Trap 145 */ |
1155 | | static int hf_infiniband_Trap_SYSTEMIMAGEGUID; |
1156 | | |
1157 | | /* Trap 256 */ |
1158 | | static int hf_infiniband_Trap_DRSLID; |
1159 | | static int hf_infiniband_Trap_METHOD; |
1160 | | static int hf_infiniband_Trap_ATTRIBUTEID; |
1161 | | static int hf_infiniband_Trap_ATTRIBUTEMODIFIER; |
1162 | | static int hf_infiniband_Trap_MKEY; |
1163 | | static int hf_infiniband_Trap_DRNotice; |
1164 | | static int hf_infiniband_Trap_DRPathTruncated; |
1165 | | static int hf_infiniband_Trap_DRHopCount; |
1166 | | static int hf_infiniband_Trap_DRNoticeReturnPath; |
1167 | | |
1168 | | /* Trap 257, 258 */ |
1169 | | static int hf_infiniband_Trap_LIDADDR1; |
1170 | | static int hf_infiniband_Trap_LIDADDR2; |
1171 | | static int hf_infiniband_Trap_KEY; |
1172 | | static int hf_infiniband_Trap_SL; |
1173 | | static int hf_infiniband_Trap_QP1; |
1174 | | static int hf_infiniband_Trap_QP2; |
1175 | | static int hf_infiniband_Trap_GIDADDR1; |
1176 | | static int hf_infiniband_Trap_GIDADDR2; |
1177 | | |
1178 | | /* Trap 259 */ |
1179 | | static int hf_infiniband_Trap_DataValid; |
1180 | | static int hf_infiniband_Trap_PKEY; |
1181 | | static int hf_infiniband_Trap_SWLIDADDR; |
1182 | | |
1183 | | /* Infiniband Link */ |
1184 | | static int hf_infiniband_link_op; |
1185 | | static int hf_infiniband_link_fctbs; |
1186 | | static int hf_infiniband_link_vl; |
1187 | | static int hf_infiniband_link_fccl; |
1188 | | static int hf_infiniband_link_lpcrc; |
1189 | | |
1190 | | /* RC Send reassembling */ |
1191 | | static reassembly_table infiniband_rc_send_reassembly_table; |
1192 | | static int ett_infiniband_rc_send_fragment; |
1193 | | static int ett_infiniband_rc_send_fragments; |
1194 | | static int hf_infiniband_rc_send_fragments; |
1195 | | static int hf_infiniband_rc_send_fragment; |
1196 | | static int hf_infiniband_rc_send_fragment_overlap; |
1197 | | static int hf_infiniband_rc_send_fragment_overlap_conflict; |
1198 | | static int hf_infiniband_rc_send_fragment_multiple_tails; |
1199 | | static int hf_infiniband_rc_send_fragment_too_long_fragment; |
1200 | | static int hf_infiniband_rc_send_fragment_error; |
1201 | | static int hf_infiniband_rc_send_fragment_count; |
1202 | | static int hf_infiniband_rc_send_reassembled_in; |
1203 | | static int hf_infiniband_rc_send_reassembled_length; |
1204 | | static int hf_infiniband_rc_send_reassembled_data; |
1205 | | static const fragment_items infiniband_rc_send_frag_items = { |
1206 | | &ett_infiniband_rc_send_fragment, |
1207 | | &ett_infiniband_rc_send_fragments, |
1208 | | &hf_infiniband_rc_send_fragments, |
1209 | | &hf_infiniband_rc_send_fragment, |
1210 | | &hf_infiniband_rc_send_fragment_overlap, |
1211 | | &hf_infiniband_rc_send_fragment_overlap_conflict, |
1212 | | &hf_infiniband_rc_send_fragment_multiple_tails, |
1213 | | &hf_infiniband_rc_send_fragment_too_long_fragment, |
1214 | | &hf_infiniband_rc_send_fragment_error, |
1215 | | &hf_infiniband_rc_send_fragment_count, |
1216 | | &hf_infiniband_rc_send_reassembled_in, |
1217 | | &hf_infiniband_rc_send_reassembled_length, |
1218 | | &hf_infiniband_rc_send_reassembled_data, |
1219 | | "RC Send fragments" |
1220 | | }; |
1221 | | |
1222 | | /* Trap Type/Descriptions for dissection */ |
1223 | | static const value_string Operand_Description[]= { |
1224 | | { 0, " Normal Flow Control"}, |
1225 | | { 1, " Flow Control Init"}, |
1226 | | { 0, NULL} |
1227 | | }; |
1228 | | |
1229 | | /* Trap Type/Descriptions for dissection */ |
1230 | | static const value_string Trap_Description[]= { |
1231 | | { 64, " (Informational) <GIDADDR> is now in service"}, |
1232 | | { 65, " (Informational) <GIDADDR> is out of service"}, |
1233 | | { 66, " (Informational) New Multicast Group with multicast address <GIDADDR> is now created"}, |
1234 | | { 67, " (Informational) Multicast Group with multicast address <GIDADDR> is now deleted"}, |
1235 | | { 68, " (Informational) Paths indicated by <PATH_REC> and <COMP_MASK> are no longer valid"}, |
1236 | | { 69, " (Informational) Paths indicated by <PATH_REC> and <COMP_MASK> have been recomputed"}, |
1237 | | { 128, " (Urgent) Link State of at least one port of switch at <LIDADDR> has changed"}, |
1238 | | { 129, " (Urgent) Local Link Integrity threshold reached at <LIDADDR><PORTNO>"}, |
1239 | | { 130, " (Urgent) Excessive Buffer OVerrun threshold reached at <LIDADDR><PORTNO>"}, |
1240 | | { 131, " (Urgent) Flow Control Update watchdog timer expired at <LIDADDR><PORTNO>"}, |
1241 | | { 144, " (Informational) CapMask, NodeDesc, LinkWidthEnabled or LinkSpeedEnabled at <LIDADDR> has been modified"}, |
1242 | | { 145, " (Informational) SystemImageGUID at <LIDADDR> has been modified. New value is <SYSTEMIMAGEGUID>"}, |
1243 | | { 256, " (Security) Bad M_Key, <M_KEY> from <LIDADDR> attempted <METHOD> with <ATTRIBUTEID> and <ATTRIBUTEMODIFIER>"}, |
1244 | | { 257, " (Security) Bad P_Key, <KEY> from <LIDADDR1><GIDADDR1><QP1> to <LIDADDR2><GIDADDR2><QP2> on <SL>"}, |
1245 | | { 258, " (Security) Bad Q_Key, <KEY> from <LIDADDR1><GIDADDR1><QP1> to <LIDADDR2><GIDADDR2><QP2> on <SL>"}, |
1246 | | { 259, " (Security) Bad P_Key, <KEY> from <LIDADDR1><GIDADDR1><QP1> to <LIDADDR2><GIDADDR2><QP2> on <SL> at switch <LIDADDR><PORTNO>"}, |
1247 | | { 0, NULL} |
1248 | | }; |
1249 | | |
1250 | | |
1251 | | static const value_string bth_opcode_tbl[] = { |
1252 | | { 0x0, "Reliable Connection (RC) - SEND First" }, |
1253 | | { 0x1, "Reliable Connection (RC) - SEND Middle" }, |
1254 | | { 0x2, "Reliable Connection (RC) - SEND Last" }, |
1255 | | { 0x3, "Reliable Connection (RC) - SEND Last with Immediate" }, |
1256 | | { 0x4, "Reliable Connection (RC) - SEND Only" }, |
1257 | | { 0x5, "Reliable Connection (RC) - SEND Only with Immediate" }, |
1258 | | { 0x6, "Reliable Connection (RC) - RDMA WRITE First" }, |
1259 | | { 0x7, "Reliable Connection (RC) - RDMA WRITE Middle" }, |
1260 | | { 0x8, "Reliable Connection (RC) - RDMA WRITE Last" }, |
1261 | | { 0x9, "Reliable Connection (RC) - RDMA WRITE Last with Immediate" }, |
1262 | | { 0xA, "Reliable Connection (RC) - RDMA WRITE Only" }, |
1263 | | { 0xB, "Reliable Connection (RC) - RDMA WRITE Only with Immediate" }, |
1264 | | { 0xC, "Reliable Connection (RC) - RDMA READ Request" }, |
1265 | | { 0xD, "Reliable Connection (RC) - RDMA READ response First" }, |
1266 | | { 0xE, "Reliable Connection (RC) - RDMA READ response Middle" }, |
1267 | | { 0xF, "Reliable Connection (RC) - RDMA READ response Last" }, |
1268 | | { 0x10, "Reliable Connection (RC) - RDMA READ response Only" }, |
1269 | | { 0x11, "Reliable Connection (RC) - Acknowledge" }, |
1270 | | { 0x12, "Reliable Connection (RC) - ATOMIC Acknowledge" }, |
1271 | | { 0x13, "Reliable Connection (RC) - CmpSwap" }, |
1272 | | { 0x14, "Reliable Connection (RC) - FetchAdd" }, |
1273 | | { 0x15, "Reliable Connection (RC) - Reserved" }, |
1274 | | { 0x16, "Reliable Connection (RC) - SEND Last with Invalidate" }, |
1275 | | { 0x17, "Reliable Connection (RC) - SEND Only with Invalidate" }, |
1276 | | { 0x1C, "Reliable Connection (RC) - FLUSH" }, |
1277 | | { 0x1D, "Reliable Connection (RC) - ATOMIC WRITE" }, |
1278 | | { 0x20, "Unreliable Connection (UC) - SEND First" }, |
1279 | | { 0x21, "Unreliable Connection (UC) - SEND Middle" }, |
1280 | | { 0x22, "Unreliable Connection (UC) - SEND Last" }, |
1281 | | { 0x23, "Unreliable Connection (UC) - SEND Last with Immediate" }, |
1282 | | { 0x24, "Unreliable Connection (UC) - SEND Only" }, |
1283 | | { 0x25, "Unreliable Connection (UC) - SEND Only with Immediate" }, |
1284 | | { 0x26, "Unreliable Connection (UC) - RDMA WRITE First" }, |
1285 | | { 0x27, "Unreliable Connection (UC) - RDMA WRITE Middle" }, |
1286 | | { 0x28, "Unreliable Connection (UC) - RDMA WRITE Last" }, |
1287 | | { 0x29, "Unreliable Connection (UC) - RDMA WRITE Last with Immediate" }, |
1288 | | { 0x2A, "Unreliable Connection (UC) - RDMA WRITE Only" }, |
1289 | | { 0x2B, "Unreliable Connection (UC) - RDMA WRITE Only with Immediate" }, |
1290 | | { 0x40, "Reliable Datagram (RD) - SEND First" }, |
1291 | | { 0x41, "Reliable Datagram (RD) - SEND Middle" }, |
1292 | | { 0x42, "Reliable Datagram (RD) - SEND Last" }, |
1293 | | { 0x43, "Reliable Datagram (RD) - SEND Last with Immediate" }, |
1294 | | { 0x44, "Reliable Datagram (RD) - SEND Only" }, |
1295 | | { 0x45, "Reliable Datagram (RD) - SEND Only with Immediate" }, |
1296 | | { 0x46, "Reliable Datagram (RD) - RDMA WRITE First" }, |
1297 | | { 0x47, "Reliable Datagram (RD) - RDMA WRITE Middle" }, |
1298 | | { 0x48, "Reliable Datagram (RD) - RDMA WRITE Last" }, |
1299 | | { 0x49, "Reliable Datagram (RD) - RDMA WRITE Last with Immediate" }, |
1300 | | { 0x4A, "Reliable Datagram (RD) - RDMA WRITE Only" }, |
1301 | | { 0x4B, "Reliable Datagram (RD) - RDMA WRITE Only with Immediate" }, |
1302 | | { 0x4C, "Reliable Datagram (RD) - RDMA READ Request" }, |
1303 | | { 0x4D, "Reliable Datagram (RD) - RDMA READ response First" }, |
1304 | | { 0x4E, "Reliable Datagram (RD) - RDMA READ response Middle" }, |
1305 | | { 0x4F, "Reliable Datagram (RD) - RDMA READ response Last" }, |
1306 | | { 0x50, "Reliable Datagram (RD) - RDMA READ response Only" }, |
1307 | | { 0x51, "Reliable Datagram (RD) - Acknowledge" }, |
1308 | | { 0x52, "Reliable Datagram (RD) - ATOMIC Acknowledge" }, |
1309 | | { 0x53, "Reliable Datagram (RD) - CmpSwap" }, |
1310 | | { 0x54, "Reliable Datagram (RD) - FetchAdd" }, |
1311 | | { 0x55, "Reliable Datagram (RD) - RESYNC" }, |
1312 | | { 0x5C, "Reliable Datagram (RD) - FLUSH" }, |
1313 | | { 0x5D, "Reliable Datagram (RD) - ATOMIC WRITE" }, |
1314 | | { 0x64, "Unreliable Datagram (UD) - SEND only" }, |
1315 | | { 0x65, "Unreliable Datagram (UD) - SEND only with Immediate" }, |
1316 | | { 0x80, "CNP" }, |
1317 | | { 0xA0, "Extended Reliable Connection (XRC) - SEND First" }, |
1318 | | { 0xA1, "Extended Reliable Connection (XRC) - SEND Middle" }, |
1319 | | { 0xA2, "Extended Reliable Connection (XRC) - SEND Last" }, |
1320 | | { 0xA3, "Extended Reliable Connection (XRC) - SEND Last with Immediate" }, |
1321 | | { 0xA4, "Extended Reliable Connection (XRC) - SEND Only" }, |
1322 | | { 0xA5, "Extended Reliable Connection (XRC) - SEND Only with Immediate" }, |
1323 | | { 0xA6, "Extended Reliable Connection (XRC) - RDMA WRITE First" }, |
1324 | | { 0xA7, "Extended Reliable Connection (XRC) - RDMA WRITE Middle" }, |
1325 | | { 0xA8, "Extended Reliable Connection (XRC) - RDMA WRITE Last" }, |
1326 | | { 0xA9, "Extended Reliable Connection (XRC) - RDMA WRITE Last with Immediate" }, |
1327 | | { 0xAA, "Extended Reliable Connection (XRC) - RDMA WRITE Only" }, |
1328 | | { 0xAB, "Extended Reliable Connection (XRC) - RDMA WRITE Only with Immediate" }, |
1329 | | { 0xAC, "Extended Reliable Connection (XRC) - RDMA READ Request" }, |
1330 | | { 0xAD, "Extended Reliable Connection (XRC) - RDMA READ response First" }, |
1331 | | { 0xAE, "Extended Reliable Connection (XRC) - RDMA READ response Middle" }, |
1332 | | { 0xAF, "Extended Reliable Connection (XRC) - RDMA READ response Last" }, |
1333 | | { 0xB0, "Extended Reliable Connection (XRC) - RDMA READ response Only" }, |
1334 | | { 0xB1, "Extended Reliable Connection (XRC) - Acknowledge" }, |
1335 | | { 0xB2, "Extended Reliable Connection (XRC) - ATOMIC Acknowledge" }, |
1336 | | { 0xB3, "Extended Reliable Connection (XRC) - CmpSwap" }, |
1337 | | { 0xB4, "Extended Reliable Connection (XRC) - FetchAdd" }, |
1338 | | { 0xB6, "Extended Reliable Connection (XRC) - SEND Last with Invalidate" }, |
1339 | | { 0xB7, "Extended Reliable Connection (XRC) - SEND Only with Invalidate" }, |
1340 | | { 0xBC, "Extended Reliable Connection (XRC) - FLUSH" }, |
1341 | | { 0xBD, "Extended Reliable Connection (XRC) - ATOMIC WRITE" }, |
1342 | | { 0, NULL} |
1343 | | }; |
1344 | | |
1345 | 20 | #define AETH_SYNDROME_OPCODE_ACK 0 |
1346 | 3 | #define AETH_SYNDROME_OPCODE_RNR_NAK 1 |
1347 | 5 | #define AETH_SYNDROME_OPCODE_RES 2 |
1348 | 6 | #define AETH_SYNDROME_OPCODE_NAK 3 |
1349 | | |
1350 | | static const value_string aeth_syndrome_opcode_vals[]= { |
1351 | | { AETH_SYNDROME_OPCODE_ACK, "Ack"}, |
1352 | | { AETH_SYNDROME_OPCODE_RNR_NAK, "RNR Nak"}, |
1353 | | { AETH_SYNDROME_OPCODE_RES, "Reserved"}, |
1354 | | { AETH_SYNDROME_OPCODE_NAK, "Nak"}, |
1355 | | { 0, NULL} |
1356 | | }; |
1357 | | |
1358 | | static const value_string aeth_syndrome_nak_error_code_vals[]= { |
1359 | | { 0, "PSN Sequence Error"}, |
1360 | | { 1, "Invalid Request"}, |
1361 | | { 2, "Remote Access Error"}, |
1362 | | { 3, "Remote Operational Error"}, |
1363 | | { 4, "Invalid RD Request"}, |
1364 | | { 0, NULL} |
1365 | | }; |
1366 | | |
1367 | | static const value_string aeth_syndrome_timer_code_vals[]= { |
1368 | | { 0, "655.36 ms"}, |
1369 | | { 1, "0.01 ms"}, |
1370 | | { 2, "0.02 ms"}, |
1371 | | { 3, "0.03 ms"}, |
1372 | | { 4, "0.04 ms"}, |
1373 | | { 5, "0.06 ms"}, |
1374 | | { 6, "0.08 ms"}, |
1375 | | { 7, "0.12 ms"}, |
1376 | | { 8, "0.16 ms"}, |
1377 | | { 9, "0.24 ms"}, |
1378 | | { 10, "0.32 ms"}, |
1379 | | { 11, "0.48 ms"}, |
1380 | | { 12, "0.64 ms"}, |
1381 | | { 13, "0.96 ms"}, |
1382 | | { 14, "1.28 ms"}, |
1383 | | { 15, "1.92 ms"}, |
1384 | | { 16, "2.56 ms"}, |
1385 | | { 17, "3.84 ms"}, |
1386 | | { 18, "5.12 ms"}, |
1387 | | { 19, "7.68 ms"}, |
1388 | | { 20, "10.24 ms"}, |
1389 | | { 21, "15.36 ms"}, |
1390 | | { 22, "20.48 ms"}, |
1391 | | { 23, "30.72 ms"}, |
1392 | | { 24, "40.96 ms"}, |
1393 | | { 25, "61.44 ms"}, |
1394 | | { 26, "81.92 ms"}, |
1395 | | { 27, "122.88 ms"}, |
1396 | | { 28, "163.84 ms"}, |
1397 | | { 29, "245.76 ms"}, |
1398 | | { 30, "327.68 ms"}, |
1399 | | { 31, "491.52 ms"}, |
1400 | | { 0, NULL} |
1401 | | }; |
1402 | | |
1403 | | /* MAD Management Classes |
1404 | | * Classes from the Common MAD Header |
1405 | | * |
1406 | | * Management Class Name Class Description |
1407 | | * ------------------------------------------------------------------------------------------------------------ */ |
1408 | 4 | #define SUBN_LID_ROUTED 0x01 /* Subnet Management LID Route */ |
1409 | 7 | #define SUBN_DIRECTED_ROUTE 0x81 /* Subnet Management Directed Route */ |
1410 | 6 | #define SUBNADMN 0x03 /* Subnet Administration */ |
1411 | 12 | #define PERF 0x04 /* Performance Management */ |
1412 | 3 | #define BM 0x05 /* Baseboard Management (Tunneling of IB-ML commands through the IBA subnet) */ |
1413 | 2 | #define DEV_MGT 0x06 /* Device Management */ |
1414 | 4 | #define COM_MGT 0x07 /* Communication Management */ |
1415 | 3 | #define SNMP 0x08 /* SNMP Tunneling (tunneling of the SNMP protocol through the IBA fabric) */ |
1416 | 96 | #define VENDOR_1_START 0x09 /* Start of first Vendor Specific Range */ |
1417 | 48 | #define VENDOR_1_END 0x0F /* End of first Vendor Specific Range */ |
1418 | 88 | #define VENDOR_2_START 0x30 /* Start of second Vendor Specific Range */ |
1419 | 32 | #define VENDOR_2_END 0x4F /* End of the second Vendor Specific Range */ |
1420 | 84 | #define APPLICATION_START 0x10 /* Start of Application Specific Range */ |
1421 | 36 | #define APPLICATION_END 0x2F /* End of Application Specific Range */ |
1422 | | |
1423 | | /* Performance class Attributes */ |
1424 | 0 | #define ATTR_PORT_COUNTERS 0x0012 |
1425 | 0 | #define ATTR_PORT_COUNTERS_EXT 0x001D |
1426 | | |
1427 | | /* Link Next Header Values */ |
1428 | 838 | #define IBA_GLOBAL 3 |
1429 | 1.01k | #define IBA_LOCAL 2 |
1430 | 0 | #define IP_NON_IBA 1 |
1431 | 0 | #define RAW 0 |
1432 | | |
1433 | | static const value_string OpCodeMap[] = |
1434 | | { |
1435 | | { RC_SEND_FIRST, "RC Send First " }, |
1436 | | { RC_SEND_MIDDLE, "RC Send Middle "}, |
1437 | | { RC_SEND_LAST, "RC Send Last " }, |
1438 | | { RC_SEND_LAST_IMM, "RC Send Last Immediate "}, |
1439 | | { RC_SEND_ONLY, "RC Send Only "}, |
1440 | | { RC_SEND_ONLY_IMM, "RC Send Only Immediate "}, |
1441 | | { RC_RDMA_WRITE_FIRST, "RC RDMA Write First " }, |
1442 | | { RC_RDMA_WRITE_MIDDLE, "RC RDMA Write Middle "}, |
1443 | | { RC_RDMA_WRITE_LAST, "RC RDMA Write Last "}, |
1444 | | { RC_RDMA_WRITE_LAST_IMM, "RC RDMA Write Last Immediate " }, |
1445 | | { RC_RDMA_WRITE_ONLY, "RC RDMA Write Only " }, |
1446 | | { RC_RDMA_WRITE_ONLY_IMM, "RC RDMA Write Only Immediate "}, |
1447 | | { RC_RDMA_READ_REQUEST, "RC RDMA Read Request " }, |
1448 | | { RC_RDMA_READ_RESPONSE_FIRST, "RC RDMA Read Response First " }, |
1449 | | { RC_RDMA_READ_RESPONSE_MIDDLE, "RC RDMA Read Response Middle "}, |
1450 | | { RC_RDMA_READ_RESPONSE_LAST, "RC RDMA Read Response Last " }, |
1451 | | { RC_RDMA_READ_RESPONSE_ONLY, "RC RDMA Read Response Only "}, |
1452 | | { RC_ACKNOWLEDGE, "RC Acknowledge " }, |
1453 | | { RC_ATOMIC_ACKNOWLEDGE, "RC Atomic Acknowledge " }, |
1454 | | { RC_CMP_SWAP, "RC Compare Swap " }, |
1455 | | { RC_FETCH_ADD, "RC Fetch Add "}, |
1456 | | { RC_SEND_LAST_INVAL, "RC Send Last Invalidate "}, |
1457 | | { RC_SEND_ONLY_INVAL, "RC Send Only Invalidate " }, |
1458 | | { RC_FLUSH, "RC Flush " }, |
1459 | | { RC_ATOMIC_WRITE, "RC Atomic Write " }, |
1460 | | |
1461 | | { RD_SEND_FIRST, "RD Send First "}, |
1462 | | { RD_SEND_MIDDLE, "RD Send Middle " }, |
1463 | | { RD_SEND_LAST, "RD Send Last "}, |
1464 | | { RD_SEND_LAST_IMM, "RD Last Immediate " }, |
1465 | | { RD_SEND_ONLY, "RD Send Only "}, |
1466 | | { RD_SEND_ONLY_IMM, "RD Send Only Immediate "}, |
1467 | | { RD_RDMA_WRITE_FIRST, "RD RDMA Write First "}, |
1468 | | { RD_RDMA_WRITE_MIDDLE, "RD RDMA Write Middle "}, |
1469 | | { RD_RDMA_WRITE_LAST, "RD RDMA Write Last "}, |
1470 | | { RD_RDMA_WRITE_LAST_IMM, "RD RDMA Write Last Immediate "}, |
1471 | | { RD_RDMA_WRITE_ONLY, "RD RDMA Write Only "}, |
1472 | | { RD_RDMA_WRITE_ONLY_IMM, "RD RDMA Write Only Immediate "}, |
1473 | | { RD_RDMA_READ_REQUEST, "RD RDMA Read Request "}, |
1474 | | { RD_RDMA_READ_RESPONSE_FIRST, "RD RDMA Read Response First "}, |
1475 | | { RD_RDMA_READ_RESPONSE_MIDDLE, "RD RDMA Read Response Middle "}, |
1476 | | { RD_RDMA_READ_RESPONSE_LAST, "RD RDMA Read Response Last "}, |
1477 | | { RD_RDMA_READ_RESPONSE_ONLY, "RD RDMA Read Response Only "}, |
1478 | | { RD_ACKNOWLEDGE, "RD Acknowledge "}, |
1479 | | { RD_ATOMIC_ACKNOWLEDGE, "RD Atomic Acknowledge "}, |
1480 | | { RD_CMP_SWAP, "RD Compare Swap "}, |
1481 | | { RD_FETCH_ADD, "RD Fetch Add "}, |
1482 | | { RD_RESYNC, "RD RESYNC "}, |
1483 | | { RD_FLUSH, "RD Flush "}, |
1484 | | { RD_ATOMIC_WRITE, "RD Atomic Write " }, |
1485 | | |
1486 | | { UD_SEND_ONLY, "UD Send Only "}, |
1487 | | { UD_SEND_ONLY_IMM, "UD Send Only Immediate "}, |
1488 | | |
1489 | | { UC_SEND_FIRST, "UC Send First "}, |
1490 | | { UC_SEND_MIDDLE, "UC Send Middle "}, |
1491 | | { UC_SEND_LAST, "UC Send Last "}, |
1492 | | { UC_SEND_LAST_IMM, "UC Send Last Immediate "}, |
1493 | | { UC_SEND_ONLY, "UC Send Only "}, |
1494 | | { UC_SEND_ONLY_IMM, "UC Send Only Immediate "}, |
1495 | | { UC_RDMA_WRITE_FIRST, "UC RDMA Write First"}, |
1496 | | { UC_RDMA_WRITE_MIDDLE, "UC RDMA Write Middle "}, |
1497 | | { UC_RDMA_WRITE_LAST, "UC RDMA Write Last "}, |
1498 | | { UC_RDMA_WRITE_LAST_IMM, "UC RDMA Write Last Immediate "}, |
1499 | | { UC_RDMA_WRITE_ONLY, "UC RDMA Write Only "}, |
1500 | | { UC_RDMA_WRITE_ONLY_IMM, "UC RDMA Write Only Immediate "}, |
1501 | | { 0, NULL} |
1502 | | }; |
1503 | | |
1504 | | /* Mellanox DCT has the same opcodes as RD so will use the same RD macros */ |
1505 | | static const value_string DctOpCodeMap[] = |
1506 | | { |
1507 | | { RD_SEND_FIRST, "DC Send First "}, |
1508 | | { RD_SEND_MIDDLE, "DC Send Middle " }, |
1509 | | { RD_SEND_LAST, "DC Send Last "}, |
1510 | | { RD_SEND_LAST_IMM, "DC Last Immediate " }, |
1511 | | { RD_SEND_ONLY, "DC Send Only "}, |
1512 | | { RD_SEND_ONLY_IMM, "DC Send Only Immediate "}, |
1513 | | { RD_RDMA_WRITE_FIRST, "DC RDMA Write First "}, |
1514 | | { RD_RDMA_WRITE_MIDDLE, "DC RDMA Write Middle "}, |
1515 | | { RD_RDMA_WRITE_LAST, "DC RDMA Write Last "}, |
1516 | | { RD_RDMA_WRITE_LAST_IMM, "DC RDMA Write Last Immediate "}, |
1517 | | { RD_RDMA_WRITE_ONLY, "DC RDMA Write Only "}, |
1518 | | { RD_RDMA_WRITE_ONLY_IMM, "DC RDMA Write Only Immediate "}, |
1519 | | { RD_RDMA_READ_REQUEST, "DC RDMA Read Request "}, |
1520 | | { RD_RDMA_READ_RESPONSE_FIRST, "DC RDMA Read Response First "}, |
1521 | | { RD_RDMA_READ_RESPONSE_MIDDLE, "DC RDMA Read Response Middle "}, |
1522 | | { RD_RDMA_READ_RESPONSE_LAST, "DC RDMA Read Response Last "}, |
1523 | | { RD_RDMA_READ_RESPONSE_ONLY, "DC RDMA Read Response Only "}, |
1524 | | { RD_ACKNOWLEDGE, "DC Acknowledge "}, |
1525 | | { RD_ATOMIC_ACKNOWLEDGE, "DC Atomic Acknowledge "}, |
1526 | | { RD_CMP_SWAP, "DC Compare Swap "}, |
1527 | | { RD_FETCH_ADD, "DC Fetch Add "}, |
1528 | | { RD_RESYNC, "DC Unknown Opcode "}, |
1529 | | { 0, NULL} |
1530 | | }; |
1531 | | |
1532 | | /* Header Ordering Based on OPCODES |
1533 | | * These are simply an enumeration of the possible header combinations defined by the IB Spec. |
1534 | | * These enumerations |
1535 | | * #DEFINE [HEADER_ORDER] [ENUM] |
1536 | | * __________________________________ */ |
1537 | 20 | #define RDETH_DETH_PAYLD 0 |
1538 | | /* __________________________________ */ |
1539 | 12 | #define RDETH_DETH_RETH_PAYLD 1 |
1540 | | /* __________________________________ */ |
1541 | 28 | #define RDETH_DETH_IMMDT_PAYLD 2 |
1542 | | /* __________________________________ */ |
1543 | 22 | #define RDETH_DETH_RETH_IMMDT_PAYLD 3 |
1544 | | /* __________________________________ */ |
1545 | 4 | #define RDETH_DETH_RETH 4 |
1546 | | /* __________________________________ */ |
1547 | 12 | #define RDETH_AETH_PAYLD 5 |
1548 | | /* __________________________________ */ |
1549 | 4 | #define RDETH_PAYLD 6 |
1550 | | /* __________________________________ */ |
1551 | 8 | #define RDETH_AETH 7 |
1552 | | /* __________________________________ */ |
1553 | 2 | #define RDETH_AETH_ATOMICACKETH 8 |
1554 | | /* __________________________________ */ |
1555 | 12 | #define RDETH_DETH_ATOMICETH 9 |
1556 | | /* ___________________________________ */ |
1557 | 0 | #define RDETH_DETH 10 |
1558 | | /* ___________________________________ */ |
1559 | 14 | #define DETH_PAYLD 11 |
1560 | | /* ___________________________________ */ |
1561 | 14 | #define DETH_IMMDT_PAYLD 12 |
1562 | | /* ___________________________________ */ |
1563 | 854 | #define PAYLD 13 |
1564 | | /* ___________________________________ */ |
1565 | 70 | #define IMMDT_PAYLD 14 |
1566 | | /* ___________________________________ */ |
1567 | 40 | #define RETH_PAYLD 15 |
1568 | | /* ___________________________________ */ |
1569 | 18 | #define RETH_IMMDT_PAYLD 16 |
1570 | | /* ___________________________________ */ |
1571 | 6 | #define RETH 17 |
1572 | | /* ___________________________________ */ |
1573 | 46 | #define AETH_PAYLD 18 |
1574 | | /* ___________________________________ */ |
1575 | 8 | #define AETH 19 |
1576 | | /* ___________________________________ */ |
1577 | 6 | #define AETH_ATOMICACKETH 20 |
1578 | | /* ___________________________________ */ |
1579 | 28 | #define ATOMICETH 21 |
1580 | | /* ___________________________________ */ |
1581 | 38 | #define IETH_PAYLD 22 |
1582 | | /* ___________________________________ */ |
1583 | 46 | #define DCCETH 23 |
1584 | | /* ___________________________________ */ |
1585 | 4 | #define FETH_RETH 24 |
1586 | | /* ___________________________________ */ |
1587 | 4 | #define RDETH_FETH_RETH 25 |
1588 | | /* ___________________________________ */ |
1589 | 4 | #define RDETH_RETH_PAYLD 26 |
1590 | | /* ___________________________________ */ |
1591 | | |
1592 | | |
1593 | | /* Infiniband transport services |
1594 | | These are an enumeration of the transport services over which an IB packet |
1595 | | might be sent. The values match the corresponding 3 bits of the opCode field |
1596 | | in the BTH */ |
1597 | | #define TRANSPORT_RC 0 |
1598 | | #define TRANSPORT_UC 1 |
1599 | | #define TRANSPORT_RD 2 |
1600 | 287 | #define TRANSPORT_UD 3 |
1601 | | |
1602 | 16 | #define AETH_SYNDROME_RES 0x80 |
1603 | 16 | #define AETH_SYNDROME_OPCODE 0x60 |
1604 | 64 | #define AETH_SYNDROME_VALUE 0x1F |
1605 | | |
1606 | | |
1607 | | /* Array of all available OpCodes to make matching a bit easier. |
1608 | | * The OpCodes dictate the header sequence following in the packet. |
1609 | | * These arrays tell the dissector which headers must be decoded for the given OpCode. */ |
1610 | | static uint32_t opCode_RDETH_DETH_ATOMICETH[] = { |
1611 | | RD_CMP_SWAP, |
1612 | | RD_FETCH_ADD |
1613 | | }; |
1614 | | static uint32_t opCode_IETH_PAYLD[] = { |
1615 | | RC_SEND_LAST_INVAL, |
1616 | | RC_SEND_ONLY_INVAL |
1617 | | }; |
1618 | | static uint32_t opCode_ATOMICETH[] = { |
1619 | | RC_CMP_SWAP, |
1620 | | RC_FETCH_ADD |
1621 | | }; |
1622 | | static uint32_t opCode_RDETH_DETH_RETH_PAYLD[] = { |
1623 | | RD_RDMA_WRITE_FIRST, |
1624 | | RD_RDMA_WRITE_ONLY |
1625 | | }; |
1626 | | static uint32_t opCode_RETH_IMMDT_PAYLD[] = { |
1627 | | RC_RDMA_WRITE_ONLY_IMM, |
1628 | | UC_RDMA_WRITE_ONLY_IMM |
1629 | | }; |
1630 | | static uint32_t opCode_RDETH_DETH_IMMDT_PAYLD[] = { |
1631 | | RD_SEND_LAST_IMM, |
1632 | | RD_SEND_ONLY_IMM, |
1633 | | RD_RDMA_WRITE_LAST_IMM |
1634 | | }; |
1635 | | |
1636 | | static uint32_t opCode_RDETH_AETH_PAYLD[] = { |
1637 | | RD_RDMA_READ_RESPONSE_FIRST, |
1638 | | RD_RDMA_READ_RESPONSE_LAST, |
1639 | | RD_RDMA_READ_RESPONSE_ONLY |
1640 | | }; |
1641 | | static uint32_t opCode_AETH_PAYLD[] = { |
1642 | | RC_RDMA_READ_RESPONSE_FIRST, |
1643 | | RC_RDMA_READ_RESPONSE_LAST, |
1644 | | RC_RDMA_READ_RESPONSE_ONLY |
1645 | | }; |
1646 | | static uint32_t opCode_RETH_PAYLD[] = { |
1647 | | RC_RDMA_WRITE_FIRST, |
1648 | | RC_RDMA_WRITE_ONLY, |
1649 | | UC_RDMA_WRITE_FIRST, |
1650 | | UC_RDMA_WRITE_ONLY |
1651 | | }; |
1652 | | |
1653 | | static uint32_t opCode_RDETH_DETH_PAYLD[] = { |
1654 | | RD_SEND_FIRST, |
1655 | | RD_SEND_MIDDLE, |
1656 | | RD_SEND_LAST, |
1657 | | RD_SEND_ONLY, |
1658 | | RD_RDMA_WRITE_MIDDLE, |
1659 | | RD_RDMA_WRITE_LAST |
1660 | | }; |
1661 | | |
1662 | | static uint32_t opCode_IMMDT_PAYLD[] = { |
1663 | | RC_SEND_LAST_IMM, |
1664 | | RC_SEND_ONLY_IMM, |
1665 | | RC_RDMA_WRITE_LAST_IMM, |
1666 | | UC_SEND_LAST_IMM, |
1667 | | UC_SEND_ONLY_IMM, |
1668 | | UC_RDMA_WRITE_LAST_IMM |
1669 | | }; |
1670 | | |
1671 | | static uint32_t opCode_PAYLD[] = { |
1672 | | RC_SEND_FIRST, |
1673 | | RC_SEND_MIDDLE, |
1674 | | RC_SEND_LAST, |
1675 | | RC_SEND_ONLY, |
1676 | | RC_RDMA_WRITE_MIDDLE, |
1677 | | RC_RDMA_WRITE_LAST, |
1678 | | RC_RDMA_READ_RESPONSE_MIDDLE, |
1679 | | UC_SEND_FIRST, |
1680 | | UC_SEND_MIDDLE, |
1681 | | UC_SEND_LAST, |
1682 | | UC_SEND_ONLY, |
1683 | | UC_RDMA_WRITE_MIDDLE, |
1684 | | UC_RDMA_WRITE_LAST |
1685 | | }; |
1686 | | |
1687 | | /* It is not necessary to create arrays for these OpCodes since they indicate only one further header. |
1688 | | * We can just decode it directly |
1689 | | |
1690 | | * static uint32_t opCode_DETH_IMMDT_PAYLD[] = { |
1691 | | * UD_SEND_ONLY_IMM |
1692 | | * }; |
1693 | | * static uint32_t opCode_DETH_PAYLD[] = { |
1694 | | * UD_SEND_ONLY |
1695 | | * }; |
1696 | | * static uint32_t opCode_RDETH_DETH[] = { |
1697 | | * RD_RESYNC |
1698 | | * }; |
1699 | | * static uint32_t opCode_RDETH_DETH_RETH[] = { |
1700 | | * RD_RDMA_READ_REQUEST |
1701 | | * }; |
1702 | | * static uint32_t opCode_RDETH_DETH_RETH_IMMDT_PAYLD[] = { |
1703 | | * RD_RDMA_WRITE_ONLY_IMM |
1704 | | * }; |
1705 | | * static uint32_t opCode_RDETH_AETH_ATOMICACKETH[] = { |
1706 | | * RD_ATOMIC_ACKNOWLEDGE |
1707 | | * }; |
1708 | | * static uint32_t opCode_RDETH_AETH[] = { |
1709 | | * RD_ACKNOWLEDGE |
1710 | | * }; |
1711 | | * static uint32_t opCode_RDETH_PAYLD[] = { |
1712 | | * RD_RDMA_READ_RESPONSE_MIDDLE |
1713 | | * }; |
1714 | | * static uint32_t opCode_AETH_ATOMICACKETH[] = { |
1715 | | * RC_ATOMIC_ACKNOWLEDGE |
1716 | | * }; |
1717 | | * static uint32_t opCode_RETH[] = { |
1718 | | * RC_RDMA_READ_REQUEST |
1719 | | * }; |
1720 | | * static uint32_t opCode_AETH[] = { |
1721 | | * RC_ACKNOWLEDGE |
1722 | | * }; */ |
1723 | | |
1724 | | /* settings to be set by the user via the preferences dialog */ |
1725 | | static unsigned pref_rroce_udp_port = DEFAULT_RROCE_UDP_PORT; |
1726 | | static bool try_heuristic_first = true; |
1727 | | |
1728 | | /* saves information about connections that have been/are in the process of being |
1729 | | negotiated via ConnectionManagement packets */ |
1730 | | typedef struct { |
1731 | | uint8_t req_gid[GID_SIZE], |
1732 | | resp_gid[GID_SIZE]; /* GID of requester/responder, respectively */ |
1733 | | uint16_t req_lid, |
1734 | | resp_lid; /* LID of requester/responder, respectively */ |
1735 | | uint32_t req_qp, |
1736 | | resp_qp; /* QP number of requester/responder, respectively */ |
1737 | | uint64_t service_id; /* service id for this connection */ |
1738 | | } connection_context; |
1739 | | |
1740 | | /* holds a table of connection contexts being negotiated by CM. the key is a obtained |
1741 | | using add_address_to_hash64(initiator address, TransactionID) */ |
1742 | | static GHashTable *CM_context_table; |
1743 | | |
1744 | | /* heuristics sub-dissectors list for dissecting the data payload of IB packets */ |
1745 | | static heur_dissector_list_t heur_dissectors_payload; |
1746 | | /* heuristics sub-dissectors list for dissecting the PrivateData of CM packets */ |
1747 | | static heur_dissector_list_t heur_dissectors_cm_private; |
1748 | | |
1749 | | /* ----- This sections contains various utility functions indirectly related to Infiniband dissection ---- */ |
1750 | | static void infiniband_payload_prompt(packet_info *pinfo _U_, char* result) |
1751 | 0 | { |
1752 | 0 | snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "Dissect Infiniband payload as"); |
1753 | 0 | } |
1754 | | |
1755 | 0 | static void table_destroy_notify(void *data) { |
1756 | 0 | g_free(data); |
1757 | 0 | } |
1758 | | |
1759 | | /* --------------------------------------------------------------------------------------------------------*/ |
1760 | | /* Helper dissector for correctly dissecting RRoCE packets (encapsulated within an IP */ |
1761 | | /* frame). The only difference from regular IB packets is that RRoCE packets do not contain */ |
1762 | | /* a LRH, and always start with a BTH. */ |
1763 | | static int |
1764 | | dissect_rroce(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
1765 | 306 | { |
1766 | | /* |
1767 | | * this is a RRoCE packet so signal the IB dissector not to look for LRH/GRH |
1768 | | * |
1769 | | * We also make sure to reset pinfo->{ptype,srcport,destport} so |
1770 | | * that PT_IBQP is only set temporary, so that Follow UDP Stream |
1771 | | * still works. |
1772 | | */ |
1773 | 306 | port_type saved_ptype = pinfo->ptype; |
1774 | 306 | uint32_t saved_srcport = pinfo->srcport; |
1775 | 306 | uint32_t saved_destport = pinfo->destport; |
1776 | 306 | dissect_infiniband_common(tvb, pinfo, tree, IB_PACKET_STARTS_WITH_BTH); |
1777 | 306 | pinfo->ptype = saved_ptype; |
1778 | 306 | pinfo->srcport = saved_srcport; |
1779 | 306 | pinfo->destport = saved_destport; |
1780 | 306 | return tvb_captured_length(tvb); |
1781 | 306 | } |
1782 | | |
1783 | | /* Helper dissector for correctly dissecting RoCE packets (encapsulated within an Ethernet */ |
1784 | | /* frame). The only difference from regular IB packets is that RoCE packets do not contain */ |
1785 | | /* a LRH, and always start with a GRH. */ |
1786 | | static int |
1787 | | dissect_roce(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
1788 | 419 | { |
1789 | | /* this is a RoCE packet, so signal the IB dissector not to look for LRH */ |
1790 | 419 | dissect_infiniband_common(tvb, pinfo, tree, IB_PACKET_STARTS_WITH_GRH); |
1791 | 419 | return tvb_captured_length(tvb); |
1792 | 419 | } |
1793 | | |
1794 | | static int |
1795 | | dissect_infiniband(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
1796 | 0 | { |
1797 | 0 | dissect_infiniband_common(tvb, pinfo, tree, IB_PACKET_STARTS_WITH_LRH); |
1798 | 0 | return tvb_captured_length(tvb); |
1799 | 0 | } |
1800 | | |
1801 | | /* Common Dissector for both InfiniBand and RoCE packets |
1802 | | * IN: |
1803 | | * tvb - The tvbuf of packet data |
1804 | | * pinfo - The packet info structure with column information |
1805 | | * tree - The tree structure under which field nodes are to be added |
1806 | | * starts_with - regular IB packet starts with LRH, ROCE starts with GRH and RROCE starts with BTH, |
1807 | | * this tells the parser what headers of (LRH/GRH) to skip. |
1808 | | * Notes: |
1809 | | * 1.) Floating "offset+=" statements should probably be "functionized" but they are inline |
1810 | | * Offset is only passed by reference in specific places, so do not be confused when following code |
1811 | | * In any code path, adding up "offset+=" statements will tell you what byte you are at */ |
1812 | | static void |
1813 | | dissect_infiniband_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ib_packet_start_header starts_with) |
1814 | 725 | { |
1815 | | /* Top Level Item */ |
1816 | 725 | proto_item *infiniband_packet; |
1817 | | |
1818 | | /* The Headers Subtree */ |
1819 | 725 | proto_tree *all_headers_tree; |
1820 | | |
1821 | | /* BTH - Base Transport Header */ |
1822 | 725 | bool dctBthHeader = false; |
1823 | 725 | int bthSize = 12; |
1824 | | |
1825 | | /* LRH - Local Route Header */ |
1826 | 725 | proto_item *local_route_header_item; |
1827 | 725 | proto_tree *local_route_header_tree; |
1828 | | |
1829 | | /* Raw Data */ |
1830 | 725 | proto_item *RAWDATA_header_item; |
1831 | 725 | uint8_t lnh_val; /* Link Next Header Value */ |
1832 | 725 | unsigned offset = 0; /* Current Offset */ |
1833 | | |
1834 | | /* General Variables */ |
1835 | 725 | bool bthFollows = false; /* Tracks if we are parsing a BTH. This is a significant decision point */ |
1836 | 725 | struct infinibandinfo info = { NULL, 0, 0, 0, 0, 0, 0, 0, false, false}; |
1837 | 725 | int32_t nextHeaderSequence = -1; /* defined by this dissector. #define which indicates the upcoming header sequence from OpCode */ |
1838 | 725 | uint8_t nxtHdr = 0; /* Keyed off for header dissection order */ |
1839 | 725 | uint16_t packetLength = 0; /* Packet Length. We track this as tvb_length - offset. */ |
1840 | | /* It provides the parsing methods a known size */ |
1841 | | /* that must be available for that header. */ |
1842 | 725 | int crc_length = 0; |
1843 | 725 | int crclen = 6; |
1844 | | |
1845 | 725 | void *src_addr, /* the address to be displayed in the source/destination columns */ |
1846 | 725 | *dst_addr; /* (lid/gid number) will be stored here */ |
1847 | | |
1848 | 725 | pinfo->srcport = pinfo->destport = 0xffffffff; /* set the src/dest QPN to something impossible instead of the default 0, |
1849 | | so we don't mistake it for a MAD. (QP is only 24bit, so can't be 0xffffffff)*/ |
1850 | | |
1851 | 725 | pinfo->ptype = PT_IBQP; /* set the port-type for this packet to be Infiniband QP number */ |
1852 | | |
1853 | | /* Mark the Packet type as Infiniband in the wireshark UI */ |
1854 | | /* Clear other columns */ |
1855 | 725 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "InfiniBand"); |
1856 | 725 | col_clear(pinfo->cinfo, COL_INFO); |
1857 | | |
1858 | | /* Top Level Packet */ |
1859 | 725 | infiniband_packet = proto_tree_add_item(tree, proto_infiniband, tvb, offset, -1, ENC_NA); |
1860 | | |
1861 | | /* Headers Level Tree */ |
1862 | 725 | all_headers_tree = proto_item_add_subtree(infiniband_packet, ett_all_headers); |
1863 | | |
1864 | 725 | if (starts_with == IB_PACKET_STARTS_WITH_GRH) { |
1865 | | /* this is a RoCE packet, skip LRH parsing */ |
1866 | 419 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "RoCE"); |
1867 | 419 | lnh_val = IBA_GLOBAL; |
1868 | 419 | packetLength = tvb_reported_length_remaining(tvb, offset); |
1869 | 419 | crclen = 4; |
1870 | 419 | goto skip_lrh; |
1871 | 419 | } |
1872 | 306 | else if (starts_with == IB_PACKET_STARTS_WITH_BTH) { |
1873 | | /* this is a RRoCE packet, skip LRH/GRH parsing and go directly to BTH */ |
1874 | 306 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "RRoCE"); |
1875 | 306 | lnh_val = IBA_LOCAL; |
1876 | 306 | packetLength = tvb_reported_length_remaining(tvb, offset); |
1877 | 306 | crclen = 4; |
1878 | 306 | goto skip_lrh; |
1879 | 306 | } |
1880 | | |
1881 | | /* Local Route Header Subtree */ |
1882 | 0 | local_route_header_item = proto_tree_add_item(all_headers_tree, hf_infiniband_LRH, tvb, offset, 8, ENC_NA); |
1883 | 0 | proto_item_set_text(local_route_header_item, "%s", "Local Route Header"); |
1884 | 0 | local_route_header_tree = proto_item_add_subtree(local_route_header_item, ett_lrh); |
1885 | |
|
1886 | 0 | proto_tree_add_item(local_route_header_tree, hf_infiniband_virtual_lane, tvb, offset, 1, ENC_BIG_ENDIAN); |
1887 | |
|
1888 | 0 | proto_tree_add_item(local_route_header_tree, hf_infiniband_link_version, tvb, offset, 1, ENC_BIG_ENDIAN); |
1889 | 0 | offset += 1; |
1890 | 0 | proto_tree_add_item(local_route_header_tree, hf_infiniband_service_level, tvb, offset, 1, ENC_BIG_ENDIAN); |
1891 | |
|
1892 | 0 | proto_tree_add_item(local_route_header_tree, hf_infiniband_reserved2, tvb, offset, 1, ENC_NA); |
1893 | 0 | proto_tree_add_item(local_route_header_tree, hf_infiniband_link_next_header, tvb, offset, 1, ENC_BIG_ENDIAN); |
1894 | | |
1895 | | |
1896 | | /* Save Link Next Header... This tells us what the next header is. */ |
1897 | 0 | lnh_val = tvb_get_uint8(tvb, offset); |
1898 | 0 | lnh_val = lnh_val & 0x03; |
1899 | 0 | offset += 1; |
1900 | | |
1901 | |
|
1902 | 0 | proto_tree_add_item(local_route_header_tree, hf_infiniband_destination_local_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
1903 | | |
1904 | | |
1905 | | /* Set destination in packet view. */ |
1906 | 0 | dst_addr = wmem_alloc(pinfo->pool, sizeof(uint16_t)); |
1907 | 0 | *((uint16_t*) dst_addr) = tvb_get_ntohs(tvb, offset); |
1908 | 0 | set_address(&pinfo->dst, AT_IB, sizeof(uint16_t), dst_addr); |
1909 | |
|
1910 | 0 | offset += 2; |
1911 | |
|
1912 | 0 | proto_tree_add_item(local_route_header_tree, hf_infiniband_reserved5, tvb, offset, 2, ENC_BIG_ENDIAN); |
1913 | |
|
1914 | 0 | packetLength = tvb_get_ntohs(tvb, offset); /* Get the Packet Length. This will determine payload size later on. */ |
1915 | 0 | packetLength = packetLength & 0x07FF; /* Mask off top 5 bits, they are reserved */ |
1916 | 0 | packetLength = packetLength * 4; /* Multiply by 4 to get true byte length. This is by specification. */ |
1917 | | /* PktLen is size in 4 byte words (byteSize /4). */ |
1918 | |
|
1919 | 0 | proto_tree_add_item(local_route_header_tree, hf_infiniband_packet_length, tvb, offset, 2, ENC_BIG_ENDIAN); |
1920 | 0 | offset += 2; |
1921 | 0 | proto_tree_add_item(local_route_header_tree, hf_infiniband_source_local_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
1922 | | |
1923 | | /* Set Source in packet view. */ |
1924 | 0 | src_addr = wmem_alloc(pinfo->pool, sizeof(uint16_t)); |
1925 | 0 | *((uint16_t*) src_addr) = tvb_get_ntohs(tvb, offset); |
1926 | 0 | set_address(&pinfo->src, AT_IB, sizeof(uint16_t), src_addr); |
1927 | |
|
1928 | 0 | offset += 2; |
1929 | 0 | packetLength -= 8; /* Shave 8 bytes for the LRH. */ |
1930 | |
|
1931 | 725 | skip_lrh: |
1932 | | |
1933 | | /* Key off Link Next Header. This tells us what High Level Data Format we have */ |
1934 | 725 | switch (lnh_val) |
1935 | 725 | { |
1936 | 419 | case IBA_GLOBAL: { |
1937 | 419 | proto_item *global_route_header_item; |
1938 | 419 | proto_tree *global_route_header_tree; |
1939 | | |
1940 | 419 | global_route_header_item = proto_tree_add_item(all_headers_tree, hf_infiniband_GRH, tvb, offset, 40, ENC_NA); |
1941 | 419 | proto_item_set_text(global_route_header_item, "%s", "Global Route Header"); |
1942 | 419 | global_route_header_tree = proto_item_add_subtree(global_route_header_item, ett_grh); |
1943 | | |
1944 | 419 | proto_tree_add_item(global_route_header_tree, hf_infiniband_ip_version, tvb, offset, 1, ENC_BIG_ENDIAN); |
1945 | 419 | proto_tree_add_item(global_route_header_tree, hf_infiniband_traffic_class, tvb, offset, 2, ENC_BIG_ENDIAN); |
1946 | 419 | proto_tree_add_item(global_route_header_tree, hf_infiniband_flow_label, tvb, offset, 4, ENC_BIG_ENDIAN); |
1947 | 419 | offset += 4; |
1948 | | |
1949 | 419 | proto_tree_add_item(global_route_header_tree, hf_infiniband_payload_length, tvb, offset, 2, ENC_BIG_ENDIAN); |
1950 | 419 | offset += 2; |
1951 | | |
1952 | 419 | nxtHdr = tvb_get_uint8(tvb, offset); |
1953 | | |
1954 | 419 | proto_tree_add_item(global_route_header_tree, hf_infiniband_next_header, tvb, offset, 1, ENC_BIG_ENDIAN); |
1955 | 419 | offset += 1; |
1956 | 419 | proto_tree_add_item(global_route_header_tree, hf_infiniband_hop_limit, tvb, offset, 1, ENC_BIG_ENDIAN); |
1957 | 419 | offset += 1; |
1958 | 419 | proto_tree_add_item(global_route_header_tree, hf_infiniband_source_gid, tvb, offset, 16, ENC_NA); |
1959 | | |
1960 | | /* set source GID in packet view*/ |
1961 | 419 | set_address_tvb(&pinfo->src, AT_IB, GID_SIZE, tvb, offset); |
1962 | 419 | offset += 16; |
1963 | | |
1964 | 419 | proto_tree_add_item(global_route_header_tree, hf_infiniband_destination_gid, tvb, offset, 16, ENC_NA); |
1965 | | /* set destination GID in packet view*/ |
1966 | 419 | set_address_tvb(&pinfo->dst, AT_IB, GID_SIZE, tvb, offset); |
1967 | | |
1968 | 419 | offset += 16; |
1969 | 419 | packetLength -= 40; /* Shave 40 bytes for GRH */ |
1970 | | |
1971 | 419 | if (nxtHdr != 0x1B) |
1972 | 19 | { |
1973 | | /* Some kind of packet being transported globally with IBA, but locally it is not IBA - no BTH following. */ |
1974 | 19 | break; |
1975 | 19 | } |
1976 | 419 | } |
1977 | | /* otherwise fall through and start parsing BTH */ |
1978 | | /* FALL THROUGH */ |
1979 | 706 | case IBA_LOCAL: { |
1980 | 706 | proto_item *base_transport_header_item; |
1981 | 706 | proto_tree *base_transport_header_tree; |
1982 | 706 | bthFollows = true; |
1983 | | /* Get the OpCode - this tells us what headers are following */ |
1984 | 706 | info.opCode = tvb_get_uint8(tvb, offset); |
1985 | 706 | info.pad_count = (tvb_get_uint8(tvb, offset+1) & 0x30) >> 4; |
1986 | | |
1987 | 706 | if ((info.opCode >> 5) == 0x2) { |
1988 | 90 | info.dctConnect = !(tvb_get_uint8(tvb, offset + 1) & 0x80); |
1989 | 90 | dctBthHeader = true; |
1990 | 90 | bthSize += 8; |
1991 | 90 | } |
1992 | | |
1993 | 706 | base_transport_header_item = proto_tree_add_item(all_headers_tree, hf_infiniband_BTH, tvb, offset, bthSize, ENC_NA); |
1994 | 706 | proto_item_set_text(base_transport_header_item, "%s", "Base Transport Header"); |
1995 | 706 | base_transport_header_tree = proto_item_add_subtree(base_transport_header_item, ett_bth); |
1996 | 706 | proto_tree_add_item(base_transport_header_tree, hf_infiniband_opcode, tvb, offset, 1, ENC_BIG_ENDIAN); |
1997 | | |
1998 | 706 | if (dctBthHeader) { |
1999 | | /* since DCT uses the same opcodes as RD we will use another name mapping */ |
2000 | 89 | col_append_str(pinfo->cinfo, COL_INFO, val_to_str_const((uint32_t)info.opCode, DctOpCodeMap, "Unknown OpCode ")); |
2001 | 89 | } |
2002 | 617 | else { |
2003 | 617 | col_append_str(pinfo->cinfo, COL_INFO, val_to_str_const((uint32_t)info.opCode, OpCodeMap, "Unknown OpCode ")); |
2004 | 617 | } |
2005 | 706 | offset += 1; |
2006 | | |
2007 | 706 | proto_tree_add_item(base_transport_header_tree, hf_infiniband_solicited_event, tvb, offset, 1, ENC_BIG_ENDIAN); |
2008 | 706 | proto_tree_add_item(base_transport_header_tree, hf_infiniband_migreq, tvb, offset, 1, ENC_BIG_ENDIAN); |
2009 | 706 | proto_tree_add_item(base_transport_header_tree, hf_infiniband_pad_count, tvb, offset, 1, ENC_BIG_ENDIAN); |
2010 | 706 | proto_tree_add_item(base_transport_header_tree, hf_infiniband_transport_header_version, tvb, offset, 1, ENC_BIG_ENDIAN); |
2011 | 706 | offset += 1; |
2012 | 706 | proto_tree_add_item(base_transport_header_tree, hf_infiniband_partition_key, tvb, offset, 2, ENC_BIG_ENDIAN); |
2013 | 706 | offset += 2; |
2014 | 706 | proto_tree_add_item(base_transport_header_tree, hf_infiniband_reserved, tvb, offset, 1, ENC_NA); |
2015 | 706 | offset += 1; |
2016 | 706 | proto_tree_add_item_ret_uint(base_transport_header_tree, hf_infiniband_destination_qp, tvb, offset, 3, ENC_BIG_ENDIAN, &pinfo->destport); |
2017 | 706 | col_append_fstr(pinfo->cinfo, COL_INFO, "QP=0x%06x ", pinfo->destport); |
2018 | 706 | offset += 3; |
2019 | 706 | proto_tree_add_item(base_transport_header_tree, hf_infiniband_acknowledge_request, tvb, offset, 1, ENC_BIG_ENDIAN); |
2020 | 706 | proto_tree_add_item(base_transport_header_tree, hf_infiniband_reserved7, tvb, offset, 1, ENC_BIG_ENDIAN); |
2021 | 706 | offset += 1; |
2022 | 706 | proto_tree_add_item_ret_uint(base_transport_header_tree, hf_infiniband_packet_sequence_number, tvb, offset, 3, ENC_BIG_ENDIAN, &info.packet_seq_num); |
2023 | 706 | offset += 3; |
2024 | 706 | offset += bthSize - 12; |
2025 | 706 | packetLength -= bthSize; /* Shave bthSize for Base Transport Header */ |
2026 | 706 | } |
2027 | 706 | break; |
2028 | 0 | case IP_NON_IBA: |
2029 | | /* Raw IPv6 Packet */ |
2030 | 0 | dst_addr = wmem_strdup(pinfo->pool, "IPv6 over IB Packet"); |
2031 | 0 | set_address(&pinfo->dst, AT_STRINGZ, (int)strlen((char *)dst_addr)+1, dst_addr); |
2032 | |
|
2033 | 0 | parse_IPvSix(all_headers_tree, tvb, &offset, pinfo); |
2034 | 0 | break; |
2035 | 0 | case RAW: |
2036 | 0 | parse_RWH(all_headers_tree, tvb, &offset, pinfo, tree); |
2037 | 0 | break; |
2038 | 0 | default: |
2039 | | /* Unknown Packet */ |
2040 | 0 | RAWDATA_header_item = proto_tree_add_item(all_headers_tree, hf_infiniband_raw_data, tvb, offset, -1, ENC_NA); |
2041 | 0 | proto_item_set_text(RAWDATA_header_item, "%s", "Unknown Raw Data - IB Encapsulated"); |
2042 | 0 | break; |
2043 | 725 | } |
2044 | | |
2045 | | /* Base Transport header is hit quite often, however it is alone since it is the exception not the rule */ |
2046 | | /* Only IBA Local packets use it */ |
2047 | 696 | if (bthFollows) |
2048 | 677 | { |
2049 | | /* Find our next header sequence based on the Opcode |
2050 | | * Each case decrements the packetLength by the amount of bytes consumed by each header. |
2051 | | * The find_next_header_sequence method could be used to automate this. |
2052 | | * We need to keep track of this so we know much data to mark as payload/ICRC/VCRC values. */ |
2053 | | |
2054 | 677 | nextHeaderSequence = find_next_header_sequence(&info); |
2055 | | |
2056 | | /* find_next_header_sequence gives us the DEFINE value corresponding to the header order following */ |
2057 | | /* Enumerations are named intuitively, e.g. RDETH DETH PAYLOAD means there is an RDETH Header, DETH Header, and a packet payload */ |
2058 | 677 | switch (nextHeaderSequence) |
2059 | 677 | { |
2060 | 10 | case RDETH_DETH_PAYLD: |
2061 | 10 | parse_RDETH(all_headers_tree, tvb, &offset); |
2062 | 10 | parse_DETH(all_headers_tree, pinfo, tvb, &offset); |
2063 | | |
2064 | 10 | packetLength -= 4; /* RDETH */ |
2065 | 10 | packetLength -= 8; /* DETH */ |
2066 | | |
2067 | 10 | parse_PAYLOAD(all_headers_tree, pinfo, &info, tvb, &offset, packetLength, crclen, tree); |
2068 | 10 | break; |
2069 | 6 | case RDETH_DETH_RETH_PAYLD: |
2070 | 6 | parse_RDETH(all_headers_tree, tvb, &offset); |
2071 | 6 | parse_DETH(all_headers_tree, pinfo, tvb, &offset); |
2072 | 6 | parse_RETH(all_headers_tree, tvb, &offset, &info); |
2073 | | |
2074 | 6 | packetLength -= 4; /* RDETH */ |
2075 | 6 | packetLength -= 8; /* DETH */ |
2076 | 6 | packetLength -= 16; /* RETH */ |
2077 | | |
2078 | 6 | parse_PAYLOAD(all_headers_tree, pinfo, &info, tvb, &offset, packetLength, crclen, tree); |
2079 | 6 | break; |
2080 | 14 | case RDETH_DETH_IMMDT_PAYLD: |
2081 | 14 | parse_RDETH(all_headers_tree, tvb, &offset); |
2082 | 14 | parse_DETH(all_headers_tree, pinfo, tvb, &offset); |
2083 | 14 | parse_IMMDT(all_headers_tree, tvb, &offset); |
2084 | | |
2085 | 14 | packetLength -= 4; /* RDETH */ |
2086 | 14 | packetLength -= 8; /* DETH */ |
2087 | 14 | packetLength -= 4; /* IMMDT */ |
2088 | | |
2089 | 14 | parse_PAYLOAD(all_headers_tree, pinfo, &info, tvb, &offset, packetLength, crclen, tree); |
2090 | 14 | break; |
2091 | 11 | case RDETH_DETH_RETH_IMMDT_PAYLD: |
2092 | 11 | parse_RDETH(all_headers_tree, tvb, &offset); |
2093 | 11 | parse_DETH(all_headers_tree, pinfo, tvb, &offset); |
2094 | 11 | parse_RETH(all_headers_tree, tvb, &offset, &info); |
2095 | 11 | parse_IMMDT(all_headers_tree, tvb, &offset); |
2096 | | |
2097 | 11 | packetLength -= 4; /* RDETH */ |
2098 | 11 | packetLength -= 8; /* DETH */ |
2099 | 11 | packetLength -= 16; /* RETH */ |
2100 | 11 | packetLength -= 4; /* IMMDT */ |
2101 | | |
2102 | 11 | parse_PAYLOAD(all_headers_tree, pinfo, &info, tvb, &offset, packetLength, crclen, tree); |
2103 | 11 | break; |
2104 | 2 | case RDETH_DETH_RETH: |
2105 | 2 | parse_RDETH(all_headers_tree, tvb, &offset); |
2106 | 2 | parse_DETH(all_headers_tree, pinfo, tvb, &offset); |
2107 | 2 | parse_RETH(all_headers_tree, tvb, &offset, &info); |
2108 | | |
2109 | | /*packetLength -= 4;*/ /* RDETH */ |
2110 | | /*packetLength -= 8;*/ /* DETH */ |
2111 | | /*packetLength -= 16;*/ /* RETH */ |
2112 | | |
2113 | 2 | break; |
2114 | 6 | case RDETH_AETH_PAYLD: |
2115 | 6 | parse_RDETH(all_headers_tree, tvb, &offset); |
2116 | 6 | parse_AETH(all_headers_tree, tvb, &offset, pinfo); |
2117 | | |
2118 | 6 | packetLength -= 4; /* RDETH */ |
2119 | 6 | packetLength -= 4; /* AETH */ |
2120 | | |
2121 | 6 | parse_PAYLOAD(all_headers_tree, pinfo, &info, tvb, &offset, packetLength, crclen, tree); |
2122 | 6 | break; |
2123 | 2 | case RDETH_PAYLD: |
2124 | 2 | parse_RDETH(all_headers_tree, tvb, &offset); |
2125 | | |
2126 | 2 | packetLength -= 4; /* RDETH */ |
2127 | | |
2128 | 2 | parse_PAYLOAD(all_headers_tree, pinfo, &info, tvb, &offset, packetLength, crclen, tree); |
2129 | 2 | break; |
2130 | 4 | case RDETH_AETH: |
2131 | 4 | parse_AETH(all_headers_tree, tvb, &offset, pinfo); |
2132 | | |
2133 | | /*packetLength -= 4;*/ /* RDETH */ |
2134 | | /*packetLength -= 4;*/ /* AETH */ |
2135 | | |
2136 | | |
2137 | 4 | break; |
2138 | 1 | case RDETH_AETH_ATOMICACKETH: |
2139 | 1 | parse_RDETH(all_headers_tree, tvb, &offset); |
2140 | 1 | parse_AETH(all_headers_tree, tvb, &offset, pinfo); |
2141 | 1 | parse_ATOMICACKETH(all_headers_tree, tvb, &offset); |
2142 | | |
2143 | | /*packetLength -= 4;*/ /* RDETH */ |
2144 | | /*packetLength -= 4;*/ /* AETH */ |
2145 | | /*packetLength -= 8;*/ /* AtomicAckETH */ |
2146 | | |
2147 | | |
2148 | 1 | break; |
2149 | 6 | case RDETH_DETH_ATOMICETH: |
2150 | 6 | parse_RDETH(all_headers_tree, tvb, &offset); |
2151 | 6 | parse_DETH(all_headers_tree, pinfo, tvb, &offset); |
2152 | 6 | parse_ATOMICETH(all_headers_tree, tvb, &offset); |
2153 | | |
2154 | | /*packetLength -= 4;*/ /* RDETH */ |
2155 | | /*packetLength -= 8;*/ /* DETH */ |
2156 | | /*packetLength -= 28;*/ /* AtomicETH */ |
2157 | | |
2158 | 6 | break; |
2159 | 0 | case RDETH_DETH: |
2160 | 0 | parse_RDETH(all_headers_tree, tvb, &offset); |
2161 | 0 | parse_DETH(all_headers_tree, pinfo, tvb, &offset); |
2162 | | |
2163 | | /*packetLength -= 4;*/ /* RDETH */ |
2164 | | /*packetLength -= 8;*/ /* DETH */ |
2165 | |
|
2166 | 0 | break; |
2167 | 7 | case DETH_PAYLD: |
2168 | 7 | parse_DETH(all_headers_tree, pinfo, tvb, &offset); |
2169 | | |
2170 | 7 | packetLength -= 8; /* DETH */ |
2171 | | |
2172 | 7 | parse_PAYLOAD(all_headers_tree, pinfo, &info, tvb, &offset, packetLength, crclen, tree); |
2173 | 7 | break; |
2174 | 427 | case PAYLD: |
2175 | | |
2176 | 427 | parse_PAYLOAD(all_headers_tree, pinfo, &info, tvb, &offset, packetLength, crclen, tree); |
2177 | 427 | break; |
2178 | 35 | case IMMDT_PAYLD: |
2179 | 35 | parse_IMMDT(all_headers_tree, tvb, &offset); |
2180 | | |
2181 | 35 | packetLength -= 4; /* IMMDT */ |
2182 | | |
2183 | 35 | parse_PAYLOAD(all_headers_tree, pinfo, &info, tvb, &offset, packetLength, crclen, tree); |
2184 | 35 | break; |
2185 | 9 | case RETH_IMMDT_PAYLD: |
2186 | 9 | parse_RETH(all_headers_tree, tvb, &offset, &info); |
2187 | 9 | parse_IMMDT(all_headers_tree, tvb, &offset); |
2188 | | |
2189 | 9 | packetLength -= 16; /* RETH */ |
2190 | 9 | packetLength -= 4; /* IMMDT */ |
2191 | | |
2192 | 9 | parse_PAYLOAD(all_headers_tree, pinfo, &info, tvb, &offset, packetLength, crclen, tree); |
2193 | 9 | break; |
2194 | 20 | case RETH_PAYLD: |
2195 | 20 | parse_RETH(all_headers_tree, tvb, &offset, &info); |
2196 | | |
2197 | 20 | packetLength -= 16; /* RETH */ |
2198 | | |
2199 | 20 | parse_PAYLOAD(all_headers_tree, pinfo, &info, tvb, &offset, packetLength, crclen, tree); |
2200 | 20 | break; |
2201 | 3 | case RETH: |
2202 | 3 | parse_RETH(all_headers_tree, tvb, &offset, &info); |
2203 | | |
2204 | 3 | packetLength -= 16; /* RETH */ |
2205 | 3 | parse_PAYLOAD(all_headers_tree, pinfo, &info, tvb, &offset, packetLength, crclen, tree); |
2206 | | |
2207 | 3 | break; |
2208 | 23 | case AETH_PAYLD: |
2209 | 23 | parse_AETH(all_headers_tree, tvb, &offset, pinfo); |
2210 | | |
2211 | 23 | packetLength -= 4; /* AETH */ |
2212 | | |
2213 | 23 | parse_PAYLOAD(all_headers_tree, pinfo, &info, tvb, &offset, packetLength, crclen, tree); |
2214 | 23 | break; |
2215 | 4 | case AETH: |
2216 | 4 | parse_AETH(all_headers_tree, tvb, &offset, pinfo); |
2217 | | |
2218 | | /*packetLength -= 4;*/ /* AETH */ |
2219 | | |
2220 | 4 | break; |
2221 | 3 | case AETH_ATOMICACKETH: |
2222 | 3 | parse_AETH(all_headers_tree, tvb, &offset, pinfo); |
2223 | 3 | parse_ATOMICACKETH(all_headers_tree, tvb, &offset); |
2224 | | |
2225 | | /*packetLength -= 4;*/ /* AETH */ |
2226 | | /*packetLength -= 8;*/ /* AtomicAckETH */ |
2227 | | |
2228 | 3 | break; |
2229 | 14 | case ATOMICETH: |
2230 | 14 | parse_ATOMICETH(all_headers_tree, tvb, &offset); |
2231 | | |
2232 | | /*packetLength -= 28;*/ /* AtomicETH */ |
2233 | | |
2234 | 14 | break; |
2235 | 19 | case IETH_PAYLD: |
2236 | 19 | parse_IETH(all_headers_tree, tvb, &offset); |
2237 | | |
2238 | 19 | packetLength -= 4; /* IETH */ |
2239 | | |
2240 | 19 | parse_PAYLOAD(all_headers_tree, pinfo, &info, tvb, &offset, packetLength, crclen, tree); |
2241 | 19 | break; |
2242 | 7 | case DETH_IMMDT_PAYLD: |
2243 | 7 | parse_DETH(all_headers_tree, pinfo, tvb, &offset); |
2244 | 7 | parse_IMMDT(all_headers_tree, tvb, &offset); |
2245 | | |
2246 | 7 | packetLength -= 8; /* DETH */ |
2247 | 7 | packetLength -= 4; /* IMMDT */ |
2248 | | |
2249 | 7 | parse_PAYLOAD(all_headers_tree, pinfo, &info, tvb, &offset, packetLength, crclen, tree); |
2250 | 7 | break; |
2251 | 23 | case DCCETH: |
2252 | 23 | parse_DCCETH(all_headers_tree, tvb, &offset); |
2253 | 23 | packetLength -= 16; /* DCCETH */ |
2254 | | |
2255 | 23 | parse_PAYLOAD(all_headers_tree, pinfo, &info, tvb, &offset, packetLength, crclen, tree); |
2256 | 23 | break; |
2257 | 2 | case FETH_RETH: |
2258 | 2 | parse_FETH(all_headers_tree, tvb, &offset); |
2259 | 2 | parse_RETH(all_headers_tree, tvb, &offset, &info); |
2260 | | |
2261 | | /*packetLength -= 4;*/ /* FETH */ |
2262 | | /*packetLength -= 16;*/ /* RETH */ |
2263 | 2 | break; |
2264 | 2 | case RDETH_FETH_RETH: |
2265 | 2 | parse_RDETH(all_headers_tree, tvb, &offset); |
2266 | 2 | parse_FETH(all_headers_tree, tvb, &offset); |
2267 | 2 | parse_RETH(all_headers_tree, tvb, &offset, &info); |
2268 | | |
2269 | | /*packetLength -= 4;*/ /* RDETH */ |
2270 | | /*packetLength -= 4;*/ /* FETH */ |
2271 | | /*packetLength -= 16;*/ /* RETH */ |
2272 | 2 | break; |
2273 | 2 | case RDETH_RETH_PAYLD: |
2274 | 2 | parse_RDETH(all_headers_tree, tvb, &offset); |
2275 | 2 | parse_RETH(all_headers_tree, tvb, &offset, &info); |
2276 | | |
2277 | 2 | packetLength -= 4; |
2278 | 2 | packetLength -= 16; |
2279 | | |
2280 | 2 | parse_PAYLOAD(all_headers_tree, pinfo, &info, tvb, &offset, packetLength, crclen, tree); |
2281 | 2 | break; |
2282 | 15 | default: |
2283 | 15 | parse_VENDOR(all_headers_tree, tvb, &offset); |
2284 | 15 | break; |
2285 | | |
2286 | 677 | } |
2287 | | |
2288 | 677 | } |
2289 | | /* Display the ICRC/VCRC */ |
2290 | | /* Doing it this way rather than in a variety of places according to the specific packet */ |
2291 | | /* If we've already displayed it crc_length comes out 0 */ |
2292 | 497 | crc_length = tvb_reported_length_remaining(tvb, offset); |
2293 | 497 | if (crc_length == 6) |
2294 | 3 | { |
2295 | 3 | proto_tree_add_item(all_headers_tree, hf_infiniband_invariant_crc, tvb, offset, 4, ENC_BIG_ENDIAN); |
2296 | 3 | offset += 4; |
2297 | 3 | proto_tree_add_item(all_headers_tree, hf_infiniband_variant_crc, tvb, offset, 2, ENC_BIG_ENDIAN); |
2298 | 3 | offset += 2; |
2299 | 3 | } |
2300 | 494 | else if (crc_length == 4) |
2301 | 360 | { |
2302 | 360 | proto_tree_add_item(all_headers_tree, hf_infiniband_invariant_crc, tvb, offset, 4, ENC_BIG_ENDIAN); |
2303 | 360 | offset += 4; |
2304 | 360 | } |
2305 | 134 | else if (crc_length == 2) |
2306 | 13 | { |
2307 | 13 | proto_tree_add_item(all_headers_tree, hf_infiniband_variant_crc, tvb, offset, 2, ENC_BIG_ENDIAN); |
2308 | 13 | offset += 2; |
2309 | 13 | } |
2310 | | |
2311 | 497 | } |
2312 | | |
2313 | | static int |
2314 | | dissect_infiniband_link(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
2315 | 0 | { |
2316 | | /* Top Level Item */ |
2317 | 0 | proto_item *infiniband_link_packet; |
2318 | | |
2319 | | /* The Link Subtree */ |
2320 | 0 | proto_tree *link_tree; |
2321 | |
|
2322 | 0 | proto_item *operand_item; |
2323 | 0 | int offset = 0; /* Current Offset */ |
2324 | 0 | uint8_t operand; /* Link packet Operand */ |
2325 | |
|
2326 | 0 | operand = tvb_get_uint8(tvb, offset); |
2327 | 0 | operand = (operand & 0xF0) >> 4; |
2328 | | |
2329 | | /* Mark the Packet type as Infiniband in the wireshark UI */ |
2330 | | /* Clear other columns */ |
2331 | 0 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "InfiniBand Link"); |
2332 | 0 | col_add_str(pinfo->cinfo, COL_INFO, |
2333 | 0 | val_to_str(pinfo->pool, operand, Operand_Description, "Unknown (0x%1x)")); |
2334 | | |
2335 | | /* Assigns column values */ |
2336 | 0 | dissect_general_info(tvb, offset, pinfo, IB_PACKET_STARTS_WITH_LRH); |
2337 | | |
2338 | | /* Top Level Packet */ |
2339 | 0 | infiniband_link_packet = proto_tree_add_item(tree, proto_infiniband_link, tvb, offset, -1, ENC_NA); |
2340 | | |
2341 | | /* Headers Level Tree */ |
2342 | 0 | link_tree = proto_item_add_subtree(infiniband_link_packet, ett_link); |
2343 | |
|
2344 | 0 | operand_item = proto_tree_add_item(link_tree, hf_infiniband_link_op, tvb, offset, 2, ENC_BIG_ENDIAN); |
2345 | |
|
2346 | 0 | if (operand > 1) { |
2347 | 0 | proto_item_set_text(operand_item, "%s", "Reserved"); |
2348 | 0 | call_data_dissector(tvb, pinfo, link_tree); |
2349 | 0 | } else { |
2350 | 0 | proto_tree_add_item(link_tree, hf_infiniband_link_fctbs, tvb, offset, 2, ENC_BIG_ENDIAN); |
2351 | 0 | offset += 2; |
2352 | |
|
2353 | 0 | proto_tree_add_item(link_tree, hf_infiniband_link_vl, tvb, offset, 2, ENC_BIG_ENDIAN); |
2354 | 0 | proto_tree_add_item(link_tree, hf_infiniband_link_fccl, tvb, offset, 2, ENC_BIG_ENDIAN); |
2355 | 0 | offset += 2; |
2356 | |
|
2357 | 0 | proto_tree_add_item(link_tree, hf_infiniband_link_lpcrc, tvb, offset, 2, ENC_BIG_ENDIAN); |
2358 | 0 | } |
2359 | |
|
2360 | 0 | return tvb_captured_length(tvb); |
2361 | 0 | } |
2362 | | |
2363 | | |
2364 | | /* Description: Finds the header sequence that follows the Base Transport Header. |
2365 | | * Somwhat inefficient (should be using a single key,value pair data structure) |
2366 | | * But uses pure probability to take a stab at better efficiency. |
2367 | | * Searches largest header sequence groups first, and then finally resorts to single matches for unique header sequences |
2368 | | * IN: OpCode: The OpCode from the Base Transport Header. |
2369 | | * OUT: The Header Sequence enumeration. See Declarations for #defines from (0-22) */ |
2370 | | static int32_t |
2371 | | find_next_header_sequence(struct infinibandinfo* ibInfo) |
2372 | 677 | { |
2373 | 677 | if (ibInfo->opCode == 0x55) |
2374 | 23 | return ibInfo->dctConnect ? DCCETH : PAYLD; |
2375 | | |
2376 | 654 | if (contains(ibInfo->opCode, &opCode_PAYLD[0], (int32_t)array_length(opCode_PAYLD))) |
2377 | 427 | return PAYLD; |
2378 | | |
2379 | 227 | if (contains(ibInfo->opCode, &opCode_IMMDT_PAYLD[0], (int32_t)array_length(opCode_IMMDT_PAYLD))) |
2380 | 35 | return IMMDT_PAYLD; |
2381 | | |
2382 | 192 | if (contains(ibInfo->opCode, &opCode_RDETH_DETH_PAYLD[0], (int32_t)array_length(opCode_RDETH_DETH_PAYLD))) |
2383 | 10 | return RDETH_DETH_PAYLD; |
2384 | | |
2385 | 182 | if (contains(ibInfo->opCode, &opCode_RETH_PAYLD[0], (int32_t)array_length(opCode_RETH_PAYLD))) |
2386 | 18 | return RETH_PAYLD; |
2387 | | |
2388 | 164 | if (contains(ibInfo->opCode, &opCode_RDETH_AETH_PAYLD[0], (int32_t)array_length(opCode_RDETH_AETH_PAYLD))) |
2389 | 6 | return RDETH_AETH_PAYLD; |
2390 | | |
2391 | 158 | if (contains(ibInfo->opCode, &opCode_AETH_PAYLD[0], (int32_t)array_length(opCode_AETH_PAYLD))) |
2392 | 23 | return AETH_PAYLD; |
2393 | | |
2394 | 135 | if (contains(ibInfo->opCode, &opCode_RDETH_DETH_IMMDT_PAYLD[0], (int32_t)array_length(opCode_RDETH_DETH_IMMDT_PAYLD))) |
2395 | 14 | return RDETH_DETH_IMMDT_PAYLD; |
2396 | | |
2397 | 121 | if (contains(ibInfo->opCode, &opCode_RETH_IMMDT_PAYLD[0], (int32_t)array_length(opCode_RETH_IMMDT_PAYLD))) |
2398 | 9 | return RETH_IMMDT_PAYLD; |
2399 | | |
2400 | 112 | if (contains(ibInfo->opCode, &opCode_RDETH_DETH_RETH_PAYLD[0], (int32_t)array_length(opCode_RDETH_DETH_RETH_PAYLD))) |
2401 | 6 | return RDETH_DETH_RETH_PAYLD; |
2402 | | |
2403 | 106 | if (contains(ibInfo->opCode, &opCode_ATOMICETH[0], (int32_t)array_length(opCode_ATOMICETH))) |
2404 | 14 | return ATOMICETH; |
2405 | | |
2406 | 92 | if (contains(ibInfo->opCode, &opCode_IETH_PAYLD[0], (int32_t)array_length(opCode_IETH_PAYLD))) |
2407 | 19 | return IETH_PAYLD; |
2408 | | |
2409 | 73 | if (contains(ibInfo->opCode, &opCode_RDETH_DETH_ATOMICETH[0], (int32_t)array_length(opCode_RDETH_DETH_ATOMICETH))) |
2410 | 6 | return RDETH_DETH_ATOMICETH; |
2411 | | |
2412 | 67 | if ((ibInfo->opCode ^ RC_ACKNOWLEDGE) == 0) |
2413 | 4 | return AETH; |
2414 | | |
2415 | 63 | if ((ibInfo->opCode ^ RC_RDMA_READ_REQUEST) == 0) |
2416 | 3 | return RETH; |
2417 | | |
2418 | 60 | if ((ibInfo->opCode ^ RC_ATOMIC_ACKNOWLEDGE) == 0) |
2419 | 3 | return AETH_ATOMICACKETH; |
2420 | | |
2421 | 57 | if ((ibInfo->opCode ^ RD_RDMA_READ_RESPONSE_MIDDLE) == 0) |
2422 | 2 | return RDETH_PAYLD; |
2423 | | |
2424 | 55 | if ((ibInfo->opCode ^ RD_ACKNOWLEDGE) == 0) |
2425 | 4 | return RDETH_AETH; |
2426 | | |
2427 | 51 | if ((ibInfo->opCode ^ RD_ATOMIC_ACKNOWLEDGE) == 0) |
2428 | 1 | return RDETH_AETH_ATOMICACKETH; |
2429 | | |
2430 | 50 | if ((ibInfo->opCode ^ RD_RDMA_WRITE_ONLY_IMM) == 0) |
2431 | 11 | return RDETH_DETH_RETH_IMMDT_PAYLD; |
2432 | | |
2433 | 39 | if ((ibInfo->opCode ^ RD_RDMA_READ_REQUEST) == 0) |
2434 | 2 | return RDETH_DETH_RETH; |
2435 | | |
2436 | 37 | if ((ibInfo->opCode ^ RD_RESYNC) == 0) |
2437 | 0 | return RDETH_DETH; |
2438 | | |
2439 | 37 | if ((ibInfo->opCode ^ UD_SEND_ONLY) == 0) |
2440 | 7 | return DETH_PAYLD; |
2441 | | |
2442 | 30 | if ((ibInfo->opCode ^ UD_SEND_ONLY_IMM) == 0) |
2443 | 7 | return DETH_IMMDT_PAYLD; |
2444 | | |
2445 | 23 | if ((ibInfo->opCode ^ RC_FLUSH) == 0) |
2446 | 2 | return FETH_RETH; |
2447 | | |
2448 | 21 | if ((ibInfo->opCode ^ RD_FLUSH) == 0) |
2449 | 2 | return RDETH_FETH_RETH; |
2450 | | |
2451 | 19 | if ((ibInfo->opCode ^ RC_ATOMIC_WRITE) == 0) |
2452 | 2 | return RETH_PAYLD; |
2453 | | |
2454 | 17 | if ((ibInfo->opCode ^ RD_ATOMIC_WRITE) == 0) |
2455 | 2 | return RDETH_RETH_PAYLD; |
2456 | | |
2457 | 15 | return -1; |
2458 | 17 | } |
2459 | | |
2460 | | /* Description: Finds if a given value is present in an array. This is probably in a standard library somewhere, |
2461 | | * But I'd rather define my own. |
2462 | | * IN: OpCode: The OpCode you are looking for |
2463 | | * IN: Codes: The organized array of OpCodes to look through |
2464 | | * IN: Array length, because we're in C++... |
2465 | | * OUT: Boolean indicating if that OpCode was found in OpCodes */ |
2466 | | static bool |
2467 | | contains(uint32_t OpCode, uint32_t* Codes, int32_t length) |
2468 | 2.21k | { |
2469 | 2.21k | int32_t i; |
2470 | 11.3k | for (i = 0; i < length; i++) |
2471 | 9.71k | { |
2472 | 9.71k | if ((OpCode ^ Codes[i]) == 0) |
2473 | 587 | return true; |
2474 | 9.71k | } |
2475 | 1.62k | return false; |
2476 | 2.21k | } |
2477 | | |
2478 | | /* Parse RDETH - Reliable Datagram Extended Transport Header |
2479 | | * IN: parentTree to add the dissection to - in this code the all_headers_tree |
2480 | | * IN: tvb - the data buffer from wireshark |
2481 | | * IN/OUT: The current and updated offset */ |
2482 | | static void |
2483 | | parse_RDETH(proto_tree * parentTree, tvbuff_t *tvb, unsigned *offset) |
2484 | 62 | { |
2485 | 62 | unsigned local_offset = *offset; |
2486 | | /* RDETH - Reliable Datagram Extended Transport Header */ |
2487 | 62 | proto_item *RDETH_header_item; |
2488 | 62 | proto_tree *RDETH_header_tree; |
2489 | | |
2490 | 62 | RDETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_RDETH, tvb, local_offset, 4, ENC_NA); |
2491 | 62 | proto_item_set_text(RDETH_header_item, "%s", "RDETH - Reliable Datagram Extended Transport Header"); |
2492 | 62 | RDETH_header_tree = proto_item_add_subtree(RDETH_header_item, ett_rdeth); |
2493 | | |
2494 | 62 | proto_tree_add_item(RDETH_header_tree, hf_infiniband_reserved, tvb, local_offset, 1, ENC_NA); |
2495 | 62 | local_offset += 1; |
2496 | 62 | proto_tree_add_item(RDETH_header_tree, hf_infiniband_ee_context, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
2497 | 62 | local_offset += 3; |
2498 | 62 | *offset = local_offset; |
2499 | 62 | } |
2500 | | |
2501 | | /* Parse DETH - Datagram Extended Transport Header |
2502 | | * IN: parentTree to add the dissection to - in this code the all_headers_tree |
2503 | | * IN: tvb - the data buffer from wireshark |
2504 | | * IN/OUT: The current and updated offset */ |
2505 | | static void |
2506 | | parse_DETH(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, unsigned *offset) |
2507 | 53 | { |
2508 | 53 | unsigned local_offset = *offset; |
2509 | | /* DETH - Datagram Extended Transport Header */ |
2510 | 53 | proto_item *DETH_header_item; |
2511 | 53 | proto_tree *DETH_header_tree; |
2512 | | |
2513 | 53 | DETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_DETH, tvb, local_offset, 8, ENC_NA); |
2514 | 53 | proto_item_set_text(DETH_header_item, "%s", "DETH - Datagram Extended Transport Header"); |
2515 | 53 | DETH_header_tree = proto_item_add_subtree(DETH_header_item, ett_deth); |
2516 | | |
2517 | 53 | proto_tree_add_item(DETH_header_tree, hf_infiniband_queue_key, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
2518 | 53 | local_offset += 4; |
2519 | 53 | proto_tree_add_item(DETH_header_tree, hf_infiniband_reserved, tvb, local_offset, 1, ENC_NA); |
2520 | 53 | local_offset += 1; |
2521 | 53 | proto_tree_add_item(DETH_header_tree, hf_infiniband_source_qp, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
2522 | 53 | pinfo->srcport = tvb_get_ntoh24(tvb, local_offset); |
2523 | 53 | local_offset += 3; |
2524 | | |
2525 | 53 | *offset = local_offset; |
2526 | 53 | } |
2527 | | |
2528 | | /* Parse DCCETH - DC Connected Extended Transport Header |
2529 | | * IN: parentTree to add the dissection to - in this code the all_headers_tree |
2530 | | * IN: dctConnect - True if this is a DCT-Connect packet. |
2531 | | * IN: tvb - the data buffer from wireshark |
2532 | | * IN/OUT: The current and updated offset */ |
2533 | | static void |
2534 | | parse_DCCETH(proto_tree *parentTree _U_, tvbuff_t *tvb _U_, unsigned *offset) |
2535 | 23 | { |
2536 | | /* Do nothing just skip the header size */ |
2537 | 23 | *offset += 16; |
2538 | 23 | } |
2539 | | |
2540 | | /* Parse RETH - RDMA Extended Transport Header |
2541 | | * IN: parentTree to add the dissection to - in this code the all_headers_tree |
2542 | | * IN: tvb - the data buffer from wireshark |
2543 | | * IN/OUT: The current and updated offset |
2544 | | * OUT: Updated info->reth_remote_key |
2545 | | * OUT: Updated info->reth_dma_length */ |
2546 | | static void |
2547 | | parse_RETH(proto_tree * parentTree, tvbuff_t *tvb, unsigned *offset, |
2548 | | struct infinibandinfo *info) |
2549 | 54 | { |
2550 | 54 | unsigned local_offset = *offset; |
2551 | | /* RETH - RDMA Extended Transport Header */ |
2552 | 54 | proto_item *RETH_header_item; |
2553 | 54 | proto_tree *RETH_header_tree; |
2554 | | |
2555 | 54 | RETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_RETH, tvb, local_offset, 16, ENC_NA); |
2556 | 54 | proto_item_set_text(RETH_header_item, "%s", "RETH - RDMA Extended Transport Header"); |
2557 | 54 | RETH_header_tree = proto_item_add_subtree(RETH_header_item, ett_reth); |
2558 | | |
2559 | 54 | proto_tree_add_item_ret_uint64(RETH_header_tree, hf_infiniband_virtual_address, tvb, local_offset, 8, ENC_BIG_ENDIAN, &info->reth_remote_address); |
2560 | 54 | local_offset += 8; |
2561 | 54 | proto_tree_add_item_ret_uint(RETH_header_tree, hf_infiniband_remote_key, tvb, local_offset, 4, ENC_BIG_ENDIAN, &info->reth_remote_key); |
2562 | 54 | local_offset += 4; |
2563 | 54 | proto_tree_add_item_ret_uint(RETH_header_tree, hf_infiniband_dma_length, tvb, local_offset, 4, ENC_BIG_ENDIAN, &info->reth_dma_length); |
2564 | 54 | local_offset += 4; |
2565 | | |
2566 | 54 | *offset = local_offset; |
2567 | 54 | } |
2568 | | |
2569 | | /* Parse AtomicETH - Atomic Extended Transport Header |
2570 | | * IN: parentTree to add the dissection to - in this code the all_headers_tree |
2571 | | * IN: tvb - the data buffer from wireshark |
2572 | | * IN/OUT: The current and updated offset */ |
2573 | | static void |
2574 | | parse_ATOMICETH(proto_tree * parentTree, tvbuff_t *tvb, unsigned *offset) |
2575 | 18 | { |
2576 | 18 | unsigned local_offset = *offset; |
2577 | | /* AtomicETH - Atomic Extended Transport Header */ |
2578 | 18 | proto_item *ATOMICETH_header_item; |
2579 | 18 | proto_tree *ATOMICETH_header_tree; |
2580 | | |
2581 | 18 | ATOMICETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_AtomicETH, tvb, local_offset, 28, ENC_NA); |
2582 | 18 | proto_item_set_text(ATOMICETH_header_item, "%s", "AtomicETH - Atomic Extended Transport Header"); |
2583 | 18 | ATOMICETH_header_tree = proto_item_add_subtree(ATOMICETH_header_item, ett_atomiceth); |
2584 | | |
2585 | 18 | proto_tree_add_item(ATOMICETH_header_tree, hf_infiniband_virtual_address, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
2586 | 18 | local_offset += 8; |
2587 | 18 | proto_tree_add_item(ATOMICETH_header_tree, hf_infiniband_remote_key, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
2588 | 18 | local_offset += 4; |
2589 | 18 | proto_tree_add_item(ATOMICETH_header_tree, hf_infiniband_swap_or_add_data, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
2590 | 18 | local_offset += 8; |
2591 | 18 | proto_tree_add_item(ATOMICETH_header_tree, hf_infiniband_compare_data, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
2592 | 18 | local_offset += 8; |
2593 | 18 | *offset = local_offset; |
2594 | 18 | } |
2595 | | |
2596 | | /* Parse AETH - ACK Extended Transport Header |
2597 | | * IN: parentTree to add the dissection to - in this code the all_headers_tree |
2598 | | * IN: tvb - the data buffer from wireshark |
2599 | | * IN/OUT: The current and updated offset */ |
2600 | | static void |
2601 | | parse_AETH(proto_tree * parentTree, tvbuff_t *tvb, unsigned *offset, packet_info *pinfo) |
2602 | 39 | { |
2603 | 39 | unsigned local_offset = *offset; |
2604 | | /* AETH - ACK Extended Transport Header */ |
2605 | 39 | proto_item *AETH_header_item; |
2606 | 39 | proto_tree *AETH_header_tree; |
2607 | 39 | proto_item *AETH_syndrome_item; |
2608 | 39 | proto_tree *AETH_syndrome_tree; |
2609 | 39 | uint8_t opcode; |
2610 | 39 | uint32_t nak_error; |
2611 | | |
2612 | 39 | AETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_AETH, tvb, local_offset, 4, ENC_NA); |
2613 | 39 | proto_item_set_text(AETH_header_item, "%s", "AETH - ACK Extended Transport Header"); |
2614 | 39 | AETH_header_tree = proto_item_add_subtree(AETH_header_item, ett_aeth); |
2615 | | |
2616 | 39 | AETH_syndrome_item = proto_tree_add_item(AETH_header_tree, hf_infiniband_syndrome, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
2617 | 39 | AETH_syndrome_tree = proto_item_add_subtree(AETH_syndrome_item, ett_aeth_syndrome); |
2618 | 39 | proto_tree_add_item(AETH_syndrome_tree, hf_infiniband_syndrome_reserved, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
2619 | 39 | proto_tree_add_item_ret_uint8(AETH_syndrome_tree, hf_infiniband_syndrome_opcode, tvb, local_offset, 1, ENC_BIG_ENDIAN, &opcode); |
2620 | 39 | proto_item_append_text(AETH_syndrome_item, ", %s", val_to_str_const(opcode, aeth_syndrome_opcode_vals, "Unknown")); |
2621 | 39 | switch (opcode) |
2622 | 39 | { |
2623 | 20 | case AETH_SYNDROME_OPCODE_ACK: |
2624 | 20 | proto_tree_add_item(AETH_syndrome_tree, hf_infiniband_syndrome_credit_count, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
2625 | 20 | break; |
2626 | 3 | case AETH_SYNDROME_OPCODE_RNR_NAK: |
2627 | 3 | proto_tree_add_item(AETH_syndrome_tree, hf_infiniband_syndrome_timer, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
2628 | 3 | break; |
2629 | 5 | case AETH_SYNDROME_OPCODE_RES: |
2630 | 5 | proto_tree_add_item(AETH_syndrome_tree, hf_infiniband_syndrome_reserved_value, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
2631 | 5 | break; |
2632 | 6 | case AETH_SYNDROME_OPCODE_NAK: |
2633 | 6 | proto_tree_add_item_ret_uint(AETH_syndrome_tree, hf_infiniband_syndrome_error_code, tvb, local_offset, 1, ENC_BIG_ENDIAN, &nak_error); |
2634 | 6 | col_append_fstr(pinfo->cinfo, COL_INFO, "[%s] ", val_to_str(pinfo->pool, nak_error, aeth_syndrome_nak_error_code_vals, "Unknown (%d)")); |
2635 | 6 | break; |
2636 | 39 | } |
2637 | | |
2638 | 34 | local_offset += 1; |
2639 | 34 | proto_tree_add_item(AETH_header_tree, hf_infiniband_message_sequence_number, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
2640 | 34 | local_offset += 3; |
2641 | | |
2642 | 34 | *offset = local_offset; |
2643 | 34 | } |
2644 | | |
2645 | | /* Parse AtomicAckEth - Atomic ACK Extended Transport Header |
2646 | | * IN: parentTree to add the dissection to - in this code the all_headers_tree |
2647 | | * IN: tvb - the data buffer from wireshark |
2648 | | * IN/OUT: The current and updated offset */ |
2649 | | static void |
2650 | | parse_ATOMICACKETH(proto_tree * parentTree, tvbuff_t *tvb, unsigned *offset) |
2651 | 3 | { |
2652 | 3 | unsigned local_offset = *offset; |
2653 | | /* AtomicAckEth - Atomic ACK Extended Transport Header */ |
2654 | 3 | proto_item *ATOMICACKETH_header_item; |
2655 | 3 | proto_tree *ATOMICACKETH_header_tree; |
2656 | | |
2657 | 3 | ATOMICACKETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_AtomicAckETH, tvb, local_offset, 8, ENC_NA); |
2658 | 3 | proto_item_set_text(ATOMICACKETH_header_item, "%s", "ATOMICACKETH - Atomic ACK Extended Transport Header"); |
2659 | 3 | ATOMICACKETH_header_tree = proto_item_add_subtree(ATOMICACKETH_header_item, ett_atomicacketh); |
2660 | 3 | proto_tree_add_item(ATOMICACKETH_header_tree, hf_infiniband_original_remote_data, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
2661 | 3 | local_offset += 8; |
2662 | 3 | *offset = local_offset; |
2663 | 3 | } |
2664 | | |
2665 | | /* Parse IMMDT - Immediate Data Extended Transport Header |
2666 | | * IN: parentTree to add the dissection to - in this code the all_headers_tree |
2667 | | * IN: tvb - the data buffer from wireshark |
2668 | | * IN/OUT: The current and updated offset */ |
2669 | | static void |
2670 | | parse_IMMDT(proto_tree * parentTree, tvbuff_t *tvb, unsigned *offset) |
2671 | 68 | { |
2672 | 68 | unsigned local_offset = *offset; |
2673 | | /* IMMDT - Immediate Data Extended Transport Header */ |
2674 | 68 | proto_item *IMMDT_header_item; |
2675 | 68 | proto_tree *IMMDT_header_tree; |
2676 | | |
2677 | 68 | IMMDT_header_item = proto_tree_add_item(parentTree, hf_infiniband_IMMDT, tvb, local_offset, 4, ENC_NA); |
2678 | 68 | proto_item_set_text(IMMDT_header_item, "%s", "IMMDT - Immediate Data Extended Transport Header"); |
2679 | 68 | IMMDT_header_tree = proto_item_add_subtree(IMMDT_header_item, ett_immdt); |
2680 | 68 | proto_tree_add_item(IMMDT_header_tree, hf_infiniband_IMMDT, tvb, local_offset, 4, ENC_NA); |
2681 | 68 | local_offset += 4; |
2682 | 68 | *offset = local_offset; |
2683 | 68 | } |
2684 | | |
2685 | | /* Parse IETH - Invalidate Extended Transport Header |
2686 | | * IN: parentTree to add the dissection to - in this code the all_headers_tree |
2687 | | * IN: tvb - the data buffer from wireshark |
2688 | | * IN/OUT: The current and updated offset */ |
2689 | | static void |
2690 | | parse_IETH(proto_tree * parentTree, tvbuff_t *tvb, unsigned *offset) |
2691 | 19 | { |
2692 | 19 | unsigned local_offset = *offset; |
2693 | | /* IETH - Invalidate Extended Transport Header */ |
2694 | 19 | proto_item *IETH_header_item; |
2695 | 19 | proto_tree *IETH_header_tree; |
2696 | | |
2697 | 19 | IETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_IETH, tvb, local_offset, 4, ENC_NA); |
2698 | 19 | proto_item_set_text(IETH_header_item, "%s", "IETH - Invalidate Extended Transport Header"); |
2699 | 19 | IETH_header_tree = proto_item_add_subtree(IETH_header_item, ett_ieth); |
2700 | | |
2701 | 19 | proto_tree_add_item(IETH_header_tree, hf_infiniband_IETH, tvb, local_offset, 4, ENC_NA); |
2702 | 19 | local_offset += 4; |
2703 | | |
2704 | 19 | *offset = local_offset; |
2705 | 19 | } |
2706 | | |
2707 | | /* Parse FETH - FLUSH extended transport header |
2708 | | * IN: parentTree to add the dissection to - in this code the all_headers_tree |
2709 | | * IN: tvb - the data buffer from wireshark |
2710 | | * IN/OUT: The current and updated offset */ |
2711 | | static void |
2712 | | parse_FETH(proto_tree * parentTree, tvbuff_t *tvb, unsigned *offset) |
2713 | 4 | { |
2714 | 4 | unsigned local_offset = *offset; |
2715 | | /* FETH - FLUSH Extended Transport Header */ |
2716 | 4 | proto_item *FETH_header_item; |
2717 | 4 | proto_tree *FETH_header_tree; |
2718 | | |
2719 | 4 | FETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_FETH, tvb, local_offset, 4, ENC_NA); |
2720 | 4 | proto_item_set_text(FETH_header_item, "%s", "FETH - FLUSH Extended Transport Header"); |
2721 | 4 | FETH_header_tree = proto_item_add_subtree(FETH_header_item, ett_ieth); |
2722 | | |
2723 | 4 | proto_tree_add_item(FETH_header_tree, hf_infiniband_reserved27, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
2724 | 4 | local_offset += 3; |
2725 | 4 | proto_tree_add_item(FETH_header_tree, hf_infiniband_selectivity_level, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
2726 | 4 | proto_tree_add_item(FETH_header_tree, hf_infiniband_placement_type, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
2727 | | |
2728 | 4 | local_offset += 1; |
2729 | 4 | *offset = local_offset; |
2730 | 4 | } |
2731 | | |
2732 | | static void update_sport(packet_info *pinfo) |
2733 | 491 | { |
2734 | 491 | conversation_t *conv; |
2735 | 491 | conversation_infiniband_data *conv_data; |
2736 | | |
2737 | 491 | conv = find_conversation(pinfo->num, &pinfo->dst, &pinfo->dst, |
2738 | 491 | CONVERSATION_IBQP, pinfo->destport, pinfo->destport, NO_ADDR_B|NO_PORT_B); |
2739 | 491 | if (!conv) |
2740 | 491 | return; |
2741 | | |
2742 | 0 | conv_data = (conversation_infiniband_data *)conversation_get_proto_data(conv, proto_infiniband); |
2743 | 0 | if (!conv_data) |
2744 | 0 | return; |
2745 | | |
2746 | 0 | pinfo->srcport = conv_data->src_qp; |
2747 | 0 | } |
2748 | | |
2749 | | static bool parse_PAYLOAD_do_rc_send_reassembling(packet_info *pinfo, |
2750 | | struct infinibandinfo *info, |
2751 | | heur_dtbl_entry_t **_hdtbl_entry) |
2752 | 491 | { |
2753 | 491 | conversation_t *conversation = NULL; |
2754 | 491 | conversation_infiniband_data *proto_data = NULL; |
2755 | | |
2756 | 491 | switch (info->opCode) { |
2757 | 50 | case RC_SEND_FIRST: |
2758 | 64 | case RC_SEND_MIDDLE: |
2759 | 88 | case RC_SEND_ONLY: |
2760 | 90 | case RC_SEND_ONLY_IMM: |
2761 | 93 | case RC_SEND_ONLY_INVAL: |
2762 | 350 | case RC_SEND_LAST: |
2763 | 359 | case RC_SEND_LAST_IMM: |
2764 | 373 | case RC_SEND_LAST_INVAL: |
2765 | 373 | break; |
2766 | 118 | default: |
2767 | | /* not a fragmented RC Send */ |
2768 | 118 | return false; |
2769 | 491 | } |
2770 | | |
2771 | | /* |
2772 | | * Check if RC Send reassembling was used before in |
2773 | | * this conversation |
2774 | | */ |
2775 | 373 | conversation = find_conversation_pinfo(pinfo, 0); |
2776 | 373 | if (conversation == NULL) { |
2777 | 134 | return false; |
2778 | 134 | } |
2779 | 239 | proto_data = conversation_get_proto_data(conversation, proto_infiniband); |
2780 | 239 | if (proto_data == NULL) { |
2781 | 239 | return false; |
2782 | 239 | } |
2783 | | |
2784 | 0 | if (proto_data->do_rc_send_reassembling) { |
2785 | 0 | *_hdtbl_entry = proto_data->rc_hdtbl_entry; |
2786 | 0 | } |
2787 | 0 | return proto_data->do_rc_send_reassembling; |
2788 | 239 | } |
2789 | | |
2790 | | static tvbuff_t *parse_PAYLOAD_reassemble_tvb(packet_info *pinfo, |
2791 | | struct infinibandinfo *info, |
2792 | | heur_dtbl_entry_t *rc_hdtbl_entry, |
2793 | | tvbuff_t *tvb, |
2794 | | proto_tree *top_tree) |
2795 | 0 | { |
2796 | 0 | static const uint32_t rc_send_id = 99; |
2797 | 0 | conversation_t *conversation = NULL; |
2798 | 0 | conversation_infiniband_data *proto_data = NULL; |
2799 | 0 | bool more_frags = false; |
2800 | 0 | fragment_head *fd_head = NULL; |
2801 | 0 | bool fd_head_not_cached = false; |
2802 | |
|
2803 | 0 | switch (info->opCode) { |
2804 | 0 | case RC_SEND_FIRST: |
2805 | 0 | case RC_SEND_MIDDLE: |
2806 | 0 | more_frags = true; |
2807 | 0 | break; |
2808 | 0 | case RC_SEND_LAST: |
2809 | 0 | case RC_SEND_LAST_IMM: |
2810 | 0 | case RC_SEND_LAST_INVAL: |
2811 | 0 | break; |
2812 | 0 | case RC_SEND_ONLY: |
2813 | 0 | case RC_SEND_ONLY_IMM: |
2814 | 0 | case RC_SEND_ONLY_INVAL: |
2815 | 0 | default: |
2816 | | /* not a fragmented RC Send */ |
2817 | 0 | return tvb; |
2818 | 0 | } |
2819 | | |
2820 | 0 | conversation = find_or_create_conversation(pinfo); |
2821 | 0 | proto_data = conversation_get_proto_data(conversation, proto_infiniband); |
2822 | 0 | if (proto_data == NULL) { |
2823 | | /* |
2824 | | * Remember that RC Send reassembling was requested |
2825 | | * for this conversation |
2826 | | */ |
2827 | 0 | proto_data = wmem_new0(wmem_file_scope(), conversation_infiniband_data); |
2828 | 0 | conversation_add_proto_data(conversation, |
2829 | 0 | proto_infiniband, |
2830 | 0 | proto_data); |
2831 | 0 | } |
2832 | |
|
2833 | 0 | proto_data->do_rc_send_reassembling = true; |
2834 | 0 | proto_data->rc_hdtbl_entry = rc_hdtbl_entry; |
2835 | |
|
2836 | 0 | fd_head = (fragment_head *)p_get_proto_data(wmem_file_scope(), |
2837 | 0 | pinfo, |
2838 | 0 | proto_infiniband, |
2839 | 0 | rc_send_id); |
2840 | 0 | if (fd_head == NULL) { |
2841 | 0 | fd_head_not_cached = true; |
2842 | |
|
2843 | 0 | fd_head = fragment_add_seq_next(&infiniband_rc_send_reassembly_table, |
2844 | 0 | tvb, 0, pinfo, |
2845 | 0 | conversation->conv_index, |
2846 | 0 | NULL, tvb_captured_length(tvb), |
2847 | 0 | more_frags); |
2848 | 0 | } |
2849 | |
|
2850 | 0 | if (more_frags && fd_head == NULL) { |
2851 | | /* |
2852 | | * We really want the fd_head and pass it to |
2853 | | * process_reassembled_data() |
2854 | | * |
2855 | | * So that individual fragments gets the |
2856 | | * reassembled in field. |
2857 | | */ |
2858 | 0 | fd_head = fragment_get_reassembled_id(&infiniband_rc_send_reassembly_table, |
2859 | 0 | pinfo, |
2860 | 0 | conversation->conv_index); |
2861 | 0 | } |
2862 | |
|
2863 | 0 | if (fd_head == NULL) { |
2864 | | /* |
2865 | | * we need more data... |
2866 | | */ |
2867 | 0 | return NULL; |
2868 | 0 | } |
2869 | | |
2870 | 0 | if (fd_head_not_cached) { |
2871 | 0 | p_add_proto_data(wmem_file_scope(), pinfo, |
2872 | 0 | proto_infiniband, |
2873 | 0 | rc_send_id, |
2874 | 0 | fd_head); |
2875 | 0 | } |
2876 | |
|
2877 | 0 | return process_reassembled_data(tvb, 0, pinfo, |
2878 | 0 | "Reassembled Infiniband RC Send fragments", |
2879 | 0 | fd_head, |
2880 | 0 | &infiniband_rc_send_frag_items, |
2881 | 0 | NULL, /* update_col_info*/ |
2882 | 0 | top_tree); |
2883 | 0 | } |
2884 | | |
2885 | | /* Parse Payload - Packet Payload / Invariant CRC / maybe Variant CRC |
2886 | | * IN: parentTree to add the dissection to - in this code the all_headers_tree |
2887 | | * IN: pinfo - packet info from wireshark |
2888 | | * IN: info - infiniband info passed to subdissectors |
2889 | | * IN: tvb - the data buffer from wireshark |
2890 | | * IN/OUT: offset - The current and updated offset |
2891 | | * IN: length - Length of Payload |
2892 | | * IN: top_tree - parent tree of Infiniband dissector */ |
2893 | | static void parse_PAYLOAD(proto_tree *parentTree, |
2894 | | packet_info *pinfo, struct infinibandinfo *info, |
2895 | | tvbuff_t *tvb, unsigned *offset, int length, int crclen, proto_tree *top_tree) |
2896 | 588 | { |
2897 | 588 | unsigned local_offset = *offset; |
2898 | | /* Payload - Packet Payload */ |
2899 | 588 | uint8_t management_class; |
2900 | 588 | tvbuff_t *volatile next_tvb; |
2901 | 588 | int reported_length; |
2902 | 588 | heur_dtbl_entry_t *hdtbl_entry = NULL; |
2903 | 588 | bool dissector_found = false; |
2904 | | |
2905 | 588 | if (!tvb_bytes_exist(tvb, *offset, length)) /* previously consumed bytes + offset was all the data - none or corrupt payload */ |
2906 | 1 | { |
2907 | 1 | col_set_str(pinfo->cinfo, COL_INFO, "Invalid Packet Length from LRH! [Malformed Packet]"); |
2908 | 1 | col_set_fence(pinfo->cinfo, COL_INFO); |
2909 | 1 | return; |
2910 | 1 | } |
2911 | | |
2912 | | /* management datagrams are determined by the source/destination QPs */ |
2913 | 587 | if (pinfo->srcport == 0 || pinfo->srcport == 1 || pinfo->destport == 0 || pinfo->destport == 1) /* management datagram */ |
2914 | 96 | { |
2915 | 96 | management_class = tvb_get_uint8(tvb, (*offset) + 1); |
2916 | | |
2917 | 96 | if (((management_class >= (uint8_t)VENDOR_1_START) && (management_class <= (uint8_t)VENDOR_1_END)) |
2918 | 88 | || ((management_class >= (uint8_t)VENDOR_2_START) && (management_class <= (uint8_t)VENDOR_2_END))) |
2919 | 12 | { |
2920 | | /* parse vendor specific */ |
2921 | 12 | col_set_str(pinfo->cinfo, COL_INFO, "VENDOR (Unknown Attribute)"); |
2922 | 12 | parse_VENDOR_MANAGEMENT(parentTree, tvb, offset); |
2923 | 12 | } |
2924 | 84 | else if ((management_class >= (uint8_t)APPLICATION_START) && (management_class <= (uint8_t)APPLICATION_END)) |
2925 | 12 | { |
2926 | | /* parse application specific */ |
2927 | 12 | col_set_str(pinfo->cinfo, COL_INFO, "APP (Unknown Attribute)"); |
2928 | 12 | parse_APPLICATION_MANAGEMENT(parentTree, tvb, offset); |
2929 | 12 | } |
2930 | 72 | else if (((management_class == (uint8_t)0x00) || (management_class == (uint8_t)0x02)) |
2931 | 58 | || ((management_class >= (uint8_t)0x50) && (management_class <= (uint8_t)0x80)) |
2932 | 46 | || ((management_class >= (uint8_t)0x82))) |
2933 | 27 | { |
2934 | | /* parse reserved classes */ |
2935 | 27 | col_set_str(pinfo->cinfo, COL_INFO, "RESERVED (Unknown Attribute)"); |
2936 | 27 | parse_RESERVED_MANAGEMENT(parentTree, tvb, offset); |
2937 | 27 | } |
2938 | 45 | else /* we have a normal management_class */ |
2939 | 45 | { |
2940 | 45 | switch (management_class) |
2941 | 45 | { |
2942 | 4 | case SUBN_LID_ROUTED: |
2943 | | /* parse subn man lid routed */ |
2944 | 4 | parse_SUBN_LID_ROUTED(parentTree, pinfo, tvb, &local_offset); |
2945 | 4 | break; |
2946 | 7 | case SUBN_DIRECTED_ROUTE: |
2947 | | /* parse subn directed route */ |
2948 | 7 | parse_SUBN_DIRECTED_ROUTE(parentTree, pinfo, tvb, &local_offset); |
2949 | 7 | break; |
2950 | 6 | case SUBNADMN: |
2951 | | /* parse sub admin */ |
2952 | 6 | parse_SUBNADMN(parentTree, pinfo, tvb, &local_offset); |
2953 | 6 | break; |
2954 | 12 | case PERF: |
2955 | | /* parse performance */ |
2956 | 12 | parse_PERF(parentTree, tvb, pinfo, &local_offset); |
2957 | 12 | break; |
2958 | 3 | case BM: |
2959 | | /* parse baseboard mgmt */ |
2960 | 3 | col_set_str(pinfo->cinfo, COL_INFO, "BM (Unknown Attribute)"); |
2961 | 3 | parse_BM(parentTree, tvb, &local_offset); |
2962 | 3 | break; |
2963 | 2 | case DEV_MGT: |
2964 | | /* parse device management */ |
2965 | 2 | col_set_str(pinfo->cinfo, COL_INFO, "DEV_MGT (Unknown Attribute)"); |
2966 | 2 | parse_DEV_MGT(parentTree, tvb, &local_offset); |
2967 | 2 | break; |
2968 | 4 | case COM_MGT: |
2969 | | /* parse communication management */ |
2970 | 4 | parse_COM_MGT(parentTree, pinfo, tvb, &local_offset, top_tree); |
2971 | 4 | break; |
2972 | 3 | case SNMP: |
2973 | | /* parse snmp tunneling */ |
2974 | 3 | col_set_str(pinfo->cinfo, COL_INFO, "SNMP (Unknown Attribute)"); |
2975 | 3 | parse_SNMP(parentTree, tvb, &local_offset); |
2976 | 3 | break; |
2977 | 0 | default: |
2978 | 0 | break; |
2979 | 45 | } |
2980 | 45 | } |
2981 | 96 | } |
2982 | 491 | else /* Normal Data Packet - Parse as such */ |
2983 | 491 | { |
2984 | 491 | bool allow_reassembling = true; |
2985 | | /* update sport for the packet, for dissectors that performs |
2986 | | * exact match on saddr, dadr, sport, dport tuple. |
2987 | | */ |
2988 | 491 | update_sport(pinfo); |
2989 | | |
2990 | 491 | info->payload_tree = parentTree; |
2991 | | |
2992 | | /* Calculation for Payload: |
2993 | | * (tvb_length) Length of entire packet - (local_offset) Starting byte of Payload Data |
2994 | | * offset addition is more complex for the payload. |
2995 | | * We need the total length of the packet, - length of previous headers, + offset where payload started. |
2996 | | * We also need to reserve 6 bytes for the CRCs which are not actually part of the payload. */ |
2997 | 491 | reported_length = tvb_reported_length_remaining(tvb, local_offset); |
2998 | 491 | if (reported_length >= crclen) |
2999 | 453 | reported_length -= crclen; |
3000 | 491 | next_tvb = tvb_new_subset_length(tvb, local_offset, reported_length); |
3001 | | |
3002 | 491 | info->do_rc_send_reassembling = parse_PAYLOAD_do_rc_send_reassembling(pinfo, info, &hdtbl_entry); |
3003 | | |
3004 | 491 | reassemble: |
3005 | | |
3006 | 491 | if (info->do_rc_send_reassembling) { |
3007 | 0 | allow_reassembling = false; |
3008 | 0 | next_tvb = parse_PAYLOAD_reassemble_tvb(pinfo, info, hdtbl_entry, next_tvb, top_tree); |
3009 | 0 | if (next_tvb == NULL) { |
3010 | | /* |
3011 | | * we need more data... |
3012 | | */ |
3013 | 0 | goto skip_dissector; |
3014 | 0 | } |
3015 | 0 | } |
3016 | | |
3017 | 491 | if (hdtbl_entry) { |
3018 | 0 | call_heur_dissector_direct(hdtbl_entry, next_tvb, pinfo, top_tree, info); |
3019 | 0 | dissector_found = true; |
3020 | 0 | } |
3021 | 491 | else if (try_heuristic_first) |
3022 | 491 | { |
3023 | 491 | if (dissector_try_heuristic(heur_dissectors_payload, next_tvb, pinfo, top_tree, &hdtbl_entry, info)) |
3024 | 93 | dissector_found = true; |
3025 | 491 | } |
3026 | | |
3027 | 491 | if (dissector_found == false) |
3028 | 261 | { |
3029 | 261 | if (dissector_try_payload_with_data(subdissector_table, next_tvb, pinfo, top_tree, true, info)) |
3030 | 0 | { |
3031 | 0 | dissector_found = true; |
3032 | 0 | } |
3033 | 261 | else |
3034 | 261 | { |
3035 | 261 | if (!try_heuristic_first) |
3036 | 0 | { |
3037 | 0 | if (dissector_try_heuristic(heur_dissectors_payload, next_tvb, pinfo, top_tree, &hdtbl_entry, info)) |
3038 | 0 | dissector_found = true; |
3039 | 0 | } |
3040 | 261 | } |
3041 | 261 | } |
3042 | | |
3043 | 491 | if (dissector_found == false) |
3044 | 261 | { |
3045 | | /* No sub-dissector found. |
3046 | | Label rest of packet as "Data" */ |
3047 | 261 | call_data_dissector(next_tvb, pinfo, top_tree); |
3048 | 261 | } |
3049 | | |
3050 | 491 | if (dissector_found && allow_reassembling && info->do_rc_send_reassembling) { |
3051 | 0 | goto reassemble; |
3052 | 0 | } |
3053 | | |
3054 | 491 | skip_dissector: |
3055 | | /* Will contain ICRC <and maybe VCRC> = 4 or 4+2 (crclen) */ |
3056 | 354 | local_offset = tvb_reported_length(tvb) - crclen; |
3057 | 354 | } |
3058 | | |
3059 | 446 | *offset = local_offset; |
3060 | 446 | } |
3061 | | |
3062 | | /* Parse VENDOR - Parse a vendor specific or unknown header sequence |
3063 | | * IN: parentTree to add the dissection to - in this code the all_headers_tree |
3064 | | * IN: tvb - the data buffer from wireshark |
3065 | | * IN/OUT: The current and updated offset */ |
3066 | | static void parse_VENDOR(proto_tree * parentTree, tvbuff_t *tvb, unsigned *offset) |
3067 | 15 | { |
3068 | 15 | unsigned local_offset = *offset; |
3069 | 15 | proto_item *VENDOR_header_item; |
3070 | 15 | proto_tree *VENDOR_header_tree; |
3071 | 15 | unsigned VENDOR_header_length; |
3072 | | |
3073 | 15 | VENDOR_header_item = proto_tree_add_item(parentTree, hf_infiniband_vendor, tvb, local_offset, 4, ENC_NA); |
3074 | 15 | proto_item_set_text(VENDOR_header_item, "%s", "Vendor Specific or Unknown Header Sequence"); |
3075 | 15 | VENDOR_header_tree = proto_item_add_subtree(VENDOR_header_item, ett_vendor); |
3076 | 15 | proto_tree_add_item_ret_length(VENDOR_header_tree, hf_infiniband_vendor, tvb, local_offset, -1, ENC_NA, &VENDOR_header_length); |
3077 | 15 | local_offset += VENDOR_header_length; |
3078 | 15 | *offset = local_offset; |
3079 | 15 | } |
3080 | | |
3081 | | /* Parse IPv6 - Parse an IPv6 Packet |
3082 | | * IN: parentTree to add the dissection to - in this code the all_headers_tree |
3083 | | * IN: tvb - the data buffer from wireshark |
3084 | | * IN/OUT: The current and updated offset |
3085 | | * IN: pinfo - packet info from wireshark */ |
3086 | | static void parse_IPvSix(proto_tree *parentTree, tvbuff_t *tvb, unsigned *offset, packet_info *pinfo) |
3087 | 0 | { |
3088 | 0 | tvbuff_t *ipv6_tvb; |
3089 | | |
3090 | | /* (- 2) for VCRC which lives at the end of the packet */ |
3091 | 0 | ipv6_tvb = tvb_new_subset_length(tvb, *offset, |
3092 | 0 | tvb_reported_length_remaining(tvb, *offset) - 2); |
3093 | 0 | call_dissector(ipv6_handle, ipv6_tvb, pinfo, parentTree); |
3094 | 0 | *offset = tvb_reported_length(tvb) - 2; |
3095 | | |
3096 | | /* Display the VCRC */ |
3097 | 0 | proto_tree_add_item(parentTree, hf_infiniband_variant_crc, tvb, *offset, 2, ENC_BIG_ENDIAN); |
3098 | 0 | } |
3099 | | |
3100 | | /* Parse EtherType - Parse a generic IP packaet with an EtherType of IP or ARP |
3101 | | * IN: parentTree to add the dissection to - in this code the all_headers_tree |
3102 | | * IN: tvb - the data buffer from wireshark |
3103 | | * IN/OUT: The current and updated offset |
3104 | | * IN: pinfo - packet info from wireshark |
3105 | | * IN: top_tree - parent tree of Infiniband dissector */ |
3106 | | static void parse_RWH(proto_tree *ah_tree, tvbuff_t *tvb, unsigned *offset, packet_info *pinfo, proto_tree *top_tree) |
3107 | 0 | { |
3108 | 0 | uint16_t ether_type; |
3109 | 0 | tvbuff_t *next_tvb; |
3110 | | |
3111 | | /* RWH - Raw Header */ |
3112 | 0 | proto_item *RWH_header_item; |
3113 | 0 | proto_tree *RWH_header_tree; |
3114 | |
|
3115 | 0 | int captured_length, reported_length; |
3116 | |
|
3117 | 0 | RWH_header_item = proto_tree_add_item(ah_tree, hf_infiniband_RWH, tvb, *offset, 4, ENC_NA); |
3118 | 0 | proto_item_set_text(RWH_header_item, "%s", "RWH - Raw Header"); |
3119 | 0 | RWH_header_tree = proto_item_add_subtree(RWH_header_item, ett_rwh); |
3120 | |
|
3121 | 0 | proto_tree_add_item(RWH_header_tree, hf_infiniband_reserved, tvb, |
3122 | 0 | *offset, 2, ENC_NA); |
3123 | |
|
3124 | 0 | *offset += 2; |
3125 | |
|
3126 | 0 | ether_type = tvb_get_ntohs(tvb, *offset); |
3127 | 0 | proto_tree_add_uint(RWH_header_tree, hf_infiniband_etype, tvb, *offset, 2, |
3128 | 0 | ether_type); |
3129 | 0 | *offset += 2; |
3130 | | |
3131 | | /* Get the captured length and reported length of the data |
3132 | | * after the Ethernet type. */ |
3133 | 0 | captured_length = tvb_captured_length_remaining(tvb, *offset); |
3134 | 0 | reported_length = tvb_reported_length_remaining(tvb, *offset); |
3135 | | |
3136 | | /* Construct a tvbuff for the payload after the Ethernet type, |
3137 | | * not including the FCS. */ |
3138 | 0 | if ((captured_length >= 0) && (reported_length >= 0)) { |
3139 | 0 | if (reported_length >= 2) |
3140 | 0 | reported_length -= 2; |
3141 | 0 | } |
3142 | |
|
3143 | 0 | next_tvb = tvb_new_subset_length(tvb, *offset, reported_length); |
3144 | 0 | if (!dissector_try_uint(ethertype_dissector_table, ether_type, |
3145 | 0 | next_tvb, pinfo, top_tree)) |
3146 | 0 | call_data_dissector(next_tvb, pinfo, top_tree); |
3147 | |
|
3148 | 0 | *offset = tvb_reported_length(tvb) - 2; |
3149 | | /* Display the VCRC */ |
3150 | 0 | proto_tree_add_item(ah_tree, hf_infiniband_variant_crc, tvb, *offset, 2, ENC_BIG_ENDIAN); |
3151 | 0 | } |
3152 | | |
3153 | | |
3154 | | /* Parse a Mellanox EoIB Encapsulation Header and the associated Ethernet frame |
3155 | | * IN: parentTree to add the dissection to - in this code the all_headers_tree |
3156 | | * IN: tvb - the data buffer from wireshark |
3157 | | * IN: The current offset |
3158 | | * IN: pinfo - packet info from wireshark |
3159 | | * IN: top_tree - parent tree of Infiniband dissector */ |
3160 | | static bool dissect_mellanox_eoib(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) |
3161 | 287 | { |
3162 | 287 | proto_item *header_item; |
3163 | 287 | proto_tree *header_subtree; |
3164 | 287 | tvbuff_t *encap_tvb; |
3165 | 287 | int offset = 0; |
3166 | 287 | bool more_segments; |
3167 | 287 | struct infinibandinfo *info = (struct infinibandinfo *)data; |
3168 | | |
3169 | 287 | if (((info->opCode & 0xE0) >> 5) != TRANSPORT_UD) |
3170 | 277 | return false; |
3171 | | |
3172 | 10 | if ((tvb_get_uint8(tvb, offset) & 0xF0) != 0xC0) |
3173 | 6 | return false; |
3174 | | |
3175 | 4 | if (tvb_reported_length(tvb) < 4) { |
3176 | | /* not even large enough to contain the eoib encap header. error! */ |
3177 | 0 | return false; |
3178 | 0 | } |
3179 | | |
3180 | 4 | header_item = proto_tree_add_item(tree, proto_mellanox_eoib, tvb, offset, 4, ENC_NA); |
3181 | 4 | header_subtree = proto_item_add_subtree(header_item, ett_eoib); |
3182 | | |
3183 | 4 | proto_tree_add_item(header_subtree, hf_infiniband_ver, tvb, offset, 2, ENC_BIG_ENDIAN); |
3184 | 4 | proto_tree_add_item(header_subtree, hf_infiniband_tcp_chk, tvb, offset, 2, ENC_BIG_ENDIAN); |
3185 | 4 | proto_tree_add_item(header_subtree, hf_infiniband_ip_chk, tvb, offset, 2, ENC_BIG_ENDIAN); |
3186 | 4 | proto_tree_add_item(header_subtree, hf_infiniband_fcs, tvb, offset, 2, ENC_BIG_ENDIAN); |
3187 | 4 | proto_tree_add_item(header_subtree, hf_infiniband_ms, tvb, offset, 2, ENC_BIG_ENDIAN); |
3188 | 4 | proto_tree_add_item(header_subtree, hf_infiniband_seg_off, tvb, offset, 2, ENC_BIG_ENDIAN); |
3189 | 4 | more_segments = tvb_get_ntohs(tvb, offset) & (MELLANOX_MORE_SEGMENT_FLAG | MELLANOX_SEGMENT_FLAG); |
3190 | 4 | offset += 2; |
3191 | 4 | proto_tree_add_item(header_subtree, hf_infiniband_seg_id, tvb, offset, 2, ENC_BIG_ENDIAN); |
3192 | 4 | offset += 2; |
3193 | | |
3194 | 4 | encap_tvb = tvb_new_subset_remaining(tvb, offset); |
3195 | | |
3196 | 4 | if (more_segments) { |
3197 | | /* this is a fragment of an encapsulated Ethernet jumbo frame, parse as data */ |
3198 | 2 | call_data_dissector(encap_tvb, pinfo, tree); |
3199 | 2 | } else { |
3200 | | /* non-fragmented frames can be fully parsed */ |
3201 | 2 | call_dissector(eth_handle, encap_tvb, pinfo, tree); |
3202 | 2 | } |
3203 | | |
3204 | 4 | return true; |
3205 | 4 | } |
3206 | | |
3207 | | /* IBA packet data could be anything in principle, however it is common |
3208 | | * practice to carry non-IBA data encapsulated with an EtherType header, |
3209 | | * similar to the RWH header. There is no way to identify these frames |
3210 | | * positively. |
3211 | | */ |
3212 | | static bool dissect_eth_over_ib(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) |
3213 | 304 | { |
3214 | 304 | uint16_t etype, reserved; |
3215 | 304 | const char *saved_proto; |
3216 | 304 | tvbuff_t *next_tvb; |
3217 | 304 | struct infinibandinfo *info = (struct infinibandinfo *)data; |
3218 | 304 | volatile bool dissector_found = false; |
3219 | | |
3220 | 304 | if (tvb_reported_length(tvb) < 4) { |
3221 | | /* not even large enough to contain the eoib encap header. error! */ |
3222 | 51 | return false; |
3223 | 51 | } |
3224 | | |
3225 | 253 | etype = tvb_get_ntohs(tvb, 0); |
3226 | 253 | reserved = tvb_get_ntohs(tvb, 2); |
3227 | | |
3228 | 253 | if (reserved != 0) |
3229 | 198 | return false; |
3230 | | |
3231 | 55 | next_tvb = tvb_new_subset_remaining(tvb, 4); |
3232 | | |
3233 | | /* Look for sub-dissector, and call it if found. |
3234 | | Catch exceptions, so that if the reported length of "next_tvb" |
3235 | | was reduced by some dissector before an exception was thrown, |
3236 | | we can still put in an item for the trailer. */ |
3237 | 55 | saved_proto = pinfo->current_proto; |
3238 | | |
3239 | 55 | TRY { |
3240 | 55 | dissector_found = (bool)dissector_try_uint(ethertype_dissector_table, |
3241 | 55 | etype, next_tvb, pinfo, tree); |
3242 | 55 | } |
3243 | 55 | CATCH_NONFATAL_ERRORS { |
3244 | | /* Somebody threw an exception that means that there |
3245 | | was a problem dissecting the payload; that means |
3246 | | that a dissector was found, so we don't need to |
3247 | | dissect the payload as data or update the protocol |
3248 | | or info columns. |
3249 | | |
3250 | | Just show the exception and then drive on to show |
3251 | | the trailer, after noting that a dissector was found |
3252 | | and restoring the protocol value that was in effect |
3253 | | before we called the subdissector. |
3254 | | */ |
3255 | | |
3256 | 4 | show_exception(next_tvb, pinfo, tree, EXCEPT_CODE, GET_MESSAGE); |
3257 | 4 | dissector_found = true; |
3258 | 4 | pinfo->current_proto = saved_proto; |
3259 | 4 | } |
3260 | 55 | ENDTRY; |
3261 | | |
3262 | 55 | if (dissector_found) { |
3263 | 9 | proto_item *PAYLOAD_header_item; |
3264 | 9 | proto_tree *PAYLOAD_header_tree; |
3265 | | |
3266 | | /* now create payload entry to show Ethertype */ |
3267 | 9 | PAYLOAD_header_item = proto_tree_add_item(info->payload_tree, hf_infiniband_payload, tvb, 0, |
3268 | 9 | tvb_reported_length(tvb) - 6, ENC_NA); |
3269 | 9 | proto_item_set_text(PAYLOAD_header_item, "%s", "IBA Payload - appears to be EtherType encapsulated"); |
3270 | 9 | PAYLOAD_header_tree = proto_item_add_subtree(PAYLOAD_header_item, ett_payload); |
3271 | | |
3272 | 9 | proto_tree_add_uint(PAYLOAD_header_tree, hf_infiniband_etype, tvb, 0, 2, etype); |
3273 | 9 | proto_tree_add_item(PAYLOAD_header_tree, hf_infiniband_reserved, tvb, 2, 2, ENC_NA); |
3274 | 9 | } |
3275 | | |
3276 | 55 | return dissector_found; |
3277 | 253 | } |
3278 | | |
3279 | | /* Parse Subnet Management (LID Routed) |
3280 | | * IN: parentTree to add the dissection to |
3281 | | * IN: pinfo - packet info from wireshark |
3282 | | * IN: tvb - the data buffer from wireshark |
3283 | | * IN/OUT: The current and updated offset */ |
3284 | | static void parse_SUBN_LID_ROUTED(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, unsigned *offset) |
3285 | 4 | { |
3286 | | /* Parse the Common MAD Header */ |
3287 | 4 | MAD_Data MadData; |
3288 | 4 | unsigned local_offset; |
3289 | 4 | proto_item *SUBN_LID_ROUTED_header_item; |
3290 | 4 | proto_tree *SUBN_LID_ROUTED_header_tree; |
3291 | | |
3292 | 4 | if (!parse_MAD_Common(parentTree, tvb, offset, &MadData)) |
3293 | 2 | { |
3294 | | /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */ |
3295 | 2 | return; |
3296 | 2 | } |
3297 | | |
3298 | 2 | local_offset = *offset; |
3299 | | |
3300 | | /* local_offset - 24 here because when we come out of parse_MAD_Common, the offset it sitting at the data section. */ |
3301 | 2 | SUBN_LID_ROUTED_header_item = proto_tree_add_item(parentTree, hf_infiniband_SMP_LID, tvb, local_offset - 24, 256, ENC_NA); |
3302 | 2 | proto_item_set_text(SUBN_LID_ROUTED_header_item, "%s", "SMP (LID Routed) "); |
3303 | 2 | SUBN_LID_ROUTED_header_tree = proto_item_add_subtree(SUBN_LID_ROUTED_header_item, ett_subn_lid_routed); |
3304 | 2 | proto_tree_add_item(SUBN_LID_ROUTED_header_tree, hf_infiniband_m_key, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
3305 | 2 | local_offset += 8; |
3306 | 2 | proto_tree_add_item(SUBN_LID_ROUTED_header_tree, hf_infiniband_reserved, tvb, local_offset, 32, ENC_NA); |
3307 | 2 | local_offset += 32; |
3308 | | |
3309 | 2 | label_SUBM_Method(SUBN_LID_ROUTED_header_item, &MadData, pinfo); |
3310 | 2 | label_SUBM_Attribute(SUBN_LID_ROUTED_header_item, &MadData, pinfo); |
3311 | | |
3312 | | /* 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. */ |
3313 | 2 | if (!parse_SUBM_Attribute(SUBN_LID_ROUTED_header_tree, pinfo, tvb, &local_offset, &MadData)) |
3314 | 0 | { |
3315 | 0 | proto_tree_add_item(SUBN_LID_ROUTED_header_tree, hf_infiniband_smp_data, tvb, local_offset, 64, ENC_NA); |
3316 | 0 | local_offset += 64; |
3317 | 0 | } |
3318 | | |
3319 | 2 | proto_tree_add_item(SUBN_LID_ROUTED_header_tree, hf_infiniband_reserved, tvb, local_offset, 128, ENC_NA); |
3320 | 2 | local_offset += 128; |
3321 | 2 | *offset = local_offset; |
3322 | 2 | } |
3323 | | |
3324 | | /* Parse Subnet Management (Directed Route) |
3325 | | * IN: parentTree to add the dissection to |
3326 | | * IN: tvb - the data buffer from wireshark |
3327 | | * IN/OUT: The current and updated offset */ |
3328 | | static void parse_SUBN_DIRECTED_ROUTE(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, unsigned *offset) |
3329 | 7 | { |
3330 | | /* Parse the Common MAD Header */ |
3331 | 7 | MAD_Data MadData; |
3332 | 7 | unsigned local_offset; |
3333 | 7 | proto_item *SUBN_DIRECTED_ROUTE_header_item; |
3334 | 7 | proto_tree *SUBN_DIRECTED_ROUTE_header_tree; |
3335 | | |
3336 | 7 | if (!parse_MAD_Common(parentTree, tvb, offset, &MadData)) |
3337 | 5 | { |
3338 | | /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */ |
3339 | 5 | return; |
3340 | 5 | } |
3341 | | |
3342 | 2 | local_offset = *offset; |
3343 | | |
3344 | | /* local_offset - 24 here because when we come out of parse_MAD_Common, the offset it sitting at the data section. |
3345 | | * We need to go backwards because this particular SMP uses the class specific portion of the Common MAD Header */ |
3346 | 2 | SUBN_DIRECTED_ROUTE_header_item = proto_tree_add_item(parentTree, hf_infiniband_SMP_DIRECTED, tvb, local_offset - 24, 256, ENC_NA); |
3347 | 2 | proto_item_set_text(SUBN_DIRECTED_ROUTE_header_item, "%s", "SMP (Directed Route) "); |
3348 | 2 | SUBN_DIRECTED_ROUTE_header_tree = proto_item_add_subtree(SUBN_DIRECTED_ROUTE_header_item, ett_subn_directed_route); |
3349 | | |
3350 | 2 | label_SUBM_Method(SUBN_DIRECTED_ROUTE_header_item, &MadData, pinfo); |
3351 | 2 | label_SUBM_Attribute(SUBN_DIRECTED_ROUTE_header_item, &MadData, pinfo); |
3352 | | |
3353 | | /* Place us at offset 4, the "D" Bit (Direction bit for Directed Route SMPs) */ |
3354 | 2 | local_offset -= 20; |
3355 | 2 | proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_d, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3356 | 2 | proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_smp_status, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
3357 | 2 | local_offset += 2; |
3358 | 2 | proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_hop_pointer, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3359 | 2 | local_offset += 1; |
3360 | 2 | proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_hop_count, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3361 | 2 | local_offset += 1; |
3362 | 2 | local_offset += 16; /* Skip over the rest of the Common MAD Header... It's already dissected by parse_MAD_Common */ |
3363 | 2 | proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_m_key, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
3364 | 2 | local_offset += 8; |
3365 | 2 | proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_dr_slid, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
3366 | 2 | local_offset += 2; |
3367 | 2 | proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_dr_dlid, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
3368 | 2 | local_offset += 2; |
3369 | 2 | proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_reserved, tvb, local_offset, 28, ENC_NA); |
3370 | 2 | local_offset += 28; |
3371 | | |
3372 | | /* 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. */ |
3373 | 2 | if (!parse_SUBM_Attribute(SUBN_DIRECTED_ROUTE_header_tree, pinfo, tvb, &local_offset, &MadData)) |
3374 | 0 | { |
3375 | 0 | proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_smp_data, tvb, local_offset, 64, ENC_NA); |
3376 | 0 | local_offset += 64; |
3377 | 0 | } |
3378 | | |
3379 | 2 | proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_initial_path, tvb, local_offset, 64, ENC_NA); |
3380 | 2 | local_offset += 64; |
3381 | 2 | proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_return_path, tvb, local_offset, 64, ENC_NA); |
3382 | 2 | local_offset += 64; |
3383 | 2 | *offset = local_offset; |
3384 | 2 | } |
3385 | | |
3386 | | /* Parse Subnet Administration |
3387 | | * IN: parentTree to add the dissection to |
3388 | | * IN: pinfo - packet info from wireshark |
3389 | | * IN: tvb - the data buffer from wireshark |
3390 | | * IN/OUT: The current and updated offset */ |
3391 | | static void parse_SUBNADMN(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, unsigned *offset) |
3392 | 6 | { |
3393 | | /* Parse the Common MAD Header */ |
3394 | 6 | MAD_Data MadData; |
3395 | 6 | unsigned local_offset; |
3396 | 6 | proto_item *SUBNADMN_header_item; |
3397 | 6 | proto_tree *SUBNADMN_header_tree; |
3398 | | |
3399 | 6 | if (!parse_MAD_Common(parentTree, tvb, offset, &MadData)) |
3400 | 3 | { |
3401 | | /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */ |
3402 | 3 | return; |
3403 | 3 | } |
3404 | 3 | if (!parse_RMPP(parentTree, pinfo, tvb, offset)) |
3405 | 0 | { |
3406 | | /* TODO: Mark Corrupt Packet */ |
3407 | 0 | return; |
3408 | 0 | } |
3409 | 3 | local_offset = *offset; |
3410 | | |
3411 | 3 | SUBNADMN_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset - 36, 256, ENC_NA); |
3412 | 3 | proto_item_set_text(SUBNADMN_header_item, "%s", "SA "); |
3413 | 3 | SUBNADMN_header_tree = proto_item_add_subtree(SUBNADMN_header_item, ett_subnadmin); |
3414 | | |
3415 | 3 | proto_tree_add_item(SUBNADMN_header_tree, hf_infiniband_sm_key, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
3416 | 3 | local_offset += 8; |
3417 | 3 | proto_tree_add_item(SUBNADMN_header_tree, hf_infiniband_attribute_offset, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
3418 | 3 | local_offset += 2; |
3419 | 3 | proto_tree_add_item(SUBNADMN_header_tree, hf_infiniband_reserved, tvb, local_offset, 2, ENC_NA); |
3420 | 3 | local_offset += 2; |
3421 | 3 | proto_tree_add_item(SUBNADMN_header_tree, hf_infiniband_component_mask, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
3422 | 3 | local_offset += 8; |
3423 | | |
3424 | 3 | label_SUBA_Method(SUBNADMN_header_item, &MadData, pinfo); |
3425 | 3 | label_SUBA_Attribute(SUBNADMN_header_item, &MadData, pinfo); |
3426 | | |
3427 | 3 | if (!parse_SUBA_Attribute(SUBNADMN_header_tree, pinfo, tvb, &local_offset, &MadData)) |
3428 | 0 | { |
3429 | 0 | proto_tree_add_item(SUBNADMN_header_tree, hf_infiniband_subnet_admin_data, tvb, local_offset, 200, ENC_NA); |
3430 | 0 | local_offset += 200; |
3431 | 0 | } |
3432 | 3 | *offset = local_offset; |
3433 | 3 | } |
3434 | | |
3435 | | /* Parse Performance Management |
3436 | | * IN: parentTree to add the dissection to |
3437 | | * IN: tvb - the data buffer from wireshark |
3438 | | * IN: pinfo - the pinfo struct from wireshark |
3439 | | * IN/OUT: The current and updated offset */ |
3440 | | static void parse_PERF(proto_tree *parentTree, tvbuff_t *tvb, packet_info *pinfo, unsigned *offset) |
3441 | 12 | { |
3442 | | /* Parse the Common MAD Header */ |
3443 | 12 | MAD_Data MadData; |
3444 | 12 | unsigned local_offset; |
3445 | 12 | proto_item *PERF_header_item; |
3446 | | |
3447 | 12 | if (!parse_MAD_Common(parentTree, tvb, offset, &MadData)) |
3448 | 11 | { |
3449 | | /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */ |
3450 | 11 | return; |
3451 | 11 | } |
3452 | | |
3453 | 1 | local_offset = *offset; /* offset now points to the start of the MAD data field */ |
3454 | | |
3455 | 1 | switch (MadData.attributeID) { |
3456 | 0 | case 0x0001: /* (ClassPortInfo) */ |
3457 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "PERF (ClassPortInfo)"); |
3458 | 0 | proto_tree_add_item(parentTree, hf_infiniband_PerfMgt_ClassPortInfo, tvb, local_offset, 40, ENC_NA); |
3459 | 0 | local_offset += 40; |
3460 | 0 | *offset = local_offset; |
3461 | 0 | parse_ClassPortInfo(parentTree, tvb, offset); |
3462 | 0 | break; |
3463 | 0 | case ATTR_PORT_COUNTERS: |
3464 | 0 | parse_PERF_PortCounters(parentTree, tvb, pinfo, &local_offset); |
3465 | 0 | break; |
3466 | 0 | case ATTR_PORT_COUNTERS_EXT: |
3467 | 0 | parse_PERF_PortCountersExtended(parentTree, tvb, pinfo, &local_offset); |
3468 | 0 | break; |
3469 | 1 | default: |
3470 | 1 | col_set_str(pinfo->cinfo, COL_INFO, "PERF (Unknown Attribute)"); |
3471 | 1 | PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, MAD_DATA_SIZE, ENC_NA); |
3472 | 1 | local_offset += MAD_DATA_SIZE; |
3473 | 1 | proto_item_set_text(PERF_header_item, "%s", "PERF - Performance Management MAD (Dissector Not Implemented)"); |
3474 | 1 | break; |
3475 | 1 | } |
3476 | | |
3477 | 1 | *offset = local_offset; |
3478 | 1 | } |
3479 | | |
3480 | | /* Parse Baseboard Management |
3481 | | * IN: parentTree to add the dissection to |
3482 | | * IN: tvb - the data buffer from wireshark |
3483 | | * IN/OUT: The current and updated offset */ |
3484 | | static void parse_BM(proto_tree *parentTree, tvbuff_t *tvb, unsigned *offset) |
3485 | 3 | { |
3486 | | /* Parse the Common MAD Header */ |
3487 | 3 | MAD_Data MadData; |
3488 | 3 | unsigned local_offset; |
3489 | 3 | proto_item *BM_header_item; |
3490 | | |
3491 | 3 | if (!parse_MAD_Common(parentTree, tvb, offset, &MadData)) |
3492 | 2 | { |
3493 | | /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */ |
3494 | 2 | return; |
3495 | 2 | } |
3496 | 1 | local_offset = *offset; |
3497 | | |
3498 | 1 | BM_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, MAD_DATA_SIZE, ENC_NA); |
3499 | 1 | local_offset += MAD_DATA_SIZE; |
3500 | 1 | proto_item_set_text(BM_header_item, "%s", "BM - Baseboard Management MAD (Dissector Not Implemented)"); |
3501 | 1 | *offset = local_offset; |
3502 | 1 | } |
3503 | | |
3504 | | /* Parse Device Management |
3505 | | * IN: parentTree to add the dissection to |
3506 | | * IN: tvb - the data buffer from wireshark |
3507 | | * IN/OUT: The current and updated offset */ |
3508 | | static void parse_DEV_MGT(proto_tree *parentTree, tvbuff_t *tvb, unsigned *offset) |
3509 | 2 | { |
3510 | | /* Parse the Common MAD Header */ |
3511 | 2 | MAD_Data MadData; |
3512 | 2 | unsigned local_offset; |
3513 | 2 | proto_item *DEVM_header_item; |
3514 | | |
3515 | 2 | if (!parse_MAD_Common(parentTree, tvb, offset, &MadData)) |
3516 | 1 | { |
3517 | | /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */ |
3518 | 1 | return; |
3519 | 1 | } |
3520 | 1 | local_offset = *offset; |
3521 | 1 | DEVM_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, MAD_DATA_SIZE, ENC_NA); |
3522 | 1 | local_offset += MAD_DATA_SIZE; |
3523 | 1 | proto_item_set_text(DEVM_header_item, "%s", "DEV_MGT - Device Management MAD (Dissector Not Implemented)"); |
3524 | 1 | *offset = local_offset; |
3525 | 1 | } |
3526 | | |
3527 | | static bool parse_CM_Req_ServiceID(proto_tree *parent_tree, tvbuff_t *tvb, unsigned *offset, uint64_t serviceid) |
3528 | 0 | { |
3529 | 0 | proto_item *service_id_item; |
3530 | 0 | proto_tree *service_id_tree; |
3531 | 0 | unsigned local_offset = *offset; |
3532 | 0 | bool ip_cm_sid; |
3533 | |
|
3534 | 0 | if ((serviceid & RDMA_IP_CM_SID_PREFIX_MASK) == RDMA_IP_CM_SID_PREFIX) { |
3535 | 0 | service_id_item = proto_tree_add_item(parent_tree, hf_cm_req_service_id, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
3536 | 0 | proto_item_set_text(service_id_item, "%s", "IP CM ServiceID"); |
3537 | 0 | service_id_tree = proto_item_add_subtree(service_id_item, ett_cm_sid); |
3538 | |
|
3539 | 0 | proto_tree_add_item(service_id_tree, hf_cm_req_service_id_prefix, tvb, local_offset, 5, ENC_NA); |
3540 | 0 | local_offset += 5; |
3541 | 0 | proto_tree_add_item(service_id_tree, hf_cm_req_service_id_protocol, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3542 | 0 | local_offset += 1; |
3543 | 0 | proto_tree_add_item(service_id_tree, hf_cm_req_service_id_dport, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
3544 | 0 | local_offset += 2; |
3545 | 0 | ip_cm_sid = true; |
3546 | 0 | } else { |
3547 | 0 | proto_tree_add_item(parent_tree, hf_cm_req_service_id, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
3548 | 0 | local_offset += 8; |
3549 | 0 | ip_cm_sid = false; |
3550 | 0 | } |
3551 | 0 | *offset = local_offset; |
3552 | 0 | return ip_cm_sid; |
3553 | 0 | } |
3554 | | |
3555 | | static uint64_t make_hash_key(uint64_t transcationID, address *addr) |
3556 | 0 | { |
3557 | 0 | uint64_t hash_key; |
3558 | |
|
3559 | 0 | hash_key = transcationID; |
3560 | 0 | hash_key = add_address_to_hash64(hash_key, addr); |
3561 | 0 | return hash_key; |
3562 | 0 | } |
3563 | | |
3564 | | static connection_context* lookup_connection(uint64_t transcationID, address *addr) |
3565 | 0 | { |
3566 | 0 | connection_context *connection; |
3567 | 0 | uint64_t hash_key; |
3568 | |
|
3569 | 0 | hash_key = make_hash_key(transcationID, addr); |
3570 | |
|
3571 | 0 | connection = (connection_context *)g_hash_table_lookup(CM_context_table, &hash_key); |
3572 | 0 | return connection; |
3573 | 0 | } |
3574 | | |
3575 | | static void remove_connection(uint64_t transcationID, address *addr) |
3576 | 0 | { |
3577 | 0 | uint64_t hash_key; |
3578 | |
|
3579 | 0 | hash_key = make_hash_key(transcationID, addr); |
3580 | |
|
3581 | 0 | g_hash_table_remove(CM_context_table, &hash_key); |
3582 | 0 | } |
3583 | | |
3584 | | static void |
3585 | | create_conv_and_add_proto_data(packet_info *pinfo, uint64_t service_id, |
3586 | | bool client_to_server, |
3587 | | address *addr, const uint16_t lid, |
3588 | | const uint32_t port, const uint32_t src_port, |
3589 | | const unsigned options, uint8_t *mad_data) |
3590 | 0 | { |
3591 | 0 | conversation_t *conv; |
3592 | 0 | conversation_infiniband_data *proto_data; |
3593 | |
|
3594 | 0 | proto_data = wmem_new0(wmem_file_scope(), conversation_infiniband_data); |
3595 | 0 | proto_data->service_id = service_id; |
3596 | 0 | proto_data->client_to_server = client_to_server; |
3597 | 0 | proto_data->src_qp = src_port; |
3598 | 0 | memcpy(&proto_data->mad_private_data[0], mad_data, MAD_DATA_SIZE); |
3599 | 0 | conv = conversation_new(pinfo->num, addr, addr, |
3600 | 0 | CONVERSATION_IBQP, port, port, options); |
3601 | 0 | conversation_add_proto_data(conv, proto_infiniband, proto_data); |
3602 | | |
3603 | | /* next, register the conversation using the LIDs */ |
3604 | 0 | set_address(addr, AT_IB, sizeof(uint16_t), wmem_memdup(pinfo->pool, &lid, sizeof lid)); |
3605 | 0 | conv = conversation_new(pinfo->num, addr, addr, |
3606 | 0 | CONVERSATION_IBQP, port, port, options); |
3607 | 0 | conversation_add_proto_data(conv, proto_infiniband, proto_data); |
3608 | 0 | } |
3609 | | |
3610 | | static void save_conversation_info(packet_info *pinfo, uint8_t *local_gid, uint8_t *remote_gid, |
3611 | | uint32_t local_qpn, uint32_t local_lid, uint32_t remote_lid, |
3612 | | uint64_t serviceid, MAD_Data *MadData) |
3613 | 0 | { |
3614 | | /* the following saves information about the conversation this packet defines, |
3615 | | so there's no point in doing it more than once per packet */ |
3616 | 0 | if (!pinfo->fd->visited) |
3617 | 0 | { |
3618 | 0 | connection_context *connection; |
3619 | 0 | conversation_infiniband_data *proto_data; |
3620 | 0 | conversation_t *conv; |
3621 | 0 | uint64_t *hash_key = g_new(uint64_t, 1); |
3622 | | |
3623 | | /* create a new connection context and store it in the hash table */ |
3624 | 0 | connection = g_new(connection_context, 1); |
3625 | |
|
3626 | 0 | if (pinfo->dst.type == AT_IPv4) { |
3627 | 0 | memcpy(&(connection->req_gid), local_gid, 4); |
3628 | 0 | memcpy(&(connection->resp_gid), remote_gid, 4); |
3629 | 0 | } else { |
3630 | 0 | memcpy(&(connection->req_gid), local_gid, GID_SIZE); |
3631 | 0 | memcpy(&(connection->resp_gid), remote_gid, GID_SIZE); |
3632 | 0 | } |
3633 | 0 | connection->req_lid = local_lid; |
3634 | 0 | connection->resp_lid = remote_lid; |
3635 | 0 | connection->req_qp = local_qpn; |
3636 | 0 | connection->resp_qp = 0; /* not currently known. we'll fill this in later */ |
3637 | 0 | connection->service_id = serviceid; |
3638 | | |
3639 | | /* save the context to the context hash table, for retrieval when the corresponding |
3640 | | CM REP message arrives */ |
3641 | 0 | *hash_key = make_hash_key(MadData->transactionID, &pinfo->src); |
3642 | 0 | g_hash_table_replace(CM_context_table, hash_key, connection); |
3643 | | |
3644 | | /* Now we create a conversation for the CM exchange. This uses both |
3645 | | sides of the conversation since CM packets also include the source |
3646 | | QPN */ |
3647 | 0 | proto_data = wmem_new0(wmem_file_scope(), conversation_infiniband_data); |
3648 | 0 | proto_data->service_id = connection->service_id; |
3649 | 0 | proto_data->client_to_server = true; |
3650 | |
|
3651 | 0 | conv = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, |
3652 | 0 | CONVERSATION_IBQP, pinfo->srcport, pinfo->destport, 0); |
3653 | 0 | conversation_add_proto_data(conv, proto_infiniband, proto_data); |
3654 | | |
3655 | | /* create unidirection conversation for packets that will flow from |
3656 | | * server to client. |
3657 | | */ |
3658 | 0 | create_conv_and_add_proto_data(pinfo, connection->service_id, false, |
3659 | 0 | &pinfo->src, connection->req_lid, |
3660 | 0 | connection->req_qp, 0, NO_ADDR2|NO_PORT2, |
3661 | 0 | &MadData->data[0]); |
3662 | 0 | } |
3663 | 0 | } |
3664 | | |
3665 | | static void parse_IP_CM_Req_Msg(proto_tree *parent_tree, tvbuff_t *tvb, unsigned local_offset) |
3666 | 0 | { |
3667 | 0 | proto_item *private_data_item; |
3668 | 0 | proto_tree *private_data_tree; |
3669 | 0 | uint8_t ipv; |
3670 | |
|
3671 | 0 | private_data_item = proto_tree_add_item(parent_tree, hf_cm_req_ip_cm_req_msg, tvb, local_offset, 92, ENC_NA); |
3672 | 0 | proto_item_set_text(private_data_item, "%s", "IP CM Private Data"); |
3673 | 0 | private_data_tree = proto_item_add_subtree(private_data_item, ett_cm_ipcm); |
3674 | |
|
3675 | 0 | proto_tree_add_item(private_data_tree, hf_cm_req_ip_cm_majv, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3676 | 0 | proto_tree_add_item(private_data_tree, hf_cm_req_ip_cm_minv, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3677 | 0 | local_offset += 1; |
3678 | |
|
3679 | 0 | proto_tree_add_item_ret_uint8(private_data_tree, hf_cm_req_ip_cm_ipv, tvb, local_offset, 1, ENC_BIG_ENDIAN, &ipv); |
3680 | 0 | proto_tree_add_item(private_data_tree, hf_cm_req_ip_cm_res, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3681 | 0 | local_offset += 1; |
3682 | 0 | proto_tree_add_item(private_data_tree, hf_cm_req_ip_cm_sport, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
3683 | 0 | local_offset += 2; |
3684 | |
|
3685 | 0 | if (ipv == 4) { |
3686 | | /* skip first 12 bytes of zero for sip */ |
3687 | 0 | proto_tree_add_item(private_data_tree, hf_cm_req_ip_cm_sip4, tvb, local_offset + 12, 4, ENC_BIG_ENDIAN); |
3688 | 0 | local_offset += 16; |
3689 | | /* skip first 12 bytes of zero for dip */ |
3690 | 0 | proto_tree_add_item(private_data_tree, hf_cm_req_ip_cm_dip4, tvb, local_offset + 12, 4, ENC_BIG_ENDIAN); |
3691 | 0 | } else { |
3692 | 0 | proto_tree_add_item(private_data_tree, hf_cm_req_ip_cm_sip6, tvb, local_offset, 16, ENC_NA); |
3693 | 0 | local_offset += 16; |
3694 | 0 | proto_tree_add_item(private_data_tree, hf_cm_req_ip_cm_dip6, tvb, local_offset, 16, ENC_NA); |
3695 | 0 | } |
3696 | 0 | local_offset += 16; |
3697 | | |
3698 | | /* finally add the consumer specific private data as undecoded data */ |
3699 | 0 | proto_tree_add_item(private_data_tree, hf_ip_cm_req_consumer_private_data, |
3700 | 0 | tvb, local_offset, 56, ENC_NA); |
3701 | 0 | } |
3702 | | |
3703 | | static void parse_CM_Req(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb, unsigned *offset, |
3704 | | MAD_Data *MadData, proto_tree *CM_header_tree, struct infinibandinfo *info) |
3705 | 0 | { |
3706 | 0 | tvbuff_t *next_tvb; |
3707 | 0 | heur_dtbl_entry_t *hdtbl_entry; |
3708 | 0 | uint8_t *local_gid, *remote_gid; |
3709 | 0 | uint64_t serviceid; |
3710 | 0 | unsigned local_offset; |
3711 | 0 | uint32_t local_qpn; |
3712 | 0 | uint32_t local_lid; |
3713 | 0 | uint32_t remote_lid; |
3714 | 0 | bool ip_cm_sid; |
3715 | |
|
3716 | 0 | local_offset = *offset; |
3717 | |
|
3718 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_local_comm_id, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
3719 | 0 | local_offset += 4; |
3720 | 0 | proto_tree_add_item(CM_header_tree, hf_infiniband_reserved, tvb, local_offset, 4, ENC_NA); |
3721 | 0 | local_offset += 4; |
3722 | |
|
3723 | 0 | serviceid = tvb_get_ntoh64(tvb, local_offset); |
3724 | 0 | ip_cm_sid = parse_CM_Req_ServiceID(CM_header_tree, tvb, &local_offset, serviceid); |
3725 | |
|
3726 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_local_ca_guid, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
3727 | 0 | local_offset += 8; |
3728 | 0 | proto_tree_add_item(CM_header_tree, hf_infiniband_reserved, tvb, local_offset, 4, ENC_NA); |
3729 | 0 | local_offset += 4; |
3730 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_local_qkey, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
3731 | 0 | local_offset += 4; |
3732 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_local_qpn, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
3733 | 0 | local_qpn = tvb_get_ntoh24(tvb, local_offset); |
3734 | 0 | local_offset += 3; |
3735 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_respo_res, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3736 | 0 | local_offset += 1; |
3737 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_local_eecn, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
3738 | 0 | local_offset += 3; |
3739 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_init_depth, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3740 | 0 | local_offset += 1; |
3741 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_remote_eecn, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
3742 | 0 | local_offset += 3; |
3743 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_remote_cm_resp_to, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3744 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_transp_serv_type, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3745 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_e2e_flow_ctrl, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3746 | 0 | local_offset += 1; |
3747 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_start_psn, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
3748 | 0 | local_offset += 3; |
3749 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_local_cm_resp_to, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3750 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_retry_count, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3751 | 0 | local_offset += 1; |
3752 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_pkey, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
3753 | 0 | local_offset += 2; |
3754 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_path_pp_mtu, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3755 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_rdc_exists, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3756 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_rnr_retry_count, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3757 | 0 | local_offset += 1; |
3758 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_max_cm_retries, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3759 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_srq, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3760 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_extended_transport, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3761 | 0 | local_offset += 1; |
3762 | 0 | proto_tree_add_item_ret_uint(CM_header_tree, hf_cm_req_primary_local_lid, tvb, local_offset, 2, ENC_BIG_ENDIAN, &local_lid); |
3763 | 0 | local_offset += 2; |
3764 | 0 | proto_tree_add_item_ret_uint(CM_header_tree, hf_cm_req_primary_remote_lid, tvb, local_offset, 2, ENC_BIG_ENDIAN, &remote_lid); |
3765 | 0 | local_offset += 2; |
3766 | |
|
3767 | 0 | if (pinfo->dst.type == AT_IPv4) { |
3768 | 0 | local_gid = (uint8_t *)wmem_alloc(pinfo->pool, 4); |
3769 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_primary_local_gid_ipv4, tvb, local_offset + 12, 4, ENC_BIG_ENDIAN); |
3770 | 0 | (*(uint32_t*)local_gid) = tvb_get_ipv4(tvb, local_offset + 12); |
3771 | 0 | local_offset += 16; |
3772 | |
|
3773 | 0 | remote_gid = (uint8_t *)wmem_alloc(pinfo->pool, 4); |
3774 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_primary_remote_gid_ipv4, tvb, local_offset + 12, 4, ENC_BIG_ENDIAN); |
3775 | 0 | (*(uint32_t*)remote_gid) = tvb_get_ipv4(tvb, local_offset + 12); |
3776 | 0 | } else { |
3777 | 0 | local_gid = (uint8_t *)wmem_alloc(pinfo->pool, GID_SIZE); |
3778 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_primary_local_gid, tvb, local_offset, 16, ENC_NA); |
3779 | 0 | tvb_get_ipv6(tvb, local_offset, (ws_in6_addr*)local_gid); |
3780 | 0 | local_offset += 16; |
3781 | |
|
3782 | 0 | remote_gid = (uint8_t *)wmem_alloc(pinfo->pool, GID_SIZE); |
3783 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_primary_remote_gid, tvb, local_offset, 16, ENC_NA); |
3784 | 0 | tvb_get_ipv6(tvb, local_offset, (ws_in6_addr*)remote_gid); |
3785 | 0 | } |
3786 | 0 | local_offset += 16; |
3787 | |
|
3788 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_primary_flow_label, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
3789 | 0 | local_offset += 2; |
3790 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_primary_reserved0, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3791 | 0 | local_offset += 1; |
3792 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_primary_packet_rate, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3793 | 0 | local_offset += 1; |
3794 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_primary_traffic_class, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3795 | 0 | local_offset += 1; |
3796 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_primary_hop_limit, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3797 | 0 | local_offset += 1; |
3798 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_primary_sl, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3799 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_primary_subnet_local, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3800 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_primary_reserved1, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3801 | 0 | local_offset += 1; |
3802 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_primary_local_ack_to, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3803 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_primary_reserved2, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3804 | 0 | local_offset += 1; |
3805 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_alt_local_lid, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
3806 | 0 | local_offset += 2; |
3807 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_alt_remote_lid, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
3808 | 0 | local_offset += 2; |
3809 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_alt_local_gid, tvb, local_offset, 16, ENC_NA); |
3810 | 0 | local_offset += 16; |
3811 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_alt_remote_gid, tvb, local_offset, 16, ENC_NA); |
3812 | 0 | local_offset += 16; |
3813 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_flow_label, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
3814 | 0 | local_offset += 2; |
3815 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_alt_reserved0, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3816 | 0 | local_offset += 1; |
3817 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_packet_rate, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3818 | 0 | local_offset += 1; |
3819 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_alt_traffic_class, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3820 | 0 | local_offset += 1; |
3821 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_alt_hop_limit, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3822 | 0 | local_offset += 1; |
3823 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_SL, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3824 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_subnet_local, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3825 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_alt_reserved1, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3826 | 0 | local_offset += 1; |
3827 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_local_ACK_timeout, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3828 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_alt_reserved2, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3829 | 0 | local_offset += 1; |
3830 | |
|
3831 | 0 | save_conversation_info(pinfo, local_gid, remote_gid, local_qpn, local_lid, remote_lid, serviceid, MadData); |
3832 | |
|
3833 | 0 | if (ip_cm_sid) { |
3834 | | /* decode IP CM service specific private data */ |
3835 | 0 | parse_IP_CM_Req_Msg(CM_header_tree, tvb, local_offset); |
3836 | | /* ip_cm.req is 36 in length */ |
3837 | 0 | next_tvb = tvb_new_subset_length(tvb, local_offset+36, 56); |
3838 | 0 | } else { |
3839 | | /* Add the undecoded private data anyway as RDMA CM private data */ |
3840 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_req_private_data, tvb, local_offset, 92, ENC_NA); |
3841 | 0 | next_tvb = tvb_new_subset_length(tvb, local_offset, 92); |
3842 | 0 | } |
3843 | | |
3844 | | /* give a chance for subdissectors to analyze the private data */ |
3845 | 0 | (void) dissector_try_heuristic(heur_dissectors_cm_private, next_tvb, pinfo, top_tree, &hdtbl_entry, info); |
3846 | |
|
3847 | 0 | local_offset += 92; |
3848 | 0 | *offset = local_offset; |
3849 | 0 | } |
3850 | | |
3851 | | static void create_bidi_conv(packet_info *pinfo, connection_context *connection) |
3852 | 0 | { |
3853 | 0 | conversation_t *conv; |
3854 | 0 | conversation_infiniband_data *proto_data; |
3855 | |
|
3856 | 0 | proto_data = wmem_new0(wmem_file_scope(), conversation_infiniband_data); |
3857 | 0 | proto_data->service_id = connection->service_id; |
3858 | 0 | proto_data->client_to_server = false; |
3859 | 0 | memset(&proto_data->mad_private_data[0], 0, MAD_DATA_SIZE); |
3860 | 0 | conv = conversation_new(pinfo->num, &pinfo->src, &pinfo->dst, |
3861 | 0 | CONVERSATION_IBQP, connection->resp_qp, |
3862 | 0 | connection->req_qp, 0); |
3863 | 0 | conversation_add_proto_data(conv, proto_infiniband, proto_data); |
3864 | 0 | } |
3865 | | |
3866 | | static void |
3867 | | attach_connection_to_pinfo(packet_info *pinfo, connection_context *connection, |
3868 | | MAD_Data *MadData) |
3869 | 0 | { |
3870 | 0 | address req_addr, |
3871 | 0 | resp_addr; /* we'll fill these in and pass them to conversation_new */ |
3872 | | |
3873 | | /* RC traffic never(?) includes a field indicating the source QPN, so |
3874 | | the destination host knows it only from previous context (a single |
3875 | | QPN on the host that is part of an RC can only receive traffic from |
3876 | | that RC). For this reason we do not register conversations with both |
3877 | | sides, but rather we register the same conversation twice - once for |
3878 | | each side of the Reliable Connection. */ |
3879 | |
|
3880 | 0 | if (pinfo->dst.type == AT_IPv4) { |
3881 | 0 | set_address(&req_addr, AT_IPv4, 4, connection->req_gid); |
3882 | 0 | set_address(&resp_addr, AT_IPv4, 4, connection->resp_gid); |
3883 | 0 | } else if (pinfo->dst.type == AT_IPv6) { |
3884 | 0 | set_address(&req_addr, AT_IPv6, GID_SIZE, connection->req_gid); |
3885 | 0 | set_address(&resp_addr, AT_IPv6, GID_SIZE, connection->resp_gid); |
3886 | 0 | } else { |
3887 | 0 | set_address(&req_addr, AT_IB, GID_SIZE, connection->req_gid); |
3888 | 0 | set_address(&resp_addr, AT_IB, GID_SIZE, connection->resp_gid); |
3889 | 0 | } |
3890 | | |
3891 | | /* create conversations: |
3892 | | * first for client to server direction so that upper level protocols |
3893 | | * can do appropriate dissection depending on the message direction. |
3894 | | */ |
3895 | 0 | create_conv_and_add_proto_data(pinfo, connection->service_id, true, |
3896 | 0 | &resp_addr, connection->resp_lid, |
3897 | 0 | connection->resp_qp, connection->req_qp, |
3898 | 0 | NO_ADDR2|NO_PORT2, &MadData->data[0]); |
3899 | | /* now create bidirectional connection that can be looked upon |
3900 | | * by ULP for stateful context in both directions. |
3901 | | */ |
3902 | 0 | create_bidi_conv(pinfo, connection); |
3903 | 0 | } |
3904 | | |
3905 | | static void update_passive_conv_info(packet_info *pinfo, |
3906 | | connection_context *connection) |
3907 | 0 | { |
3908 | 0 | conversation_t *conv; |
3909 | 0 | conversation_infiniband_data *conv_data; |
3910 | |
|
3911 | 0 | conv = find_conversation(pinfo->num, &pinfo->dst, &pinfo->dst, |
3912 | 0 | CONVERSATION_IBQP, connection->req_qp, connection->req_qp, |
3913 | 0 | NO_ADDR_B|NO_PORT_B); |
3914 | 0 | if (!conv) |
3915 | 0 | return; /* nothing to do with no conversation context */ |
3916 | | |
3917 | 0 | conv_data = (conversation_infiniband_data *)conversation_get_proto_data(conv, proto_infiniband); |
3918 | 0 | if (!conv_data) |
3919 | 0 | return; |
3920 | 0 | conv_data->src_qp = connection->resp_qp; |
3921 | 0 | } |
3922 | | |
3923 | | static void update_conversation_info(packet_info *pinfo, |
3924 | | uint32_t remote_qpn, |
3925 | | MAD_Data *MadData) |
3926 | 0 | { |
3927 | | /* the following saves information about the conversation this packet defines, |
3928 | | so there's no point in doing it more than once per packet */ |
3929 | 0 | if (!pinfo->fd->visited) { |
3930 | | /* get the previously saved context for this connection */ |
3931 | 0 | connection_context *connection; |
3932 | |
|
3933 | 0 | connection = lookup_connection(MadData->transactionID, &pinfo->dst); |
3934 | | |
3935 | | /* if an appropriate connection was not found there's something wrong, but nothing we can |
3936 | | do about it here - so just skip saving the context */ |
3937 | 0 | if (connection) { |
3938 | 0 | connection->resp_qp = remote_qpn; |
3939 | 0 | update_passive_conv_info(pinfo, connection); |
3940 | 0 | attach_connection_to_pinfo(pinfo, connection, MadData); |
3941 | 0 | } |
3942 | 0 | } |
3943 | 0 | } |
3944 | | |
3945 | | static void parse_CM_Rsp(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb, unsigned *offset, |
3946 | | MAD_Data *MadData, proto_tree *CM_header_tree, struct infinibandinfo *info) |
3947 | 0 | { |
3948 | 0 | tvbuff_t *next_tvb; |
3949 | 0 | heur_dtbl_entry_t *hdtbl_entry; |
3950 | 0 | uint32_t remote_qpn; |
3951 | 0 | unsigned local_offset; |
3952 | |
|
3953 | 0 | local_offset = *offset; |
3954 | |
|
3955 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rep_localcommid, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
3956 | 0 | local_offset += 4; |
3957 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rep_remotecommid, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
3958 | 0 | local_offset += 4; |
3959 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rep_localqkey, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
3960 | 0 | local_offset += 4; |
3961 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rep_localqpn, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
3962 | 0 | remote_qpn = tvb_get_ntoh24(tvb, local_offset); |
3963 | 0 | local_offset += 3; |
3964 | 0 | proto_tree_add_item(CM_header_tree, hf_infiniband_reserved, tvb, local_offset, 1, ENC_NA); |
3965 | 0 | local_offset += 1; |
3966 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rep_localeecontnum, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
3967 | 0 | local_offset += 3; |
3968 | 0 | proto_tree_add_item(CM_header_tree, hf_infiniband_reserved, tvb, local_offset, 1, ENC_NA); |
3969 | 0 | local_offset += 1; |
3970 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rep_startingpsn, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
3971 | 0 | local_offset += 3; |
3972 | 0 | proto_tree_add_item(CM_header_tree, hf_infiniband_reserved, tvb, local_offset, 1, ENC_NA); |
3973 | 0 | local_offset += 1; |
3974 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rep_responderres, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3975 | 0 | local_offset += 1; |
3976 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rep_initiatordepth, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3977 | 0 | local_offset += 1; |
3978 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rep_tgtackdelay, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3979 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rep_failoveracc, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3980 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rep_e2eflowctl, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3981 | 0 | local_offset += 1; |
3982 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rep_rnrretrycount, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3983 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rep_srq, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3984 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rep_reserved, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
3985 | 0 | local_offset += 1; |
3986 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rep_localcaguid, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
3987 | 0 | local_offset += 8; |
3988 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rep_privatedata, tvb, local_offset, 196, ENC_NA); |
3989 | |
|
3990 | 0 | update_conversation_info(pinfo, remote_qpn, MadData); |
3991 | | |
3992 | | /* give a chance for subdissectors to get the private data */ |
3993 | 0 | next_tvb = tvb_new_subset_length(tvb, local_offset, 196); |
3994 | 0 | (void) dissector_try_heuristic(heur_dissectors_cm_private, next_tvb, pinfo, top_tree, &hdtbl_entry, info); |
3995 | |
|
3996 | 0 | local_offset += 196; |
3997 | 0 | *offset = local_offset; |
3998 | 0 | } |
3999 | | |
4000 | | static connection_context* |
4001 | | try_connection_dissectors(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb, |
4002 | | address *addr, MAD_Data *MadData, struct infinibandinfo *info, |
4003 | | int pdata_offset, int pdata_length) |
4004 | 0 | { |
4005 | 0 | tvbuff_t *next_tvb; |
4006 | 0 | heur_dtbl_entry_t *hdtbl_entry; |
4007 | 0 | connection_context *connection; |
4008 | |
|
4009 | 0 | connection = lookup_connection(MadData->transactionID, addr); |
4010 | |
|
4011 | 0 | next_tvb = tvb_new_subset_length(tvb, pdata_offset, pdata_length); |
4012 | 0 | (void) dissector_try_heuristic(heur_dissectors_cm_private, next_tvb, pinfo, top_tree, |
4013 | 0 | &hdtbl_entry, info); |
4014 | 0 | return connection; |
4015 | 0 | } |
4016 | | |
4017 | | static void parse_CM_Rtu(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb, unsigned *offset, |
4018 | | MAD_Data *MadData, proto_tree *CM_header_tree, |
4019 | | struct infinibandinfo *info) |
4020 | 0 | { |
4021 | 0 | unsigned local_offset; |
4022 | |
|
4023 | 0 | local_offset = *offset; |
4024 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rtu_localcommid, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4025 | 0 | local_offset += 4; |
4026 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rtu_remotecommid, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4027 | 0 | local_offset += 4; |
4028 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rtu_privatedata, tvb, local_offset, 224, ENC_NA); |
4029 | 0 | try_connection_dissectors(top_tree, pinfo, tvb, &pinfo->src, MadData, info, local_offset, 224); |
4030 | 0 | local_offset += 224; |
4031 | 0 | *offset = local_offset; |
4032 | 0 | } |
4033 | | |
4034 | | static void parse_CM_Rej(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb, unsigned *offset, |
4035 | | MAD_Data *MadData, proto_tree *CM_header_tree, |
4036 | | struct infinibandinfo *info) |
4037 | 0 | { |
4038 | 0 | unsigned local_offset; |
4039 | |
|
4040 | 0 | local_offset = *offset; |
4041 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rej_local_commid, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4042 | 0 | local_offset += 4; |
4043 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rej_remote_commid, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4044 | 0 | local_offset += 4; |
4045 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rej_msg_rej, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4046 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rej_msg_reserved0, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4047 | 0 | local_offset += 1; |
4048 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rej_rej_info_len, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4049 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rej_msg_reserved1, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4050 | 0 | local_offset += 1; |
4051 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rej_reason, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4052 | 0 | local_offset += 2; |
4053 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rej_add_rej_info, tvb, local_offset, 72, ENC_NA); |
4054 | 0 | local_offset += 72; |
4055 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_rej_private_data, tvb, local_offset, 148, ENC_NA); |
4056 | |
|
4057 | 0 | try_connection_dissectors(top_tree, pinfo, tvb, &pinfo->dst, MadData, info, local_offset, 148); |
4058 | 0 | local_offset += 148; |
4059 | 0 | *offset = local_offset; |
4060 | 0 | } |
4061 | | |
4062 | | static void parse_CM_DReq(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb, unsigned *offset, |
4063 | | MAD_Data *MadData, proto_tree *CM_header_tree, |
4064 | | struct infinibandinfo *info) |
4065 | 0 | { |
4066 | 0 | unsigned local_offset; |
4067 | |
|
4068 | 0 | local_offset = *offset; |
4069 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_dreq_localcommid, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4070 | 0 | local_offset += 4; |
4071 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_dreq_remotecommid, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4072 | 0 | local_offset += 4; |
4073 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_dreq_remote_qpn, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
4074 | 0 | local_offset += 3; |
4075 | 0 | proto_tree_add_item(CM_header_tree, hf_infiniband_reserved, tvb, local_offset, 1, ENC_NA); |
4076 | 0 | local_offset += 1; |
4077 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_dreq_privatedata, tvb, local_offset, 220, ENC_NA); |
4078 | 0 | try_connection_dissectors(top_tree, pinfo, tvb, &pinfo->src, MadData, info, local_offset, 220); |
4079 | 0 | local_offset += 220; |
4080 | 0 | *offset = local_offset; |
4081 | 0 | } |
4082 | | |
4083 | | static void parse_CM_DRsp(proto_tree *top_tree, packet_info *pinfo, tvbuff_t *tvb, unsigned *offset, |
4084 | | MAD_Data *MadData, proto_tree *CM_header_tree, |
4085 | | struct infinibandinfo *info) |
4086 | 0 | { |
4087 | 0 | connection_context *connection; |
4088 | 0 | unsigned local_offset; |
4089 | |
|
4090 | 0 | local_offset = *offset; |
4091 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_drsp_localcommid, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4092 | 0 | local_offset += 4; |
4093 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_drsp_remotecommid, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4094 | 0 | local_offset += 4; |
4095 | 0 | proto_tree_add_item(CM_header_tree, hf_cm_drsp_privatedata, tvb, local_offset, 224, ENC_NA); |
4096 | | |
4097 | | /* connection is closing so remove entry from the connection table */ |
4098 | 0 | connection = try_connection_dissectors(top_tree, pinfo, tvb, &pinfo->dst, MadData, info, local_offset, 224); |
4099 | 0 | if (connection) |
4100 | 0 | remove_connection(MadData->transactionID, &pinfo->dst); |
4101 | |
|
4102 | 0 | local_offset += 224; |
4103 | 0 | *offset = local_offset; |
4104 | 0 | } |
4105 | | |
4106 | | /* Parse Communication Management |
4107 | | * IN: parentTree to add the dissection to |
4108 | | * IN: tvb - the data buffer from wireshark |
4109 | | * IN/OUT: The current and updated offset */ |
4110 | | static void parse_COM_MGT(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, unsigned *offset, proto_tree* top_tree) |
4111 | 4 | { |
4112 | 4 | MAD_Data MadData; |
4113 | 4 | struct infinibandinfo info = { NULL, 0, 0, 0, 0, 0, 0, 0, false, false}; |
4114 | 4 | unsigned local_offset; |
4115 | 4 | const char *label; |
4116 | 4 | proto_item *CM_header_item; |
4117 | 4 | proto_tree *CM_header_tree; |
4118 | | |
4119 | 4 | if (!parse_MAD_Common(parentTree, tvb, offset, &MadData)) |
4120 | 2 | { |
4121 | | /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */ |
4122 | 2 | return; |
4123 | 2 | } |
4124 | 2 | local_offset = *offset; |
4125 | | |
4126 | 2 | CM_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, MAD_DATA_SIZE, ENC_NA); |
4127 | | |
4128 | 2 | label = val_to_str_const(MadData.attributeID, CM_Attributes, "(Unknown CM Attribute)"); |
4129 | | |
4130 | 2 | proto_item_set_text(CM_header_item, "CM %s", label); |
4131 | 2 | col_add_fstr(pinfo->cinfo, COL_INFO, "CM: %s", label); |
4132 | | |
4133 | 2 | CM_header_tree = proto_item_add_subtree(CM_header_item, ett_cm); |
4134 | | |
4135 | 2 | info.payload_tree = parentTree; |
4136 | 2 | switch (MadData.attributeID) { |
4137 | 0 | case ATTR_CM_REQ: |
4138 | 0 | info.cm_attribute_id = ATTR_CM_REQ; |
4139 | 0 | parse_CM_Req(top_tree, pinfo, tvb, &local_offset, &MadData, CM_header_tree, &info); |
4140 | 0 | break; |
4141 | 0 | case ATTR_CM_REP: |
4142 | 0 | info.cm_attribute_id = ATTR_CM_REP; |
4143 | 0 | parse_CM_Rsp(top_tree, pinfo, tvb, &local_offset, &MadData, CM_header_tree, &info); |
4144 | 0 | break; |
4145 | 0 | case ATTR_CM_RTU: |
4146 | 0 | info.cm_attribute_id = ATTR_CM_RTU; |
4147 | 0 | parse_CM_Rtu(top_tree, pinfo, tvb, &local_offset, &MadData, CM_header_tree, &info); |
4148 | 0 | break; |
4149 | 0 | case ATTR_CM_REJ: |
4150 | 0 | info.cm_attribute_id = ATTR_CM_REJ; |
4151 | 0 | parse_CM_Rej(top_tree, pinfo, tvb, &local_offset, &MadData, CM_header_tree, &info); |
4152 | 0 | break; |
4153 | 0 | case ATTR_CM_DREQ: |
4154 | 0 | info.cm_attribute_id = ATTR_CM_DREQ; |
4155 | 0 | parse_CM_DReq(top_tree, pinfo, tvb, &local_offset, &MadData, CM_header_tree, &info); |
4156 | 0 | break; |
4157 | 0 | case ATTR_CM_DRSP: |
4158 | 0 | info.cm_attribute_id = ATTR_CM_DRSP; |
4159 | 0 | parse_CM_DRsp(top_tree, pinfo, tvb, &local_offset, &MadData, CM_header_tree, &info); |
4160 | 0 | break; |
4161 | 2 | default: |
4162 | 2 | proto_item_append_text(CM_header_item, " (Dissector Not Implemented)"); |
4163 | 2 | local_offset += MAD_DATA_SIZE; |
4164 | 2 | break; |
4165 | 2 | } |
4166 | | |
4167 | 2 | *offset = local_offset; |
4168 | 2 | } |
4169 | | |
4170 | | /* Parse SNMP Tunneling |
4171 | | * IN: parentTree to add the dissection to |
4172 | | * IN: tvb - the data buffer from wireshark |
4173 | | * IN/OUT: The current and updated offset */ |
4174 | | static void parse_SNMP(proto_tree *parentTree, tvbuff_t *tvb, unsigned *offset) |
4175 | 3 | { |
4176 | | /* Parse the Common MAD Header */ |
4177 | 3 | MAD_Data MadData; |
4178 | 3 | unsigned local_offset; |
4179 | 3 | proto_item *SNMP_header_item; |
4180 | | |
4181 | 3 | if (!parse_MAD_Common(parentTree, tvb, offset, &MadData)) |
4182 | 2 | { |
4183 | | /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */ |
4184 | 2 | return; |
4185 | 2 | } |
4186 | 1 | local_offset = *offset; |
4187 | | |
4188 | 1 | SNMP_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, MAD_DATA_SIZE, ENC_NA); |
4189 | 1 | local_offset += MAD_DATA_SIZE; |
4190 | 1 | proto_item_set_text(SNMP_header_item, "%s", "SNMP - SNMP Tunneling MAD (Dissector Not Implemented)"); |
4191 | 1 | *offset = local_offset; |
4192 | 1 | } |
4193 | | |
4194 | | /* Parse Vendor Specific Management Packets |
4195 | | * IN: parentTree to add the dissection to |
4196 | | * IN: tvb - the data buffer from wireshark |
4197 | | * IN/OUT: The current and updated offset */ |
4198 | | static void parse_VENDOR_MANAGEMENT(proto_tree *parentTree, tvbuff_t *tvb, unsigned *offset) |
4199 | 12 | { |
4200 | | /* Parse the Common MAD Header */ |
4201 | 12 | MAD_Data MadData; |
4202 | 12 | unsigned local_offset; |
4203 | 12 | proto_item *VENDOR_header_item; |
4204 | | |
4205 | 12 | if (!parse_MAD_Common(parentTree, tvb, offset, &MadData)) |
4206 | 10 | { |
4207 | | /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */ |
4208 | 10 | return; |
4209 | 10 | } |
4210 | 2 | local_offset = *offset; |
4211 | | |
4212 | 2 | VENDOR_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, MAD_DATA_SIZE, ENC_NA); |
4213 | 2 | local_offset += MAD_DATA_SIZE; |
4214 | 2 | proto_item_set_text(VENDOR_header_item, "%s", "VENDOR - Vendor Specific Management MAD (Dissector Not Implemented)"); |
4215 | 2 | *offset = local_offset; |
4216 | 2 | } |
4217 | | |
4218 | | /* Parse Application Specific Management Packets |
4219 | | * IN: parentTree to add the dissection to |
4220 | | * IN: tvb - the data buffer from wireshark |
4221 | | * IN/OUT: The current and updated offset */ |
4222 | | static void parse_APPLICATION_MANAGEMENT(proto_tree *parentTree, tvbuff_t *tvb, unsigned *offset) |
4223 | 12 | { |
4224 | | /* Parse the Common MAD Header */ |
4225 | 12 | MAD_Data MadData; |
4226 | 12 | unsigned local_offset; |
4227 | 12 | proto_item *APP_header_item; |
4228 | | |
4229 | 12 | if (!parse_MAD_Common(parentTree, tvb, offset, &MadData)) |
4230 | 10 | { |
4231 | | /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */ |
4232 | 10 | return; |
4233 | 10 | } |
4234 | 2 | local_offset = *offset; |
4235 | 2 | APP_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, MAD_DATA_SIZE, ENC_NA); |
4236 | 2 | local_offset += MAD_DATA_SIZE; |
4237 | 2 | proto_item_set_text(APP_header_item, "%s", "APP - Application Specific MAD (Dissector Not Implemented)"); |
4238 | 2 | *offset = local_offset; |
4239 | 2 | } |
4240 | | |
4241 | | /* Parse Reserved Management Packets. |
4242 | | |
4243 | | * This is an !ERROR CONDITION! |
4244 | | * It means that the Management Class value used was defined as a reserved value for future use. |
4245 | | * This method is here since we will want to report this information directly to the UI without blowing up Wireshark. |
4246 | | |
4247 | | * IN: parentTree to add the dissection to |
4248 | | * IN: tvb - the data buffer from wireshark |
4249 | | * IN/OUT: The current and updated offset */ |
4250 | | static void parse_RESERVED_MANAGEMENT(proto_tree *parentTree, tvbuff_t *tvb, unsigned *offset) |
4251 | 27 | { |
4252 | | /* Parse the Common MAD Header */ |
4253 | 27 | MAD_Data MadData; |
4254 | 27 | unsigned local_offset; |
4255 | 27 | proto_item *RESV_header_item; |
4256 | | |
4257 | 27 | if (!parse_MAD_Common(parentTree, tvb, offset, &MadData)) |
4258 | 25 | { |
4259 | | /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */ |
4260 | 25 | return; |
4261 | 25 | } |
4262 | 2 | local_offset = *offset; |
4263 | 2 | RESV_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 256, ENC_NA); |
4264 | 2 | local_offset += 256; |
4265 | 2 | proto_item_set_text(RESV_header_item, "%s", "RESERVED - Reserved MAD Type (Possible Device Error)"); |
4266 | 2 | *offset = local_offset; |
4267 | 2 | } |
4268 | | |
4269 | | /* Parse the common MAD Header |
4270 | | * IN: parentTree to add the dissection to |
4271 | | * IN: tvb - the data buffer from wireshark |
4272 | | * IN/OUT: The current and updated offset |
4273 | | * IN/OUT: MadData - the data from the MAD header */ |
4274 | | static bool parse_MAD_Common(proto_tree *parentTree, tvbuff_t *tvb, unsigned *offset, MAD_Data* MadData) |
4275 | 92 | { |
4276 | 92 | unsigned local_offset = *offset; |
4277 | 92 | proto_item *MAD_header_item; |
4278 | 92 | proto_tree *MAD_header_tree; |
4279 | | |
4280 | 92 | if (MadData == NULL) |
4281 | 0 | return false; |
4282 | 92 | if (!tvb_bytes_exist(tvb, *offset, 256)) |
4283 | 73 | return false; |
4284 | | |
4285 | | /* Get the Management Class to decide between LID Routed and Direct Route */ |
4286 | 19 | MadData->managementClass = tvb_get_uint8(tvb, local_offset + 1); |
4287 | 19 | MadData->classVersion = tvb_get_uint8(tvb, local_offset + 2); |
4288 | 19 | MadData->method = tvb_get_uint8(tvb, local_offset + 3); |
4289 | 19 | MadData->status = tvb_get_uint8(tvb, local_offset + 4); |
4290 | 19 | MadData->classSpecific = tvb_get_ntohs(tvb, local_offset + 6); |
4291 | 19 | MadData->transactionID = tvb_get_ntoh64(tvb, local_offset + 8); |
4292 | 19 | MadData->attributeID = tvb_get_ntohs(tvb, local_offset + 16); |
4293 | 19 | MadData->attributeModifier = tvb_get_ntohl(tvb, local_offset + 20); |
4294 | 19 | tvb_memcpy(tvb, MadData->data, local_offset + 24, MAD_DATA_SIZE); |
4295 | | |
4296 | | /* Populate the Dissector Tree */ |
4297 | | |
4298 | 19 | MAD_header_item = proto_tree_add_item(parentTree, hf_infiniband_MAD, tvb, local_offset, 256, ENC_NA); |
4299 | 19 | proto_item_set_text(MAD_header_item, "%s", "MAD Header - Common Management Datagram"); |
4300 | 19 | MAD_header_tree = proto_item_add_subtree(MAD_header_item, ett_mad); |
4301 | | |
4302 | 19 | proto_tree_add_item(MAD_header_tree, hf_infiniband_base_version, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4303 | 19 | local_offset += 1; |
4304 | 19 | proto_tree_add_item(MAD_header_tree, hf_infiniband_mgmt_class, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4305 | 19 | local_offset += 1; |
4306 | 19 | proto_tree_add_item(MAD_header_tree, hf_infiniband_class_version, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4307 | 19 | local_offset += 1; |
4308 | 19 | proto_tree_add_item(MAD_header_tree, hf_infiniband_method, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4309 | 19 | local_offset += 1; |
4310 | 19 | proto_tree_add_item(MAD_header_tree, hf_infiniband_status, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4311 | 19 | local_offset += 2; |
4312 | 19 | proto_tree_add_item(MAD_header_tree, hf_infiniband_class_specific, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4313 | 19 | local_offset += 2; |
4314 | 19 | proto_tree_add_item(MAD_header_tree, hf_infiniband_transaction_id, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
4315 | 19 | local_offset += 8; |
4316 | 19 | proto_tree_add_item(MAD_header_tree, hf_infiniband_attribute_id, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4317 | 19 | local_offset += 2; |
4318 | 19 | proto_tree_add_item(MAD_header_tree, hf_infiniband_reserved, tvb, local_offset, 2, ENC_NA); |
4319 | 19 | local_offset += 2; |
4320 | 19 | proto_tree_add_item(MAD_header_tree, hf_infiniband_attribute_modifier, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4321 | 19 | local_offset += 4; |
4322 | 19 | proto_tree_add_item(MAD_header_tree, hf_infiniband_data, tvb, local_offset, MAD_DATA_SIZE, ENC_NA); |
4323 | 19 | *offset = local_offset; /* Move the offset to the start of the Data field - this will be where the other parsers start. */ |
4324 | | |
4325 | 19 | return true; |
4326 | 92 | } |
4327 | | |
4328 | | /* Parse the RMPP (Reliable Multi-Packet Transaction Protocol |
4329 | | * IN: parentTree to add the dissection to |
4330 | | * IN: tvb - the data buffer from wireshark |
4331 | | * IN/OUT: The current and updated offset */ |
4332 | | static bool parse_RMPP(proto_tree *parentTree, packet_info* pinfo, tvbuff_t *tvb, unsigned *offset) |
4333 | 3 | { |
4334 | 3 | unsigned local_offset = *offset; |
4335 | 3 | uint8_t RMPP_Type = tvb_get_uint8(tvb, local_offset + 1); |
4336 | 3 | proto_item *RMPP_header_item; |
4337 | 3 | proto_tree *RMPP_header_tree; |
4338 | | |
4339 | 3 | RMPP_header_item = proto_tree_add_item(parentTree, hf_infiniband_RMPP, tvb, local_offset, 12, ENC_NA); |
4340 | 3 | proto_item_set_text(RMPP_header_item, "%s", val_to_str(pinfo->pool, RMPP_Type, RMPP_Packet_Types, "Reserved RMPP Type! (0x%02x)")); |
4341 | 3 | RMPP_header_tree = proto_item_add_subtree(RMPP_header_item, ett_rmpp); |
4342 | | |
4343 | 3 | proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_version, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4344 | 3 | local_offset += 1; |
4345 | 3 | proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_type, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4346 | 3 | local_offset += 1; |
4347 | 3 | proto_tree_add_item(RMPP_header_tree, hf_infiniband_r_resp_time, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4348 | 3 | proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_flags, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4349 | 3 | local_offset += 1; |
4350 | 3 | proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_status, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4351 | 3 | local_offset += 1; |
4352 | 3 | switch (RMPP_Type) |
4353 | 3 | { |
4354 | 2 | case RMPP_NOT_USED: |
4355 | 2 | proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_data1, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4356 | 2 | local_offset += 4; |
4357 | 2 | proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_data2, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4358 | 2 | local_offset += 4; |
4359 | 2 | break; |
4360 | 0 | case RMPP_DATA: |
4361 | 0 | proto_tree_add_item(RMPP_header_tree, hf_infiniband_segment_number, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4362 | 0 | local_offset += 4; |
4363 | 0 | proto_tree_add_item(RMPP_header_tree, hf_infiniband_payload_length32, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4364 | 0 | local_offset += 4; |
4365 | 0 | proto_tree_add_item(RMPP_header_tree, hf_infiniband_transferred_data, tvb, local_offset, 220, ENC_NA); |
4366 | 0 | break; |
4367 | 0 | case RMPP_ACK: |
4368 | 0 | proto_tree_add_item(RMPP_header_tree, hf_infiniband_segment_number, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4369 | 0 | local_offset += 4; |
4370 | 0 | proto_tree_add_item(RMPP_header_tree, hf_infiniband_new_window_last, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4371 | 0 | local_offset += 4; |
4372 | 0 | proto_tree_add_item(RMPP_header_tree, hf_infiniband_reserved, tvb, local_offset, 220, ENC_NA); |
4373 | 0 | break; |
4374 | 0 | case RMPP_STOP: |
4375 | 0 | case RMPP_ABORT: |
4376 | 0 | proto_tree_add_item(RMPP_header_tree, hf_infiniband_reserved, tvb, local_offset, 4, ENC_NA); |
4377 | 0 | local_offset += 4; |
4378 | 0 | proto_tree_add_item(RMPP_header_tree, hf_infiniband_reserved, tvb, local_offset, 4, ENC_NA); |
4379 | 0 | local_offset += 4; |
4380 | 0 | proto_tree_add_item(RMPP_header_tree, hf_infiniband_optional_extended_error_data, tvb, local_offset, 220, ENC_NA); |
4381 | 0 | break; |
4382 | 1 | default: |
4383 | 1 | break; |
4384 | 3 | } |
4385 | 3 | *offset = local_offset; |
4386 | 3 | return true; |
4387 | 3 | } |
4388 | | |
4389 | | /* Parse the Method from the MAD Common Header. |
4390 | | * Simply used to generate the identifier. |
4391 | | * IN: SubMItem - the item to append the method label to. |
4392 | | * IN: MadHeader - the MadData structure that contains the information from the Common MAD header. |
4393 | | * IN: pinfo - packet info from wireshark. */ |
4394 | | static void label_SUBM_Method(proto_item *SubMItem, MAD_Data *MadHeader, packet_info *pinfo) |
4395 | 4 | { |
4396 | 4 | const char *label = val_to_str_const(MadHeader->method, SUBM_Methods, "(Unknown SubManagement Method!)"); |
4397 | | |
4398 | 4 | proto_item_append_text(SubMItem, "%s", label); |
4399 | 4 | col_append_str(pinfo->cinfo, COL_INFO, label); |
4400 | 4 | } |
4401 | | |
4402 | | /* Parse the SA Method from the MAD Common Header. |
4403 | | * Simply used to generate the identifier. |
4404 | | * IN: SubAItem - the item to append the method label to. |
4405 | | * IN: MadHeader - the MadData structure that contains the information from the Common MAD header. |
4406 | | * IN: pinfo - packet info from wireshark. */ |
4407 | | static void label_SUBA_Method(proto_item *SubAItem, MAD_Data *MadHeader, packet_info *pinfo) |
4408 | 3 | { |
4409 | 3 | const char *label = val_to_str_const(MadHeader->method, SUBA_Methods, "(Unknown SubAdministration Method!)"); |
4410 | | |
4411 | 3 | proto_item_append_text(SubAItem, "%s", label); |
4412 | 3 | col_append_str(pinfo->cinfo, COL_INFO, label); |
4413 | 3 | } |
4414 | | |
4415 | | /* Parse the Attribute from the MAD Common Header |
4416 | | * Simply used to generate the identifier. |
4417 | | * IN: SubMItem - the item to append the Attribute label to. |
4418 | | * IN: MadHeader - the MadData structure that contains the information from the Common MAD header. |
4419 | | * IN: pinfo - packet info from wireshark. */ |
4420 | | static void label_SUBM_Attribute(proto_item *SubMItem, MAD_Data *MadHeader, packet_info *pinfo) |
4421 | 4 | { |
4422 | 4 | const char *label = val_to_str_const(MadHeader->attributeID, SUBM_Attributes, "(Unknown SubManagement Attribute!)"); |
4423 | | |
4424 | 4 | proto_item_append_text(SubMItem, "%s", &label[11]); |
4425 | 4 | col_append_str(pinfo->cinfo, COL_INFO, &label[11]); |
4426 | 4 | } |
4427 | | |
4428 | | /* Parse the SA Attribute from the MAD Common Header |
4429 | | * Simply used to generate the identifier. |
4430 | | * IN: SubAItem - the item to append the Attribute label to. |
4431 | | * IN: MadHeader - the MadData structure that contains the information from the Common MAD header. |
4432 | | * IN: pinfo - packet info from wireshark. */ |
4433 | | static void label_SUBA_Attribute(proto_item *SubAItem, MAD_Data *MadHeader, packet_info *pinfo) |
4434 | 3 | { |
4435 | 3 | const char *label = val_to_str_const(MadHeader->attributeID, SUBA_Attributes, "(Unknown SubAdministration Attribute!)"); |
4436 | | |
4437 | 3 | proto_item_append_text(SubAItem, "%s", &label[11]); |
4438 | 3 | col_append_str(pinfo->cinfo, COL_INFO, &label[11]); |
4439 | 3 | } |
4440 | | |
4441 | | /* Parse the attribute from a Subnet Management Packet. |
4442 | | * IN: Parent Tree to add the item to in the dissection tree |
4443 | | * IN: tvbuff, offset - the data and where it is. |
4444 | | * IN: MAD_Data the data from the Common MAD Header that provides the information we need */ |
4445 | | static bool parse_SUBM_Attribute(proto_tree *parentTree, packet_info* pinfo, tvbuff_t *tvb, unsigned *offset, MAD_Data *MadHeader) |
4446 | 4 | { |
4447 | 4 | uint16_t attributeID = MadHeader->attributeID; |
4448 | 4 | proto_item *SUBM_Attribute_header_item; |
4449 | 4 | proto_tree *SUBM_Attribute_header_tree; |
4450 | | |
4451 | 4 | SUBM_Attribute_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, *offset, 64, ENC_NA); |
4452 | 4 | proto_item_set_text(SUBM_Attribute_header_item, "%s", val_to_str(pinfo->pool, attributeID, SUBM_Attributes, "Unknown Attribute Type! (0x%02x)")); |
4453 | 4 | SUBM_Attribute_header_tree = proto_item_add_subtree(SUBM_Attribute_header_item, ett_subm_attribute); |
4454 | | |
4455 | | |
4456 | 4 | switch (attributeID) |
4457 | 4 | { |
4458 | 0 | case 0x0002: |
4459 | 0 | parse_NoticesAndTraps(SUBM_Attribute_header_tree , pinfo, tvb, offset); |
4460 | 0 | break; |
4461 | 0 | case 0x0010: |
4462 | 0 | parse_NodeDescription(SUBM_Attribute_header_tree , tvb, offset); |
4463 | 0 | break; |
4464 | 0 | case 0x0011: |
4465 | 0 | parse_NodeInfo(SUBM_Attribute_header_tree , tvb, offset); |
4466 | 0 | break; |
4467 | 0 | case 0x0012: |
4468 | 0 | parse_SwitchInfo(SUBM_Attribute_header_tree , tvb, offset); |
4469 | 0 | break; |
4470 | 0 | case 0x0014: |
4471 | 0 | parse_GUIDInfo(SUBM_Attribute_header_tree , tvb, offset); |
4472 | 0 | break; |
4473 | 0 | case 0x0015: |
4474 | 0 | parse_PortInfo(SUBM_Attribute_header_tree , tvb, offset); |
4475 | 0 | break; |
4476 | 0 | case 0x0016: |
4477 | 0 | parse_P_KeyTable(SUBM_Attribute_header_tree , tvb, offset); |
4478 | 0 | break; |
4479 | 0 | case 0x0017: |
4480 | 0 | parse_SLtoVLMappingTable(SUBM_Attribute_header_tree , tvb, offset); |
4481 | 0 | break; |
4482 | 0 | case 0x0018: |
4483 | 0 | parse_VLArbitrationTable(SUBM_Attribute_header_tree , tvb, offset); |
4484 | 0 | break; |
4485 | 0 | case 0x0019: |
4486 | 0 | parse_LinearForwardingTable(SUBM_Attribute_header_tree , tvb, offset); |
4487 | 0 | break; |
4488 | 0 | case 0x001A: |
4489 | 0 | parse_RandomForwardingTable(SUBM_Attribute_header_tree , tvb, offset); |
4490 | 0 | break; |
4491 | 0 | case 0x001B: |
4492 | 0 | parse_MulticastForwardingTable(SUBM_Attribute_header_tree , tvb, offset); |
4493 | 0 | break; |
4494 | 0 | case 0x001C: |
4495 | 0 | parse_LinkSpeedWidthPairsTable(SUBM_Attribute_header_tree , tvb, offset); |
4496 | 0 | break; |
4497 | 0 | case 0x0020: |
4498 | 0 | parse_SMInfo(SUBM_Attribute_header_tree , tvb, offset); |
4499 | 0 | break; |
4500 | 0 | case 0x0030: |
4501 | 0 | parse_VendorDiag(SUBM_Attribute_header_tree , tvb, offset); |
4502 | 0 | break; |
4503 | 0 | case 0x0031: |
4504 | 0 | parse_LedInfo(SUBM_Attribute_header_tree , tvb, offset); |
4505 | 0 | break; |
4506 | 4 | default: |
4507 | 4 | break; |
4508 | 4 | } |
4509 | | |
4510 | | |
4511 | 4 | *offset += 64; |
4512 | 4 | return true; |
4513 | | |
4514 | 4 | } |
4515 | | /* Parse the attribute from a Subnet Administration Packet. |
4516 | | * IN: Parent Tree to add the item to in the dissection tree |
4517 | | * IN: tvbuff, offset - the data and where it is. |
4518 | | * IN: MAD_Data the data from the Common MAD Header that provides the information we need */ |
4519 | | static bool parse_SUBA_Attribute(proto_tree *parentTree, packet_info* pinfo, tvbuff_t *tvb, unsigned *offset, MAD_Data *MadHeader) |
4520 | 3 | { |
4521 | 3 | uint16_t attributeID = MadHeader->attributeID; |
4522 | 3 | proto_item *SUBA_Attribute_header_item; |
4523 | 3 | proto_tree *SUBA_Attribute_header_tree; |
4524 | | |
4525 | 3 | SUBA_Attribute_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, *offset, 200, ENC_NA); |
4526 | 3 | proto_item_set_text(SUBA_Attribute_header_item, "%s", val_to_str(pinfo->pool, attributeID, SUBA_Attributes, "Unknown Attribute Type! (0x%02x)")); |
4527 | 3 | SUBA_Attribute_header_tree = proto_item_add_subtree(SUBA_Attribute_header_item, ett_suba_attribute); |
4528 | | |
4529 | | /* Skim off the RID fields should they be present */ |
4530 | 3 | parse_RID(SUBA_Attribute_header_tree, tvb, offset, MadHeader); |
4531 | | |
4532 | | /* Parse the rest of the attributes */ |
4533 | 3 | switch (MadHeader->attributeID) |
4534 | 3 | { |
4535 | 0 | case 0x0001: /* (ClassPortInfo) */ |
4536 | 0 | parse_ClassPortInfo(SUBA_Attribute_header_tree, tvb, offset); |
4537 | 0 | break; |
4538 | 0 | case 0x0002: /* (Notice) */ |
4539 | 0 | parse_NoticesAndTraps(SUBA_Attribute_header_tree, pinfo, tvb, offset); |
4540 | 0 | break; |
4541 | 0 | case 0x0003: /* (InformInfo) */ |
4542 | 0 | parse_InformInfo(SUBA_Attribute_header_tree, tvb, offset); |
4543 | 0 | break; |
4544 | 0 | case 0x0011: /* (NodeRecord) */ |
4545 | 0 | parse_NodeInfo(SUBA_Attribute_header_tree, tvb, offset); |
4546 | 0 | *offset += 40; |
4547 | 0 | parse_NodeDescription(SUBA_Attribute_header_tree, tvb, offset); |
4548 | 0 | break; |
4549 | 0 | case 0x0012: /* (PortInfoRecord) */ |
4550 | 0 | parse_PortInfo(SUBA_Attribute_header_tree, tvb, offset); |
4551 | 0 | break; |
4552 | 0 | case 0x0013: /* (SLtoVLMappingTableRecord) */ |
4553 | 0 | parse_SLtoVLMappingTable(SUBA_Attribute_header_tree, tvb, offset); |
4554 | 0 | break; |
4555 | 0 | case 0x0014: /* (SwitchInfoRecord) */ |
4556 | 0 | parse_SwitchInfo(SUBA_Attribute_header_tree, tvb, offset); |
4557 | 0 | break; |
4558 | 0 | case 0x0015: /*(LinearForwardingTableRecord) */ |
4559 | 0 | parse_LinearForwardingTable(SUBA_Attribute_header_tree, tvb, offset); |
4560 | 0 | break; |
4561 | 0 | case 0x0016: /* (RandomForwardingTableRecord) */ |
4562 | 0 | parse_RandomForwardingTable(SUBA_Attribute_header_tree, tvb, offset); |
4563 | 0 | break; |
4564 | 0 | case 0x0017: /* (MulticastForwardingTableRecord) */ |
4565 | 0 | parse_MulticastForwardingTable(SUBA_Attribute_header_tree, tvb, offset); |
4566 | 0 | break; |
4567 | 0 | case 0x0018: /* (SMInfoRecord) */ |
4568 | 0 | parse_SMInfo(SUBA_Attribute_header_tree, tvb, offset); |
4569 | 0 | break; |
4570 | 0 | case 0x0019: /* (LinkSpeedWidthPairsTableRecord) */ |
4571 | 0 | parse_LinkSpeedWidthPairsTable(SUBA_Attribute_header_tree, tvb, offset); |
4572 | 0 | break; |
4573 | 0 | case 0x00F3: /*(InformInfoRecord) */ |
4574 | 0 | parse_InformInfo(SUBA_Attribute_header_tree, tvb, offset); |
4575 | 0 | break; |
4576 | 0 | case 0x0020: /* (LinkRecord) */ |
4577 | 0 | parse_LinkRecord(SUBA_Attribute_header_tree, tvb, offset); |
4578 | 0 | break; |
4579 | 0 | case 0x0030: /* (GuidInfoRecord) */ |
4580 | 0 | parse_GUIDInfo(SUBA_Attribute_header_tree, tvb, offset); |
4581 | 0 | break; |
4582 | 0 | case 0x0031: /*(ServiceRecord) */ |
4583 | 0 | parse_ServiceRecord(SUBA_Attribute_header_tree, tvb, offset); |
4584 | 0 | break; |
4585 | 0 | case 0x0033: /* (P_KeyTableRecord) */ |
4586 | 0 | parse_P_KeyTable(SUBA_Attribute_header_tree, tvb, offset); |
4587 | 0 | break; |
4588 | 0 | case 0x0035: /* (PathRecord) */ |
4589 | 0 | parse_PathRecord(SUBA_Attribute_header_tree, tvb, offset); |
4590 | 0 | break; |
4591 | 0 | case 0x0036: /* (VLArbitrationTableRecord) */ |
4592 | 0 | parse_VLArbitrationTable(SUBA_Attribute_header_tree, tvb, offset); |
4593 | 0 | break; |
4594 | 0 | case 0x0038: /* (MCMemberRecord) */ |
4595 | 0 | parse_MCMemberRecord(SUBA_Attribute_header_tree, tvb, offset); |
4596 | 0 | break; |
4597 | 0 | case 0x0039: /* (TraceRecord) */ |
4598 | 0 | parse_TraceRecord(SUBA_Attribute_header_tree, tvb, offset); |
4599 | 0 | break; |
4600 | 0 | case 0x003A: /* (MultiPathRecord) */ |
4601 | 0 | parse_MultiPathRecord(SUBA_Attribute_header_tree, tvb, offset); |
4602 | 0 | break; |
4603 | 0 | case 0x003B: /* (ServiceAssociationRecord) */ |
4604 | 0 | parse_ServiceAssociationRecord(SUBA_Attribute_header_tree, tvb, offset); |
4605 | 0 | break; |
4606 | 3 | default: /* (Unknown SubAdministration Attribute!) */ |
4607 | | /* We've already labeled as unknown in item construction */ |
4608 | 3 | break; |
4609 | 3 | } |
4610 | | |
4611 | 3 | *offset += 200; |
4612 | 3 | return true; |
4613 | 3 | } |
4614 | | |
4615 | | /* Subnet Management Attribute Parsing Methods. |
4616 | | * Also Parsing for Attributes common to both SM/SA. |
4617 | | * The Subnet Admin Parsing methods will call some of these methods when an attribute is present within an SA MAD |
4618 | | */ |
4619 | | |
4620 | | |
4621 | | /* Parse ClassPortInfo Attribute Field |
4622 | | * IN: parentTree - The tree to add the dissection to |
4623 | | * tvb - The tvbuf of packet data |
4624 | | * offset - The offset in TVB where the attribute begins */ |
4625 | | static int parse_ClassPortInfo(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
4626 | 0 | { |
4627 | 0 | unsigned local_offset = *offset; |
4628 | 0 | proto_tree *ClassPortInfo_header_tree; |
4629 | |
|
4630 | 0 | if (!parentTree) |
4631 | 0 | return *offset; |
4632 | | |
4633 | 0 | ClassPortInfo_header_tree = parentTree; |
4634 | |
|
4635 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_BaseVersion, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4636 | 0 | local_offset += 1; |
4637 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_ClassVersion, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4638 | 0 | local_offset += 1; |
4639 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_CapabilityMask, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4640 | 0 | local_offset += 2; |
4641 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_CapabilityMask2, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4642 | 0 | local_offset += 3; |
4643 | |
|
4644 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_RespTimeValue, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4645 | 0 | local_offset += 1; |
4646 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_RedirectGID, tvb, local_offset, 16, ENC_NA); |
4647 | 0 | local_offset += 16; |
4648 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_RedirectTC, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4649 | 0 | local_offset += 1; |
4650 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_RedirectSL, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4651 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_RedirectFL, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
4652 | 0 | local_offset += 3; |
4653 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_RedirectLID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4654 | 0 | local_offset += 2; |
4655 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_RedirectP_Key, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4656 | 0 | local_offset += 2; |
4657 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_Reserved, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4658 | 0 | local_offset += 1; |
4659 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_RedirectQP, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
4660 | 0 | local_offset += 3; |
4661 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_RedirectQ_Key, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4662 | 0 | local_offset += 4; |
4663 | |
|
4664 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_TrapGID, tvb, local_offset, 16, ENC_NA); |
4665 | 0 | local_offset += 16; |
4666 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_TrapTC, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4667 | 0 | local_offset += 1; |
4668 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_TrapSL, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4669 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_TrapFL, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
4670 | 0 | local_offset += 3; |
4671 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_TrapLID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4672 | 0 | local_offset += 2; |
4673 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_TrapP_Key, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4674 | 0 | local_offset += 2; |
4675 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_Reserved, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4676 | 0 | local_offset += 1; |
4677 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_TrapQP, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
4678 | 0 | local_offset += 3; |
4679 | 0 | proto_tree_add_item(ClassPortInfo_header_tree, hf_infiniband_ClassPortInfo_TrapQ_Key, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4680 | 0 | local_offset += 4; |
4681 | |
|
4682 | 0 | return local_offset; |
4683 | 0 | } |
4684 | | |
4685 | | /* Parse NoticeDataDetails Attribute Field |
4686 | | * IN: parentTree - The tree to add the dissection to |
4687 | | * tvb - The tvbuf of packet data |
4688 | | * offset - The offset in TVB where the attribute begins |
4689 | | * trapNumber - The Trap ID of the Trap Data being Dissected */ |
4690 | | |
4691 | | static int parse_NoticeDataDetails(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset, uint16_t trapNumber) |
4692 | 0 | { |
4693 | 0 | unsigned local_offset = *offset; |
4694 | 0 | proto_item *DataDetails_header_item; |
4695 | 0 | proto_tree *DataDetails_header_tree; |
4696 | |
|
4697 | 0 | if (!parentTree) |
4698 | 0 | return 0; |
4699 | | |
4700 | 0 | DataDetails_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 54, ENC_NA); |
4701 | 0 | DataDetails_header_tree = proto_item_add_subtree(DataDetails_header_item, ett_datadetails); |
4702 | | |
4703 | |
|
4704 | 0 | switch (trapNumber) |
4705 | 0 | { |
4706 | 0 | case 64: |
4707 | 0 | proto_item_set_text(DataDetails_header_item, "%s", "Trap 64 DataDetails"); |
4708 | 0 | local_offset += 6; |
4709 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR, tvb, local_offset, 16, ENC_NA); |
4710 | 0 | local_offset += 16; |
4711 | 0 | break; |
4712 | 0 | case 65: |
4713 | 0 | proto_item_set_text(DataDetails_header_item, "%s", "Trap 65 DataDetails"); |
4714 | 0 | local_offset += 6; |
4715 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR, tvb, local_offset, 16, ENC_NA); |
4716 | 0 | local_offset += 16; |
4717 | 0 | break; |
4718 | 0 | case 66: |
4719 | 0 | proto_item_set_text(DataDetails_header_item, "%s", "Trap 66 DataDetails"); |
4720 | 0 | local_offset += 6; |
4721 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR, tvb, local_offset, 16, ENC_NA); |
4722 | 0 | local_offset += 16; |
4723 | 0 | break; |
4724 | 0 | case 67: |
4725 | 0 | proto_item_set_text(DataDetails_header_item, "%s", "Trap 67 DataDetails"); |
4726 | 0 | local_offset += 6; |
4727 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR, tvb, local_offset, 16, ENC_NA); |
4728 | 0 | local_offset += 16; |
4729 | 0 | break; |
4730 | 0 | case 68: |
4731 | 0 | proto_item_set_text(DataDetails_header_item, "%s", "Trap 68 DataDetails"); |
4732 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_COMP_MASK, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
4733 | 0 | local_offset += 8; |
4734 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_WAIT_FOR_REPATH, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4735 | 0 | break; |
4736 | 0 | case 69: |
4737 | 0 | proto_item_set_text(DataDetails_header_item, "%s", "Trap 69 DataDetails"); |
4738 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_COMP_MASK, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
4739 | 0 | local_offset += 8; |
4740 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_WAIT_FOR_REPATH, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4741 | 0 | break; |
4742 | 0 | case 128: |
4743 | 0 | proto_item_set_text(DataDetails_header_item, "%s", "Trap 128 DataDetails"); |
4744 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4745 | 0 | local_offset += 2; |
4746 | 0 | break; |
4747 | 0 | case 129: |
4748 | 0 | proto_item_set_text(DataDetails_header_item, "%s", "Trap 129 DataDetails"); |
4749 | 0 | local_offset += 2; |
4750 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4751 | 0 | local_offset += 2; |
4752 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_PORTNO, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4753 | 0 | local_offset += 1; |
4754 | 0 | break; |
4755 | 0 | case 130: |
4756 | 0 | proto_item_set_text(DataDetails_header_item, "%s", "Trap 130 DataDetails"); |
4757 | 0 | local_offset += 2; |
4758 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4759 | 0 | local_offset += 2; |
4760 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_PORTNO, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4761 | 0 | local_offset += 1; |
4762 | 0 | break; |
4763 | 0 | case 131: |
4764 | 0 | proto_item_set_text(DataDetails_header_item, "%s", "Trap 131 DataDetails"); |
4765 | 0 | local_offset += 2; |
4766 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4767 | 0 | local_offset += 2; |
4768 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_PORTNO, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4769 | 0 | local_offset += 1; |
4770 | 0 | break; |
4771 | 0 | case 144: |
4772 | 0 | proto_item_set_text(DataDetails_header_item, "%s", "Trap 144 DataDetails"); |
4773 | 0 | local_offset += 2; |
4774 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4775 | 0 | local_offset += 2; |
4776 | 0 | local_offset += 1; |
4777 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_OtherLocalChanges, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4778 | 0 | local_offset += 1; |
4779 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_CAPABILITYMASK, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4780 | 0 | local_offset += 4; |
4781 | 0 | local_offset += 1; |
4782 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LinkSpeecEnabledChange, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4783 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LinkWidthEnabledChange, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4784 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_NodeDescriptionChange, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4785 | 0 | break; |
4786 | 0 | case 145: |
4787 | 0 | proto_item_set_text(DataDetails_header_item, "%s", "Trap 145 DataDetails"); |
4788 | 0 | local_offset += 2; |
4789 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4790 | 0 | local_offset += 2; |
4791 | 0 | local_offset += 2; |
4792 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_SYSTEMIMAGEGUID, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
4793 | 0 | local_offset += 8; |
4794 | 0 | break; |
4795 | 0 | case 256: |
4796 | 0 | proto_item_set_text(DataDetails_header_item, "%s", "Trap 256 DataDetails"); |
4797 | 0 | local_offset += 2; |
4798 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4799 | 0 | local_offset += 2; |
4800 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DRSLID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4801 | 0 | local_offset += 2; |
4802 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_METHOD, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4803 | 0 | local_offset += 1; |
4804 | 0 | local_offset += 1; |
4805 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_ATTRIBUTEID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4806 | 0 | local_offset += 2; |
4807 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_ATTRIBUTEMODIFIER, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4808 | 0 | local_offset += 4; |
4809 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_MKEY, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
4810 | 0 | local_offset += 8; |
4811 | 0 | local_offset += 1; |
4812 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DRNotice, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4813 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DRPathTruncated, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4814 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DRHopCount, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4815 | 0 | local_offset += 1; |
4816 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DRNoticeReturnPath, tvb, local_offset, 30, ENC_NA); |
4817 | 0 | local_offset += 30; |
4818 | 0 | break; |
4819 | 0 | case 257: |
4820 | 0 | proto_item_set_text(DataDetails_header_item, "%s", "Trap 257 DataDetails"); |
4821 | 0 | local_offset += 2; |
4822 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR1, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4823 | 0 | local_offset += 2; |
4824 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR2, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4825 | 0 | local_offset += 2; |
4826 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_KEY, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4827 | 0 | local_offset += 4; |
4828 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_SL, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4829 | 0 | local_offset += 1; |
4830 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP1, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
4831 | 0 | local_offset += 3; |
4832 | 0 | local_offset += 1; |
4833 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP2, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
4834 | 0 | local_offset += 3; |
4835 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR1, tvb, local_offset, 16, ENC_NA); |
4836 | 0 | local_offset += 16; |
4837 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR2, tvb, local_offset, 16, ENC_NA); |
4838 | 0 | local_offset += 16; |
4839 | 0 | break; |
4840 | 0 | case 258: |
4841 | 0 | proto_item_set_text(DataDetails_header_item, "%s", "Trap 258 DataDetails"); |
4842 | 0 | local_offset += 2; |
4843 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR1, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4844 | 0 | local_offset += 2; |
4845 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR2, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4846 | 0 | local_offset += 2; |
4847 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_KEY, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4848 | 0 | local_offset += 4; |
4849 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_SL, tvb, local_offset, 1, ENC_BIG_ENDIAN); local_offset += 1; |
4850 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP1, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
4851 | 0 | local_offset += 3; |
4852 | 0 | local_offset += 1; |
4853 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP2, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
4854 | 0 | local_offset += 3; |
4855 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR1, tvb, local_offset, 16, ENC_NA); |
4856 | 0 | local_offset += 16; |
4857 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR2, tvb, local_offset, 16, ENC_NA); |
4858 | 0 | local_offset += 16; |
4859 | 0 | break; |
4860 | 0 | case 259: |
4861 | 0 | proto_item_set_text(DataDetails_header_item, "%s", "Trap 259 DataDetails"); |
4862 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DataValid, tvb, local_offset, 2, ENC_NA); |
4863 | 0 | local_offset += 2; |
4864 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR1, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4865 | 0 | local_offset += 2; |
4866 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR2, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4867 | 0 | local_offset += 2; |
4868 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_PKEY, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4869 | 0 | local_offset += 2; |
4870 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_SL, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4871 | 0 | local_offset += 1; |
4872 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP1, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
4873 | 0 | local_offset += 3; |
4874 | 0 | local_offset += 1; |
4875 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP2, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
4876 | 0 | local_offset += 3; |
4877 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR1, tvb, local_offset, 16, ENC_NA); |
4878 | 0 | local_offset += 16; |
4879 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR2, tvb, local_offset, 16, ENC_NA); |
4880 | 0 | local_offset += 16; |
4881 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_SWLIDADDR, tvb, local_offset, 2, ENC_NA); |
4882 | 0 | local_offset += 2; |
4883 | 0 | proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_PORTNO, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4884 | 0 | local_offset += 1; |
4885 | 0 | break; |
4886 | 0 | default: |
4887 | 0 | proto_item_set_text(DataDetails_header_item, "%s", "Vendor Specific Subnet Management Trap"); |
4888 | 0 | local_offset += 54; |
4889 | 0 | break; |
4890 | 0 | } |
4891 | | |
4892 | 0 | return local_offset; |
4893 | 0 | } |
4894 | | |
4895 | | /* Parse NoticesAndTraps Attribute |
4896 | | * IN: parentTree - The tree to add the dissection to |
4897 | | * tvb - The tvbuf of packet data |
4898 | | * offset - The offset in TVB where the attribute begins */ |
4899 | | static void parse_NoticesAndTraps(proto_tree* parentTree, packet_info* pinfo, tvbuff_t* tvb, unsigned *offset) |
4900 | 0 | { |
4901 | 0 | unsigned local_offset = *offset; |
4902 | 0 | proto_item *NoticesAndTraps_header_item; |
4903 | 0 | proto_tree *NoticesAndTraps_header_tree; |
4904 | 0 | uint16_t trapNumber = tvb_get_ntohs(tvb, local_offset + 4); |
4905 | |
|
4906 | 0 | if (!parentTree) |
4907 | 0 | return; |
4908 | | |
4909 | 0 | NoticesAndTraps_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, ENC_NA); |
4910 | 0 | proto_item_set_text(NoticesAndTraps_header_item, "%s", val_to_str(pinfo->pool, trapNumber, Trap_Description, "Unknown or Vendor Specific Trap Number! (0x%02x)")); |
4911 | 0 | NoticesAndTraps_header_tree = proto_item_add_subtree(NoticesAndTraps_header_item, ett_noticestraps); |
4912 | |
|
4913 | 0 | proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_IsGeneric, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4914 | 0 | proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_Type, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4915 | 0 | local_offset += 1; |
4916 | 0 | proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_ProducerTypeVendorID, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
4917 | 0 | local_offset += 3; |
4918 | 0 | proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_TrapNumberDeviceID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4919 | 0 | local_offset += 2; |
4920 | 0 | proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_IssuerLID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4921 | 0 | local_offset += 2; |
4922 | 0 | proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_NoticeToggle, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4923 | 0 | proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_NoticeCount, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4924 | 0 | local_offset += 2; |
4925 | |
|
4926 | 0 | parse_NoticeDataDetails(NoticesAndTraps_header_tree, tvb, &local_offset, trapNumber); |
4927 | 0 | proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_DataDetails, tvb, local_offset, 54, ENC_NA); |
4928 | 0 | local_offset += 54; |
4929 | |
|
4930 | | #if 0 /* Only Defined For GMPs not SMPs which is not part of this dissector phase */ |
4931 | | *proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_IssuerGID, tvb, local_offset, 16, ENC_NA); |
4932 | | local_offset += 16; |
4933 | | *proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_ClassTrapSpecificData, tvb, local_offset, 1, ENC_NA); |
4934 | | local_offset += 1; |
4935 | | #endif |
4936 | |
|
4937 | 0 | } |
4938 | | |
4939 | | /* Parse NodeDescription Attribute |
4940 | | * IN: parentTree - The tree to add the dissection to |
4941 | | * tvb - The tvbuf of packet data |
4942 | | * offset - The offset in TVB where the attribute begins */ |
4943 | | static void parse_NodeDescription(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
4944 | 0 | { |
4945 | 0 | unsigned local_offset = *offset; |
4946 | 0 | proto_tree *NodeDescription_header_tree; |
4947 | |
|
4948 | 0 | if (!parentTree) |
4949 | 0 | return; |
4950 | | |
4951 | 0 | NodeDescription_header_tree = parentTree; |
4952 | 0 | proto_tree_add_item(NodeDescription_header_tree, hf_infiniband_NodeDescription_NodeString, tvb, local_offset, 64, ENC_ASCII); |
4953 | 0 | } |
4954 | | |
4955 | | /* Parse NodeInfo Attribute |
4956 | | * IN: parentTree - The tree to add the dissection to |
4957 | | * tvb - The tvbuf of packet data |
4958 | | * offset - The offset in TVB where the attribute begins */ |
4959 | | static int parse_NodeInfo(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
4960 | 0 | { |
4961 | 0 | unsigned local_offset = *offset; |
4962 | 0 | proto_tree *NodeInfo_header_tree; |
4963 | |
|
4964 | 0 | if (!parentTree) |
4965 | 0 | return *offset; |
4966 | | |
4967 | 0 | NodeInfo_header_tree = parentTree; |
4968 | |
|
4969 | 0 | proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_BaseVersion, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4970 | 0 | local_offset += 1; |
4971 | 0 | proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_ClassVersion, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4972 | 0 | local_offset += 1; |
4973 | 0 | proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_NodeType, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4974 | 0 | local_offset += 1; |
4975 | 0 | proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_NumPorts, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4976 | 0 | local_offset += 1; |
4977 | 0 | proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_SystemImageGUID, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
4978 | 0 | local_offset += 8; |
4979 | 0 | proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_NodeGUID, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
4980 | 0 | local_offset += 8; |
4981 | 0 | proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_PortGUID, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
4982 | 0 | local_offset += 8; |
4983 | 0 | proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_PartitionCap, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4984 | 0 | local_offset += 2; |
4985 | 0 | proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_DeviceID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
4986 | 0 | local_offset += 2; |
4987 | 0 | proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_Revision, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
4988 | 0 | local_offset += 4; |
4989 | 0 | proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_LocalPortNum, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
4990 | 0 | local_offset += 1; |
4991 | 0 | proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_VendorID, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
4992 | 0 | local_offset += 3; |
4993 | |
|
4994 | 0 | return local_offset; |
4995 | |
|
4996 | 0 | } |
4997 | | |
4998 | | /* Parse SwitchInfo Attribute |
4999 | | * IN: parentTree - The tree to add the dissection to |
5000 | | * tvb - The tvbuf of packet data |
5001 | | * offset - The offset in TVB where the attribute begins */ |
5002 | | static int parse_SwitchInfo(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
5003 | 0 | { |
5004 | 0 | unsigned local_offset = *offset; |
5005 | 0 | proto_tree *SwitchInfo_header_tree; |
5006 | |
|
5007 | 0 | if (!parentTree) |
5008 | 0 | return *offset; |
5009 | | |
5010 | 0 | SwitchInfo_header_tree = parentTree; |
5011 | |
|
5012 | 0 | proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_LinearFDBCap, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5013 | 0 | local_offset += 2; |
5014 | 0 | proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_RandomFDBCap, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5015 | 0 | local_offset += 2; |
5016 | 0 | proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_MulticastFDBCap, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5017 | 0 | local_offset += 2; |
5018 | 0 | proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_LinearFDBTop, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5019 | 0 | local_offset += 2; |
5020 | 0 | proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_DefaultPort, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5021 | 0 | local_offset += 1; |
5022 | 0 | proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_DefaultMulticastPrimaryPort, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5023 | 0 | local_offset += 1; |
5024 | 0 | proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_DefaultMulticastNotPrimaryPort, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5025 | 0 | local_offset += 1; |
5026 | 0 | proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_LifeTimeValue, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5027 | 0 | proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_PortStateChange, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5028 | 0 | proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_OptimizedSLtoVLMappingProgramming, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5029 | 0 | local_offset += 1; |
5030 | 0 | proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_LIDsPerPort, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5031 | 0 | local_offset += 2; |
5032 | 0 | proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_PartitionEnforcementCap, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5033 | 0 | local_offset += 2; |
5034 | 0 | proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_InboundEnforcementCap, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5035 | 0 | proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_OutboundEnforcementCap, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5036 | 0 | proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_FilterRawInboundCap, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5037 | 0 | proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_FilterRawOutboundCap, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5038 | 0 | proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_EnhancedPortZero, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5039 | 0 | local_offset += 1; |
5040 | |
|
5041 | 0 | return local_offset; |
5042 | 0 | } |
5043 | | |
5044 | | /* Parse GUIDInfo Attribute |
5045 | | * IN: parentTree - The tree to add the dissection to |
5046 | | * tvb - The tvbuf of packet data |
5047 | | * offset - The offset in TVB where the attribute begins */ |
5048 | | static int parse_GUIDInfo(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
5049 | 0 | { |
5050 | 0 | unsigned local_offset = *offset; |
5051 | 0 | proto_tree *GUIDInfo_header_tree; |
5052 | 0 | proto_item *tempItemLow; |
5053 | 0 | int i; |
5054 | |
|
5055 | 0 | if (!parentTree) |
5056 | 0 | return *offset; |
5057 | | |
5058 | 0 | GUIDInfo_header_tree = parentTree; |
5059 | |
|
5060 | 0 | for (i = 0; i < 8; i++) |
5061 | 0 | { |
5062 | 0 | tempItemLow = proto_tree_add_item(GUIDInfo_header_tree, hf_infiniband_GUIDInfo_GUID, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
5063 | 0 | local_offset += 8; |
5064 | 0 | proto_item_append_text(tempItemLow, "(%u)", i); |
5065 | 0 | } |
5066 | 0 | return local_offset; |
5067 | 0 | } |
5068 | | |
5069 | | /* Parse PortInfo Attribute |
5070 | | * IN: parentTree - The tree to add the dissection to |
5071 | | * tvb - The tvbuf of packet data |
5072 | | * offset - The offset in TVB where the attribute begins */ |
5073 | | static int parse_PortInfo(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
5074 | 0 | { |
5075 | 0 | unsigned local_offset = *offset; |
5076 | 0 | proto_tree *PortInfo_header_tree; |
5077 | 0 | proto_item *PortInfo_CapabilityMask_item; |
5078 | 0 | proto_tree *PortInfo_CapabilityMask_tree; |
5079 | 0 | proto_item *temp_item; |
5080 | 0 | uint16_t temp_val; |
5081 | |
|
5082 | 0 | if (!parentTree) |
5083 | 0 | return *offset; |
5084 | | |
5085 | 0 | PortInfo_header_tree = parentTree; |
5086 | |
|
5087 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_M_Key, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
5088 | 0 | local_offset += 8; |
5089 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_GidPrefix, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
5090 | 0 | local_offset += 8; |
5091 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5092 | 0 | local_offset += 2; |
5093 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_MasterSMLID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5094 | 0 | local_offset += 2; |
5095 | | |
5096 | | /* Capability Mask Flags */ |
5097 | 0 | PortInfo_CapabilityMask_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_CapabilityMask, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5098 | 0 | PortInfo_CapabilityMask_tree = proto_item_add_subtree(PortInfo_CapabilityMask_item, ett_portinfo_capmask); |
5099 | |
|
5100 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_SM, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5101 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_NoticeSupported, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5102 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_TrapSupported, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5103 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_OptionalIPDSupported, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5104 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_AutomaticMigrationSupported, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5105 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_SLMappingSupported, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5106 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_MKeyNVRAM, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5107 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_PKeyNVRAM, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5108 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_LEDInfoSupported, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5109 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_SMdisabled, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5110 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_SystemImageGUIDSupported, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5111 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_PKeySwitchExternalPortTrapSupported, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5112 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_CommunicationManagementSupported, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5113 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_SNMPTunnelingSupported, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5114 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_ReinitSupported, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5115 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_DeviceManagementSupported, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5116 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_VendorClassSupported, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5117 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_DRNoticeSupported, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5118 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_CapabilityMaskNoticeSupported, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5119 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_BootManagementSupported, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5120 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_LinkRoundTripLatencySupported, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5121 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_ClientRegistrationSupported, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5122 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_OtherLocalChangesNoticeSupported, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5123 | 0 | proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_LinkSpeedWIdthPairsTableSupported, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5124 | 0 | local_offset += 4; |
5125 | | /* End Capability Mask Flags */ |
5126 | | |
5127 | | /* Diag Code */ |
5128 | 0 | temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_DiagCode, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5129 | 0 | temp_val = tvb_get_ntohs(tvb, local_offset); |
5130 | |
|
5131 | 0 | proto_item_append_text(temp_item, ", %s", val_to_str_const(temp_val, DiagCode, "Reserved DiagCode! Possible Error")); |
5132 | 0 | local_offset += 2; |
5133 | | /* End Diag Code */ |
5134 | |
|
5135 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_M_KeyLeasePeriod, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5136 | 0 | local_offset += 2; |
5137 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LocalPortNum, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5138 | 0 | local_offset += 1; |
5139 | | |
5140 | | /* LinkWidthEnabled */ |
5141 | 0 | temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkWidthEnabled, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5142 | 0 | temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset); |
5143 | |
|
5144 | 0 | proto_item_append_text(temp_item, ", %s", val_to_str_const(temp_val, LinkWidthEnabled, "Reserved LinkWidthEnabled Value! Possible Error")); |
5145 | 0 | local_offset += 1; |
5146 | | /* End LinkWidthEnabled */ |
5147 | | |
5148 | | /* LinkWidthSupported */ |
5149 | 0 | temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkWidthSupported, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5150 | 0 | temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset); |
5151 | |
|
5152 | 0 | proto_item_append_text(temp_item, ", %s", val_to_str_const(temp_val, LinkWidthSupported, "Reserved LinkWidthSupported Value! Possible Error")); |
5153 | 0 | local_offset += 1; |
5154 | | /* End LinkWidthSupported */ |
5155 | | |
5156 | | /* LinkWidthActive */ |
5157 | 0 | temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkWidthActive, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5158 | 0 | temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset); |
5159 | |
|
5160 | 0 | proto_item_append_text(temp_item, ", %s", val_to_str_const(temp_val, LinkWidthActive, "Reserved LinkWidthActive Value! Possible Error")); |
5161 | 0 | local_offset += 1; |
5162 | | /* End LinkWidthActive */ |
5163 | | |
5164 | | /* LinkSpeedSupported */ |
5165 | 0 | temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkSpeedSupported, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5166 | 0 | temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset); |
5167 | | |
5168 | | /* 4 bit values = mask and shift */ |
5169 | 0 | temp_val = temp_val & 0x00F0; |
5170 | 0 | temp_val = temp_val >> 4; |
5171 | |
|
5172 | 0 | proto_item_append_text(temp_item, ", %s", val_to_str_const(temp_val, LinkSpeedSupported, "Reserved LinkWidthSupported Value! Possible Error")); |
5173 | | /* End LinkSpeedSupported */ |
5174 | | |
5175 | | /* PortState */ |
5176 | 0 | temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_PortState, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5177 | 0 | temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset); |
5178 | | |
5179 | | /* 4 bit values = mask and shift */ |
5180 | 0 | temp_val = temp_val & 0x000F; |
5181 | | /*temp_val = temp_val >> 4 */ |
5182 | |
|
5183 | 0 | proto_item_append_text(temp_item, ", %s", val_to_str_const(temp_val, PortState, "Reserved PortState Value! Possible Error")); |
5184 | 0 | local_offset += 1; |
5185 | | /* End PortState */ |
5186 | | |
5187 | | /* PortPhysicalState */ |
5188 | 0 | temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_PortPhysicalState, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5189 | 0 | temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset); |
5190 | | |
5191 | | /* 4 bit values = mask and shift */ |
5192 | 0 | temp_val = temp_val & 0x00F0; |
5193 | 0 | temp_val = temp_val >> 4; |
5194 | |
|
5195 | 0 | proto_item_append_text(temp_item, ", %s", val_to_str_const(temp_val, PortPhysicalState, "Reserved PortPhysicalState Value! Possible Error")); |
5196 | | /* End PortPhysicalState */ |
5197 | | |
5198 | | /* LinkDownDefaultState */ |
5199 | 0 | temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkDownDefaultState, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5200 | 0 | temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset); |
5201 | | |
5202 | | /* 4 bit values = mask and shift */ |
5203 | 0 | temp_val = temp_val & 0x000F; |
5204 | | /*temp_val = temp_val >> 4 */ |
5205 | |
|
5206 | 0 | proto_item_append_text(temp_item, ", %s", val_to_str_const(temp_val, LinkDownDefaultState, "Reserved LinkDownDefaultState Value! Possible Error")); |
5207 | 0 | local_offset += 1; |
5208 | | /* End LinkDownDefaultState */ |
5209 | |
|
5210 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_M_KeyProtectBits, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5211 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LMC, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5212 | 0 | local_offset += 1; |
5213 | | |
5214 | | /* LinkSpeedActive */ |
5215 | 0 | temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkSpeedActive, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5216 | 0 | temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset); |
5217 | | |
5218 | | /* 4 bit values = mask and shift */ |
5219 | 0 | temp_val = temp_val & 0x00F0; |
5220 | 0 | temp_val = temp_val >> 4; |
5221 | |
|
5222 | 0 | proto_item_append_text(temp_item, ", %s", val_to_str_const(temp_val, LinkSpeedActive, "Reserved LinkSpeedActive Value! Possible Error")); |
5223 | | /* End LinkSpeedActive */ |
5224 | | |
5225 | | /* LinkSpeedEnabled */ |
5226 | 0 | temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkSpeedEnabled, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5227 | 0 | temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset); |
5228 | | |
5229 | | /* 4 bit values = mask and shift */ |
5230 | 0 | temp_val = temp_val & 0x000F; |
5231 | | /*temp_val = temp_val >> 4 */ |
5232 | |
|
5233 | 0 | proto_item_append_text(temp_item, ", %s", val_to_str_const(temp_val, LinkSpeedEnabled, "Reserved LinkSpeedEnabled Value! Possible Error")); |
5234 | 0 | local_offset += 1; |
5235 | | /* End LinkSpeedEnabled */ |
5236 | | |
5237 | | /* NeighborMTU */ |
5238 | 0 | temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_NeighborMTU, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5239 | 0 | temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset); |
5240 | | |
5241 | | /* 4 bit values = mask and shift */ |
5242 | 0 | temp_val = temp_val & 0x00F0; |
5243 | 0 | temp_val = temp_val >> 4; |
5244 | |
|
5245 | 0 | proto_item_append_text(temp_item, ", %s", val_to_str_const(temp_val, NeighborMTU, "Reserved NeighborMTU Value! Possible Error")); |
5246 | | |
5247 | | /* End NeighborMTU */ |
5248 | |
|
5249 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_MasterSMSL, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5250 | 0 | local_offset += 1; |
5251 | | |
5252 | | /* VLCap */ |
5253 | 0 | temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_VLCap, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5254 | 0 | temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset); |
5255 | | |
5256 | | /* 4 bit values = mask and shift */ |
5257 | 0 | temp_val = temp_val & 0x00F0; |
5258 | 0 | temp_val = temp_val >> 4; |
5259 | |
|
5260 | 0 | proto_item_append_text(temp_item, ", %s", val_to_str_const(temp_val, VLCap, "Reserved VLCap Value! Possible Error")); |
5261 | | |
5262 | | /* End VLCap */ |
5263 | |
|
5264 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_InitType, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5265 | 0 | local_offset += 1; |
5266 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_VLHighLimit, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5267 | 0 | local_offset += 1; |
5268 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_VLArbitrationHighCap, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5269 | 0 | local_offset += 1; |
5270 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_VLArbitrationLowCap, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5271 | 0 | local_offset += 1; |
5272 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_InitTypeReply, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5273 | | |
5274 | | /* MTUCap */ |
5275 | 0 | temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_MTUCap, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5276 | 0 | temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset); |
5277 | | |
5278 | | /* 4 bit values = mask and shift */ |
5279 | 0 | temp_val = temp_val & 0x000F; |
5280 | | /*temp_val = temp_val >> 4 */ |
5281 | |
|
5282 | 0 | proto_item_append_text(temp_item, ", %s", val_to_str_const(temp_val, MTUCap, "Reserved MTUCap Value! Possible Error")); |
5283 | 0 | local_offset += 1; |
5284 | | /* End MTUCap */ |
5285 | |
|
5286 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_VLStallCount, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5287 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_HOQLife, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5288 | 0 | local_offset += 1; |
5289 | | |
5290 | | /* OperationalVLs */ |
5291 | 0 | temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_OperationalVLs, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5292 | 0 | temp_val = (uint16_t)tvb_get_uint8(tvb, local_offset); |
5293 | | |
5294 | | /* 4 bit values = mask and shift */ |
5295 | 0 | temp_val = temp_val & 0x00F0; |
5296 | 0 | temp_val = temp_val >> 4; |
5297 | |
|
5298 | 0 | proto_item_append_text(temp_item, ", %s", val_to_str_const(temp_val, OperationalVLs, "Reserved OperationalVLs Value! Possible Error")); |
5299 | | /* End OperationalVLs */ |
5300 | |
|
5301 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_PartitionEnforcementInbound, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5302 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_PartitionEnforcementOutbound, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5303 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_FilterRawInbound, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5304 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_FilterRawOutbound, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5305 | 0 | local_offset += 1; |
5306 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_M_KeyViolations, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5307 | 0 | local_offset += 2; |
5308 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_P_KeyViolations, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5309 | 0 | local_offset += 2; |
5310 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_Q_KeyViolations, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5311 | 0 | local_offset += 2; |
5312 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_GUIDCap, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5313 | 0 | local_offset += 1; |
5314 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_ClientReregister, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5315 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_SubnetTimeOut, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5316 | 0 | local_offset += 1; |
5317 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_RespTimeValue, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5318 | 0 | local_offset += 1; |
5319 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LocalPhyErrors, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5320 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_OverrunErrors, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5321 | 0 | local_offset += 1; |
5322 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_MaxCreditHint, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5323 | 0 | local_offset += 3; /* 2 + 1 Reserved */ |
5324 | 0 | proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkRoundTripLatency, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
5325 | 0 | local_offset += 3; |
5326 | |
|
5327 | 0 | return local_offset; |
5328 | 0 | } |
5329 | | |
5330 | | /* Parse P_KeyTable Attribute |
5331 | | * IN: parentTree - The tree to add the dissection to |
5332 | | * tvb - The tvbuf of packet data |
5333 | | * offset - The offset in TVB where the attribute begins */ |
5334 | | static void parse_P_KeyTable(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
5335 | 0 | { |
5336 | 0 | unsigned local_offset = *offset; |
5337 | 0 | int i; |
5338 | 0 | proto_item *P_KeyTable_header_item; |
5339 | 0 | proto_tree *P_KeyTable_header_tree; |
5340 | 0 | proto_item *tempItemLow; |
5341 | 0 | proto_item *tempItemHigh; |
5342 | |
|
5343 | 0 | if (!parentTree) |
5344 | 0 | return; |
5345 | | |
5346 | 0 | P_KeyTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_P_KeyTable_P_KeyTableBlock, tvb, local_offset, 64, ENC_NA); |
5347 | 0 | proto_item_set_text(P_KeyTable_header_item, "%s", "P_KeyTable"); |
5348 | 0 | P_KeyTable_header_tree = proto_item_add_subtree(P_KeyTable_header_item, ett_pkeytable); |
5349 | |
|
5350 | 0 | for (i = 0; i < 32; i++) |
5351 | 0 | { |
5352 | 0 | tempItemLow = proto_tree_add_item(P_KeyTable_header_tree, hf_infiniband_P_KeyTable_MembershipType, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5353 | 0 | tempItemHigh = proto_tree_add_item(P_KeyTable_header_tree, hf_infiniband_P_KeyTable_P_KeyBase, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5354 | 0 | local_offset += 2; |
5355 | 0 | proto_item_append_text(tempItemLow, "(%u)", i); |
5356 | 0 | proto_item_append_text(tempItemHigh, "(%u)", i+1); |
5357 | 0 | } |
5358 | 0 | } |
5359 | | |
5360 | | /* Parse SLtoVLMappingTable Attribute |
5361 | | * IN: parentTree - The tree to add the dissection to |
5362 | | * tvb - The tvbuf of packet data |
5363 | | * offset - The offset in TVB where the attribute begins */ |
5364 | | static void parse_SLtoVLMappingTable(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
5365 | 0 | { |
5366 | 0 | unsigned local_offset = *offset; |
5367 | 0 | proto_item *SLtoVLMappingTable_header_item; |
5368 | 0 | proto_tree *SLtoVLMappingTable_header_tree; |
5369 | 0 | proto_item *tempItemLow; |
5370 | 0 | proto_item *tempItemHigh; |
5371 | 0 | int i; |
5372 | |
|
5373 | 0 | if (!parentTree) |
5374 | 0 | return; |
5375 | | |
5376 | 0 | SLtoVLMappingTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, ENC_NA); |
5377 | 0 | proto_item_set_text(SLtoVLMappingTable_header_item, "%s", "SLtoVLMappingTable"); |
5378 | 0 | SLtoVLMappingTable_header_tree = proto_item_add_subtree(SLtoVLMappingTable_header_item, ett_sltovlmapping); |
5379 | |
|
5380 | 0 | for (i = 0; i < 8; i++) |
5381 | 0 | { |
5382 | 0 | tempItemLow = proto_tree_add_item(SLtoVLMappingTable_header_tree, hf_infiniband_SLtoVLMappingTable_SLtoVL_HighBits, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5383 | 0 | tempItemHigh = proto_tree_add_item(SLtoVLMappingTable_header_tree, hf_infiniband_SLtoVLMappingTable_SLtoVL_LowBits, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5384 | 0 | local_offset += 1; |
5385 | 0 | proto_item_append_text(tempItemLow, "(%u)", i); |
5386 | 0 | proto_item_append_text(tempItemHigh, "(%u)", i+1); |
5387 | 0 | } |
5388 | 0 | } |
5389 | | |
5390 | | /* Parse VLArbitrationTable Attribute |
5391 | | * IN: parentTree - The tree to add the dissection to |
5392 | | * tvb - The tvbuf of packet data |
5393 | | * offset - The offset in TVB where the attribute begins */ |
5394 | | static void parse_VLArbitrationTable(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
5395 | 0 | { |
5396 | 0 | unsigned local_offset = *offset; |
5397 | 0 | int i; |
5398 | 0 | proto_item *VLArbitrationTable_header_item; |
5399 | 0 | proto_tree *VLArbitrationTable_header_tree; |
5400 | 0 | proto_item *tempItemLow; |
5401 | 0 | proto_item *tempItemHigh; |
5402 | |
|
5403 | 0 | if (!parentTree) |
5404 | 0 | return; |
5405 | | |
5406 | 0 | VLArbitrationTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, ENC_NA); |
5407 | 0 | proto_item_set_text(VLArbitrationTable_header_item, "%s", "VLArbitrationTable"); |
5408 | 0 | VLArbitrationTable_header_tree = proto_item_add_subtree(VLArbitrationTable_header_item, ett_vlarbitrationtable); |
5409 | |
|
5410 | 0 | for (i = 0; i < 32; i++) |
5411 | 0 | { |
5412 | 0 | tempItemLow = proto_tree_add_item(VLArbitrationTable_header_tree, hf_infiniband_VLArbitrationTable_VL, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5413 | 0 | local_offset += 1; |
5414 | 0 | tempItemHigh = proto_tree_add_item(VLArbitrationTable_header_tree, hf_infiniband_VLArbitrationTable_Weight, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5415 | 0 | local_offset += 1; |
5416 | 0 | proto_item_append_text(tempItemLow, "(%u)", i); |
5417 | 0 | proto_item_append_text(tempItemHigh, "(%u)", i); |
5418 | 0 | } |
5419 | 0 | } |
5420 | | |
5421 | | /* Parse LinearForwardingTable Attribute |
5422 | | * IN: parentTree - The tree to add the dissection to |
5423 | | * tvb - The tvbuf of packet data |
5424 | | * offset - The offset in TVB where the attribute begins */ |
5425 | | static void parse_LinearForwardingTable(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
5426 | 0 | { |
5427 | 0 | int i; |
5428 | 0 | unsigned local_offset = *offset; |
5429 | 0 | proto_item *LinearForwardingTable_header_item; |
5430 | 0 | proto_tree *LinearForwardingTable_header_tree; |
5431 | 0 | proto_item *tempItemLow; |
5432 | |
|
5433 | 0 | if (!parentTree) |
5434 | 0 | return; |
5435 | | |
5436 | 0 | LinearForwardingTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, ENC_NA); |
5437 | 0 | proto_item_set_text(LinearForwardingTable_header_item, "%s", "LinearForwardingTable"); |
5438 | 0 | LinearForwardingTable_header_tree = proto_item_add_subtree(LinearForwardingTable_header_item, ett_linearforwardingtable); |
5439 | |
|
5440 | 0 | for (i = 0; i < 64; i++) |
5441 | 0 | { |
5442 | 0 | tempItemLow = proto_tree_add_item(LinearForwardingTable_header_tree, hf_infiniband_LinearForwardingTable_Port, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5443 | 0 | local_offset += 1; |
5444 | 0 | proto_item_append_text(tempItemLow, "(%u)", i); |
5445 | 0 | } |
5446 | 0 | } |
5447 | | |
5448 | | /* Parse RandomForwardingTable Attribute |
5449 | | * IN: parentTree - The tree to add the dissection to |
5450 | | * tvb - The tvbuf of packet data |
5451 | | * offset - The offset in TVB where the attribute begins */ |
5452 | | static void parse_RandomForwardingTable(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
5453 | 0 | { |
5454 | 0 | int i; |
5455 | 0 | unsigned local_offset = *offset; |
5456 | 0 | proto_item *RandomForwardingTable_header_item; |
5457 | 0 | proto_tree *RandomForwardingTable_header_tree; |
5458 | 0 | proto_item *tempItemLow; |
5459 | |
|
5460 | 0 | if (!parentTree) |
5461 | 0 | return; |
5462 | | |
5463 | 0 | RandomForwardingTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, ENC_NA); |
5464 | 0 | proto_item_set_text(RandomForwardingTable_header_item, "%s", "RandomForwardingTable"); |
5465 | 0 | RandomForwardingTable_header_tree = proto_item_add_subtree(RandomForwardingTable_header_item, ett_randomforwardingtable); |
5466 | |
|
5467 | 0 | for (i = 0; i < 16; i++) |
5468 | 0 | { |
5469 | 0 | tempItemLow = proto_tree_add_item(RandomForwardingTable_header_tree, hf_infiniband_RandomForwardingTable_LID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5470 | 0 | local_offset += 2; |
5471 | 0 | proto_item_append_text(tempItemLow, "(%u)", i); |
5472 | 0 | tempItemLow = proto_tree_add_item(RandomForwardingTable_header_tree, hf_infiniband_RandomForwardingTable_Valid, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5473 | 0 | proto_item_append_text(tempItemLow, "(%u)", i); |
5474 | 0 | tempItemLow = proto_tree_add_item(RandomForwardingTable_header_tree, hf_infiniband_RandomForwardingTable_LMC, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5475 | 0 | local_offset += 1; |
5476 | 0 | proto_item_append_text(tempItemLow, "(%u)", i); |
5477 | 0 | tempItemLow = proto_tree_add_item(RandomForwardingTable_header_tree, hf_infiniband_RandomForwardingTable_Port, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5478 | 0 | local_offset += 1; |
5479 | 0 | proto_item_append_text(tempItemLow, "(%u)", i); |
5480 | 0 | } |
5481 | 0 | } |
5482 | | |
5483 | | /* Parse NoticesAndTraps Attribute |
5484 | | * IN: parentTree - The tree to add the dissection to |
5485 | | * tvb - The tvbuf of packet data |
5486 | | * offset - The offset in TVB where the attribute begins */ |
5487 | | static void parse_MulticastForwardingTable(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
5488 | 0 | { |
5489 | 0 | int i; |
5490 | 0 | unsigned local_offset = *offset; |
5491 | 0 | proto_item *MulticastForwardingTable_header_item; |
5492 | 0 | proto_tree *MulticastForwardingTable_header_tree; |
5493 | 0 | proto_item *tempItemLow; |
5494 | |
|
5495 | 0 | if (!parentTree) |
5496 | 0 | return; |
5497 | | |
5498 | 0 | MulticastForwardingTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, ENC_NA); |
5499 | 0 | proto_item_set_text(MulticastForwardingTable_header_item, "%s", "MulticastForwardingTable"); |
5500 | 0 | MulticastForwardingTable_header_tree = proto_item_add_subtree(MulticastForwardingTable_header_item, ett_multicastforwardingtable); |
5501 | |
|
5502 | 0 | for (i = 0; i < 16; i++) |
5503 | 0 | { |
5504 | 0 | tempItemLow = proto_tree_add_item(MulticastForwardingTable_header_tree, hf_infiniband_MulticastForwardingTable_PortMask, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5505 | 0 | local_offset += 2; |
5506 | 0 | proto_item_append_text(tempItemLow, "(%u)", i); |
5507 | 0 | } |
5508 | |
|
5509 | 0 | } |
5510 | | |
5511 | | /* Parse SMInfo Attribute |
5512 | | * IN: parentTree - The tree to add the dissection to |
5513 | | * tvb - The tvbuf of packet data |
5514 | | * offset - The offset in TVB where the attribute begins */ |
5515 | | static int parse_SMInfo(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
5516 | 0 | { |
5517 | 0 | unsigned local_offset = *offset; |
5518 | 0 | proto_item *SMInfo_header_item; |
5519 | 0 | proto_tree *SMInfo_header_tree; |
5520 | |
|
5521 | 0 | if (!parentTree) |
5522 | 0 | return *offset; |
5523 | | |
5524 | 0 | SMInfo_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, ENC_NA); |
5525 | 0 | proto_item_set_text(SMInfo_header_item, "%s", "SMInfo"); |
5526 | 0 | SMInfo_header_tree = proto_item_add_subtree(SMInfo_header_item, ett_sminfo); |
5527 | |
|
5528 | 0 | proto_tree_add_item(SMInfo_header_tree, hf_infiniband_SMInfo_GUID, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
5529 | 0 | local_offset += 8; |
5530 | 0 | proto_tree_add_item(SMInfo_header_tree, hf_infiniband_SMInfo_SM_Key, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
5531 | 0 | local_offset += 8; |
5532 | 0 | proto_tree_add_item(SMInfo_header_tree, hf_infiniband_SMInfo_ActCount, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5533 | 0 | local_offset += 4; |
5534 | 0 | proto_tree_add_item(SMInfo_header_tree, hf_infiniband_SMInfo_Priority, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5535 | 0 | proto_tree_add_item(SMInfo_header_tree, hf_infiniband_SMInfo_SMState, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5536 | 0 | local_offset += 1; |
5537 | 0 | return local_offset; |
5538 | 0 | } |
5539 | | |
5540 | | /* Parse VendorDiag Attribute |
5541 | | * IN: parentTree - The tree to add the dissection to |
5542 | | * tvb - The tvbuf of packet data |
5543 | | * offset - The offset in TVB where the attribute begins */ |
5544 | | static int parse_VendorDiag(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
5545 | 0 | { |
5546 | 0 | unsigned local_offset = *offset; |
5547 | 0 | proto_item *VendorDiag_header_item; |
5548 | 0 | proto_tree *VendorDiag_header_tree; |
5549 | |
|
5550 | 0 | if (!parentTree) |
5551 | 0 | return *offset; |
5552 | | |
5553 | 0 | VendorDiag_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, ENC_NA); |
5554 | 0 | proto_item_set_text(VendorDiag_header_item, "%s", "VendorDiag"); |
5555 | 0 | VendorDiag_header_tree = proto_item_add_subtree(VendorDiag_header_item, ett_vendordiag); |
5556 | |
|
5557 | 0 | proto_tree_add_item(VendorDiag_header_tree, hf_infiniband_VendorDiag_NextIndex, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5558 | 0 | local_offset += 2; |
5559 | 0 | proto_tree_add_item(VendorDiag_header_tree, hf_infiniband_VendorDiag_DiagData, tvb, local_offset, 62, ENC_NA); |
5560 | 0 | local_offset += 62; |
5561 | |
|
5562 | 0 | return local_offset; |
5563 | 0 | } |
5564 | | |
5565 | | /* Parse LedInfo Attribute |
5566 | | * IN: parentTree - The tree to add the dissection to |
5567 | | * tvb - The tvbuf of packet data |
5568 | | * offset - The offset in TVB where the attribute begins */ |
5569 | | static void parse_LedInfo(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
5570 | 0 | { |
5571 | 0 | unsigned local_offset = *offset; |
5572 | 0 | proto_item *LedInfo_header_item; |
5573 | 0 | proto_tree *LedInfo_header_tree; |
5574 | |
|
5575 | 0 | if (!parentTree) |
5576 | 0 | return; |
5577 | | |
5578 | 0 | LedInfo_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, ENC_NA); |
5579 | 0 | proto_item_set_text(LedInfo_header_item, "%s", "LedInfo"); |
5580 | 0 | LedInfo_header_tree = proto_item_add_subtree(LedInfo_header_item, ett_ledinfo); |
5581 | |
|
5582 | 0 | proto_tree_add_item(LedInfo_header_tree, hf_infiniband_LedInfo_LedMask, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5583 | 0 | } |
5584 | | |
5585 | | /* Parse LinkSpeedWidthPairsTable Attribute |
5586 | | * IN: parentTree - The tree to add the dissection to |
5587 | | * tvb - The tvbuf of packet data |
5588 | | * offset - The offset in TVB where the attribute begins */ |
5589 | | static int parse_LinkSpeedWidthPairsTable(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
5590 | 0 | { |
5591 | 0 | unsigned local_offset = *offset; |
5592 | 0 | proto_item *LinkSpeedWidthPairsTable_header_item; |
5593 | 0 | proto_tree *LinkSpeedWidthPairsTable_header_tree; |
5594 | |
|
5595 | 0 | if (!parentTree) |
5596 | 0 | return *offset; |
5597 | | |
5598 | 0 | LinkSpeedWidthPairsTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, ENC_NA); |
5599 | 0 | proto_item_set_text(LinkSpeedWidthPairsTable_header_item, "%s", "LinkSpeedWidthPairsTable"); |
5600 | 0 | LinkSpeedWidthPairsTable_header_tree = proto_item_add_subtree(LinkSpeedWidthPairsTable_header_item, ett_linkspeedwidthpairs); |
5601 | |
|
5602 | 0 | proto_tree_add_item(LinkSpeedWidthPairsTable_header_tree, hf_infiniband_LinkSpeedWidthPairsTable_NumTables, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5603 | 0 | local_offset += 1; |
5604 | 0 | proto_tree_add_item(LinkSpeedWidthPairsTable_header_tree, hf_infiniband_LinkSpeedWidthPairsTable_PortMask, tvb, local_offset, 32, ENC_NA); |
5605 | 0 | local_offset += 32; |
5606 | 0 | proto_tree_add_item(LinkSpeedWidthPairsTable_header_tree, hf_infiniband_LinkSpeedWidthPairsTable_SpeedTwoFive, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5607 | 0 | local_offset += 1; |
5608 | 0 | proto_tree_add_item(LinkSpeedWidthPairsTable_header_tree, hf_infiniband_LinkSpeedWidthPairsTable_SpeedFive, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5609 | 0 | local_offset += 1; |
5610 | 0 | proto_tree_add_item(LinkSpeedWidthPairsTable_header_tree, hf_infiniband_LinkSpeedWidthPairsTable_SpeedTen, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5611 | 0 | local_offset += 1; |
5612 | |
|
5613 | 0 | return local_offset; |
5614 | 0 | } |
5615 | | |
5616 | | /* Parse RID Field from Subnet Administration Packets. |
5617 | | * IN: SA_header_tree - the dissection tree of the subnet admin attribute. |
5618 | | * tvb - the packet buffer |
5619 | | * MadHeader - the Common MAD header from this packet. |
5620 | | * IN/OUT: offset - the current and updated offset in the packet buffer */ |
5621 | | static void parse_RID(proto_tree* SA_header_tree, tvbuff_t* tvb, unsigned *offset, MAD_Data* MadHeader) |
5622 | 3 | { |
5623 | 3 | unsigned local_offset = *offset; |
5624 | | |
5625 | 3 | if (!SA_header_tree) |
5626 | 0 | { |
5627 | 0 | return; |
5628 | 0 | } |
5629 | 3 | switch (MadHeader->attributeID) |
5630 | 3 | { |
5631 | 0 | case 0x0011: |
5632 | | /* NodeRecord */ |
5633 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5634 | 0 | local_offset += 2; |
5635 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_reserved, tvb, local_offset, 2, ENC_NA); |
5636 | 0 | local_offset += 2; |
5637 | 0 | break; |
5638 | 0 | case 0x0012: |
5639 | | /* PortInfoRecord */ |
5640 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_EndportLID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5641 | 0 | local_offset += 2; |
5642 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_PortNum, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5643 | 0 | local_offset += 1; |
5644 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_reserved, tvb, local_offset, 1, ENC_NA); |
5645 | 0 | local_offset += 1; |
5646 | 0 | break; |
5647 | 0 | case 0x0013: |
5648 | | /* SLtoVLMappingTableRecord */ |
5649 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5650 | 0 | local_offset += 2; |
5651 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_InputPortNum, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5652 | 0 | local_offset += 1; |
5653 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_OutputPortNum, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5654 | 0 | local_offset += 1; |
5655 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_reserved, tvb, local_offset, 4, ENC_NA); |
5656 | 0 | local_offset += 4; |
5657 | 0 | break; |
5658 | 0 | case 0x0014: |
5659 | | /* SwitchInfoRecord */ |
5660 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5661 | 0 | local_offset += 2; |
5662 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_reserved, tvb, local_offset, 2, ENC_NA); |
5663 | 0 | local_offset += 2; |
5664 | 0 | break; |
5665 | 0 | case 0x0015: |
5666 | | /* LinearForwardingTableRecord */ |
5667 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5668 | 0 | local_offset += 2; |
5669 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_SixteenBit, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5670 | 0 | local_offset += 2; |
5671 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_reserved, tvb, local_offset, 4, ENC_NA); |
5672 | 0 | local_offset += 4; |
5673 | 0 | break; |
5674 | 0 | case 0x0016: |
5675 | | /* RandomForwardingTableRecord */ |
5676 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5677 | 0 | local_offset += 2; |
5678 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_SixteenBit, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5679 | 0 | local_offset += 2; |
5680 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_reserved, tvb, local_offset, 4, ENC_NA); |
5681 | 0 | local_offset += 4; |
5682 | 0 | break; |
5683 | 0 | case 0x0017: |
5684 | | /* MulticastForwardingTableRecord */ |
5685 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5686 | 0 | local_offset += 2; |
5687 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_Position, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5688 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_NineBit, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5689 | 0 | local_offset += 2; |
5690 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_reserved, tvb, local_offset, 4, ENC_NA); |
5691 | 0 | local_offset += 4; |
5692 | 0 | break; |
5693 | 0 | case 0x0036: |
5694 | | /* VLArbitrationTableRecord */ |
5695 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5696 | 0 | local_offset += 2; |
5697 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_OutputPortNum, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5698 | 0 | local_offset += 1; |
5699 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_EightBit, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5700 | 0 | local_offset += 1; |
5701 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_reserved, tvb, local_offset, 4, ENC_NA); |
5702 | 0 | local_offset += 4; |
5703 | 0 | break; |
5704 | 0 | case 0x0018: |
5705 | | /* SMInfoRecord */ |
5706 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5707 | 0 | local_offset += 2; |
5708 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_reserved, tvb, local_offset, 2, ENC_NA); |
5709 | 0 | local_offset += 2; |
5710 | 0 | break; |
5711 | 0 | case 0x0033: |
5712 | | /* P_KeyTableRecord */ |
5713 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5714 | 0 | local_offset += 2; |
5715 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_SixteenBit, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5716 | 0 | local_offset += 2; |
5717 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_PortNum, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5718 | 0 | local_offset += 1; |
5719 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_reserved, tvb, local_offset, 3, ENC_NA); |
5720 | 0 | local_offset += 3; |
5721 | 0 | break; |
5722 | 0 | case 0x00F3: |
5723 | | /* InformInfoRecord */ |
5724 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_InformInfoRecord_SubscriberGID, tvb, local_offset, 16, ENC_NA); |
5725 | 0 | local_offset += 16; |
5726 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_InformInfoRecord_Enum, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5727 | 0 | local_offset += 2; |
5728 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_reserved, tvb, local_offset, 6, ENC_NA); |
5729 | 0 | local_offset += 6; |
5730 | 0 | break; |
5731 | 0 | case 0x0020: |
5732 | | /* LinkRecord */ |
5733 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_LinkRecord_FromLID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5734 | 0 | local_offset += 2; |
5735 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_LinkRecord_FromPort, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5736 | 0 | local_offset += 1; |
5737 | 0 | break; |
5738 | 0 | case 0x0031: |
5739 | | /* ServiceRecord */ |
5740 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_ServiceRecord_ServiceID, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
5741 | 0 | local_offset += 8; |
5742 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_ServiceRecord_ServiceGID, tvb, local_offset, 16, ENC_NA); |
5743 | 0 | local_offset += 16; |
5744 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_ServiceRecord_ServiceP_Key, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5745 | 0 | local_offset += 2; |
5746 | 0 | local_offset += 2; |
5747 | 0 | break; |
5748 | 0 | case 0x0038: |
5749 | | /* MCMemberRecord */ |
5750 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_MCMemberRecord_MGID, tvb, local_offset, 16, ENC_NA); |
5751 | 0 | local_offset += 16; |
5752 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_MCMemberRecord_PortGID, tvb, local_offset, 16, ENC_NA); |
5753 | 0 | local_offset += 16; |
5754 | 0 | break; |
5755 | 0 | case 0x0030: |
5756 | | /* GuidInfoRecord */ |
5757 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5758 | 0 | local_offset += 2; |
5759 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_EightBit, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5760 | 0 | local_offset += 2; |
5761 | 0 | proto_tree_add_item(SA_header_tree, hf_infiniband_reserved, tvb, local_offset, 4, ENC_NA); |
5762 | 0 | local_offset += 4; |
5763 | 0 | break; |
5764 | 3 | default: |
5765 | 3 | break; |
5766 | 3 | } |
5767 | | |
5768 | 3 | *offset = local_offset; |
5769 | 3 | } |
5770 | | |
5771 | | /* Parse InformInfo Attribute |
5772 | | * IN: parentTree - The tree to add the dissection to |
5773 | | * tvb - The tvbuf of packet data |
5774 | | * offset - The offset in TVB where the attribute begins */ |
5775 | | static int parse_InformInfo(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
5776 | 0 | { |
5777 | 0 | unsigned local_offset = *offset; |
5778 | 0 | proto_item *InformInfo_header_item; |
5779 | 0 | proto_tree *InformInfo_header_tree; |
5780 | |
|
5781 | 0 | if (!parentTree) |
5782 | 0 | { |
5783 | 0 | return *offset; |
5784 | 0 | } |
5785 | 0 | InformInfo_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 36, ENC_NA); |
5786 | 0 | proto_item_set_text(InformInfo_header_item, "%s", "InformInfo"); |
5787 | 0 | InformInfo_header_tree = proto_item_add_subtree(InformInfo_header_item, ett_informinfo); |
5788 | |
|
5789 | 0 | proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_GID, tvb, local_offset, 16, ENC_NA); |
5790 | 0 | local_offset += 16; |
5791 | 0 | proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_LIDRangeBegin, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5792 | 0 | local_offset += 2; |
5793 | 0 | proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_LIDRangeEnd, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5794 | 0 | local_offset += 2; |
5795 | 0 | proto_tree_add_item(InformInfo_header_tree, hf_infiniband_reserved, tvb, local_offset, 2, ENC_NA); |
5796 | 0 | local_offset += 2; |
5797 | 0 | proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_IsGeneric, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5798 | 0 | local_offset += 1; |
5799 | 0 | proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_Subscribe, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5800 | 0 | local_offset += 1; |
5801 | 0 | proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_Type, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5802 | 0 | local_offset += 2; |
5803 | 0 | proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_TrapNumberDeviceID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5804 | 0 | local_offset += 2; |
5805 | 0 | proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_QPN, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
5806 | 0 | local_offset += 3; |
5807 | 0 | proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_RespTimeValue, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5808 | 0 | local_offset += 1; |
5809 | 0 | proto_tree_add_item(InformInfo_header_tree, hf_infiniband_reserved, tvb, local_offset, 1, ENC_NA); |
5810 | 0 | local_offset += 1; |
5811 | 0 | proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_ProducerTypeVendorID, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
5812 | 0 | local_offset += 3; |
5813 | |
|
5814 | 0 | return local_offset; |
5815 | 0 | } |
5816 | | /* Parse LinkRecord Attribute |
5817 | | * IN: parentTree - The tree to add the dissection to |
5818 | | * tvb - The tvbuf of packet data |
5819 | | * offset - The offset in TVB where the attribute begins */ |
5820 | | static int parse_LinkRecord(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
5821 | 0 | { |
5822 | 0 | unsigned local_offset = *offset; |
5823 | 0 | proto_item *LinkRecord_header_item; |
5824 | 0 | proto_tree *LinkRecord_header_tree; |
5825 | |
|
5826 | 0 | if (!parentTree) |
5827 | 0 | { |
5828 | 0 | return *offset; |
5829 | 0 | } |
5830 | | |
5831 | 0 | LinkRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 3, ENC_NA); |
5832 | 0 | proto_item_set_text(LinkRecord_header_item, "%s", "LinkRecord"); |
5833 | 0 | LinkRecord_header_tree = proto_item_add_subtree(LinkRecord_header_item, ett_linkrecord); |
5834 | |
|
5835 | 0 | proto_tree_add_item(LinkRecord_header_tree, hf_infiniband_LinkRecord_ToPort, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5836 | 0 | local_offset += 1; |
5837 | 0 | proto_tree_add_item(LinkRecord_header_tree, hf_infiniband_LinkRecord_ToLID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5838 | 0 | local_offset += 2; |
5839 | |
|
5840 | 0 | return local_offset; |
5841 | |
|
5842 | 0 | } |
5843 | | /* Parse ServiceRecord Attribute |
5844 | | * IN: parentTree - The tree to add the dissection to |
5845 | | * tvb - The tvbuf of packet data |
5846 | | * offset - The offset in TVB where the attribute begins */ |
5847 | | static int parse_ServiceRecord(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
5848 | 0 | { |
5849 | 0 | unsigned local_offset = *offset; |
5850 | 0 | proto_item *ServiceRecord_header_item; |
5851 | 0 | proto_tree *ServiceRecord_header_tree; |
5852 | 0 | proto_item *tempData; |
5853 | |
|
5854 | 0 | if (!parentTree) |
5855 | 0 | { |
5856 | 0 | return *offset; |
5857 | 0 | } |
5858 | | |
5859 | 0 | ServiceRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 176, ENC_NA); |
5860 | 0 | proto_item_set_text(ServiceRecord_header_item, "%s", "ServiceRecord"); |
5861 | 0 | ServiceRecord_header_tree = proto_item_add_subtree(ServiceRecord_header_item, ett_servicerecord); |
5862 | |
|
5863 | 0 | proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceLease, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5864 | 0 | local_offset += 4; |
5865 | 0 | proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceKey, tvb, local_offset, 16, ENC_NA); |
5866 | 0 | local_offset += 16; |
5867 | 0 | proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceName, tvb, local_offset, 64, ENC_NA); |
5868 | 0 | local_offset += 64; |
5869 | |
|
5870 | 0 | tempData = proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceData, tvb, local_offset, 16, ENC_NA); |
5871 | 0 | local_offset += 16; |
5872 | 0 | proto_item_append_text(tempData, "%s", "(ServiceData 8.1, 8.16)"); |
5873 | 0 | tempData = proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceData, tvb, local_offset, 16, ENC_NA); |
5874 | 0 | local_offset += 16; |
5875 | 0 | proto_item_append_text(tempData, "%s", "(ServiceData 16.1, 16.8)"); |
5876 | 0 | tempData = proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceData, tvb, local_offset, 16, ENC_NA); |
5877 | 0 | local_offset += 16; |
5878 | 0 | proto_item_append_text(tempData, "%s", "(ServiceData 32.1, 32.4)"); |
5879 | 0 | tempData = proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceData, tvb, local_offset, 16, ENC_NA); |
5880 | 0 | local_offset += 16; |
5881 | 0 | proto_item_append_text(tempData, "%s", "(ServiceData 64.1, 64.2)"); |
5882 | |
|
5883 | 0 | return local_offset; |
5884 | |
|
5885 | 0 | } |
5886 | | /* Parse PathRecord Attribute |
5887 | | * IN: parentTree - The tree to add the dissection to |
5888 | | * tvb - The tvbuf of packet data |
5889 | | * offset - The offset in TVB where the attribute begins */ |
5890 | | static int parse_PathRecord(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
5891 | 0 | { |
5892 | 0 | unsigned local_offset = *offset; |
5893 | 0 | proto_item *PathRecord_header_item; |
5894 | 0 | proto_tree *PathRecord_header_tree; |
5895 | |
|
5896 | 0 | if (!parentTree) |
5897 | 0 | { |
5898 | 0 | return *offset; |
5899 | 0 | } |
5900 | | |
5901 | 0 | PathRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 64, ENC_NA); |
5902 | 0 | proto_item_set_text(PathRecord_header_item, "%s", "PathRecord"); |
5903 | 0 | PathRecord_header_tree = proto_item_add_subtree(PathRecord_header_item, ett_pathrecord); |
5904 | 0 | proto_tree_add_item(PathRecord_header_tree, hf_infiniband_reserved, tvb, local_offset, 8, ENC_NA); |
5905 | 0 | local_offset += 8; |
5906 | |
|
5907 | 0 | proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_DGID, tvb, local_offset, 16, ENC_NA); |
5908 | 0 | local_offset += 16; |
5909 | 0 | proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_SGID, tvb, local_offset, 16, ENC_NA); |
5910 | 0 | local_offset += 16; |
5911 | 0 | proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_DLID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5912 | 0 | local_offset += 2; |
5913 | 0 | proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_SLID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5914 | 0 | local_offset += 2; |
5915 | 0 | proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_RawTraffic, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5916 | 0 | proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_FlowLabel, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
5917 | 0 | local_offset += 3; |
5918 | 0 | proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_HopLimit, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5919 | 0 | local_offset += 1; |
5920 | 0 | proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_TClass, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5921 | 0 | local_offset += 1; |
5922 | 0 | proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_Reversible, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5923 | 0 | proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_NumbPath, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5924 | 0 | local_offset += 1; |
5925 | 0 | proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_P_Key, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5926 | 0 | local_offset += 2; |
5927 | 0 | proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_SL, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5928 | 0 | local_offset += 2; |
5929 | 0 | proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_MTUSelector, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5930 | 0 | proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_MTU, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5931 | 0 | local_offset += 1; |
5932 | 0 | proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_RateSelector, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5933 | 0 | proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_Rate, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5934 | 0 | local_offset += 1; |
5935 | 0 | proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_PacketLifeTimeSelector, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5936 | 0 | proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_PacketLifeTime, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5937 | 0 | local_offset += 1; |
5938 | 0 | proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_Preference, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5939 | 0 | local_offset += 1; |
5940 | |
|
5941 | 0 | return local_offset; |
5942 | 0 | } |
5943 | | /* Parse MCMemberRecord Attribute |
5944 | | * IN: parentTree - The tree to add the dissection to |
5945 | | * tvb - The tvbuf of packet data |
5946 | | * offset - The offset in TVB where the attribute begins */ |
5947 | | static int parse_MCMemberRecord(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
5948 | 0 | { |
5949 | 0 | unsigned local_offset = *offset; |
5950 | 0 | proto_item *MCMemberRecord_header_item; |
5951 | 0 | proto_tree *MCMemberRecord_header_tree; |
5952 | |
|
5953 | 0 | if (!parentTree) |
5954 | 0 | { |
5955 | 0 | return *offset; |
5956 | 0 | } |
5957 | | |
5958 | 0 | MCMemberRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 64, ENC_NA); |
5959 | 0 | proto_item_set_text(MCMemberRecord_header_item, "%s", "MCMemberRecord"); |
5960 | 0 | MCMemberRecord_header_tree = proto_item_add_subtree(MCMemberRecord_header_item, ett_mcmemberrecord); |
5961 | |
|
5962 | 0 | proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_Q_Key, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
5963 | 0 | local_offset += 4; |
5964 | 0 | proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_MLID, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5965 | 0 | local_offset += 2; |
5966 | 0 | proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_MTUSelector, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5967 | 0 | proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_MTU, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5968 | 0 | local_offset += 1; |
5969 | 0 | proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_TClass, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5970 | 0 | local_offset += 1; |
5971 | 0 | proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_P_Key, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
5972 | 0 | local_offset += 2; |
5973 | 0 | proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_RateSelector, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5974 | 0 | proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_Rate, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5975 | 0 | local_offset += 1; |
5976 | 0 | proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_PacketLifeTimeSelector, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5977 | 0 | proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_PacketLifeTime, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5978 | 0 | local_offset += 1; |
5979 | 0 | proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_SL, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5980 | 0 | proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_FlowLabel, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
5981 | 0 | local_offset += 3; |
5982 | 0 | proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_HopLimit, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5983 | 0 | local_offset += 1; |
5984 | 0 | proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_Scope, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5985 | 0 | proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_JoinState, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5986 | 0 | local_offset += 1; |
5987 | 0 | proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_ProxyJoin, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
5988 | 0 | local_offset += 3; |
5989 | |
|
5990 | 0 | return local_offset; |
5991 | |
|
5992 | 0 | } |
5993 | | /* Parse TraceRecord Attribute |
5994 | | * IN: parentTree - The tree to add the dissection to |
5995 | | * tvb - The tvbuf of packet data |
5996 | | * offset - The offset in TVB where the attribute begins */ |
5997 | | static int parse_TraceRecord(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
5998 | 0 | { |
5999 | 0 | unsigned local_offset = *offset; |
6000 | 0 | proto_item *TraceRecord_header_item; |
6001 | 0 | proto_tree *TraceRecord_header_tree; |
6002 | |
|
6003 | 0 | if (!parentTree) |
6004 | 0 | { |
6005 | 0 | return *offset; |
6006 | 0 | } |
6007 | | |
6008 | 0 | TraceRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 46, ENC_NA); |
6009 | 0 | proto_item_set_text(TraceRecord_header_item, "%s", "TraceRecord"); |
6010 | 0 | TraceRecord_header_tree = proto_item_add_subtree(TraceRecord_header_item, ett_tracerecord); |
6011 | |
|
6012 | 0 | proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_GIDPrefix, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
6013 | 0 | local_offset += 8; |
6014 | 0 | proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_IDGeneration, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
6015 | 0 | local_offset += 2; |
6016 | 0 | proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_reserved, tvb, local_offset, 1, ENC_NA); |
6017 | 0 | local_offset += 1; |
6018 | 0 | proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_NodeType, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
6019 | 0 | local_offset += 1; |
6020 | 0 | proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_NodeID, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
6021 | 0 | local_offset += 8; |
6022 | 0 | proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_ChassisID, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
6023 | 0 | local_offset += 8; |
6024 | 0 | proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_EntryPortID, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
6025 | 0 | local_offset += 8; |
6026 | 0 | proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_ExitPortID, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
6027 | 0 | local_offset += 8; |
6028 | 0 | proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_EntryPort, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
6029 | 0 | local_offset += 1; |
6030 | 0 | proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_ExitPort, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
6031 | 0 | local_offset += 1; |
6032 | |
|
6033 | 0 | return local_offset; |
6034 | 0 | } |
6035 | | /* Parse MultiPathRecord Attribute |
6036 | | * IN: parentTree - The tree to add the dissection to |
6037 | | * tvb - The tvbuf of packet data |
6038 | | * offset - The offset in TVB where the attribute begins */ |
6039 | | static int parse_MultiPathRecord(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
6040 | 0 | { |
6041 | 0 | unsigned local_offset = *offset; |
6042 | 0 | proto_item *MultiPathRecord_header_item; |
6043 | 0 | proto_tree *MultiPathRecord_header_tree; |
6044 | 0 | proto_item *SDGID; |
6045 | 0 | uint8_t SGIDCount; |
6046 | 0 | uint8_t DGIDCount; |
6047 | 0 | uint32_t i; |
6048 | |
|
6049 | 0 | if (!parentTree) |
6050 | 0 | { |
6051 | 0 | return *offset; |
6052 | 0 | } |
6053 | | |
6054 | 0 | MultiPathRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 200, ENC_NA); |
6055 | 0 | proto_item_set_text(MultiPathRecord_header_item, "%s", "MultiPathRecord"); |
6056 | 0 | MultiPathRecord_header_tree = proto_item_add_subtree(MultiPathRecord_header_item, ett_multipathrecord); |
6057 | |
|
6058 | 0 | proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_RawTraffic, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
6059 | 0 | proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_FlowLabel, tvb, local_offset, 3, ENC_BIG_ENDIAN); |
6060 | 0 | local_offset += 3; |
6061 | 0 | proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_HopLimit, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
6062 | 0 | local_offset += 1; |
6063 | 0 | proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_TClass, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
6064 | 0 | local_offset += 1; |
6065 | 0 | proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_Reversible, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
6066 | 0 | proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_NumbPath, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
6067 | 0 | local_offset += 1; |
6068 | 0 | proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_P_Key, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
6069 | 0 | local_offset += 2; |
6070 | 0 | proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_SL, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
6071 | 0 | local_offset += 2; |
6072 | 0 | proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_MTUSelector, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
6073 | 0 | proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_MTU, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
6074 | 0 | local_offset += 1; |
6075 | 0 | proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_RateSelector, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
6076 | 0 | proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_Rate, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
6077 | 0 | local_offset += 1; |
6078 | 0 | proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_PacketLifeTimeSelector, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
6079 | 0 | proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_PacketLifeTime, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
6080 | 0 | local_offset += 1; |
6081 | 0 | proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_reserved, tvb, local_offset, 1, ENC_NA); |
6082 | 0 | local_offset += 1; |
6083 | 0 | proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_IndependenceSelector, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
6084 | 0 | proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_GIDScope, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
6085 | 0 | local_offset += 1; |
6086 | |
|
6087 | 0 | proto_tree_add_item_ret_uint8(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_SGIDCount, tvb, local_offset, 1, ENC_BIG_ENDIAN, &SGIDCount); |
6088 | 0 | local_offset += 1; |
6089 | 0 | proto_tree_add_item_ret_uint8(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_DGIDCount, tvb, local_offset, 1, ENC_BIG_ENDIAN, &DGIDCount); |
6090 | 0 | local_offset += 1; |
6091 | 0 | proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_reserved, tvb, local_offset, 7, ENC_NA); |
6092 | 0 | local_offset += 7; |
6093 | |
|
6094 | 0 | for (i = 0; i < SGIDCount; i++) |
6095 | 0 | { |
6096 | 0 | SDGID = proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_SDGID, tvb, local_offset, 16, ENC_NA); |
6097 | 0 | local_offset += 16; |
6098 | 0 | proto_item_set_text(SDGID, "(%s%u)", "SGID", i); |
6099 | 0 | } |
6100 | 0 | for (i = 0; i < DGIDCount; i++) |
6101 | 0 | { |
6102 | 0 | SDGID = proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_SDGID, tvb, local_offset, 16, ENC_NA); |
6103 | 0 | local_offset += 16; |
6104 | 0 | proto_item_set_text(SDGID, "(%s%u)", "DGID", i); |
6105 | 0 | } |
6106 | |
|
6107 | 0 | return local_offset; |
6108 | 0 | } |
6109 | | /* Parse ServiceAssociationRecord Attribute |
6110 | | * IN: parentTree - The tree to add the dissection to |
6111 | | * tvb - The tvbuf of packet data |
6112 | | * offset - The offset in TVB where the attribute begins */ |
6113 | | static int parse_ServiceAssociationRecord(proto_tree* parentTree, tvbuff_t* tvb, unsigned *offset) |
6114 | 0 | { |
6115 | 0 | unsigned local_offset = *offset; |
6116 | 0 | proto_item *ServiceAssociationRecord_header_item; |
6117 | 0 | proto_tree *ServiceAssociationRecord_header_tree; |
6118 | |
|
6119 | 0 | if (!parentTree) |
6120 | 0 | { |
6121 | 0 | return *offset; |
6122 | 0 | } |
6123 | | |
6124 | 0 | ServiceAssociationRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 80, ENC_NA); |
6125 | 0 | proto_item_set_text(ServiceAssociationRecord_header_item, "%s", "ServiceAssociationRecord"); |
6126 | 0 | ServiceAssociationRecord_header_tree = proto_item_add_subtree(ServiceAssociationRecord_header_item, ett_serviceassocrecord); |
6127 | |
|
6128 | 0 | proto_tree_add_item(ServiceAssociationRecord_header_tree, hf_infiniband_ServiceAssociationRecord_ServiceKey, tvb, local_offset, 16, ENC_NA); |
6129 | 0 | local_offset += 16; |
6130 | 0 | proto_tree_add_item(ServiceAssociationRecord_header_tree, hf_infiniband_ServiceAssociationRecord_ServiceName, tvb, local_offset, 64, ENC_ASCII); |
6131 | 0 | local_offset += 64; |
6132 | |
|
6133 | 0 | return local_offset; |
6134 | 0 | } |
6135 | | |
6136 | | /* Parse PortCounters MAD from the Performance management class. |
6137 | | * IN: parentTree - The tree to add the dissection to |
6138 | | * tvb - The tvbuf of packet data |
6139 | | * offset - The offset in TVB where the attribute begins |
6140 | | * pinfo - The packet info structure with column information */ |
6141 | | static int parse_PERF_PortCounters(proto_tree* parentTree, tvbuff_t* tvb, packet_info *pinfo, unsigned *offset) |
6142 | 0 | { |
6143 | 0 | proto_item *perf_item; |
6144 | 0 | proto_tree *perf_tree; |
6145 | 0 | unsigned local_offset = *offset; |
6146 | |
|
6147 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "PERF (PortCounters)"); |
6148 | |
|
6149 | 0 | perf_item = proto_tree_add_item(parentTree, hf_infiniband_PortCounters, tvb, local_offset, 40, ENC_NA); |
6150 | 0 | perf_tree = proto_item_add_subtree(perf_item, ett_perfclass); |
6151 | |
|
6152 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_reserved, tvb, local_offset, 40, ENC_NA); |
6153 | 0 | local_offset += 40; |
6154 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_reserved, tvb, local_offset, 1, ENC_NA); |
6155 | 0 | local_offset += 1; |
6156 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_PortSelect, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
6157 | 0 | local_offset += 1; |
6158 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_CounterSelect, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
6159 | 0 | local_offset += 2; |
6160 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_SymbolErrorCounter, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
6161 | 0 | local_offset += 2; |
6162 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_LinkErrorRecoveryCounter, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
6163 | 0 | local_offset += 1; |
6164 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_LinkDownedCounter, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
6165 | 0 | local_offset += 1; |
6166 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_PortRcvErrors, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
6167 | 0 | local_offset += 2; |
6168 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_PortRcvRemotePhysicalErrors, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
6169 | 0 | local_offset += 2; |
6170 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_PortRcvSwitchRelayErrors, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
6171 | 0 | local_offset += 2; |
6172 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_PortXmitDiscards, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
6173 | 0 | local_offset += 2; |
6174 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_PortXmitConstraintErrors, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
6175 | 0 | local_offset += 1; |
6176 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_PortRcvConstraintErrors, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
6177 | 0 | local_offset += 1; |
6178 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_reserved, tvb, local_offset, 1, ENC_NA); |
6179 | 0 | local_offset += 1; |
6180 | 0 | proto_tree_add_bits_item(perf_tree, hf_infiniband_PortCounters_LocalLinkIntegrityErrors, tvb, local_offset*8, 4, ENC_BIG_ENDIAN); |
6181 | 0 | proto_tree_add_bits_item(perf_tree, hf_infiniband_PortCounters_ExcessiveBufferOverrunErrors, tvb, local_offset*8 + 4, 4, ENC_BIG_ENDIAN); |
6182 | 0 | local_offset += 1; |
6183 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_reserved, tvb, local_offset, 2, ENC_NA); |
6184 | 0 | local_offset += 2; |
6185 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_VL15Dropped, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
6186 | 0 | local_offset += 2; |
6187 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_PortXmitData, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
6188 | 0 | local_offset += 4; |
6189 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_PortRcvData, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
6190 | 0 | local_offset += 4; |
6191 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_PortXmitPkts, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
6192 | 0 | local_offset += 4; |
6193 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCounters_PortRcvPkts, tvb, local_offset, 4, ENC_BIG_ENDIAN); |
6194 | 0 | local_offset += 4; |
6195 | |
|
6196 | 0 | *offset = local_offset; /* update caller's offset to point to end of the PortCounters payload */ |
6197 | 0 | return local_offset; |
6198 | 0 | } |
6199 | | |
6200 | | /* Parse PortCountersExtended MAD from the Performance management class. |
6201 | | * IN: parentTree - The tree to add the dissection to |
6202 | | * tvb - The tvbuf of packet data |
6203 | | * offset - The offset in TVB where the attribute begins |
6204 | | * pinfo - The packet info structure with column information */ |
6205 | | static int parse_PERF_PortCountersExtended(proto_tree* parentTree, tvbuff_t* tvb, packet_info *pinfo, unsigned *offset) |
6206 | 0 | { |
6207 | 0 | proto_item *perf_item; |
6208 | 0 | proto_tree *perf_tree; |
6209 | 0 | unsigned local_offset = *offset; |
6210 | |
|
6211 | 0 | col_set_str(pinfo->cinfo, COL_INFO, "PERF (PortCountersExtended)"); |
6212 | |
|
6213 | 0 | perf_item = proto_tree_add_item(parentTree, hf_infiniband_PortCountersExt, tvb, local_offset, 72, ENC_NA); |
6214 | 0 | perf_tree = proto_item_add_subtree(perf_item, ett_perfclass); |
6215 | |
|
6216 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_reserved, tvb, local_offset, 40, ENC_NA); |
6217 | 0 | local_offset += 40; |
6218 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_reserved, tvb, local_offset, 1, ENC_NA); |
6219 | 0 | local_offset += 1; |
6220 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCountersExt_PortSelect, tvb, local_offset, 1, ENC_BIG_ENDIAN); |
6221 | 0 | local_offset += 1; |
6222 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCountersExt_CounterSelect, tvb, local_offset, 2, ENC_BIG_ENDIAN); |
6223 | 0 | local_offset += 2; |
6224 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_reserved, tvb, local_offset, 4, ENC_NA); |
6225 | 0 | local_offset += 4; |
6226 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCountersExt_PortXmitData, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
6227 | 0 | local_offset += 8; |
6228 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCountersExt_PortRcvData, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
6229 | 0 | local_offset += 8; |
6230 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCountersExt_PortXmitPkts, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
6231 | 0 | local_offset += 8; |
6232 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCountersExt_PortRcvPkts, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
6233 | 0 | local_offset += 8; |
6234 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCountersExt_PortUnicastXmitPkts, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
6235 | 0 | local_offset += 8; |
6236 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCountersExt_PortUnicastRcvPkts, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
6237 | 0 | local_offset += 8; |
6238 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCountersExt_PortMulticastXmitPkts, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
6239 | 0 | local_offset += 8; |
6240 | 0 | proto_tree_add_item(perf_tree, hf_infiniband_PortCountersExt_PortMulticastRcvPkts, tvb, local_offset, 8, ENC_BIG_ENDIAN); |
6241 | 0 | local_offset += 8; |
6242 | |
|
6243 | 0 | *offset = local_offset; /* update caller's offset to point to end of the PortCountersExt payload */ |
6244 | 0 | return local_offset; |
6245 | 0 | } |
6246 | | |
6247 | | /* dissect_general_info |
6248 | | * Used to extract very few values from the packet in the case that full dissection is disabled by the user. |
6249 | | * IN: |
6250 | | * tvb - The tvbuf of packet data |
6251 | | * offset - The offset in TVB where the attribute begins |
6252 | | * pinfo - The packet info structure with column information |
6253 | | * starts_with - regular IB packet starts with LRH, ROCE starts with GRH and RROCE starts with BTH, |
6254 | | * this tells the parser what headers of (LRH/GRH) to skip. */ |
6255 | | static void dissect_general_info(tvbuff_t *tvb, unsigned offset, packet_info *pinfo, ib_packet_start_header starts_with) |
6256 | 0 | { |
6257 | 0 | uint8_t lnh_val = 0; /* The Link Next Header Value. Tells us which headers are coming */ |
6258 | 0 | bool bthFollows = false; /* Tracks if we are parsing a BTH. This is a significant decision point */ |
6259 | 0 | uint8_t virtualLane = 0; /* The Virtual Lane of the current Packet */ |
6260 | 0 | int32_t nextHeaderSequence = -1; /* defined by this dissector. #define which indicates the upcoming header sequence from OpCode */ |
6261 | 0 | uint8_t nxtHdr = 0; /* that must be available for that header. */ |
6262 | 0 | uint8_t management_class = 0; |
6263 | 0 | MAD_Data MadData; |
6264 | | |
6265 | | /* BTH - Base Transport Header */ |
6266 | 0 | struct infinibandinfo info = { NULL, 0, 0, 0, 0, 0, 0, 0, false, false}; |
6267 | 0 | int bthSize = 12; |
6268 | 0 | void *src_addr, /* the address to be displayed in the source/destination columns */ |
6269 | 0 | *dst_addr; /* (lid/gid number) will be stored here */ |
6270 | |
|
6271 | 0 | if (starts_with == IB_PACKET_STARTS_WITH_GRH) { |
6272 | | /* this is a RoCE packet, skip LRH parsing */ |
6273 | 0 | lnh_val = IBA_GLOBAL; |
6274 | 0 | goto skip_lrh; |
6275 | 0 | } |
6276 | 0 | else if (starts_with == IB_PACKET_STARTS_WITH_BTH) { |
6277 | | /* this is a RRoCE packet, skip LRH/GRH parsing and go directly to BTH */ |
6278 | 0 | lnh_val = IBA_LOCAL; |
6279 | 0 | goto skip_lrh; |
6280 | 0 | } |
6281 | | |
6282 | 0 | virtualLane = tvb_get_uint8(tvb, offset); |
6283 | 0 | virtualLane = virtualLane & 0xF0; |
6284 | 0 | offset += 1; |
6285 | | |
6286 | | /* Save Link Next Header... This tells us what the next header is. */ |
6287 | 0 | lnh_val = tvb_get_uint8(tvb, offset); |
6288 | 0 | lnh_val = lnh_val & 0x03; |
6289 | 0 | offset += 1; |
6290 | | |
6291 | | /* Set destination in packet view. */ |
6292 | 0 | dst_addr = wmem_alloc(pinfo->pool, sizeof(uint16_t)); |
6293 | 0 | *((uint16_t*) dst_addr) = tvb_get_ntohs(tvb, offset); |
6294 | 0 | set_address(&pinfo->dst, AT_IB, sizeof(uint16_t), dst_addr); |
6295 | |
|
6296 | 0 | offset += 4; |
6297 | | |
6298 | | /* Set Source in packet view. */ |
6299 | 0 | src_addr = wmem_alloc(pinfo->pool, sizeof(uint16_t)); |
6300 | 0 | *((uint16_t*) src_addr) = tvb_get_ntohs(tvb, offset); |
6301 | 0 | set_address(&pinfo->src, AT_IB, sizeof(uint16_t), src_addr); |
6302 | |
|
6303 | 0 | offset += 2; |
6304 | |
|
6305 | 0 | skip_lrh: |
6306 | |
|
6307 | 0 | switch (lnh_val) |
6308 | 0 | { |
6309 | 0 | case IBA_GLOBAL: |
6310 | 0 | offset += 6; |
6311 | 0 | nxtHdr = tvb_get_uint8(tvb, offset); |
6312 | 0 | offset += 2; |
6313 | | |
6314 | | /* Set source GID in packet view. */ |
6315 | 0 | set_address_tvb(&pinfo->src, AT_IB, GID_SIZE, tvb, offset); |
6316 | 0 | offset += 16; |
6317 | | |
6318 | | /* Set destination GID in packet view. */ |
6319 | 0 | set_address_tvb(&pinfo->dst, AT_IB, GID_SIZE, tvb, offset); |
6320 | 0 | offset += 16; |
6321 | |
|
6322 | 0 | if (nxtHdr != 0x1B) |
6323 | 0 | { |
6324 | | /* Some kind of packet being transported globally with IBA, but locally it is not IBA - no BTH following. */ |
6325 | 0 | break; |
6326 | 0 | } |
6327 | | /* else |
6328 | | * { |
6329 | | * Fall through switch and start parsing Local Headers and BTH |
6330 | | * } |
6331 | | */ |
6332 | | /* FALL THROUGH */ |
6333 | 0 | case IBA_LOCAL: |
6334 | 0 | bthFollows = true; |
6335 | | |
6336 | | /* Get the OpCode - this tells us what headers are following */ |
6337 | 0 | info.opCode = tvb_get_uint8(tvb, offset); |
6338 | 0 | if ((info.opCode >> 5) == 0x2) { |
6339 | 0 | info.dctConnect = !(tvb_get_uint8(tvb, offset + 1) & 0x80); |
6340 | 0 | bthSize += 8; |
6341 | 0 | } |
6342 | 0 | col_append_str(pinfo->cinfo, COL_INFO, val_to_str_const((uint32_t)info.opCode, OpCodeMap, "Unknown OpCode ")); |
6343 | 0 | offset += bthSize; |
6344 | 0 | break; |
6345 | 0 | case IP_NON_IBA: |
6346 | | /* Raw IPv6 Packet */ |
6347 | 0 | dst_addr = wmem_strdup(pinfo->pool, "IPv6 over IB Packet"); |
6348 | 0 | set_address(&pinfo->dst, AT_STRINGZ, (int)strlen((char *)dst_addr)+1, dst_addr); |
6349 | 0 | break; |
6350 | 0 | case RAW: |
6351 | 0 | break; |
6352 | 0 | default: |
6353 | 0 | break; |
6354 | 0 | } |
6355 | | |
6356 | 0 | if (bthFollows) |
6357 | 0 | { |
6358 | | /* Find our next header sequence based on the Opcode |
6359 | | * Since we're not doing dissection here, we just need the proper offsets to get our labels in packet view */ |
6360 | |
|
6361 | 0 | nextHeaderSequence = find_next_header_sequence(&info); |
6362 | 0 | switch (nextHeaderSequence) |
6363 | 0 | { |
6364 | 0 | case RDETH_DETH_PAYLD: |
6365 | 0 | offset += 4; /* RDETH */ |
6366 | 0 | offset += 8; /* DETH */ |
6367 | 0 | break; |
6368 | 0 | case RETH_IMMDT_PAYLD: |
6369 | 0 | offset += 16; /* RETH */ |
6370 | 0 | offset += 4; /* IMMDT */ |
6371 | 0 | break; |
6372 | 0 | case RDETH_DETH_RETH_PAYLD: |
6373 | 0 | offset += 4; /* RDETH */ |
6374 | 0 | offset += 8; /* DETH */ |
6375 | 0 | offset += 16; /* RETH */ |
6376 | 0 | break; |
6377 | 0 | case RDETH_DETH_IMMDT_PAYLD: |
6378 | 0 | offset += 4; /* RDETH */ |
6379 | 0 | offset += 8; /* DETH */ |
6380 | 0 | offset += 4; /* IMMDT */ |
6381 | 0 | break; |
6382 | 0 | case RDETH_DETH_RETH_IMMDT_PAYLD: |
6383 | 0 | offset += 4; /* RDETH */ |
6384 | 0 | offset += 8; /* DETH */ |
6385 | 0 | offset += 16; /* RETH */ |
6386 | 0 | offset += 4; /* IMMDT */ |
6387 | 0 | break; |
6388 | 0 | case RDETH_DETH_RETH: |
6389 | 0 | offset += 4; /* RDETH */ |
6390 | 0 | offset += 8; /* DETH */ |
6391 | 0 | offset += 16; /* RETH */ |
6392 | 0 | break; |
6393 | 0 | case RDETH_AETH_PAYLD: |
6394 | 0 | offset += 4; /* RDETH */ |
6395 | 0 | offset += 4; /* AETH */ |
6396 | 0 | break; |
6397 | 0 | case RDETH_PAYLD: |
6398 | 0 | offset += 4; /* RDETH */ |
6399 | 0 | break; |
6400 | 0 | case RDETH_AETH: |
6401 | 0 | offset += 4; /* RDETH */ |
6402 | 0 | offset += 4; /* AETH */ |
6403 | 0 | break; |
6404 | 0 | case RDETH_AETH_ATOMICACKETH: |
6405 | 0 | offset += 4; /* RDETH */ |
6406 | 0 | offset += 4; /* AETH */ |
6407 | 0 | offset += 8; /* AtomicAckETH */ |
6408 | 0 | break; |
6409 | 0 | case RDETH_DETH_ATOMICETH: |
6410 | 0 | offset += 4; /* RDETH */ |
6411 | 0 | offset += 8; /* DETH */ |
6412 | 0 | offset += 28; /* AtomicETH */ |
6413 | 0 | break; |
6414 | 0 | case RDETH_DETH: |
6415 | 0 | offset += 4; /* RDETH */ |
6416 | 0 | offset += 8; /* DETH */ |
6417 | 0 | break; |
6418 | 0 | case DETH_PAYLD: |
6419 | 0 | offset += 8; /* DETH */ |
6420 | 0 | break; |
6421 | 0 | case PAYLD: |
6422 | 0 | break; |
6423 | 0 | case IMMDT_PAYLD: |
6424 | 0 | offset += 4; /* IMMDT */ |
6425 | 0 | break; |
6426 | 0 | case RETH_PAYLD: |
6427 | 0 | offset += 16; /* RETH */ |
6428 | 0 | break; |
6429 | 0 | case RETH: |
6430 | 0 | offset += 16; /* RETH */ |
6431 | 0 | break; |
6432 | 0 | case AETH_PAYLD: |
6433 | 0 | offset += 4; /* AETH */ |
6434 | 0 | break; |
6435 | 0 | case AETH: |
6436 | 0 | offset += 4; /* AETH */ |
6437 | 0 | break; |
6438 | 0 | case AETH_ATOMICACKETH: |
6439 | 0 | offset += 4; /* AETH */ |
6440 | 0 | offset += 8; /* AtomicAckETH */ |
6441 | 0 | break; |
6442 | 0 | case ATOMICETH: |
6443 | 0 | offset += 28; /* AtomicETH */ |
6444 | 0 | break; |
6445 | 0 | case IETH_PAYLD: |
6446 | 0 | offset += 4; /* IETH */ |
6447 | 0 | break; |
6448 | 0 | case DETH_IMMDT_PAYLD: |
6449 | 0 | offset += 8; /* DETH */ |
6450 | 0 | offset += 4; /* IMMDT */ |
6451 | 0 | break; |
6452 | 0 | case DCCETH: |
6453 | 0 | offset += 16; /* DCCETH */ |
6454 | 0 | break; |
6455 | 0 | case FETH_RETH: |
6456 | 0 | offset += 4; /* FETH */ |
6457 | 0 | offset += 16; /* RETH */ |
6458 | 0 | break; |
6459 | 0 | case RDETH_FETH_RETH: |
6460 | 0 | offset += 4; /* RDETH */ |
6461 | 0 | offset += 4; /* FETH */ |
6462 | 0 | offset += 16; /* RETH */ |
6463 | 0 | break; |
6464 | 0 | case RDETH_RETH_PAYLD: |
6465 | 0 | offset += 4; /* RDETH */ |
6466 | 0 | offset += 16; /* RETH */ |
6467 | 0 | default: |
6468 | 0 | break; |
6469 | 0 | } |
6470 | 0 | } |
6471 | 0 | if (virtualLane == 0xF0) |
6472 | 0 | { |
6473 | 0 | management_class = tvb_get_uint8(tvb, offset + 1); |
6474 | 0 | if (((management_class >= (uint8_t)VENDOR_1_START) && (management_class <= (uint8_t)VENDOR_1_END)) |
6475 | 0 | || ((management_class >= (uint8_t)VENDOR_2_START) && (management_class <= (uint8_t)VENDOR_2_END))) |
6476 | 0 | { |
6477 | 0 | return; |
6478 | 0 | } |
6479 | 0 | else if ((management_class >= (uint8_t)APPLICATION_START) && (management_class <= (uint8_t)APPLICATION_END)) |
6480 | 0 | { |
6481 | 0 | return; |
6482 | 0 | } |
6483 | 0 | else if (((management_class == (uint8_t)0x00) || (management_class == (uint8_t)0x02)) |
6484 | 0 | || ((management_class >= (uint8_t)0x50) && (management_class <= (uint8_t)0x80)) |
6485 | 0 | || ((management_class >= (uint8_t)0x82))) |
6486 | 0 | { |
6487 | 0 | return; |
6488 | 0 | } |
6489 | 0 | else /* we have a normal management_class */ |
6490 | 0 | { |
6491 | 0 | if (parse_MAD_Common(NULL, tvb, &offset, &MadData)) { |
6492 | 0 | label_SUBM_Method(NULL, &MadData, pinfo); |
6493 | 0 | label_SUBM_Attribute(NULL, &MadData, pinfo); |
6494 | 0 | } |
6495 | 0 | } |
6496 | 0 | } |
6497 | | |
6498 | 0 | return; |
6499 | 0 | } |
6500 | | |
6501 | | static void |
6502 | | infiniband_shutdown(void) |
6503 | 0 | { |
6504 | 0 | g_hash_table_destroy(CM_context_table); |
6505 | 0 | } |
6506 | | |
6507 | | /* Protocol Registration */ |
6508 | | void proto_register_infiniband(void) |
6509 | 16 | { |
6510 | 16 | module_t *infiniband_module; |
6511 | | |
6512 | | /* Field dissector structures. |
6513 | | * For reserved fields, reservedX denotes the reserved field is X bits in length. |
6514 | | * e.g. reserved2 is a reserved field 2 bits in length. |
6515 | | * The third parameter is a filter string associated for this field. |
6516 | | * So for instance, to filter packets for a given virtual lane, |
6517 | | * The filter (infiniband.LRH.vl == 3) or something similar would be used. */ |
6518 | | |
6519 | | /* XXX: ToDo: Verify against Infiniband 1.2.1 Specification */ |
6520 | | /* Fields verified/corrected: Those after comment "XX: All following ..." */ |
6521 | | |
6522 | | /* meanings for MAD method field */ |
6523 | 16 | static const value_string mad_method_str[] = { |
6524 | 16 | { 0x01, "Get()" }, |
6525 | 16 | { 0x02, "Set()" }, |
6526 | 16 | { 0x81, "GetResp()" }, |
6527 | 16 | { 0x03, "Send()" }, |
6528 | 16 | { 0x05, "Trap()" }, |
6529 | 16 | { 0x06, "Report()" }, |
6530 | 16 | { 0x86, "ReportResp()" }, |
6531 | 16 | { 0x07, "TrapRepress()" }, |
6532 | 16 | { 0x12, "GetTable()" }, |
6533 | 16 | { 0x92, "GetTableResp()" }, |
6534 | 16 | { 0x13, "GetTraceTable()" }, |
6535 | 16 | { 0x14, "GetMulti()" }, |
6536 | 16 | { 0x94, "GetMultiResp()" }, |
6537 | 16 | { 0x15, "Delete()" }, |
6538 | 16 | { 0x95, "DeleteResp()" }, |
6539 | 16 | { 0, NULL } |
6540 | 16 | }; |
6541 | | |
6542 | 16 | static hf_register_info hf[] = { |
6543 | | /* Local Route Header (LRH) */ |
6544 | 16 | { &hf_infiniband_LRH, { |
6545 | 16 | "Local Route Header", "infiniband.lrh", |
6546 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6547 | 16 | }, |
6548 | 16 | { &hf_infiniband_virtual_lane, { |
6549 | 16 | "Virtual Lane", "infiniband.lrh.vl", |
6550 | 16 | FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL} |
6551 | 16 | }, |
6552 | 16 | { &hf_infiniband_link_version, { |
6553 | 16 | "Link Version", "infiniband.lrh.lver", |
6554 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL} |
6555 | 16 | }, |
6556 | 16 | { &hf_infiniband_service_level, { |
6557 | 16 | "Service Level", "infiniband.lrh.sl", |
6558 | 16 | FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL} |
6559 | 16 | }, |
6560 | 16 | { &hf_infiniband_reserved2, { |
6561 | 16 | "Reserved (2 bits)", "infiniband.lrh.reserved2", |
6562 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0C, NULL, HFILL} |
6563 | 16 | }, |
6564 | 16 | { &hf_infiniband_link_next_header, { |
6565 | 16 | "Link Next Header", "infiniband.lrh.lnh", |
6566 | 16 | FT_UINT8, BASE_HEX, NULL, 0x03, NULL, HFILL} |
6567 | 16 | }, |
6568 | 16 | { &hf_infiniband_destination_local_id, { |
6569 | 16 | "Destination Local ID", "infiniband.lrh.dlid", |
6570 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL} |
6571 | 16 | }, |
6572 | 16 | { &hf_infiniband_reserved5, { |
6573 | 16 | "Reserved (5 bits)", "infiniband.lrh.reserved5", |
6574 | 16 | FT_UINT16, BASE_DEC, NULL, 0xF800, NULL, HFILL} |
6575 | 16 | }, |
6576 | 16 | { &hf_infiniband_packet_length, { |
6577 | 16 | "Packet Length", "infiniband.lrh.pktlen", |
6578 | 16 | FT_UINT16, BASE_DEC, NULL, 0x07FF, NULL, HFILL} |
6579 | 16 | }, |
6580 | 16 | { &hf_infiniband_source_local_id, { |
6581 | 16 | "Source Local ID", "infiniband.lrh.slid", |
6582 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL} |
6583 | 16 | }, |
6584 | | |
6585 | | /* Global Route Header (GRH) */ |
6586 | 16 | { &hf_infiniband_GRH, { |
6587 | 16 | "Global Route Header", "infiniband.grh", |
6588 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6589 | 16 | }, |
6590 | 16 | { &hf_infiniband_ip_version, { |
6591 | 16 | "IP Version", "infiniband.grh.ipver", |
6592 | 16 | FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL} |
6593 | 16 | }, |
6594 | 16 | { &hf_infiniband_traffic_class, { |
6595 | 16 | "Traffic Class", "infiniband.grh.tclass", |
6596 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0FF0, NULL, HFILL} |
6597 | 16 | }, |
6598 | 16 | { &hf_infiniband_flow_label, { |
6599 | 16 | "Flow Label", "infiniband.grh.flowlabel", |
6600 | 16 | FT_UINT32, BASE_DEC, NULL, 0x000FFFFF, NULL, HFILL} |
6601 | 16 | }, |
6602 | 16 | { &hf_infiniband_payload_length, { |
6603 | 16 | "Payload Length", "infiniband.grh.paylen", |
6604 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL} |
6605 | 16 | }, |
6606 | 16 | { &hf_infiniband_next_header, { |
6607 | 16 | "Next Header", "infiniband.grh.nxthdr", |
6608 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL} |
6609 | 16 | }, |
6610 | 16 | { &hf_infiniband_hop_limit, { |
6611 | 16 | "Hop Limit", "infiniband.grh.hoplmt", |
6612 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL} |
6613 | 16 | }, |
6614 | 16 | { &hf_infiniband_source_gid, { |
6615 | 16 | "Source GID", "infiniband.grh.sgid", |
6616 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6617 | 16 | }, |
6618 | 16 | { &hf_infiniband_destination_gid, { |
6619 | 16 | "Destination GID", "infiniband.grh.dgid", |
6620 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6621 | 16 | }, |
6622 | | |
6623 | | /* Base Transport Header (BTH) */ |
6624 | 16 | { &hf_infiniband_BTH, { |
6625 | 16 | "Base Transport Header", "infiniband.bth", |
6626 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6627 | 16 | }, |
6628 | 16 | { &hf_infiniband_opcode, { |
6629 | 16 | "Opcode", "infiniband.bth.opcode", |
6630 | 16 | FT_UINT8, BASE_DEC, VALS(bth_opcode_tbl), 0x0, NULL, HFILL} |
6631 | 16 | }, |
6632 | 16 | { &hf_infiniband_solicited_event, { |
6633 | 16 | "Solicited Event", "infiniband.bth.se", |
6634 | 16 | FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL} |
6635 | 16 | }, |
6636 | 16 | { &hf_infiniband_migreq, { |
6637 | 16 | "MigReq", "infiniband.bth.m", |
6638 | 16 | FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL} |
6639 | 16 | }, |
6640 | 16 | { &hf_infiniband_pad_count, { |
6641 | 16 | "Pad Count", "infiniband.bth.padcnt", |
6642 | 16 | FT_UINT8, BASE_DEC, NULL, 0x30, NULL, HFILL} |
6643 | 16 | }, |
6644 | 16 | { &hf_infiniband_transport_header_version, { |
6645 | 16 | "Header Version", "infiniband.bth.tver", |
6646 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL} |
6647 | 16 | }, |
6648 | 16 | { &hf_infiniband_partition_key, { |
6649 | 16 | "Partition Key", "infiniband.bth.p_key", |
6650 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL} |
6651 | 16 | }, |
6652 | 16 | { &hf_infiniband_destination_qp, { |
6653 | 16 | "Destination Queue Pair", "infiniband.bth.destqp", |
6654 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL} |
6655 | 16 | }, |
6656 | 16 | { &hf_infiniband_acknowledge_request, { |
6657 | 16 | "Acknowledge Request", "infiniband.bth.a", |
6658 | 16 | FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL} |
6659 | 16 | }, |
6660 | 16 | { &hf_infiniband_reserved7, { |
6661 | 16 | "Reserved (7 bits)", "infiniband.bth.reserved7", |
6662 | 16 | FT_UINT8, BASE_DEC, NULL, 0x7F, NULL, HFILL} |
6663 | 16 | }, |
6664 | 16 | { &hf_infiniband_packet_sequence_number, { |
6665 | 16 | "Packet Sequence Number", "infiniband.bth.psn", |
6666 | 16 | FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL} |
6667 | 16 | }, |
6668 | | |
6669 | | /* Raw Header (RWH) */ |
6670 | 16 | { &hf_infiniband_RWH, { |
6671 | 16 | "Raw Header", "infiniband.rwh", |
6672 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6673 | 16 | }, |
6674 | 16 | { &hf_infiniband_etype, { |
6675 | 16 | "Ethertype", "infiniband.rwh.etype", |
6676 | 16 | FT_UINT16, BASE_HEX, VALS(etype_vals), 0x0, "Type", HFILL } |
6677 | 16 | }, |
6678 | | |
6679 | | /* Reliable Datagram Extended Transport Header (RDETH) */ |
6680 | 16 | { &hf_infiniband_RDETH, { |
6681 | 16 | "Reliable Datagram Extended Transport Header", "infiniband.rdeth", |
6682 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6683 | 16 | }, |
6684 | 16 | { &hf_infiniband_ee_context, { |
6685 | 16 | "E2E Context", "infiniband.rdeth.eecnxt", |
6686 | 16 | FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL} |
6687 | 16 | }, |
6688 | | |
6689 | | /* Datagram Extended Transport Header (DETH) */ |
6690 | 16 | { &hf_infiniband_DETH, { |
6691 | 16 | "Datagram Extended Transport Header", "infiniband.deth", |
6692 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6693 | 16 | }, |
6694 | 16 | { &hf_infiniband_queue_key, { |
6695 | 16 | "Queue Key", "infiniband.deth.q_key", |
6696 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
6697 | 16 | }, |
6698 | 16 | { &hf_infiniband_source_qp, { |
6699 | 16 | "Source Queue Pair", "infiniband.deth.srcqp", |
6700 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
6701 | 16 | }, |
6702 | | |
6703 | | /* RDMA Extended Transport Header (RETH) */ |
6704 | 16 | { &hf_infiniband_RETH, { |
6705 | 16 | "RDMA Extended Transport Header", "infiniband.reth", |
6706 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6707 | 16 | }, |
6708 | 16 | { &hf_infiniband_virtual_address, { |
6709 | 16 | "Virtual Address", "infiniband.reth.va", |
6710 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
6711 | 16 | }, |
6712 | 16 | { &hf_infiniband_remote_key, { |
6713 | 16 | "Remote Key", "infiniband.reth.r_key", |
6714 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
6715 | 16 | }, |
6716 | 16 | { &hf_infiniband_dma_length, { |
6717 | 16 | "DMA Length", "infiniband.reth.dmalen", |
6718 | 16 | FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL} |
6719 | 16 | }, |
6720 | | |
6721 | | /* Atomic Extended Transport Header (AtomicETH) */ |
6722 | 16 | { &hf_infiniband_AtomicETH, { |
6723 | 16 | "Atomic Extended Transport Header", "infiniband.atomiceth", |
6724 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6725 | 16 | }, |
6726 | | #if 0 |
6727 | | { &hf_infiniband_virtual_address_AtomicETH, { |
6728 | | "Virtual Address", "infiniband.atomiceth.va", |
6729 | | FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL} |
6730 | | }, |
6731 | | { &hf_infiniband_remote_key_AtomicETH, { |
6732 | | "Remote Key", "infiniband.atomiceth.r_key", |
6733 | | FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL} |
6734 | | }, |
6735 | | #endif |
6736 | 16 | { &hf_infiniband_swap_or_add_data, { |
6737 | 16 | "Swap (Or Add) Data", "infiniband.atomiceth.swapdt", |
6738 | 16 | FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL} |
6739 | 16 | }, |
6740 | 16 | { &hf_infiniband_compare_data, { |
6741 | 16 | "Compare Data", "infiniband.atomiceth.cmpdt", |
6742 | 16 | FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL} |
6743 | 16 | }, |
6744 | | |
6745 | | /* ACK Extended Transport Header (AETH) */ |
6746 | 16 | { &hf_infiniband_AETH, { |
6747 | 16 | "ACK Extended Transport Header", "infiniband.aeth", |
6748 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6749 | 16 | }, |
6750 | 16 | { &hf_infiniband_syndrome, { |
6751 | 16 | "Syndrome", "infiniband.aeth.syndrome", |
6752 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL} |
6753 | 16 | }, |
6754 | 16 | { &hf_infiniband_syndrome_reserved, { |
6755 | 16 | "Reserved", "infiniband.aeth.syndrome.reserved", |
6756 | 16 | FT_UINT8, BASE_DEC, NULL, AETH_SYNDROME_RES, NULL, HFILL} |
6757 | 16 | }, |
6758 | 16 | { &hf_infiniband_syndrome_opcode, { |
6759 | 16 | "OpCode", "infiniband.aeth.syndrome.opcode", |
6760 | 16 | FT_UINT8, BASE_DEC, VALS(aeth_syndrome_opcode_vals), AETH_SYNDROME_OPCODE, NULL, HFILL} |
6761 | 16 | }, |
6762 | 16 | { &hf_infiniband_syndrome_credit_count, { |
6763 | 16 | "Credit Count", "infiniband.aeth.syndrome.credit_count", |
6764 | 16 | FT_UINT8, BASE_DEC, NULL, AETH_SYNDROME_VALUE, NULL, HFILL} |
6765 | 16 | }, |
6766 | 16 | { &hf_infiniband_syndrome_timer, { |
6767 | 16 | "Timer", "infiniband.aeth.syndrome.timer", |
6768 | 16 | FT_UINT8, BASE_DEC, VALS(aeth_syndrome_timer_code_vals), AETH_SYNDROME_VALUE, NULL, HFILL} |
6769 | 16 | }, |
6770 | 16 | { &hf_infiniband_syndrome_reserved_value, { |
6771 | 16 | "Reserved", "infiniband.aeth.syndrome.reserved_value", |
6772 | 16 | FT_UINT8, BASE_DEC, NULL, AETH_SYNDROME_VALUE, NULL, HFILL} |
6773 | 16 | }, |
6774 | 16 | { &hf_infiniband_syndrome_error_code, { |
6775 | 16 | "Error Code", "infiniband.aeth.syndrome.error_code", |
6776 | 16 | FT_UINT8, BASE_DEC, VALS(aeth_syndrome_nak_error_code_vals), AETH_SYNDROME_VALUE, NULL, HFILL} |
6777 | 16 | }, |
6778 | 16 | { &hf_infiniband_message_sequence_number, { |
6779 | 16 | "Message Sequence Number", "infiniband.aeth.msn", |
6780 | 16 | FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL} |
6781 | 16 | }, |
6782 | | |
6783 | | /* Atomic ACK Extended Transport Header (AtomicAckETH) */ |
6784 | 16 | { &hf_infiniband_AtomicAckETH, { |
6785 | 16 | "Atomic ACK Extended Transport Header", "infiniband.atomicacketh", |
6786 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6787 | 16 | }, |
6788 | 16 | { &hf_infiniband_original_remote_data, { |
6789 | 16 | "Original Remote Data", "infiniband.atomicacketh.origremdt", |
6790 | 16 | FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL} |
6791 | 16 | }, |
6792 | | |
6793 | | /* Immediate Extended Transport Header (ImmDT) */ |
6794 | 16 | { &hf_infiniband_IMMDT, { |
6795 | 16 | "Immediate Data", "infiniband.immdt", |
6796 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6797 | 16 | }, |
6798 | | |
6799 | | /* Invalidate Extended Transport Header (IETH) */ |
6800 | 16 | { &hf_infiniband_IETH, { |
6801 | 16 | "RKey", "infiniband.ieth", |
6802 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6803 | 16 | }, |
6804 | | |
6805 | | /* FLUSH Extended Transport Header (FETH) */ |
6806 | 16 | { &hf_infiniband_FETH, { |
6807 | 16 | "FLUSH Extended Transport Header", "infiniband.feth", |
6808 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6809 | 16 | }, |
6810 | 16 | { &hf_infiniband_reserved27, { |
6811 | 16 | "Reserved (27bits)", "infiniband.feth.reserved27", |
6812 | 16 | FT_UINT32, BASE_DEC, NULL, 0xFFFFFFE0, NULL, HFILL} |
6813 | 16 | }, |
6814 | 16 | { &hf_infiniband_selectivity_level, { |
6815 | 16 | "Selectivity Level", "infiniband.feth.sel", |
6816 | 16 | FT_UINT8, BASE_DEC, NULL, 0x18, NULL, HFILL} |
6817 | 16 | }, |
6818 | 16 | { &hf_infiniband_placement_type, { |
6819 | 16 | "Placement Type", "infiniband.feth.plt", |
6820 | 16 | FT_UINT8, BASE_DEC, NULL, 0x07, NULL, HFILL} |
6821 | 16 | }, |
6822 | | |
6823 | | /* Payload */ |
6824 | 16 | { &hf_infiniband_payload, { |
6825 | 16 | "Payload", "infiniband.payload", |
6826 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6827 | 16 | }, |
6828 | 16 | { &hf_infiniband_invariant_crc, { |
6829 | 16 | "Invariant CRC", "infiniband.invariant.crc", |
6830 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
6831 | 16 | }, |
6832 | 16 | { &hf_infiniband_variant_crc, { |
6833 | 16 | "Variant CRC", "infiniband.variant.crc", |
6834 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
6835 | 16 | }, |
6836 | 16 | { &hf_infiniband_raw_data, { |
6837 | 16 | "Raw Data", "infiniband.rawdata", |
6838 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6839 | 16 | }, |
6840 | | /* Unknown or Vendor Specific */ |
6841 | 16 | { &hf_infiniband_vendor, { |
6842 | 16 | "Unknown/Vendor Specific Data", "infiniband.vendor", |
6843 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6844 | 16 | }, |
6845 | | |
6846 | | /* Common Reserved fields */ |
6847 | 16 | { &hf_infiniband_reserved, { |
6848 | 16 | "Reserved", "infiniband.reserved", |
6849 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6850 | 16 | }, |
6851 | | /* CM REQ Header */ |
6852 | 16 | {&hf_cm_req_local_comm_id, { |
6853 | 16 | "Local Communication ID", "infiniband.cm.req", |
6854 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
6855 | 16 | }, |
6856 | 16 | {&hf_cm_req_service_id, { |
6857 | 16 | "ServiceID", "infiniband.cm.req.serviceid", |
6858 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
6859 | 16 | }, |
6860 | 16 | {&hf_cm_req_service_id_prefix, { |
6861 | 16 | "Prefix", "infiniband.cm.req.serviceid.prefix", |
6862 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6863 | 16 | }, |
6864 | 16 | {&hf_cm_req_service_id_protocol, { |
6865 | 16 | "Protocol", "infiniband.cm.req.serviceid.protocol", |
6866 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
6867 | 16 | }, |
6868 | 16 | {&hf_cm_req_service_id_dport, { |
6869 | 16 | "Destination Port", "infiniband.cm.req.serviceid.dport", |
6870 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
6871 | 16 | }, |
6872 | 16 | {&hf_cm_req_local_ca_guid, { |
6873 | 16 | "Local CA GUID", "infiniband.cm.req.localcaguid", |
6874 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
6875 | 16 | }, |
6876 | 16 | {&hf_cm_req_local_qkey, { |
6877 | 16 | "Local Q_Key", "infiniband.cm.req.localqkey", |
6878 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
6879 | 16 | }, |
6880 | 16 | {&hf_cm_req_local_qpn, { |
6881 | 16 | "Local QPN", "infiniband.cm.req.localqpn", |
6882 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL} |
6883 | 16 | }, |
6884 | 16 | {&hf_cm_req_respo_res, { |
6885 | 16 | "Responder Resources", "infiniband.cm.req.responderres", |
6886 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
6887 | 16 | }, |
6888 | 16 | {&hf_cm_req_local_eecn, { |
6889 | 16 | "Local EECN", "infiniband.cm.req.localeecn", |
6890 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL} |
6891 | 16 | }, |
6892 | 16 | {&hf_cm_req_init_depth, { |
6893 | 16 | "Initiator Depth", "infiniband.cm.req.initdepth", |
6894 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
6895 | 16 | }, |
6896 | 16 | {&hf_cm_req_remote_eecn, { |
6897 | 16 | "Remote EECN", "infiniband.cm.req.remoteeecn", |
6898 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL} |
6899 | 16 | }, |
6900 | 16 | {&hf_cm_req_remote_cm_resp_to, { |
6901 | 16 | "Remote CM Response Timeout", "infiniband.cm.req.remoteresptout", |
6902 | 16 | FT_UINT8, BASE_HEX, NULL, 0xF8, NULL, HFILL} |
6903 | 16 | }, |
6904 | 16 | {&hf_cm_req_transp_serv_type, { |
6905 | 16 | "Transport Service Type", "infiniband.cm.req.transpsvctype", |
6906 | 16 | FT_UINT8, BASE_HEX, NULL, 0x06, NULL, HFILL} |
6907 | 16 | }, |
6908 | 16 | {&hf_cm_req_e2e_flow_ctrl, { |
6909 | 16 | "End-to-End Flow Control", "infiniband.cm.req.e2eflowctrl", |
6910 | 16 | FT_UINT8, BASE_HEX, NULL, 0x1, NULL, HFILL} |
6911 | 16 | }, |
6912 | 16 | {&hf_cm_req_start_psn, { |
6913 | 16 | "Starting PSN", "infiniband.cm.req.startpsn", |
6914 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL} |
6915 | 16 | }, |
6916 | 16 | {&hf_cm_req_local_cm_resp_to, { |
6917 | 16 | "Local CM Response Timeout", "infiniband.cm.req.localresptout", |
6918 | 16 | FT_UINT8, BASE_HEX, NULL, 0xf8, NULL, HFILL} |
6919 | 16 | }, |
6920 | 16 | {&hf_cm_req_retry_count, { |
6921 | 16 | "Retry Count", "infiniband.cm.req.retrcount", |
6922 | 16 | FT_UINT8, BASE_HEX, NULL, 0x7, NULL, HFILL} |
6923 | 16 | }, |
6924 | 16 | {&hf_cm_req_pkey, { |
6925 | 16 | "Partition Key", "infiniband.cm.req.pkey", |
6926 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
6927 | 16 | }, |
6928 | 16 | {&hf_cm_req_path_pp_mtu, { |
6929 | 16 | "Path Packet Payload MTU", "infiniband.cm.req.pppmtu", |
6930 | 16 | FT_UINT8, BASE_HEX, NULL, 0xf0, NULL, HFILL} |
6931 | 16 | }, |
6932 | 16 | {&hf_cm_req_rdc_exists, { |
6933 | 16 | "RDC Exists", "infiniband.cm.req.rdcexist", |
6934 | 16 | FT_UINT8, BASE_HEX, NULL, 0x8, NULL, HFILL} |
6935 | 16 | }, |
6936 | 16 | {&hf_cm_req_rnr_retry_count, { |
6937 | 16 | "RNR Retry Count", "infiniband.cm.req.rnrretrcount", |
6938 | 16 | FT_UINT8, BASE_HEX, NULL, 0x7, NULL, HFILL} |
6939 | 16 | }, |
6940 | 16 | {&hf_cm_req_max_cm_retries, { |
6941 | 16 | "Max CM Retries", "infiniband.cm.req.maxcmretr", |
6942 | 16 | FT_UINT8, BASE_HEX, NULL, 0xf0, NULL, HFILL} |
6943 | 16 | }, |
6944 | 16 | {&hf_cm_req_srq, { |
6945 | 16 | "SRQ", "infiniband.cm.req.srq", |
6946 | 16 | FT_UINT8, BASE_HEX, NULL, 0x8, NULL, HFILL} |
6947 | 16 | }, |
6948 | 16 | {&hf_cm_req_extended_transport, { |
6949 | 16 | "Extended Transport", "infiniband.cm.req.ext_transport", |
6950 | 16 | FT_UINT8, BASE_HEX, NULL, 0x7, NULL, HFILL} |
6951 | 16 | }, |
6952 | 16 | {&hf_cm_req_primary_local_lid, { |
6953 | 16 | "Primary Local Port LID", "infiniband.cm.req.prim_locallid", |
6954 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL} |
6955 | 16 | }, |
6956 | 16 | {&hf_cm_req_primary_remote_lid, { |
6957 | 16 | "Primary Remote Port LID", "infiniband.cm.req.prim_remotelid", |
6958 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL} |
6959 | 16 | }, |
6960 | 16 | {&hf_cm_req_primary_local_gid, { |
6961 | 16 | "Primary Local Port GID", "infiniband.cm.req.prim_localgid", |
6962 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6963 | 16 | }, |
6964 | 16 | {&hf_cm_req_primary_remote_gid, { |
6965 | 16 | "Primary Remote Port GID", "infiniband.cm.req.prim_remotegid", |
6966 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6967 | 16 | }, |
6968 | 16 | {&hf_cm_req_primary_local_gid_ipv4, { |
6969 | 16 | "Primary Local Port GID", "infiniband.cm.req.prim_localgid_ipv4", |
6970 | 16 | FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6971 | 16 | }, |
6972 | 16 | {&hf_cm_req_primary_remote_gid_ipv4, { |
6973 | 16 | "Primary Remote Port GID", "infiniband.cm.req.prim_remotegid_ipv4", |
6974 | 16 | FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL} |
6975 | 16 | }, |
6976 | 16 | {&hf_cm_req_primary_flow_label, { |
6977 | 16 | "Primary Flow Label", "infiniband.cm.req.prim_flowlabel", |
6978 | 16 | FT_UINT32, BASE_HEX, NULL, 0xfffff000, NULL, HFILL} |
6979 | 16 | }, |
6980 | 16 | {&hf_cm_req_primary_reserved0, { |
6981 | 16 | "Reserved", "infiniband.cm.req.prim_reserved0", |
6982 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0fc0, NULL, HFILL} |
6983 | 16 | }, |
6984 | 16 | {&hf_cm_req_primary_packet_rate, { |
6985 | 16 | "Primary Packet Rate", "infiniband.cm.req.prim_pktrate", |
6986 | 16 | FT_UINT32, BASE_HEX, NULL, 0x3f, NULL, HFILL} |
6987 | 16 | }, |
6988 | 16 | {&hf_cm_req_primary_traffic_class, { |
6989 | 16 | "Primary Traffic Class", "infiniband.cm.req.prim_tfcclass", |
6990 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
6991 | 16 | }, |
6992 | 16 | {&hf_cm_req_primary_hop_limit, { |
6993 | 16 | "Primary Hop Limit", "infiniband.cm.req.prim_hoplim", |
6994 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
6995 | 16 | }, |
6996 | 16 | {&hf_cm_req_primary_sl, { |
6997 | 16 | "Primary SL", "infiniband.cm.req.prim_sl", |
6998 | 16 | FT_UINT8, BASE_HEX, NULL, 0xf0, NULL, HFILL} |
6999 | 16 | }, |
7000 | 16 | {&hf_cm_req_primary_subnet_local, { |
7001 | 16 | "Primary Subnet Local", "infiniband.cm.req.prim_subnetlocal", |
7002 | 16 | FT_UINT8, BASE_HEX, NULL, 0x8, NULL, HFILL} |
7003 | 16 | }, |
7004 | 16 | {&hf_cm_req_primary_reserved1, { |
7005 | 16 | "Reserved", "infiniband.cm.req.prim_reserved1", |
7006 | 16 | FT_UINT8, BASE_HEX, NULL, 0x7, NULL, HFILL} |
7007 | 16 | }, |
7008 | 16 | {&hf_cm_req_primary_local_ack_to, { |
7009 | 16 | "Primary Local ACK Timeout", "infiniband.cm.req.prim_localacktout", |
7010 | 16 | FT_UINT8, BASE_HEX, NULL, 0xf8, NULL, HFILL} |
7011 | 16 | }, |
7012 | 16 | {&hf_cm_req_primary_reserved2, { |
7013 | 16 | "Reserved", "infiniband.cm.req.prim_reserved2", |
7014 | 16 | FT_UINT8, BASE_HEX, NULL, 0x07, NULL, HFILL} |
7015 | 16 | }, |
7016 | 16 | {&hf_cm_req_alt_local_lid, { |
7017 | 16 | "Alternate Local Port LID", "infiniband.cm.req.alt_locallid", |
7018 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL} |
7019 | 16 | }, |
7020 | 16 | {&hf_cm_req_alt_remote_lid, { |
7021 | 16 | "Alternate Remote Port LID", "infiniband.cm.req.alt_remotelid", |
7022 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL} |
7023 | 16 | }, |
7024 | 16 | {&hf_cm_req_alt_local_gid, { |
7025 | 16 | "Alternate Local Port GID", "infiniband.cm.req.alt_localgid", |
7026 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7027 | 16 | }, |
7028 | 16 | {&hf_cm_req_alt_remote_gid, { |
7029 | 16 | "Alternate Remote Port GID", "infiniband.cm.req.alt_remotegid", |
7030 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7031 | 16 | }, |
7032 | 16 | {&hf_cm_req_flow_label, { |
7033 | 16 | "Alternate Flow Label", "infiniband.cm.req.alt_flowlabel", |
7034 | 16 | FT_UINT32, BASE_HEX, NULL, 0xfffff000, NULL, HFILL} |
7035 | 16 | }, |
7036 | 16 | {&hf_cm_req_alt_reserved0, { |
7037 | 16 | "Reserved", "infiniband.cm.req.alt_reserved0", |
7038 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0fc0, NULL, HFILL} |
7039 | 16 | }, |
7040 | 16 | {&hf_cm_req_packet_rate, { |
7041 | 16 | "Alternate Packet Rate", "infiniband.cm.req.alt_pktrate", |
7042 | 16 | FT_UINT32, BASE_HEX, NULL, 0x3f, NULL, HFILL} |
7043 | 16 | }, |
7044 | 16 | {&hf_cm_req_alt_traffic_class, { |
7045 | 16 | "Alternate Traffic Class", "infiniband.cm.req.alt_tfcclass", |
7046 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7047 | 16 | }, |
7048 | 16 | {&hf_cm_req_alt_hop_limit, { |
7049 | 16 | "Alternate Hop Limit", "infiniband.cm.req.alt_hoplim", |
7050 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7051 | 16 | }, |
7052 | 16 | {&hf_cm_req_SL, { |
7053 | 16 | "Alternate SL", "infiniband.cm.req.alt_sl", |
7054 | 16 | FT_UINT8, BASE_HEX, NULL, 0xf0, NULL, HFILL} |
7055 | 16 | }, |
7056 | 16 | {&hf_cm_req_subnet_local, { |
7057 | 16 | "Alternate Subnet Local", "infiniband.cm.req.alt_subnetlocal", |
7058 | 16 | FT_UINT8, BASE_HEX, NULL, 0x8, NULL, HFILL} |
7059 | 16 | }, |
7060 | 16 | {&hf_cm_req_alt_reserved1, { |
7061 | 16 | "Reserved", "infiniband.cm.req.alt_reserved1", |
7062 | 16 | FT_UINT8, BASE_HEX, NULL, 0x7, NULL, HFILL} |
7063 | 16 | }, |
7064 | 16 | {&hf_cm_req_local_ACK_timeout, { |
7065 | 16 | "Alternate Local ACK Timeout", "infiniband.cm.req.alt_localacktout", |
7066 | 16 | FT_UINT8, BASE_HEX, NULL, 0xf8, NULL, HFILL} |
7067 | 16 | }, |
7068 | 16 | {&hf_cm_req_alt_reserved2, { |
7069 | 16 | "Reserved", "infiniband.cm.req.alt_reserved1", |
7070 | 16 | FT_UINT8, BASE_HEX, NULL, 0x07, NULL, HFILL} |
7071 | 16 | }, |
7072 | 16 | {&hf_cm_req_private_data, { |
7073 | 16 | "PrivateData", "infiniband.cm.req.private", |
7074 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7075 | 16 | }, |
7076 | 16 | {&hf_cm_req_ip_cm_req_msg, { |
7077 | 16 | "IP CM Request Msg", "infiniband.cm.req.ip_cm", |
7078 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7079 | 16 | }, |
7080 | 16 | {&hf_cm_req_ip_cm_majv, { |
7081 | 16 | "IP CM Major Version", "infiniband.cm.req.ip_cm.majv", |
7082 | 16 | FT_UINT8, BASE_HEX, NULL, 0xf0, NULL, HFILL} |
7083 | 16 | }, |
7084 | 16 | {&hf_cm_req_ip_cm_minv, { |
7085 | 16 | "IP CM Minor Version", "infiniband.cm.req.ip_cm.minv", |
7086 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0f, NULL, HFILL} |
7087 | 16 | }, |
7088 | 16 | {&hf_cm_req_ip_cm_ipv, { |
7089 | 16 | "IP CM IP Version", "infiniband.cm.req.ip_cm.ipv", |
7090 | 16 | FT_UINT8, BASE_HEX, NULL, 0xf0, NULL, HFILL} |
7091 | 16 | }, |
7092 | 16 | {&hf_cm_req_ip_cm_res, { |
7093 | 16 | "IP CM Reserved", "infiniband.cm.req.ip_cm.reserved", |
7094 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0f, NULL, HFILL} |
7095 | 16 | }, |
7096 | 16 | {&hf_cm_req_ip_cm_sport, { |
7097 | 16 | "IP CM Source Port", "infiniband.cm.req.ip_cm.sport", |
7098 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7099 | 16 | }, |
7100 | 16 | {&hf_cm_req_ip_cm_sip6, { |
7101 | 16 | "IP CM Source IP", "infiniband.cm.req.ip_cm.sip6", |
7102 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7103 | 16 | }, |
7104 | 16 | {&hf_cm_req_ip_cm_dip6, { |
7105 | 16 | "IP CM Destination IP", "infiniband.cm.req.ip_cm.dip6", |
7106 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7107 | 16 | }, |
7108 | 16 | {&hf_cm_req_ip_cm_sip4, { |
7109 | 16 | "IP CM Source IP", "infiniband.cm.req.ip_cm.sip4", |
7110 | 16 | FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7111 | 16 | }, |
7112 | 16 | {&hf_cm_req_ip_cm_dip4, { |
7113 | 16 | "IP CM Destination IP", "infiniband.cm.req.ip_cm.dip4", |
7114 | 16 | FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7115 | 16 | }, |
7116 | 16 | {&hf_ip_cm_req_consumer_private_data, { |
7117 | 16 | "IP CM Consumer PrivateData", "infiniband.cm.req.ip_cm.private", |
7118 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7119 | 16 | }, |
7120 | | /* CM REP Header */ |
7121 | 16 | {&hf_cm_rep_localcommid, { |
7122 | 16 | "Local Communication ID", "infiniband.cm.rep", |
7123 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7124 | 16 | }, |
7125 | 16 | {&hf_cm_rep_remotecommid, { |
7126 | 16 | "Remote Communication ID", "infiniband.cm.rep.remotecommid", |
7127 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7128 | 16 | }, |
7129 | 16 | {&hf_cm_rep_localqkey, { |
7130 | 16 | "Local Q_Key", "infiniband.cm.rep.localqkey", |
7131 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7132 | 16 | }, |
7133 | 16 | {&hf_cm_rep_localqpn, { |
7134 | 16 | "Local QPN", "infiniband.cm.rep.localqpn", |
7135 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7136 | 16 | }, |
7137 | 16 | {&hf_cm_rep_localeecontnum, { |
7138 | 16 | "Local EE Context Number", "infiniband.cm.rep.localeecn", |
7139 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7140 | 16 | }, |
7141 | 16 | {&hf_cm_rep_startingpsn, { |
7142 | 16 | "Starting PSN", "infiniband.cm.rep.startpsn", |
7143 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7144 | 16 | }, |
7145 | 16 | {&hf_cm_rep_responderres, { |
7146 | 16 | "Responder Resources", "infiniband.cm.rep.respres", |
7147 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7148 | 16 | }, |
7149 | 16 | {&hf_cm_rep_initiatordepth, { |
7150 | 16 | "Initiator Depth", "infiniband.cm.rep.initdepth", |
7151 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7152 | 16 | }, |
7153 | 16 | {&hf_cm_rep_tgtackdelay, { |
7154 | 16 | "Target ACK Delay", "infiniband.cm.rep.tgtackdelay", |
7155 | 16 | FT_UINT8, BASE_HEX, NULL, 0xf8, NULL, HFILL} |
7156 | 16 | }, |
7157 | 16 | {&hf_cm_rep_failoveracc, { |
7158 | 16 | "Failover Accepted", "infiniband.cm.rep.failoveracc", |
7159 | 16 | FT_UINT8, BASE_HEX, NULL, 0x6, NULL, HFILL} |
7160 | 16 | }, |
7161 | 16 | {&hf_cm_rep_e2eflowctl, { |
7162 | 16 | "End-To-End Flow Control", "infiniband.cm.rep.e2eflowctrl", |
7163 | 16 | FT_UINT8, BASE_HEX, NULL, 0x1, NULL, HFILL} |
7164 | 16 | }, |
7165 | 16 | {&hf_cm_rep_rnrretrycount, { |
7166 | 16 | "RNR Retry Count", "infiniband.cm.rep.rnrretrcount", |
7167 | 16 | FT_UINT8, BASE_HEX, NULL, 0xe0, NULL, HFILL} |
7168 | 16 | }, |
7169 | 16 | {&hf_cm_rep_srq, { |
7170 | 16 | "SRQ", "infiniband.cm.rep.srq", |
7171 | 16 | FT_UINT8, BASE_HEX, NULL, 0x10, NULL, HFILL} |
7172 | 16 | }, |
7173 | 16 | {&hf_cm_rep_reserved, { |
7174 | 16 | "Reserved", "infiniband.cm.rep.reserved", |
7175 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0f, NULL, HFILL} |
7176 | 16 | }, |
7177 | 16 | {&hf_cm_rep_localcaguid, { |
7178 | 16 | "Local CA GUID", "infiniband.cm.rep.localcaguid", |
7179 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7180 | 16 | }, |
7181 | 16 | {&hf_cm_rep_privatedata, { |
7182 | 16 | "PrivateData", "infiniband.cm.rep.private", |
7183 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7184 | 16 | }, |
7185 | | /* IB CM RTU Header */ |
7186 | 16 | {&hf_cm_rtu_localcommid, { |
7187 | 16 | "Local Communication ID", "infiniband.cm.rtu.localcommid", |
7188 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7189 | 16 | }, |
7190 | 16 | {&hf_cm_rtu_remotecommid, { |
7191 | 16 | "Remote Communication ID", "infiniband.cm.rtu.remotecommid", |
7192 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7193 | 16 | }, |
7194 | 16 | {&hf_cm_rtu_privatedata, { |
7195 | 16 | "PrivateData", "infiniband.cm.rtu.private", |
7196 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7197 | 16 | }, |
7198 | | /* CM REJ Header */ |
7199 | 16 | {&hf_cm_rej_local_commid, { |
7200 | 16 | "Local Communication ID", "infiniband.cm.rej.localcommid", |
7201 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7202 | 16 | }, |
7203 | 16 | {&hf_cm_rej_remote_commid, { |
7204 | 16 | "Remote Communication ID", "infiniband.cm.rej.remotecommid", |
7205 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7206 | 16 | }, |
7207 | 16 | {&hf_cm_rej_msg_rej, { |
7208 | 16 | "Message REJected", "infiniband.cm.rej.msgrej", |
7209 | 16 | FT_UINT8, BASE_HEX, NULL, 0xc0, NULL, HFILL} |
7210 | 16 | }, |
7211 | 16 | {&hf_cm_rej_msg_reserved0, { |
7212 | 16 | "Reserved", "infiniband.cm.rej.reserved0", |
7213 | 16 | FT_UINT8, BASE_HEX, NULL, 0x03, NULL, HFILL} |
7214 | 16 | }, |
7215 | 16 | {&hf_cm_rej_rej_info_len, { |
7216 | 16 | "Reject Info Length", "infiniband.cm.rej.rejinfolen", |
7217 | 16 | FT_UINT8, BASE_HEX, NULL, 0xfe, NULL, HFILL} |
7218 | 16 | }, |
7219 | 16 | {&hf_cm_rej_msg_reserved1, { |
7220 | 16 | "Reserved", "infiniband.cm.rej.reserved1", |
7221 | 16 | FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL} |
7222 | 16 | }, |
7223 | 16 | {&hf_cm_rej_reason, { |
7224 | 16 | "Reason", "infiniband.cm.rej.reason", |
7225 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7226 | 16 | }, |
7227 | 16 | {&hf_cm_rej_add_rej_info, { |
7228 | 16 | "Additional Reject Information (ARI)", "infiniband.cm.rej.ari", |
7229 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7230 | 16 | }, |
7231 | 16 | {&hf_cm_rej_private_data, { |
7232 | 16 | "PrivateData", "infiniband.cm.rej.private", |
7233 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7234 | 16 | }, |
7235 | | /* IB CM DREQ Header */ |
7236 | 16 | {&hf_cm_dreq_localcommid, { |
7237 | 16 | "Local Communication ID", "infiniband.cm.dreq.localcommid", |
7238 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7239 | 16 | }, |
7240 | 16 | {&hf_cm_dreq_remotecommid, { |
7241 | 16 | "Remote Communication ID", "infiniband.cm.dreq.remotecommid", |
7242 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7243 | 16 | }, |
7244 | 16 | {&hf_cm_dreq_remote_qpn, { |
7245 | 16 | "Remote QPN/EECN", "infiniband.cm.req.remoteqpneecn", |
7246 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7247 | 16 | }, |
7248 | 16 | {&hf_cm_dreq_privatedata, { |
7249 | 16 | "PrivateData", "infiniband.cm.dreq.private", |
7250 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7251 | 16 | }, |
7252 | | /* IB CM DRSP Header */ |
7253 | 16 | {&hf_cm_drsp_localcommid, { |
7254 | 16 | "Local Communication ID", "infiniband.cm.drsp.localcommid", |
7255 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7256 | 16 | }, |
7257 | 16 | {&hf_cm_drsp_remotecommid, { |
7258 | 16 | "Remote Communication ID", "infiniband.cm.drsp.remotecommid", |
7259 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7260 | 16 | }, |
7261 | 16 | {&hf_cm_drsp_privatedata, { |
7262 | 16 | "PrivateData", "infiniband.cm.drsp.private", |
7263 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7264 | 16 | }, |
7265 | | |
7266 | | /* MAD Base Header */ |
7267 | 16 | { &hf_infiniband_MAD, { |
7268 | 16 | "MAD (Management Datagram) Common Header", "infiniband.mad", |
7269 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7270 | 16 | }, |
7271 | 16 | { &hf_infiniband_base_version, { |
7272 | 16 | "Base Version", "infiniband.mad.baseversion", |
7273 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7274 | 16 | }, |
7275 | 16 | { &hf_infiniband_mgmt_class, { |
7276 | 16 | "Management Class", "infiniband.mad.mgmtclass", |
7277 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7278 | 16 | }, |
7279 | 16 | { &hf_infiniband_class_version, { |
7280 | 16 | "Class Version", "infiniband.mad.classversion", |
7281 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7282 | 16 | }, |
7283 | 16 | { &hf_infiniband_method, { |
7284 | 16 | "Method", "infiniband.mad.method", |
7285 | 16 | FT_UINT8, BASE_HEX, VALS(mad_method_str), 0x0, NULL, HFILL} |
7286 | 16 | }, |
7287 | 16 | { &hf_infiniband_status, { |
7288 | 16 | "Status", "infiniband.mad.status", |
7289 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7290 | 16 | }, |
7291 | 16 | { &hf_infiniband_class_specific, { |
7292 | 16 | "Class Specific", "infiniband.mad.classspecific", |
7293 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7294 | 16 | }, |
7295 | 16 | { &hf_infiniband_transaction_id, { |
7296 | 16 | "Transaction ID", "infiniband.mad.transactionid", |
7297 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7298 | 16 | }, |
7299 | 16 | { &hf_infiniband_attribute_id, { |
7300 | 16 | "Attribute ID", "infiniband.mad.attributeid", |
7301 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7302 | 16 | }, |
7303 | 16 | { &hf_infiniband_attribute_modifier, { |
7304 | 16 | "Attribute Modifier", "infiniband.mad.attributemodifier", |
7305 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7306 | 16 | }, |
7307 | 16 | { &hf_infiniband_data, { |
7308 | 16 | "MAD Data Payload", "infiniband.mad.data", |
7309 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7310 | 16 | }, |
7311 | | |
7312 | | /* RMPP Header */ |
7313 | 16 | { &hf_infiniband_RMPP, { |
7314 | 16 | "RMPP (Reliable Multi-Packet Transaction Protocol)", "infiniband.rmpp", |
7315 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7316 | 16 | }, |
7317 | 16 | { &hf_infiniband_rmpp_version, { |
7318 | 16 | "RMPP Type", "infiniband.rmpp.rmppversion", |
7319 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7320 | 16 | }, |
7321 | 16 | { &hf_infiniband_rmpp_type, { |
7322 | 16 | "RMPP Type", "infiniband.rmpp.rmpptype", |
7323 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7324 | 16 | }, |
7325 | 16 | { &hf_infiniband_r_resp_time, { |
7326 | 16 | "R Resp Time", "infiniband.rmpp.rresptime", |
7327 | 16 | FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL} |
7328 | 16 | }, |
7329 | 16 | { &hf_infiniband_rmpp_flags, { |
7330 | 16 | "RMPP Flags", "infiniband.rmpp.rmppflags", |
7331 | 16 | FT_UINT8, BASE_HEX, VALS(RMPP_Flags), 0x0F, NULL, HFILL} |
7332 | 16 | }, |
7333 | 16 | { &hf_infiniband_rmpp_status, { |
7334 | 16 | "RMPP Status", "infiniband.rmpp.rmppstatus", |
7335 | 16 | FT_UINT8, BASE_HEX, VALS(RMPP_Status), 0x0, NULL, HFILL} |
7336 | 16 | }, |
7337 | 16 | { &hf_infiniband_rmpp_data1, { |
7338 | 16 | "RMPP Data 1", "infiniband.rmpp.data1", |
7339 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7340 | 16 | }, |
7341 | 16 | { &hf_infiniband_rmpp_data2, { |
7342 | 16 | "RMPP Data 2", "infiniband.rmpp.data2", |
7343 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7344 | 16 | }, |
7345 | | |
7346 | | /* RMPP Data */ |
7347 | | #if 0 |
7348 | | { &hf_infiniband_RMPP_DATA, { |
7349 | | "RMPP Data (Reliable Multi-Packet Transaction Protocol)", "infiniband.rmpp.data", |
7350 | | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7351 | | }, |
7352 | | #endif |
7353 | 16 | { &hf_infiniband_segment_number, { |
7354 | 16 | "Segment Number", "infiniband.rmpp.segmentnumber", |
7355 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7356 | 16 | }, |
7357 | 16 | { &hf_infiniband_payload_length32, { |
7358 | 16 | "Payload Length", "infiniband.rmpp.payloadlength", |
7359 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7360 | 16 | }, |
7361 | 16 | { &hf_infiniband_transferred_data, { |
7362 | 16 | "Transferred Data", "infiniband.rmpp.transferreddata", |
7363 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7364 | 16 | }, |
7365 | | |
7366 | | /* RMPP ACK */ |
7367 | 16 | { &hf_infiniband_new_window_last, { |
7368 | 16 | "New Window Last", "infiniband.rmpp.newwindowlast", |
7369 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7370 | 16 | }, |
7371 | | |
7372 | | /* RMPP ABORT/STOP */ |
7373 | 16 | { &hf_infiniband_optional_extended_error_data, { |
7374 | 16 | "Optional Extended Error Data", "infiniband.rmpp.extendederrordata", |
7375 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7376 | 16 | }, |
7377 | | |
7378 | | /* SMP Data (LID Routed) */ |
7379 | 16 | { &hf_infiniband_SMP_LID, { |
7380 | 16 | "Subnet Management Packet (LID Routed)", "infiniband.smplid", |
7381 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7382 | 16 | }, |
7383 | 16 | { &hf_infiniband_m_key, { |
7384 | 16 | "M_Key", "infiniband.smplid.mkey", |
7385 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7386 | 16 | }, |
7387 | 16 | { &hf_infiniband_smp_data, { |
7388 | 16 | "SMP Data", "infiniband.smplid.smpdata", |
7389 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7390 | 16 | }, |
7391 | | |
7392 | | /* XX: All following verified/corrected against Infiniband 1.2.1 Specification */ |
7393 | | /* SMP Data Directed Route */ |
7394 | 16 | { &hf_infiniband_SMP_DIRECTED, { |
7395 | 16 | "Subnet Management Packet (Directed Route)", "infiniband.smpdirected", |
7396 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7397 | 16 | }, |
7398 | 16 | { &hf_infiniband_smp_status, { |
7399 | 16 | "Status", "infiniband.smpdirected.smpstatus", |
7400 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7401 | 16 | }, |
7402 | 16 | { &hf_infiniband_hop_pointer, { |
7403 | 16 | "Hop Pointer", "infiniband.smpdirected.hoppointer", |
7404 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7405 | 16 | }, |
7406 | 16 | { &hf_infiniband_hop_count, { |
7407 | 16 | "Hop Count", "infiniband.smpdirected.hopcount", |
7408 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7409 | 16 | }, |
7410 | 16 | { &hf_infiniband_dr_slid, { |
7411 | 16 | "DrSLID", "infiniband.smpdirected.drslid", |
7412 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7413 | 16 | }, |
7414 | 16 | { &hf_infiniband_dr_dlid, { |
7415 | 16 | "DrDLID", "infiniband.smpdirected.drdlid", |
7416 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7417 | 16 | }, |
7418 | 16 | { &hf_infiniband_d, { |
7419 | 16 | "D (Direction Bit)", "infiniband.smpdirected.d", |
7420 | 16 | FT_UINT64, BASE_HEX, NULL, 0x8000, NULL, HFILL} |
7421 | 16 | }, |
7422 | 16 | { &hf_infiniband_initial_path, { |
7423 | 16 | "Initial Path", "infiniband.smpdirected.initialpath", |
7424 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7425 | 16 | }, |
7426 | 16 | { &hf_infiniband_return_path, { |
7427 | 16 | "Return Path", "infiniband.smpdirected.returnpath", |
7428 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7429 | 16 | }, |
7430 | | |
7431 | | /* SA MAD Header */ |
7432 | 16 | { &hf_infiniband_SA, { |
7433 | 16 | "SA Packet (Subnet Administration)", "infiniband.sa.drdlid", |
7434 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7435 | 16 | }, |
7436 | 16 | { &hf_infiniband_sm_key, { |
7437 | 16 | "SM_Key (Verification Key)", "infiniband.sa.smkey", |
7438 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7439 | 16 | }, |
7440 | 16 | { &hf_infiniband_attribute_offset, { |
7441 | 16 | "Attribute Offset", "infiniband.sa.attributeoffset", |
7442 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7443 | 16 | }, |
7444 | 16 | { &hf_infiniband_component_mask, { |
7445 | 16 | "Component Mask", "infiniband.sa.componentmask", |
7446 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7447 | 16 | }, |
7448 | 16 | { &hf_infiniband_subnet_admin_data, { |
7449 | 16 | "Subnet Admin Data", "infiniband.sa.subnetadmindata", |
7450 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7451 | 16 | }, |
7452 | | |
7453 | | /* NodeDescription */ |
7454 | 16 | { &hf_infiniband_NodeDescription_NodeString, { |
7455 | 16 | "NodeString", "infiniband.nodedescription.nodestring", |
7456 | 16 | FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7457 | 16 | }, |
7458 | | |
7459 | | /* NodeInfo */ |
7460 | 16 | { &hf_infiniband_NodeInfo_BaseVersion, { |
7461 | 16 | "BaseVersion", "infiniband.nodeinfo.baseversion", |
7462 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7463 | 16 | }, |
7464 | 16 | { &hf_infiniband_NodeInfo_ClassVersion, { |
7465 | 16 | "ClassVersion", "infiniband.nodeinfo.classversion", |
7466 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7467 | 16 | }, |
7468 | 16 | { &hf_infiniband_NodeInfo_NodeType, { |
7469 | 16 | "NodeType", "infiniband.nodeinfo.nodetype", |
7470 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7471 | 16 | }, |
7472 | 16 | { &hf_infiniband_NodeInfo_NumPorts, { |
7473 | 16 | "NumPorts", "infiniband.nodeinfo.numports", |
7474 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7475 | 16 | }, |
7476 | 16 | { &hf_infiniband_NodeInfo_SystemImageGUID, { |
7477 | 16 | "SystemImageGUID", "infiniband.nodeinfo.systemimageguid", |
7478 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7479 | 16 | }, |
7480 | 16 | { &hf_infiniband_NodeInfo_NodeGUID, { |
7481 | 16 | "NodeGUID", "infiniband.nodeinfo.nodeguid", |
7482 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7483 | 16 | }, |
7484 | 16 | { &hf_infiniband_NodeInfo_PortGUID, { |
7485 | 16 | "PortGUID", "infiniband.nodeinfo.portguid", |
7486 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7487 | 16 | }, |
7488 | 16 | { &hf_infiniband_NodeInfo_PartitionCap, { |
7489 | 16 | "PartitionCap", "infiniband.nodeinfo.partitioncap", |
7490 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7491 | 16 | }, |
7492 | 16 | { &hf_infiniband_NodeInfo_DeviceID, { |
7493 | 16 | "DeviceID", "infiniband.nodeinfo.deviceid", |
7494 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7495 | 16 | }, |
7496 | 16 | { &hf_infiniband_NodeInfo_Revision, { |
7497 | 16 | "Revision", "infiniband.nodeinfo.revision", |
7498 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7499 | 16 | }, |
7500 | 16 | { &hf_infiniband_NodeInfo_LocalPortNum, { |
7501 | 16 | "LocalPortNum", "infiniband.nodeinfo.localportnum", |
7502 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7503 | 16 | }, |
7504 | 16 | { &hf_infiniband_NodeInfo_VendorID, { |
7505 | 16 | "VendorID", "infiniband.nodeinfo.vendorid", |
7506 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7507 | 16 | }, |
7508 | | |
7509 | | /* SwitchInfo */ |
7510 | 16 | { &hf_infiniband_SwitchInfo_LinearFDBCap, { |
7511 | 16 | "LinearFDBCap", "infiniband.switchinfo.linearfdbcap", |
7512 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7513 | 16 | }, |
7514 | 16 | { &hf_infiniband_SwitchInfo_RandomFDBCap, { |
7515 | 16 | "RandomFDBCap", "infiniband.switchinfo.randomfdbcap", |
7516 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7517 | 16 | }, |
7518 | 16 | { &hf_infiniband_SwitchInfo_MulticastFDBCap, { |
7519 | 16 | "MulticastFDBCap", "infiniband.switchinfo.multicastfdbcap", |
7520 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7521 | 16 | }, |
7522 | 16 | { &hf_infiniband_SwitchInfo_LinearFDBTop, { |
7523 | 16 | "LinearFDBTop", "infiniband.switchinfo.linearfdbtop", |
7524 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7525 | 16 | }, |
7526 | 16 | { &hf_infiniband_SwitchInfo_DefaultPort, { |
7527 | 16 | "DefaultPort", "infiniband.switchinfo.defaultport", |
7528 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7529 | 16 | }, |
7530 | 16 | { &hf_infiniband_SwitchInfo_DefaultMulticastPrimaryPort, { |
7531 | 16 | "DefaultMulticastPrimaryPort", "infiniband.switchinfo.defaultmulticastprimaryport", |
7532 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7533 | 16 | }, |
7534 | 16 | { &hf_infiniband_SwitchInfo_DefaultMulticastNotPrimaryPort, { |
7535 | 16 | "DefaultMulticastNotPrimaryPort", "infiniband.switchinfo.defaultmulticastnotprimaryport", |
7536 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7537 | 16 | }, |
7538 | 16 | { &hf_infiniband_SwitchInfo_LifeTimeValue, { |
7539 | 16 | "LifeTimeValue", "infiniband.switchinfo.lifetimevalue", |
7540 | 16 | FT_UINT8, BASE_HEX, NULL, 0xF8, NULL, HFILL} |
7541 | 16 | }, |
7542 | 16 | { &hf_infiniband_SwitchInfo_PortStateChange, { |
7543 | 16 | "PortStateChange", "infiniband.switchinfo.portstatechange", |
7544 | 16 | FT_UINT8, BASE_HEX, NULL, 0x04, NULL, HFILL} |
7545 | 16 | }, |
7546 | 16 | { &hf_infiniband_SwitchInfo_OptimizedSLtoVLMappingProgramming, { |
7547 | 16 | "OptimizedSLtoVLMappingProgramming", "infiniband.switchinfo.optimizedsltovlmappingprogramming", |
7548 | 16 | FT_UINT8, BASE_HEX, NULL, 0x03, NULL, HFILL} |
7549 | 16 | }, |
7550 | 16 | { &hf_infiniband_SwitchInfo_LIDsPerPort, { |
7551 | 16 | "LIDsPerPort", "infiniband.switchinfo.lidsperport", |
7552 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7553 | 16 | }, |
7554 | 16 | { &hf_infiniband_SwitchInfo_PartitionEnforcementCap, { |
7555 | 16 | "PartitionEnforcementCap", "infiniband.switchinfo.partitionenforcementcap", |
7556 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7557 | 16 | }, |
7558 | 16 | { &hf_infiniband_SwitchInfo_InboundEnforcementCap, { |
7559 | 16 | "InboundEnforcementCap", "infiniband.switchinfo.inboundenforcementcap", |
7560 | 16 | FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL} |
7561 | 16 | }, |
7562 | 16 | { &hf_infiniband_SwitchInfo_OutboundEnforcementCap, { |
7563 | 16 | "OutboundEnforcementCap", "infiniband.switchinfo.outboundenforcementcap", |
7564 | 16 | FT_UINT8, BASE_HEX, NULL, 0x40, NULL, HFILL} |
7565 | 16 | }, |
7566 | 16 | { &hf_infiniband_SwitchInfo_FilterRawInboundCap, { |
7567 | 16 | "FilterRawInboundCap", "infiniband.switchinfo.filterrawinboundcap", |
7568 | 16 | FT_UINT8, BASE_HEX, NULL, 0x20, NULL, HFILL} |
7569 | 16 | }, |
7570 | 16 | { &hf_infiniband_SwitchInfo_FilterRawOutboundCap, { |
7571 | 16 | "FilterRawOutboundCap", "infiniband.switchinfo.filterrawoutboundcap", |
7572 | 16 | FT_UINT8, BASE_HEX, NULL, 0x10, NULL, HFILL} |
7573 | 16 | }, |
7574 | 16 | { &hf_infiniband_SwitchInfo_EnhancedPortZero, { |
7575 | 16 | "EnhancedPortZero", "infiniband.switchinfo.enhancedportzero", |
7576 | 16 | FT_UINT8, BASE_HEX, NULL, 0x08, NULL, HFILL} |
7577 | 16 | }, |
7578 | | |
7579 | | /* GUIDInfo */ |
7580 | | #if 0 |
7581 | | { &hf_infiniband_GUIDInfo_GUIDBlock, { |
7582 | | "GUIDBlock", "infiniband.switchinfo.guidblock", |
7583 | | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7584 | | }, |
7585 | | #endif |
7586 | 16 | { &hf_infiniband_GUIDInfo_GUID, { |
7587 | 16 | "GUID", "infiniband.switchinfo.guid", |
7588 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7589 | 16 | }, |
7590 | | |
7591 | | /* PortInfo */ |
7592 | 16 | { &hf_infiniband_PortInfo_M_Key, { |
7593 | 16 | "M_Key", "infiniband.portinfo.m_key", |
7594 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7595 | 16 | }, |
7596 | 16 | { &hf_infiniband_PortInfo_GidPrefix, { |
7597 | 16 | "GidPrefix", "infiniband.portinfo.guid", |
7598 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7599 | 16 | }, |
7600 | 16 | { &hf_infiniband_PortInfo_LID, { |
7601 | 16 | "LID", "infiniband.portinfo.lid", |
7602 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7603 | 16 | }, |
7604 | 16 | { &hf_infiniband_PortInfo_MasterSMLID, { |
7605 | 16 | "MasterSMLID", "infiniband.portinfo.mastersmlid", |
7606 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7607 | 16 | }, |
7608 | 16 | { &hf_infiniband_PortInfo_CapabilityMask, { |
7609 | 16 | "CapabilityMask", "infiniband.portinfo.capabilitymask", |
7610 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7611 | 16 | }, |
7612 | | |
7613 | | /* Capability Mask Flags */ |
7614 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_SM, { |
7615 | 16 | "SM", "infiniband.portinfo.capabilitymask.issm", |
7616 | 16 | FT_UINT32, BASE_HEX, NULL, 0x00000002, NULL, HFILL} |
7617 | 16 | }, |
7618 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_NoticeSupported, { |
7619 | 16 | "NoticeSupported", "infiniband.portinfo.capabilitymask.noticesupported", |
7620 | 16 | FT_UINT32, BASE_HEX, NULL, 0x00000004, NULL, HFILL} |
7621 | 16 | }, |
7622 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_TrapSupported, { |
7623 | 16 | "TrapSupported", "infiniband.portinfo.capabilitymask.trapsupported", |
7624 | 16 | FT_UINT32, BASE_HEX, NULL, 0x00000008, NULL, HFILL} |
7625 | 16 | }, |
7626 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_OptionalIPDSupported, { |
7627 | 16 | "OptionalIPDSupported", "infiniband.portinfo.capabilitymask.optionalipdsupported", |
7628 | 16 | FT_UINT32, BASE_HEX, NULL, 0x00000010, NULL, HFILL} |
7629 | 16 | }, |
7630 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_AutomaticMigrationSupported, { |
7631 | 16 | "AutomaticMigrationSupported", "infiniband.portinfo.capabilitymask.automaticmigrationsupported", |
7632 | 16 | FT_UINT32, BASE_HEX, NULL, 0x00000020, NULL, HFILL} |
7633 | 16 | }, |
7634 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_SLMappingSupported, { |
7635 | 16 | "SLMappingSupported", "infiniband.portinfo.capabilitymask.slmappingsupported", |
7636 | 16 | FT_UINT32, BASE_HEX, NULL, 0x00000040, NULL, HFILL} |
7637 | 16 | }, |
7638 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_MKeyNVRAM, { |
7639 | 16 | "MKeyNVRAM", "infiniband.portinfo.capabilitymask.mkeynvram", |
7640 | 16 | FT_UINT32, BASE_HEX, NULL, 0x00000080, NULL, HFILL} |
7641 | 16 | }, |
7642 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_PKeyNVRAM, { |
7643 | 16 | "PKeyNVRAM", "infiniband.portinfo.capabilitymask.pkeynvram", |
7644 | 16 | FT_UINT32, BASE_HEX, NULL, 0x00000100, NULL, HFILL} |
7645 | 16 | }, |
7646 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_LEDInfoSupported, { |
7647 | 16 | "LEDInfoSupported", "infiniband.portinfo.capabilitymask.ledinfosupported", |
7648 | 16 | FT_UINT32, BASE_HEX, NULL, 0x00000200, NULL, HFILL} |
7649 | 16 | }, |
7650 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_SMdisabled, { |
7651 | 16 | "SMdisabled", "infiniband.portinfo.capabilitymask.smdisabled", |
7652 | 16 | FT_UINT32, BASE_HEX, NULL, 0x00000400, NULL, HFILL} |
7653 | 16 | }, |
7654 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_SystemImageGUIDSupported, { |
7655 | 16 | "SystemImageGUIDSupported", "infiniband.portinfo.capabilitymask.systemimageguidsupported", |
7656 | 16 | FT_UINT32, BASE_HEX, NULL, 0x00000800, NULL, HFILL} |
7657 | 16 | }, |
7658 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_PKeySwitchExternalPortTrapSupported, { |
7659 | 16 | "PKeySwitchExternalPortTrapSupported", "infiniband.portinfo.capabilitymask.pkeyswitchexternalporttrapsupported", |
7660 | 16 | FT_UINT32, BASE_HEX, NULL, 0x00001000, NULL, HFILL} |
7661 | 16 | }, |
7662 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_CommunicationManagementSupported, { |
7663 | 16 | "CommunicationManagementSupported", "infiniband.portinfo.capabilitymask.communicationmanagementsupported", |
7664 | 16 | FT_UINT32, BASE_HEX, NULL, 0x00010000, NULL, HFILL} |
7665 | 16 | }, |
7666 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_SNMPTunnelingSupported, { |
7667 | 16 | "SNMPTunnelingSupported", "infiniband.portinfo.capabilitymask.snmptunnelingsupported", |
7668 | 16 | FT_UINT32, BASE_HEX, NULL, 0x00020000, NULL, HFILL} |
7669 | 16 | }, |
7670 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_ReinitSupported, { |
7671 | 16 | "ReinitSupported", "infiniband.portinfo.capabilitymask.reinitsupported", |
7672 | 16 | FT_UINT32, BASE_HEX, NULL, 0x00040000, NULL, HFILL} |
7673 | 16 | }, |
7674 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_DeviceManagementSupported, { |
7675 | 16 | "DeviceManagementSupported", "infiniband.portinfo.capabilitymask.devicemanagementsupported", |
7676 | 16 | FT_UINT32, BASE_HEX, NULL, 0x00080000, NULL, HFILL} |
7677 | 16 | }, |
7678 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_VendorClassSupported, { |
7679 | 16 | "VendorClassSupported", "infiniband.portinfo.capabilitymask.vendorclasssupported", |
7680 | 16 | FT_UINT32, BASE_HEX, NULL, 0x00100000, NULL, HFILL} |
7681 | 16 | }, |
7682 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_DRNoticeSupported, { |
7683 | 16 | "DRNoticeSupported", "infiniband.portinfo.capabilitymask.drnoticesupported", |
7684 | 16 | FT_UINT32, BASE_HEX, NULL, 0x00200000, NULL, HFILL} |
7685 | 16 | }, |
7686 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_CapabilityMaskNoticeSupported, { |
7687 | 16 | "CapabilityMaskNoticeSupported", "infiniband.portinfo.capabilitymask.capabilitymasknoticesupported", |
7688 | 16 | FT_UINT32, BASE_HEX, NULL, 0x00400000, NULL, HFILL} |
7689 | 16 | }, |
7690 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_BootManagementSupported, { |
7691 | 16 | "BootManagementSupported", "infiniband.portinfo.capabilitymask.bootmanagementsupported", |
7692 | 16 | FT_UINT32, BASE_HEX, NULL, 0x00800000, NULL, HFILL} |
7693 | 16 | }, |
7694 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_LinkRoundTripLatencySupported, { |
7695 | 16 | "LinkRoundTripLatencySupported", "infiniband.portinfo.capabilitymask.linkroundtriplatencysupported", |
7696 | 16 | FT_UINT32, BASE_HEX, NULL, 0x01000000, NULL, HFILL} |
7697 | 16 | }, |
7698 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_ClientRegistrationSupported, { |
7699 | 16 | "ClientRegistrationSupported", "infiniband.portinfo.capabilitymask.clientregistrationsupported", |
7700 | 16 | FT_UINT32, BASE_HEX, NULL, 0x02000000, NULL, HFILL} |
7701 | 16 | }, |
7702 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_OtherLocalChangesNoticeSupported, { |
7703 | 16 | "OtherLocalChangesNoticeSupported", "infiniband.portinfo.capabilitymask.otherlocalchangesnoticesupported", |
7704 | 16 | FT_UINT32, BASE_HEX, NULL, 0x04000000, NULL, HFILL} |
7705 | 16 | }, |
7706 | 16 | { &hf_infiniband_PortInfo_CapabilityMask_LinkSpeedWIdthPairsTableSupported, { |
7707 | 16 | "LinkSpeedWIdthPairsTableSupported", "infiniband.portinfo.capabilitymask.linkspeedwidthpairstablesupported", |
7708 | 16 | FT_UINT32, BASE_HEX, NULL, 0x08000000, NULL, HFILL} |
7709 | 16 | }, |
7710 | | /* End Capability Mask Flags */ |
7711 | | |
7712 | | /* PortInfo */ |
7713 | 16 | { &hf_infiniband_PortInfo_DiagCode, { |
7714 | 16 | "DiagCode", "infiniband.portinfo.diagcode", |
7715 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7716 | 16 | }, |
7717 | 16 | { &hf_infiniband_PortInfo_M_KeyLeasePeriod, { |
7718 | 16 | "M_KeyLeasePeriod", "infiniband.portinfo.m_keyleaseperiod", |
7719 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7720 | 16 | }, |
7721 | 16 | { &hf_infiniband_PortInfo_LocalPortNum, { |
7722 | 16 | "LocalPortNum", "infiniband.portinfo.localportnum", |
7723 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7724 | 16 | }, |
7725 | 16 | { &hf_infiniband_PortInfo_LinkWidthEnabled, { |
7726 | 16 | "LinkWidthEnabled", "infiniband.portinfo.linkwidthenabled", |
7727 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7728 | 16 | }, |
7729 | 16 | { &hf_infiniband_PortInfo_LinkWidthSupported, { |
7730 | 16 | "LinkWidthSupported", "infiniband.portinfo.linkwidthsupported", |
7731 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7732 | 16 | }, |
7733 | 16 | { &hf_infiniband_PortInfo_LinkWidthActive, { |
7734 | 16 | "LinkWidthActive", "infiniband.portinfo.linkwidthactive", |
7735 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7736 | 16 | }, |
7737 | 16 | { &hf_infiniband_PortInfo_LinkSpeedSupported, { |
7738 | 16 | "LinkSpeedSupported", "infiniband.portinfo.linkspeedsupported", |
7739 | 16 | FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL} |
7740 | 16 | }, |
7741 | 16 | { &hf_infiniband_PortInfo_PortState, { |
7742 | 16 | "PortState", "infiniband.portinfo.portstate", |
7743 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL} |
7744 | 16 | }, |
7745 | 16 | { &hf_infiniband_PortInfo_PortPhysicalState, { |
7746 | 16 | "PortPhysicalState", "infiniband.portinfo.portphysicalstate", |
7747 | 16 | FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL} |
7748 | 16 | }, |
7749 | 16 | { &hf_infiniband_PortInfo_LinkDownDefaultState, { |
7750 | 16 | "LinkDownDefaultState", "infiniband.portinfo.linkdowndefaultstate", |
7751 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL} |
7752 | 16 | }, |
7753 | 16 | { &hf_infiniband_PortInfo_M_KeyProtectBits, { |
7754 | 16 | "M_KeyProtectBits", "infiniband.portinfo.m_keyprotectbits", |
7755 | 16 | FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL} |
7756 | 16 | }, |
7757 | 16 | { &hf_infiniband_PortInfo_LMC, { |
7758 | 16 | "LMC", "infiniband.portinfo.lmc", |
7759 | 16 | FT_UINT8, BASE_HEX, NULL, 0x07, NULL, HFILL} |
7760 | 16 | }, |
7761 | 16 | { &hf_infiniband_PortInfo_LinkSpeedActive, { |
7762 | 16 | "LinkSpeedActive", "infiniband.portinfo.linkspeedactive", |
7763 | 16 | FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL} |
7764 | 16 | }, |
7765 | 16 | { &hf_infiniband_PortInfo_LinkSpeedEnabled, { |
7766 | 16 | "LinkSpeedEnabled", "infiniband.portinfo.linkspeedenabled", |
7767 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL} |
7768 | 16 | }, |
7769 | 16 | { &hf_infiniband_PortInfo_NeighborMTU, { |
7770 | 16 | "NeighborMTU", "infiniband.portinfo.neighbormtu", |
7771 | 16 | FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL} |
7772 | 16 | }, |
7773 | 16 | { &hf_infiniband_PortInfo_MasterSMSL, { |
7774 | 16 | "MasterSMSL", "infiniband.portinfo.mastersmsl", |
7775 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL} |
7776 | 16 | }, |
7777 | 16 | { &hf_infiniband_PortInfo_VLCap, { |
7778 | 16 | "VLCap", "infiniband.portinfo.vlcap", |
7779 | 16 | FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL} |
7780 | 16 | }, |
7781 | 16 | { &hf_infiniband_PortInfo_InitType, { |
7782 | 16 | "InitType", "infiniband.portinfo.inittype", |
7783 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL} |
7784 | 16 | }, |
7785 | 16 | { &hf_infiniband_PortInfo_VLHighLimit, { |
7786 | 16 | "VLHighLimit", "infiniband.portinfo.vlhighlimit", |
7787 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7788 | 16 | }, |
7789 | 16 | { &hf_infiniband_PortInfo_VLArbitrationHighCap, { |
7790 | 16 | "VLArbitrationHighCap", "infiniband.portinfo.vlarbitrationhighcap", |
7791 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7792 | 16 | }, |
7793 | 16 | { &hf_infiniband_PortInfo_VLArbitrationLowCap, { |
7794 | 16 | "VLArbitrationLowCap", "infiniband.portinfo.vlarbitrationlowcap", |
7795 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7796 | 16 | }, |
7797 | 16 | { &hf_infiniband_PortInfo_InitTypeReply, { |
7798 | 16 | "InitTypeReply", "infiniband.portinfo.inittypereply", |
7799 | 16 | FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL} |
7800 | 16 | }, |
7801 | 16 | { &hf_infiniband_PortInfo_MTUCap, { |
7802 | 16 | "MTUCap", "infiniband.portinfo.mtucap", |
7803 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL} |
7804 | 16 | }, |
7805 | 16 | { &hf_infiniband_PortInfo_VLStallCount, { |
7806 | 16 | "VLStallCount", "infiniband.portinfo.vlstallcount", |
7807 | 16 | FT_UINT8, BASE_HEX, NULL, 0xE0, NULL, HFILL} |
7808 | 16 | }, |
7809 | 16 | { &hf_infiniband_PortInfo_HOQLife, { |
7810 | 16 | "HOQLife", "infiniband.portinfo.hoqlife", |
7811 | 16 | FT_UINT8, BASE_HEX, NULL, 0x1F, NULL, HFILL} |
7812 | 16 | }, |
7813 | 16 | { &hf_infiniband_PortInfo_OperationalVLs, { |
7814 | 16 | "OperationalVLs", "infiniband.portinfo.operationalvls", |
7815 | 16 | FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL} |
7816 | 16 | }, |
7817 | 16 | { &hf_infiniband_PortInfo_PartitionEnforcementInbound, { |
7818 | 16 | "PartitionEnforcementInbound", "infiniband.portinfo.partitionenforcementinbound", |
7819 | 16 | FT_UINT8, BASE_HEX, NULL, 0x08, NULL, HFILL} |
7820 | 16 | }, |
7821 | 16 | { &hf_infiniband_PortInfo_PartitionEnforcementOutbound, { |
7822 | 16 | "PartitionEnforcementOutbound", "infiniband.portinfo.partitionenforcementoutbound", |
7823 | 16 | FT_UINT8, BASE_HEX, NULL, 0x04, NULL, HFILL} |
7824 | 16 | }, |
7825 | 16 | { &hf_infiniband_PortInfo_FilterRawInbound, { |
7826 | 16 | "FilterRawInbound", "infiniband.portinfo.filterrawinbound", |
7827 | 16 | FT_UINT8, BASE_HEX, NULL, 0x02, NULL, HFILL} |
7828 | 16 | }, |
7829 | 16 | { &hf_infiniband_PortInfo_FilterRawOutbound, { |
7830 | 16 | "FilterRawOutbound", "infiniband.portinfo.filterrawoutbound", |
7831 | 16 | FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL} |
7832 | 16 | }, |
7833 | 16 | { &hf_infiniband_PortInfo_M_KeyViolations, { |
7834 | 16 | "M_KeyViolations", "infiniband.portinfo.m_keyviolations", |
7835 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7836 | 16 | }, |
7837 | 16 | { &hf_infiniband_PortInfo_P_KeyViolations, { |
7838 | 16 | "P_KeyViolations", "infiniband.portinfo.p_keyviolations", |
7839 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7840 | 16 | }, |
7841 | 16 | { &hf_infiniband_PortInfo_Q_KeyViolations, { |
7842 | 16 | "Q_KeyViolations", "infiniband.portinfo.q_keyviolations", |
7843 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7844 | 16 | }, |
7845 | 16 | { &hf_infiniband_PortInfo_GUIDCap, { |
7846 | 16 | "GUIDCap", "infiniband.portinfo.guidcap", |
7847 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7848 | 16 | }, |
7849 | 16 | { &hf_infiniband_PortInfo_ClientReregister, { |
7850 | 16 | "ClientReregister", "infiniband.portinfo.clientreregister", |
7851 | 16 | FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL} |
7852 | 16 | }, |
7853 | 16 | { &hf_infiniband_PortInfo_SubnetTimeOut, { |
7854 | 16 | "SubnetTimeOut", "infiniband.portinfo.subnettimeout", |
7855 | 16 | FT_UINT8, BASE_HEX, NULL, 0x1F, NULL, HFILL} |
7856 | 16 | }, |
7857 | 16 | { &hf_infiniband_PortInfo_RespTimeValue, { |
7858 | 16 | "RespTimeValue", "infiniband.portinfo.resptimevalue", |
7859 | 16 | FT_UINT8, BASE_HEX, NULL, 0x1F, NULL, HFILL} |
7860 | 16 | }, |
7861 | 16 | { &hf_infiniband_PortInfo_LocalPhyErrors, { |
7862 | 16 | "LocalPhyErrors", "infiniband.portinfo.localphyerrors", |
7863 | 16 | FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL} |
7864 | 16 | }, |
7865 | 16 | { &hf_infiniband_PortInfo_OverrunErrors, { |
7866 | 16 | "OverrunErrors", "infiniband.portinfo.overrunerrors", |
7867 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL} |
7868 | 16 | }, |
7869 | 16 | { &hf_infiniband_PortInfo_MaxCreditHint, { |
7870 | 16 | "MaxCreditHint", "infiniband.portinfo.maxcredithint", |
7871 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7872 | 16 | }, |
7873 | 16 | { &hf_infiniband_PortInfo_LinkRoundTripLatency, { |
7874 | 16 | "LinkRoundTripLatency", "infiniband.portinfo.linkroundtriplatency", |
7875 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7876 | 16 | }, |
7877 | | |
7878 | | /* P_KeyTable */ |
7879 | 16 | { &hf_infiniband_P_KeyTable_P_KeyTableBlock, { |
7880 | 16 | "P_KeyTableBlock", "infiniband.p_keytable.p_keytableblock", |
7881 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7882 | 16 | }, |
7883 | 16 | { &hf_infiniband_P_KeyTable_MembershipType, { |
7884 | 16 | "MembershipType", "infiniband.p_keytable.membershiptype", |
7885 | 16 | FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL} |
7886 | 16 | }, |
7887 | 16 | { &hf_infiniband_P_KeyTable_P_KeyBase, { |
7888 | 16 | "P_KeyBase", "infiniband.p_keytable.p_keybase", |
7889 | 16 | FT_UINT16, BASE_HEX, NULL, 0x7FFF, NULL, HFILL} |
7890 | 16 | }, |
7891 | | |
7892 | | /* SLtoVLMappingTable */ |
7893 | 16 | { &hf_infiniband_SLtoVLMappingTable_SLtoVL_HighBits, { |
7894 | 16 | "SL(x)toVL", "infiniband.sltovlmappingtable.sltovlhighbits", |
7895 | 16 | FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL} |
7896 | 16 | }, |
7897 | 16 | { &hf_infiniband_SLtoVLMappingTable_SLtoVL_LowBits, { |
7898 | 16 | "SL(x)toVL", "infiniband.sltovlmappingtable.sltovllowbits", |
7899 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL} |
7900 | 16 | }, |
7901 | | |
7902 | | /* VLArbitrationTable */ |
7903 | | #if 0 |
7904 | | { &hf_infiniband_VLArbitrationTable_VLWeightPairs, { |
7905 | | "VLWeightPairs", "infiniband.vlarbitrationtable.vlweightpairs", |
7906 | | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7907 | | }, |
7908 | | #endif |
7909 | 16 | { &hf_infiniband_VLArbitrationTable_VL, { |
7910 | 16 | "VL", "infiniband.vlarbitrationtable.vl", |
7911 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL} |
7912 | 16 | }, |
7913 | 16 | { &hf_infiniband_VLArbitrationTable_Weight, { |
7914 | 16 | "Weight", "infiniband.vlarbitrationtable.weight", |
7915 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7916 | 16 | }, |
7917 | | |
7918 | | /* LinearForwardingTable */ |
7919 | | #if 0 |
7920 | | { &hf_infiniband_LinearForwardingTable_LinearForwardingTableBlock, { |
7921 | | "LinearForwardingTableBlock", "infiniband.linearforwardingtable.linearforwardingtableblock", |
7922 | | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7923 | | }, |
7924 | | #endif |
7925 | 16 | { &hf_infiniband_LinearForwardingTable_Port, { |
7926 | 16 | "Port", "infiniband.linearforwardingtable.port", |
7927 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7928 | 16 | }, |
7929 | | |
7930 | | /* RandomForwardingTable */ |
7931 | | #if 0 |
7932 | | { &hf_infiniband_RandomForwardingTable_RandomForwardingTableBlock, { |
7933 | | "RandomForwardingTableBlock", "infiniband.randomforwardingtable.randomforwardingtableblock", |
7934 | | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7935 | | }, |
7936 | | #endif |
7937 | 16 | { &hf_infiniband_RandomForwardingTable_LID, { |
7938 | 16 | "LID", "infiniband.randomforwardingtable.lid", |
7939 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7940 | 16 | }, |
7941 | 16 | { &hf_infiniband_RandomForwardingTable_Valid, { |
7942 | 16 | "Valid", "infiniband.randomforwardingtable.valid", |
7943 | 16 | FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL} |
7944 | 16 | }, |
7945 | 16 | { &hf_infiniband_RandomForwardingTable_LMC, { |
7946 | 16 | "LMC", "infiniband.randomforwardingtable.lmc", |
7947 | 16 | FT_UINT8, BASE_HEX, NULL, 0x70, NULL, HFILL} |
7948 | 16 | }, |
7949 | 16 | { &hf_infiniband_RandomForwardingTable_Port, { |
7950 | 16 | "Port", "infiniband.randomforwardingtable.port", |
7951 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7952 | 16 | }, |
7953 | | |
7954 | | /* MulticastForwardingTable */ |
7955 | | #if 0 |
7956 | | { &hf_infiniband_MulticastForwardingTable_MulticastForwardingTableBlock , { |
7957 | | "MulticastForwardingTableBlock", "infiniband.multicastforwardingtable.multicastforwardingtableblock", |
7958 | | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7959 | | }, |
7960 | | #endif |
7961 | 16 | { &hf_infiniband_MulticastForwardingTable_PortMask, { |
7962 | 16 | "PortMask", "infiniband.multicastforwardingtable.portmask", |
7963 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7964 | 16 | }, |
7965 | | |
7966 | | /* SMInfo */ |
7967 | 16 | { &hf_infiniband_SMInfo_GUID, { |
7968 | 16 | "GUID", "infiniband.sminfo.guid", |
7969 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7970 | 16 | }, |
7971 | 16 | { &hf_infiniband_SMInfo_SM_Key, { |
7972 | 16 | "SM_Key", "infiniband.sminfo.sm_key", |
7973 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7974 | 16 | }, |
7975 | 16 | { &hf_infiniband_SMInfo_ActCount, { |
7976 | 16 | "ActCount", "infiniband.sminfo.actcount", |
7977 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7978 | 16 | }, |
7979 | 16 | { &hf_infiniband_SMInfo_Priority, { |
7980 | 16 | "Priority", "infiniband.sminfo.priority", |
7981 | 16 | FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL} |
7982 | 16 | }, |
7983 | 16 | { &hf_infiniband_SMInfo_SMState, { |
7984 | 16 | "SMState", "infiniband.sminfo.smstate", |
7985 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL} |
7986 | 16 | }, |
7987 | | |
7988 | | /* VendorDiag */ |
7989 | 16 | { &hf_infiniband_VendorDiag_NextIndex, { |
7990 | 16 | "NextIndex", "infiniband.vendordiag.nextindex", |
7991 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
7992 | 16 | }, |
7993 | 16 | { &hf_infiniband_VendorDiag_DiagData, { |
7994 | 16 | "DiagData", "infiniband.vendordiag.diagdata", |
7995 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
7996 | 16 | }, |
7997 | | |
7998 | | /* LedInfo */ |
7999 | 16 | { &hf_infiniband_LedInfo_LedMask, { |
8000 | 16 | "LedMask", "infiniband.ledinfo.ledmask", |
8001 | 16 | FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL} |
8002 | 16 | }, |
8003 | | |
8004 | | /* LinkSpeedWidthPairsTable */ |
8005 | 16 | { &hf_infiniband_LinkSpeedWidthPairsTable_NumTables, { |
8006 | 16 | "NumTables", "infiniband.linkspeedwidthpairstable.numtables", |
8007 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8008 | 16 | }, |
8009 | 16 | { &hf_infiniband_LinkSpeedWidthPairsTable_PortMask, { |
8010 | 16 | "PortMask", "infiniband.linkspeedwidthpairstable.portmask", |
8011 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8012 | 16 | }, |
8013 | 16 | { &hf_infiniband_LinkSpeedWidthPairsTable_SpeedTwoFive, { |
8014 | 16 | "Speed 2.5 Gbps", "infiniband.linkspeedwidthpairstable.speedtwofive", |
8015 | 16 | FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL} |
8016 | 16 | }, |
8017 | 16 | { &hf_infiniband_LinkSpeedWidthPairsTable_SpeedFive, { |
8018 | 16 | "Speed 5 Gbps", "infiniband.linkspeedwidthpairstable.speedfive", |
8019 | 16 | FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL} |
8020 | 16 | }, |
8021 | 16 | { &hf_infiniband_LinkSpeedWidthPairsTable_SpeedTen, { |
8022 | 16 | "Speed 10 Gbps", "infiniband.linkspeedwidthpairstable.speedten", |
8023 | 16 | FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL} |
8024 | 16 | }, |
8025 | | |
8026 | | /* NodeRecord */ |
8027 | | /* PortInfoRecord */ |
8028 | | /* SLtoVLMappingTableRecord */ |
8029 | | /* SwitchInfoRecord */ |
8030 | | /* LinearForwardingTableRecord */ |
8031 | | /* RandomForwardingTableRecord */ |
8032 | | /* MulticastForwardingTableRecord */ |
8033 | | /* VLArbitrationTableRecord */ |
8034 | 16 | { &hf_infiniband_SA_LID, { |
8035 | 16 | "LID", "infiniband.sa.lid", |
8036 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8037 | 16 | }, |
8038 | 16 | { &hf_infiniband_SA_EndportLID, { |
8039 | 16 | "EndportLID", "infiniband.sa.endportlid", |
8040 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8041 | 16 | }, |
8042 | 16 | { &hf_infiniband_SA_PortNum, { |
8043 | 16 | "PortNum", "infiniband.sa.portnum", |
8044 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8045 | 16 | }, |
8046 | 16 | { &hf_infiniband_SA_InputPortNum , { |
8047 | 16 | "InputPortNum", "infiniband.sa.inputportnum", |
8048 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8049 | 16 | }, |
8050 | 16 | { &hf_infiniband_SA_OutputPortNum, { |
8051 | 16 | "OutputPortNum", "infiniband.sa.outputportnum", |
8052 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8053 | 16 | }, |
8054 | 16 | { &hf_infiniband_SA_BlockNum_EightBit, { |
8055 | 16 | "BlockNum_EightBit", "infiniband.sa.blocknum_eightbit", |
8056 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8057 | 16 | }, |
8058 | 16 | { &hf_infiniband_SA_BlockNum_NineBit, { |
8059 | 16 | "BlockNum_NineBit", "infiniband.sa.blocknum_ninebit", |
8060 | 16 | FT_UINT16, BASE_HEX, NULL, 0x01FF, NULL, HFILL} |
8061 | 16 | }, |
8062 | 16 | { &hf_infiniband_SA_BlockNum_SixteenBit, { |
8063 | 16 | "BlockNum_SixteenBit", "infiniband.sa.blocknum_sixteenbit", |
8064 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8065 | 16 | }, |
8066 | 16 | { &hf_infiniband_SA_Position, { |
8067 | 16 | "Position", "infiniband.sa.position", |
8068 | 16 | FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL} |
8069 | 16 | }, |
8070 | | #if 0 |
8071 | | { &hf_infiniband_SA_Index, { |
8072 | | "Index", "infiniband.sa.index", |
8073 | | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8074 | | }, |
8075 | | #endif |
8076 | | |
8077 | | /* InformInfoRecord */ |
8078 | 16 | { &hf_infiniband_InformInfoRecord_SubscriberGID, { |
8079 | 16 | "SubscriberGID", "infiniband.informinforecord.subscribergid", |
8080 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8081 | 16 | }, |
8082 | 16 | { &hf_infiniband_InformInfoRecord_Enum, { |
8083 | 16 | "Enum", "infiniband.informinforecord.enum", |
8084 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8085 | 16 | }, |
8086 | | |
8087 | | /* InformInfo */ |
8088 | 16 | { &hf_infiniband_InformInfo_GID, { |
8089 | 16 | "GID", "infiniband.informinfo.gid", |
8090 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8091 | 16 | }, |
8092 | 16 | { &hf_infiniband_InformInfo_LIDRangeBegin, { |
8093 | 16 | "LIDRangeBegin", "infiniband.informinfo.lidrangebegin", |
8094 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8095 | 16 | }, |
8096 | 16 | { &hf_infiniband_InformInfo_LIDRangeEnd, { |
8097 | 16 | "LIDRangeEnd", "infiniband.informinfo.lidrangeend", |
8098 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8099 | 16 | }, |
8100 | 16 | { &hf_infiniband_InformInfo_IsGeneric, { |
8101 | 16 | "IsGeneric", "infiniband.informinfo.isgeneric", |
8102 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8103 | 16 | }, |
8104 | 16 | { &hf_infiniband_InformInfo_Subscribe, { |
8105 | 16 | "Subscribe", "infiniband.informinfo.subscribe", |
8106 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8107 | 16 | }, |
8108 | 16 | { &hf_infiniband_InformInfo_Type, { |
8109 | 16 | "Type", "infiniband.informinfo.type", |
8110 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8111 | 16 | }, |
8112 | 16 | { &hf_infiniband_InformInfo_TrapNumberDeviceID, { |
8113 | 16 | "TrapNumberDeviceID", "infiniband.informinfo.trapnumberdeviceid", |
8114 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8115 | 16 | }, |
8116 | 16 | { &hf_infiniband_InformInfo_QPN, { |
8117 | 16 | "QPN", "infiniband.informinfo.qpn", |
8118 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8119 | 16 | }, |
8120 | 16 | { &hf_infiniband_InformInfo_RespTimeValue, { |
8121 | 16 | "RespTimeValue", "infiniband.informinfo.resptimevalue", |
8122 | 16 | FT_UINT8, BASE_HEX, NULL, 0x1F, NULL, HFILL} |
8123 | 16 | }, |
8124 | 16 | { &hf_infiniband_InformInfo_ProducerTypeVendorID, { |
8125 | 16 | "ProducerTypeVendorID", "infiniband.informinfo.producertypevendorid", |
8126 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8127 | 16 | }, |
8128 | | |
8129 | | /* LinkRecord */ |
8130 | 16 | { &hf_infiniband_LinkRecord_FromLID, { |
8131 | 16 | "FromLID", "infiniband.linkrecord.fromlid", |
8132 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8133 | 16 | }, |
8134 | 16 | { &hf_infiniband_LinkRecord_FromPort, { |
8135 | 16 | "FromPort", "infiniband.linkrecord.fromport", |
8136 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8137 | 16 | }, |
8138 | 16 | { &hf_infiniband_LinkRecord_ToPort, { |
8139 | 16 | "ToPort", "infiniband.linkrecord.toport", |
8140 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8141 | 16 | }, |
8142 | 16 | { &hf_infiniband_LinkRecord_ToLID, { |
8143 | 16 | "ToLID", "infiniband.linkrecord.tolid", |
8144 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8145 | 16 | }, |
8146 | | |
8147 | | /* ServiceRecord */ |
8148 | 16 | { &hf_infiniband_ServiceRecord_ServiceID, { |
8149 | 16 | "ServiceID", "infiniband.linkrecord.serviceid", |
8150 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8151 | 16 | }, |
8152 | 16 | { &hf_infiniband_ServiceRecord_ServiceGID, { |
8153 | 16 | "ServiceGID", "infiniband.linkrecord.servicegid", |
8154 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8155 | 16 | }, |
8156 | 16 | { &hf_infiniband_ServiceRecord_ServiceP_Key, { |
8157 | 16 | "ServiceP_Key", "infiniband.linkrecord.servicep_key", |
8158 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8159 | 16 | }, |
8160 | 16 | { &hf_infiniband_ServiceRecord_ServiceLease, { |
8161 | 16 | "ServiceLease", "infiniband.linkrecord.servicelease", |
8162 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8163 | 16 | }, |
8164 | 16 | { &hf_infiniband_ServiceRecord_ServiceKey, { |
8165 | 16 | "ServiceKey", "infiniband.linkrecord.servicekey", |
8166 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8167 | 16 | }, |
8168 | 16 | { &hf_infiniband_ServiceRecord_ServiceName, { |
8169 | 16 | "ServiceName", "infiniband.linkrecord.servicename", |
8170 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8171 | 16 | }, |
8172 | 16 | { &hf_infiniband_ServiceRecord_ServiceData, { |
8173 | 16 | "ServiceData", "infiniband.linkrecord.servicedata", |
8174 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8175 | 16 | }, |
8176 | | |
8177 | | /* ServiceAssociationRecord */ |
8178 | 16 | { &hf_infiniband_ServiceAssociationRecord_ServiceKey, { |
8179 | 16 | "ServiceKey", "infiniband.serviceassociationrecord.servicekey", |
8180 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8181 | 16 | }, |
8182 | 16 | { &hf_infiniband_ServiceAssociationRecord_ServiceName, { |
8183 | 16 | "ServiceName", "infiniband.serviceassociationrecord.servicename", |
8184 | 16 | FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8185 | 16 | }, |
8186 | | |
8187 | | /* PathRecord */ |
8188 | 16 | { &hf_infiniband_PathRecord_DGID, { |
8189 | 16 | "DGID", "infiniband.pathrecord.dgid", |
8190 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8191 | 16 | }, |
8192 | 16 | { &hf_infiniband_PathRecord_SGID, { |
8193 | 16 | "SGID", "infiniband.pathrecord.sgid", |
8194 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8195 | 16 | }, |
8196 | 16 | { &hf_infiniband_PathRecord_DLID, { |
8197 | 16 | "DLID", "infiniband.pathrecord.dlid", |
8198 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8199 | 16 | }, |
8200 | 16 | { &hf_infiniband_PathRecord_SLID, { |
8201 | 16 | "SLID", "infiniband.pathrecord.slid", |
8202 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8203 | 16 | }, |
8204 | 16 | { &hf_infiniband_PathRecord_RawTraffic, { |
8205 | 16 | "RawTraffic", "infiniband.pathrecord.rawtraffic", |
8206 | 16 | FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL} |
8207 | 16 | }, |
8208 | 16 | { &hf_infiniband_PathRecord_FlowLabel, { |
8209 | 16 | "FlowLabel", "infiniband.pathrecord.flowlabel", |
8210 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0FFFFF, NULL, HFILL} |
8211 | 16 | }, |
8212 | 16 | { &hf_infiniband_PathRecord_HopLimit, { |
8213 | 16 | "HopLimit", "infiniband.pathrecord.hoplimit", |
8214 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8215 | 16 | }, |
8216 | 16 | { &hf_infiniband_PathRecord_TClass, { |
8217 | 16 | "TClass", "infiniband.pathrecord.tclass", |
8218 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8219 | 16 | }, |
8220 | 16 | { &hf_infiniband_PathRecord_Reversible, { |
8221 | 16 | "Reversible", "infiniband.pathrecord.reversible", |
8222 | 16 | FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL} |
8223 | 16 | }, |
8224 | 16 | { &hf_infiniband_PathRecord_NumbPath, { |
8225 | 16 | "NumbPath", "infiniband.pathrecord.numbpath", |
8226 | 16 | FT_UINT8, BASE_HEX, NULL, 0x7F, NULL, HFILL} |
8227 | 16 | }, |
8228 | 16 | { &hf_infiniband_PathRecord_P_Key, { |
8229 | 16 | "P_Key", "infiniband.pathrecord.p_key", |
8230 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8231 | 16 | }, |
8232 | 16 | { &hf_infiniband_PathRecord_SL, { |
8233 | 16 | "SL", "infiniband.pathrecord.sl", |
8234 | 16 | FT_UINT16, BASE_HEX, NULL, 0x000F, NULL, HFILL} |
8235 | 16 | }, |
8236 | 16 | { &hf_infiniband_PathRecord_MTUSelector, { |
8237 | 16 | "MTUSelector", "infiniband.pathrecord.mtuselector", |
8238 | 16 | FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL} |
8239 | 16 | }, |
8240 | 16 | { &hf_infiniband_PathRecord_MTU, { |
8241 | 16 | "MTU", "infiniband.pathrecord.mtu", |
8242 | 16 | FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL} |
8243 | 16 | }, |
8244 | 16 | { &hf_infiniband_PathRecord_RateSelector, { |
8245 | 16 | "RateSelector", "infiniband.pathrecord.rateselector", |
8246 | 16 | FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL} |
8247 | 16 | }, |
8248 | 16 | { &hf_infiniband_PathRecord_Rate, { |
8249 | 16 | "Rate", "infiniband.pathrecord.rate", |
8250 | 16 | FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL} |
8251 | 16 | }, |
8252 | 16 | { &hf_infiniband_PathRecord_PacketLifeTimeSelector, { |
8253 | 16 | "PacketLifeTimeSelector", "infiniband.pathrecord.packetlifetimeselector", |
8254 | 16 | FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL} |
8255 | 16 | }, |
8256 | 16 | { &hf_infiniband_PathRecord_PacketLifeTime, { |
8257 | 16 | "PacketLifeTime", "infiniband.pathrecord.packetlifetime", |
8258 | 16 | FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL} |
8259 | 16 | }, |
8260 | 16 | { &hf_infiniband_PathRecord_Preference, { |
8261 | 16 | "Preference", "infiniband.pathrecord.preference", |
8262 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8263 | 16 | }, |
8264 | | |
8265 | | /* MCMemberRecord */ |
8266 | 16 | { &hf_infiniband_MCMemberRecord_MGID, { |
8267 | 16 | "MGID", "infiniband.mcmemberrecord.mgid", |
8268 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8269 | 16 | }, |
8270 | 16 | { &hf_infiniband_MCMemberRecord_PortGID, { |
8271 | 16 | "PortGID", "infiniband.mcmemberrecord.portgid", |
8272 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8273 | 16 | }, |
8274 | 16 | { &hf_infiniband_MCMemberRecord_Q_Key, { |
8275 | 16 | "Q_Key", "infiniband.mcmemberrecord.q_key", |
8276 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8277 | 16 | }, |
8278 | 16 | { &hf_infiniband_MCMemberRecord_MLID, { |
8279 | 16 | "MLID", "infiniband.mcmemberrecord.mlid", |
8280 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8281 | 16 | }, |
8282 | 16 | { &hf_infiniband_MCMemberRecord_MTUSelector, { |
8283 | 16 | "MTUSelector", "infiniband.mcmemberrecord.mtuselector", |
8284 | 16 | FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL} |
8285 | 16 | }, |
8286 | 16 | { &hf_infiniband_MCMemberRecord_MTU, { |
8287 | 16 | "MTU", "infiniband.mcmemberrecord.mtu", |
8288 | 16 | FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL} |
8289 | 16 | }, |
8290 | 16 | { &hf_infiniband_MCMemberRecord_TClass, { |
8291 | 16 | "TClass", "infiniband.mcmemberrecord.tclass", |
8292 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8293 | 16 | }, |
8294 | 16 | { &hf_infiniband_MCMemberRecord_P_Key, { |
8295 | 16 | "P_Key", "infiniband.mcmemberrecord.p_key", |
8296 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8297 | 16 | }, |
8298 | 16 | { &hf_infiniband_MCMemberRecord_RateSelector, { |
8299 | 16 | "RateSelector", "infiniband.mcmemberrecord.rateselector", |
8300 | 16 | FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL} |
8301 | 16 | }, |
8302 | 16 | { &hf_infiniband_MCMemberRecord_Rate, { |
8303 | 16 | "Rate", "infiniband.mcmemberrecord.rate", |
8304 | 16 | FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL} |
8305 | 16 | }, |
8306 | 16 | { &hf_infiniband_MCMemberRecord_PacketLifeTimeSelector, { |
8307 | 16 | "PacketLifeTimeSelector", "infiniband.mcmemberrecord.packetlifetimeselector", |
8308 | 16 | FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL} |
8309 | 16 | }, |
8310 | 16 | { &hf_infiniband_MCMemberRecord_PacketLifeTime, { |
8311 | 16 | "PacketLifeTime", "infiniband.mcmemberrecord.packetlifetime", |
8312 | 16 | FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL} |
8313 | 16 | }, |
8314 | 16 | { &hf_infiniband_MCMemberRecord_SL, { |
8315 | 16 | "SL", "infiniband.mcmemberrecord.sl", |
8316 | 16 | FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL} |
8317 | 16 | }, |
8318 | 16 | { &hf_infiniband_MCMemberRecord_FlowLabel, { |
8319 | 16 | "FlowLabel", "infiniband.mcmemberrecord.flowlabel", |
8320 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0FFFFF, NULL, HFILL} |
8321 | 16 | }, |
8322 | 16 | { &hf_infiniband_MCMemberRecord_HopLimit, { |
8323 | 16 | "HopLimit", "infiniband.mcmemberrecord.hoplimit", |
8324 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8325 | 16 | }, |
8326 | 16 | { &hf_infiniband_MCMemberRecord_Scope, { |
8327 | 16 | "Scope", "infiniband.mcmemberrecord.scope", |
8328 | 16 | FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL} |
8329 | 16 | }, |
8330 | 16 | { &hf_infiniband_MCMemberRecord_JoinState, { |
8331 | 16 | "JoinState", "infiniband.mcmemberrecord.joinstate", |
8332 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL} |
8333 | 16 | }, |
8334 | 16 | { &hf_infiniband_MCMemberRecord_ProxyJoin, { |
8335 | 16 | "ProxyJoin", "infiniband.mcmemberrecord.proxyjoin", |
8336 | 16 | FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL} |
8337 | 16 | }, |
8338 | | |
8339 | | /* TraceRecord */ |
8340 | 16 | { &hf_infiniband_TraceRecord_GIDPrefix, { |
8341 | 16 | "GidPrefix", "infiniband.tracerecord.gidprefix", |
8342 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8343 | 16 | }, |
8344 | 16 | { &hf_infiniband_TraceRecord_IDGeneration, { |
8345 | 16 | "IDGeneration", "infiniband.tracerecord.idgeneration", |
8346 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8347 | 16 | }, |
8348 | 16 | { &hf_infiniband_TraceRecord_NodeType, { |
8349 | 16 | "NodeType", "infiniband.tracerecord.nodetype", |
8350 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8351 | 16 | }, |
8352 | 16 | { &hf_infiniband_TraceRecord_NodeID, { |
8353 | 16 | "NodeID", "infiniband.tracerecord.nodeid", |
8354 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8355 | 16 | }, |
8356 | 16 | { &hf_infiniband_TraceRecord_ChassisID, { |
8357 | 16 | "ChassisID", "infiniband.tracerecord.chassisid", |
8358 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8359 | 16 | }, |
8360 | 16 | { &hf_infiniband_TraceRecord_EntryPortID, { |
8361 | 16 | "EntryPortID", "infiniband.tracerecord.entryportid", |
8362 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8363 | 16 | }, |
8364 | 16 | { &hf_infiniband_TraceRecord_ExitPortID, { |
8365 | 16 | "ExitPortID", "infiniband.tracerecord.exitportid", |
8366 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8367 | 16 | }, |
8368 | 16 | { &hf_infiniband_TraceRecord_EntryPort, { |
8369 | 16 | "EntryPort", "infiniband.tracerecord.entryport", |
8370 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8371 | 16 | }, |
8372 | 16 | { &hf_infiniband_TraceRecord_ExitPort, { |
8373 | 16 | "ExitPort", "infiniband.tracerecord.exitport", |
8374 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8375 | 16 | }, |
8376 | | |
8377 | | /* MultiPathRecord */ |
8378 | 16 | { &hf_infiniband_MultiPathRecord_RawTraffic, { |
8379 | 16 | "RawTraffic", "infiniband.multipathrecord.rawtraffic", |
8380 | 16 | FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL} |
8381 | 16 | }, |
8382 | 16 | { &hf_infiniband_MultiPathRecord_FlowLabel, { |
8383 | 16 | "FlowLabel", "infiniband.multipathrecord.flowlabel", |
8384 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0FFFFF, NULL, HFILL} |
8385 | 16 | }, |
8386 | 16 | { &hf_infiniband_MultiPathRecord_HopLimit, { |
8387 | 16 | "HopLimit", "infiniband.multipathrecord.hoplimit", |
8388 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8389 | 16 | }, |
8390 | 16 | { &hf_infiniband_MultiPathRecord_TClass, { |
8391 | 16 | "TClass", "infiniband.multipathrecord.tclass", |
8392 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8393 | 16 | }, |
8394 | 16 | { &hf_infiniband_MultiPathRecord_Reversible, { |
8395 | 16 | "Reversible", "infiniband.multipathrecord.reversible", |
8396 | 16 | FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL} |
8397 | 16 | }, |
8398 | 16 | { &hf_infiniband_MultiPathRecord_NumbPath, { |
8399 | 16 | "NumbPath", "infiniband.multipathrecord.numbpath", |
8400 | 16 | FT_UINT8, BASE_HEX, NULL, 0x7F, NULL, HFILL} |
8401 | 16 | }, |
8402 | 16 | { &hf_infiniband_MultiPathRecord_P_Key, { |
8403 | 16 | "P_Key", "infiniband.multipathrecord.p_key", |
8404 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8405 | 16 | }, |
8406 | 16 | { &hf_infiniband_MultiPathRecord_SL, { |
8407 | 16 | "SL", "infiniband.multipathrecord.sl", |
8408 | 16 | FT_UINT16, BASE_HEX, NULL, 0x000F, NULL, HFILL} |
8409 | 16 | }, |
8410 | 16 | { &hf_infiniband_MultiPathRecord_MTUSelector, { |
8411 | 16 | "MTUSelector", "infiniband.multipathrecord.mtuselector", |
8412 | 16 | FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL} |
8413 | 16 | }, |
8414 | 16 | { &hf_infiniband_MultiPathRecord_MTU, { |
8415 | 16 | "MTU", "infiniband.multipathrecord.mtu", |
8416 | 16 | FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL} |
8417 | 16 | }, |
8418 | 16 | { &hf_infiniband_MultiPathRecord_RateSelector, { |
8419 | 16 | "RateSelector", "infiniband.multipathrecord.rateselector", |
8420 | 16 | FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL} |
8421 | 16 | }, |
8422 | 16 | { &hf_infiniband_MultiPathRecord_Rate, { |
8423 | 16 | "Rate", "infiniband.multipathrecord.rate", |
8424 | 16 | FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL} |
8425 | 16 | }, |
8426 | 16 | { &hf_infiniband_MultiPathRecord_PacketLifeTimeSelector, { |
8427 | 16 | "PacketLifeTimeSelector", "infiniband.multipathrecord.packetlifetimeselector", |
8428 | 16 | FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL} |
8429 | 16 | }, |
8430 | 16 | { &hf_infiniband_MultiPathRecord_PacketLifeTime, { |
8431 | 16 | "PacketLifeTime", "infiniband.multipathrecord.packetlifetime", |
8432 | 16 | FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL} |
8433 | 16 | }, |
8434 | 16 | { &hf_infiniband_MultiPathRecord_IndependenceSelector, { |
8435 | 16 | "IndependenceSelector", "infiniband.multipathrecord.independenceselector", |
8436 | 16 | FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL} |
8437 | 16 | }, |
8438 | 16 | { &hf_infiniband_MultiPathRecord_GIDScope, { |
8439 | 16 | "GIDScope", "infiniband.multipathrecord.gidscope", |
8440 | 16 | FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL} |
8441 | 16 | }, |
8442 | 16 | { &hf_infiniband_MultiPathRecord_SGIDCount, { |
8443 | 16 | "SGIDCount", "infiniband.multipathrecord.sgidcount", |
8444 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8445 | 16 | }, |
8446 | 16 | { &hf_infiniband_MultiPathRecord_DGIDCount, { |
8447 | 16 | "DGIDCount", "infiniband.multipathrecord.dgidcount", |
8448 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8449 | 16 | }, |
8450 | 16 | { &hf_infiniband_MultiPathRecord_SDGID, { |
8451 | 16 | "SDGID", "infiniband.multipathrecord.sdgid", |
8452 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8453 | 16 | }, |
8454 | | |
8455 | | /* ClassPortInfo */ |
8456 | 16 | { &hf_infiniband_ClassPortInfo_BaseVersion, { |
8457 | 16 | "BaseVersion", "infiniband.classportinfo.baseversion", |
8458 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8459 | 16 | }, |
8460 | 16 | { &hf_infiniband_ClassPortInfo_ClassVersion, { |
8461 | 16 | "ClassVersion", "infiniband.classportinfo.classversion", |
8462 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8463 | 16 | }, |
8464 | 16 | { &hf_infiniband_ClassPortInfo_CapabilityMask, { |
8465 | 16 | "CapabilityMask", "infiniband.classportinfo.capabilitymask", |
8466 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8467 | 16 | }, |
8468 | 16 | { &hf_infiniband_ClassPortInfo_CapabilityMask2, { |
8469 | 16 | "CapabilityMask2", "infiniband.classportinfo.capabilitymask2", |
8470 | 16 | FT_UINT32, BASE_HEX, NULL, 0xFFFFFFE0, NULL, HFILL} |
8471 | 16 | }, |
8472 | 16 | { &hf_infiniband_ClassPortInfo_RespTimeValue, { |
8473 | 16 | "RespTimeValue", "infiniband.classportinfo.resptimevalue", |
8474 | 16 | FT_UINT8, BASE_HEX, NULL, 0x1F, NULL, HFILL} |
8475 | 16 | }, |
8476 | 16 | { &hf_infiniband_ClassPortInfo_RedirectGID, { |
8477 | 16 | "RedirectGID", "infiniband.classportinfo.redirectgid", |
8478 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8479 | 16 | }, |
8480 | 16 | { &hf_infiniband_ClassPortInfo_RedirectTC, { |
8481 | 16 | "RedirectTC", "infiniband.classportinfo.redirecttc", |
8482 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8483 | 16 | }, |
8484 | 16 | { &hf_infiniband_ClassPortInfo_RedirectSL, { |
8485 | 16 | "RedirectSL", "infiniband.classportinfo.redirectsl", |
8486 | 16 | FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL} |
8487 | 16 | }, |
8488 | 16 | { &hf_infiniband_ClassPortInfo_RedirectFL, { |
8489 | 16 | "RedirectFL", "infiniband.classportinfo.redirectfl", |
8490 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0FFFFF, NULL, HFILL} |
8491 | 16 | }, |
8492 | 16 | { &hf_infiniband_ClassPortInfo_RedirectLID, { |
8493 | 16 | "RedirectLID", "infiniband.classportinfo.redirectlid", |
8494 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8495 | 16 | }, |
8496 | 16 | { &hf_infiniband_ClassPortInfo_RedirectP_Key, { |
8497 | 16 | "RedirectP_Key", "infiniband.classportinfo.redirectpkey", |
8498 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8499 | 16 | }, |
8500 | 16 | { &hf_infiniband_ClassPortInfo_Reserved, { |
8501 | 16 | "Reserved", "infiniband.classportinfo.reserved", |
8502 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8503 | 16 | }, |
8504 | 16 | { &hf_infiniband_ClassPortInfo_RedirectQP, { |
8505 | 16 | "RedirectQP", "infiniband.classportinfo.redirectqp", |
8506 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8507 | 16 | }, |
8508 | 16 | { &hf_infiniband_ClassPortInfo_RedirectQ_Key, { |
8509 | 16 | "RedirectQ_Key", "infiniband.classportinfo.redirectqkey", |
8510 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8511 | 16 | }, |
8512 | 16 | { &hf_infiniband_ClassPortInfo_TrapGID, { |
8513 | 16 | "TrapGID", "infiniband.classportinfo.trapgid", |
8514 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8515 | 16 | }, |
8516 | 16 | { &hf_infiniband_ClassPortInfo_TrapTC, { |
8517 | 16 | "TrapTC", "infiniband.classportinfo.traptc", |
8518 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8519 | 16 | }, |
8520 | 16 | { &hf_infiniband_ClassPortInfo_TrapSL, { |
8521 | 16 | "TrapSL", "infiniband.classportinfo.trapsl", |
8522 | 16 | FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL} |
8523 | 16 | }, |
8524 | 16 | { &hf_infiniband_ClassPortInfo_TrapFL, { |
8525 | 16 | "TrapFL", "infiniband.classportinfo.trapfl", |
8526 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0FFFFF, NULL, HFILL} |
8527 | 16 | }, |
8528 | 16 | { &hf_infiniband_ClassPortInfo_TrapLID, { |
8529 | 16 | "TrapLID", "infiniband.classportinfo.traplid", |
8530 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8531 | 16 | }, |
8532 | 16 | { &hf_infiniband_ClassPortInfo_TrapP_Key, { |
8533 | 16 | "TrapP_Key", "infiniband.classportinfo.trappkey", |
8534 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8535 | 16 | }, |
8536 | 16 | { &hf_infiniband_ClassPortInfo_TrapQP, { |
8537 | 16 | "TrapQP", "infiniband.classportinfo.trapqp", |
8538 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8539 | 16 | }, |
8540 | 16 | { &hf_infiniband_ClassPortInfo_TrapQ_Key, { |
8541 | 16 | "TrapQ_Key", "infiniband.classportinfo.trapqkey", |
8542 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8543 | 16 | }, |
8544 | | |
8545 | | /* Notice */ |
8546 | 16 | { &hf_infiniband_Notice_IsGeneric, { |
8547 | 16 | "IsGeneric", "infiniband.notice.isgeneric", |
8548 | 16 | FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL} |
8549 | 16 | }, |
8550 | 16 | { &hf_infiniband_Notice_Type, { |
8551 | 16 | "Type", "infiniband.notice.type", |
8552 | 16 | FT_UINT8, BASE_HEX, NULL, 0x7F, NULL, HFILL} |
8553 | 16 | }, |
8554 | 16 | { &hf_infiniband_Notice_ProducerTypeVendorID, { |
8555 | 16 | "ProducerTypeVendorID", "infiniband.notice.producertypevendorid", |
8556 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8557 | 16 | }, |
8558 | 16 | { &hf_infiniband_Notice_TrapNumberDeviceID, { |
8559 | 16 | "TrapNumberDeviceID", "infiniband.notice.trapnumberdeviceid", |
8560 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8561 | 16 | }, |
8562 | 16 | { &hf_infiniband_Notice_IssuerLID, { |
8563 | 16 | "IssuerLID", "infiniband.notice.issuerlid", |
8564 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8565 | 16 | }, |
8566 | 16 | { &hf_infiniband_Notice_NoticeToggle, { |
8567 | 16 | "NoticeToggle", "infiniband.notice.noticetoggle", |
8568 | 16 | FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL} |
8569 | 16 | }, |
8570 | 16 | { &hf_infiniband_Notice_NoticeCount, { |
8571 | 16 | "NoticeCount", "infiniband.notice.noticecount", |
8572 | 16 | FT_UINT16, BASE_HEX, NULL, 0x7FFF, NULL, HFILL} |
8573 | 16 | }, |
8574 | 16 | { &hf_infiniband_Notice_DataDetails, { |
8575 | 16 | "DataDetails", "infiniband.notice.datadetails", |
8576 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8577 | 16 | }, |
8578 | | #if 0 |
8579 | | { &hf_infiniband_Notice_IssuerGID, { |
8580 | | "IssuerGID", "infiniband.notice.issuergid", |
8581 | | FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8582 | | }, |
8583 | | { &hf_infiniband_Notice_ClassTrapSpecificData, { |
8584 | | "ClassTrapSpecificData", "infiniband.notice.classtrapspecificdata", |
8585 | | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8586 | | }, |
8587 | | #endif |
8588 | | |
8589 | | /* Traps 64,65,66,67 */ |
8590 | 16 | { &hf_infiniband_Trap_GIDADDR, { |
8591 | 16 | "GIDADDR", "infiniband.trap.gidaddr", |
8592 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8593 | 16 | }, |
8594 | | /* Traps 68,69 */ |
8595 | 16 | { &hf_infiniband_Trap_COMP_MASK, { |
8596 | 16 | "COMP_MASK", "infiniband.trap.comp_mask", |
8597 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8598 | 16 | }, |
8599 | 16 | { &hf_infiniband_Trap_WAIT_FOR_REPATH, { |
8600 | 16 | "WAIT_FOR_REPATH", "infiniband.trap.wait_for_repath", |
8601 | 16 | FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL} |
8602 | 16 | }, |
8603 | | #if 0 |
8604 | | { &hf_infiniband_Trap_PATH_REC, { |
8605 | | "PATH_REC", "infiniband.trap.path_rec", |
8606 | | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8607 | | }, |
8608 | | #endif |
8609 | | |
8610 | | /* Trap 128 */ |
8611 | 16 | { &hf_infiniband_Trap_LIDADDR, { |
8612 | 16 | "LIDADDR", "infiniband.trap.lidaddr", |
8613 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8614 | 16 | }, |
8615 | | |
8616 | | /* Trap 129, 130, 131 */ |
8617 | 16 | { &hf_infiniband_Trap_PORTNO, { |
8618 | 16 | "PORTNO", "infiniband.trap.portno", |
8619 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8620 | 16 | }, |
8621 | | |
8622 | | /* Trap 144 */ |
8623 | 16 | { &hf_infiniband_Trap_OtherLocalChanges, { |
8624 | 16 | "OtherLocalChanges", "infiniband.trap.otherlocalchanges", |
8625 | 16 | FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL} |
8626 | 16 | }, |
8627 | 16 | { &hf_infiniband_Trap_CAPABILITYMASK, { |
8628 | 16 | "CAPABILITYMASK", "infiniband.trap.capabilitymask", |
8629 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8630 | 16 | }, |
8631 | 16 | { &hf_infiniband_Trap_LinkSpeecEnabledChange, { |
8632 | 16 | "LinkSpeecEnabledChange", "infiniband.trap.linkspeecenabledchange", |
8633 | 16 | FT_UINT8, BASE_HEX, NULL, 0x04, NULL, HFILL} |
8634 | 16 | }, |
8635 | 16 | { &hf_infiniband_Trap_LinkWidthEnabledChange, { |
8636 | 16 | "LinkWidthEnabledChange", "infiniband.trap.linkwidthenabledchange", |
8637 | 16 | FT_UINT8, BASE_HEX, NULL, 0x02, NULL, HFILL} |
8638 | 16 | }, |
8639 | 16 | { &hf_infiniband_Trap_NodeDescriptionChange, { |
8640 | 16 | "NodeDescriptionChange", "infiniband.trap.nodedescriptionchange", |
8641 | 16 | FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL} |
8642 | 16 | }, |
8643 | | |
8644 | | /* Trap 145 */ |
8645 | 16 | { &hf_infiniband_Trap_SYSTEMIMAGEGUID, { |
8646 | 16 | "SYSTEMIMAGEGUID", "infiniband.trap.systemimageguid", |
8647 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8648 | 16 | }, |
8649 | | |
8650 | | /* Trap 256 */ |
8651 | 16 | { &hf_infiniband_Trap_DRSLID, { |
8652 | 16 | "DRSLID", "infiniband.trap.drslid", |
8653 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8654 | 16 | }, |
8655 | 16 | { &hf_infiniband_Trap_METHOD, { |
8656 | 16 | "METHOD", "infiniband.trap.method", |
8657 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8658 | 16 | }, |
8659 | 16 | { &hf_infiniband_Trap_ATTRIBUTEID, { |
8660 | 16 | "ATTRIBUTEID", "infiniband.trap.attributeid", |
8661 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8662 | 16 | }, |
8663 | 16 | { &hf_infiniband_Trap_ATTRIBUTEMODIFIER, { |
8664 | 16 | "ATTRIBUTEMODIFIER", "infiniband.trap.attributemodifier", |
8665 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8666 | 16 | }, |
8667 | 16 | { &hf_infiniband_Trap_MKEY, { |
8668 | 16 | "MKEY", "infiniband.trap.mkey", |
8669 | 16 | FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8670 | 16 | }, |
8671 | 16 | { &hf_infiniband_Trap_DRNotice, { |
8672 | 16 | "DRNotice", "infiniband.trap.drnotice", |
8673 | 16 | FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL} |
8674 | 16 | }, |
8675 | 16 | { &hf_infiniband_Trap_DRPathTruncated, { |
8676 | 16 | "DRPathTruncated", "infiniband.trap.drpathtruncated", |
8677 | 16 | FT_UINT8, BASE_HEX, NULL, 0x40, NULL, HFILL} |
8678 | 16 | }, |
8679 | 16 | { &hf_infiniband_Trap_DRHopCount, { |
8680 | 16 | "DRHopCount", "infiniband.trap.drhopcount", |
8681 | 16 | FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL} |
8682 | 16 | }, |
8683 | 16 | { &hf_infiniband_Trap_DRNoticeReturnPath, { |
8684 | 16 | "DRNoticeReturnPath", "infiniband.trap.drnoticereturnpath", |
8685 | 16 | FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8686 | 16 | }, |
8687 | | |
8688 | | /* Trap 257, 258 */ |
8689 | 16 | { &hf_infiniband_Trap_LIDADDR1, { |
8690 | 16 | "LIDADDR1", "infiniband.trap.lidaddr1", |
8691 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8692 | 16 | }, |
8693 | 16 | { &hf_infiniband_Trap_LIDADDR2, { |
8694 | 16 | "LIDADDR2", "infiniband.trap.lidaddr2", |
8695 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8696 | 16 | }, |
8697 | 16 | { &hf_infiniband_Trap_KEY, { |
8698 | 16 | "KEY", "infiniband.trap.key", |
8699 | 16 | FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8700 | 16 | }, |
8701 | 16 | { &hf_infiniband_Trap_SL, { |
8702 | 16 | "SL", "infiniband.trap.sl", |
8703 | 16 | FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL} |
8704 | 16 | }, |
8705 | 16 | { &hf_infiniband_Trap_QP1, { |
8706 | 16 | "QP1", "infiniband.trap.qp1", |
8707 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8708 | 16 | }, |
8709 | 16 | { &hf_infiniband_Trap_QP2, { |
8710 | 16 | "QP2", "infiniband.trap.qp2", |
8711 | 16 | FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8712 | 16 | }, |
8713 | 16 | { &hf_infiniband_Trap_GIDADDR1, { |
8714 | 16 | "GIDADDR1", "infiniband.trap.gidaddr1", |
8715 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8716 | 16 | }, |
8717 | 16 | { &hf_infiniband_Trap_GIDADDR2, { |
8718 | 16 | "GIDADDR2", "infiniband.trap.gidaddr2", |
8719 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8720 | 16 | }, |
8721 | | |
8722 | | /* Trap 259 */ |
8723 | 16 | { &hf_infiniband_Trap_DataValid, { |
8724 | 16 | "DataValid", "infiniband.trap.datavalid", |
8725 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8726 | 16 | }, |
8727 | 16 | { &hf_infiniband_Trap_PKEY, { |
8728 | 16 | "PKEY", "infiniband.trap.pkey", |
8729 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL} |
8730 | 16 | }, |
8731 | 16 | { &hf_infiniband_Trap_SWLIDADDR, { |
8732 | 16 | "SWLIDADDR", "infiniband.trap.swlidaddr", |
8733 | 16 | FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL} |
8734 | 16 | }, |
8735 | | /* ClassPortInfo in Performance class */ |
8736 | 16 | { &hf_infiniband_PerfMgt_ClassPortInfo, { |
8737 | 16 | "ClassPortInfo (Performance Management MAD)", "infiniband.classportinfo", |
8738 | 16 | FT_NONE, BASE_NONE, NULL, 0x0, |
8739 | 16 | "Performance class ClassPortInfo packet", HFILL} |
8740 | 16 | }, |
8741 | | /* PortCounters in Performance class */ |
8742 | 16 | { &hf_infiniband_PortCounters, { |
8743 | 16 | "Port Counters (Performance Management MAD)", "infiniband.portcounters", |
8744 | 16 | FT_NONE, BASE_NONE, NULL, 0x0, |
8745 | 16 | "Performance class PortCounters packet", HFILL} |
8746 | 16 | }, |
8747 | 16 | { &hf_infiniband_PortCounters_PortSelect, { |
8748 | 16 | "PortSelect", "infiniband.portcounters.portselect", |
8749 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, |
8750 | 16 | "Selects the port that will be accessed", HFILL} |
8751 | 16 | }, |
8752 | 16 | { &hf_infiniband_PortCounters_CounterSelect, { |
8753 | 16 | "CounterSelect", "infiniband.portcounters.counterselect", |
8754 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, |
8755 | 16 | "When writing, selects which counters are affected by the operation", HFILL} |
8756 | 16 | }, |
8757 | 16 | { &hf_infiniband_PortCounters_SymbolErrorCounter, { |
8758 | 16 | "SymbolErrorCounter", "infiniband.portcounters.symbolerrorcounter", |
8759 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8760 | 16 | "Total number of minor link errors", HFILL} |
8761 | 16 | }, |
8762 | 16 | { &hf_infiniband_PortCounters_LinkErrorRecoveryCounter, { |
8763 | 16 | "LinkErrorRecoveryCounter", "infiniband.portcounters.linkerrorrecoverycounter", |
8764 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8765 | 16 | "Total number of times successfully completed link error recovery process", HFILL} |
8766 | 16 | }, |
8767 | 16 | { &hf_infiniband_PortCounters_LinkDownedCounter, { |
8768 | 16 | "LinkDownedCounter", "infiniband.portcounters.linkdownedcounter", |
8769 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8770 | 16 | "Total number of times failed link error recovery process", HFILL} |
8771 | 16 | }, |
8772 | 16 | { &hf_infiniband_PortCounters_PortRcvErrors, { |
8773 | 16 | "PortRcvErrors", "infiniband.portcounters.portrcverrors", |
8774 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8775 | 16 | "Total number of packets containing an error received", HFILL} |
8776 | 16 | }, |
8777 | 16 | { &hf_infiniband_PortCounters_PortRcvRemotePhysicalErrors, { |
8778 | 16 | "PortRcvRemotePhysicalErrors", "infiniband.portcounters.portrcvremotephysicalerrors", |
8779 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8780 | 16 | "Total number of packets marked with EBP delimiter received", HFILL} |
8781 | 16 | }, |
8782 | 16 | { &hf_infiniband_PortCounters_PortRcvSwitchRelayErrors, { |
8783 | 16 | "PortRcvSwitchRelayErrors", "infiniband.portcounters.portrcvswitchrelayerrors", |
8784 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8785 | 16 | "Total number of packets discarded because they could not be forwarded by switch relay", |
8786 | 16 | HFILL} |
8787 | 16 | }, |
8788 | 16 | { &hf_infiniband_PortCounters_PortXmitDiscards, { |
8789 | 16 | "PortXmitDiscards", "infiniband.portcounters.portxmitdiscards", |
8790 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8791 | 16 | "Total number of outbound packets discarded", HFILL} |
8792 | 16 | }, |
8793 | 16 | { &hf_infiniband_PortCounters_PortXmitConstraintErrors, { |
8794 | 16 | "PortXmitConstraintErrors", "infiniband.portcounters.portxmitconstrainterrors", |
8795 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8796 | 16 | "Total number of packets not transmitted from the switch physical port", HFILL} |
8797 | 16 | }, |
8798 | 16 | { &hf_infiniband_PortCounters_PortRcvConstraintErrors, { |
8799 | 16 | "PortRcvConstraintErrors", "infiniband.portcounters.portrcvconstrainterrors", |
8800 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8801 | 16 | "Total number of packets received on the switch physical port that are discarded", HFILL} |
8802 | 16 | }, |
8803 | 16 | { &hf_infiniband_PortCounters_LocalLinkIntegrityErrors, { |
8804 | 16 | "LocalLinkIntegrityErrors", "infiniband.portcounters.locallinkintegrityerrors", |
8805 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8806 | 16 | "The number of times the count of local physical errors exceeded the threshold specified by LocalPhyErrors", |
8807 | 16 | HFILL} |
8808 | 16 | }, |
8809 | 16 | { &hf_infiniband_PortCounters_ExcessiveBufferOverrunErrors, { |
8810 | 16 | "ExcessiveBufferOverrunErrors", "infiniband.portcounters.excessivebufferoverrunerrors", |
8811 | 16 | FT_UINT8, BASE_DEC, NULL, 0x0, |
8812 | 16 | "The number of times that OverrunErrors consecutive flow control update periods occurred", |
8813 | 16 | HFILL} |
8814 | 16 | }, |
8815 | 16 | { &hf_infiniband_PortCounters_VL15Dropped, { |
8816 | 16 | "VL15Dropped", "infiniband.portcounters.vl15dropped", |
8817 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, |
8818 | 16 | "Number of incoming VL15 packets dropped", HFILL} |
8819 | 16 | }, |
8820 | 16 | { &hf_infiniband_PortCounters_PortXmitData, { |
8821 | 16 | "PortXmitData", "infiniband.portcounters.portxmitdata", |
8822 | 16 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8823 | 16 | "Total number of data octets, divided by 4, transmitted on all VLs from the port", HFILL} |
8824 | 16 | }, |
8825 | 16 | { &hf_infiniband_PortCounters_PortRcvData, { |
8826 | 16 | "PortRcvData", "infiniband.portcounters.portrcvdata", |
8827 | 16 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8828 | 16 | "Total number of data octets, divided by 4, received on all VLs at the port", HFILL} |
8829 | 16 | }, |
8830 | 16 | { &hf_infiniband_PortCounters_PortXmitPkts, { |
8831 | 16 | "PortXmitPkts", "infiniband.portcounters.portxmitpkts", |
8832 | 16 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8833 | 16 | "Total number of packets transmitted on all VLs from the port", HFILL} |
8834 | 16 | }, |
8835 | 16 | { &hf_infiniband_PortCounters_PortRcvPkts, { |
8836 | 16 | "PortRcvPkts", "infiniband.portcounters.portrcvpkts", |
8837 | 16 | FT_UINT32, BASE_DEC, NULL, 0x0, |
8838 | 16 | "Total number of packets received from all VLs on the port", HFILL} |
8839 | 16 | }, |
8840 | | /* PortCountersExtended in Performance class */ |
8841 | 16 | { &hf_infiniband_PortCountersExt, { |
8842 | 16 | "Port Counters Extended (Performance Management MAD)", "infiniband.portcounters_ext", |
8843 | 16 | FT_NONE, BASE_NONE, NULL, 0x0, |
8844 | 16 | "Performance class PortCountersExtended packet", HFILL} |
8845 | 16 | }, |
8846 | 16 | { &hf_infiniband_PortCountersExt_PortSelect, { |
8847 | 16 | "PortSelect", "infiniband.portcounters_ext.portselect", |
8848 | 16 | FT_UINT8, BASE_HEX, NULL, 0x0, |
8849 | 16 | "Selects the port that will be accessed", HFILL} |
8850 | 16 | }, |
8851 | 16 | { &hf_infiniband_PortCountersExt_CounterSelect, { |
8852 | 16 | "CounterSelect", "infiniband.portcounters_ext.counterselect", |
8853 | 16 | FT_UINT16, BASE_HEX, NULL, 0x0, |
8854 | 16 | "When writing, selects which counters are affected by the operation", HFILL} |
8855 | 16 | }, |
8856 | 16 | { &hf_infiniband_PortCountersExt_PortXmitData, { |
8857 | 16 | "PortXmitData", "infiniband.portcounters_ext.portxmitdata", |
8858 | 16 | FT_UINT64, BASE_DEC, NULL, 0x0, |
8859 | 16 | "Total number of data octets, divided by 4, transmitted on all VLs from the port", HFILL} |
8860 | 16 | }, |
8861 | 16 | { &hf_infiniband_PortCountersExt_PortRcvData, { |
8862 | 16 | "PortRcvData", "infiniband.portcounters_ext.portrcvdata", |
8863 | 16 | FT_UINT64, BASE_DEC, NULL, 0x0, |
8864 | 16 | "Total number of data octets, divided by 4, received on all VLs at the port", HFILL} |
8865 | 16 | }, |
8866 | 16 | { &hf_infiniband_PortCountersExt_PortXmitPkts, { |
8867 | 16 | "PortXmitPkts", "infiniband.portcounters_ext.portxmitpkts", |
8868 | 16 | FT_UINT64, BASE_DEC, NULL, 0x0, |
8869 | 16 | "Total number of packets transmitted on all VLs from the port", HFILL} |
8870 | 16 | }, |
8871 | 16 | { &hf_infiniband_PortCountersExt_PortRcvPkts, { |
8872 | 16 | "PortRcvPkts", "infiniband.portcounters_ext.portrcvpkts", |
8873 | 16 | FT_UINT64, BASE_DEC, NULL, 0x0, |
8874 | 16 | "Total number of packets received from all VLs on the port", HFILL} |
8875 | 16 | }, |
8876 | 16 | { &hf_infiniband_PortCountersExt_PortUnicastXmitPkts, { |
8877 | 16 | "PortUnicastXmitPkts", "infiniband.portcounters_ext.portunicastxmitpkts", |
8878 | 16 | FT_UINT64, BASE_DEC, NULL, 0x0, |
8879 | 16 | "Total number of unicast packets transmitted on all VLs from the port", HFILL} |
8880 | 16 | }, |
8881 | 16 | { &hf_infiniband_PortCountersExt_PortUnicastRcvPkts, { |
8882 | 16 | "PortUnicastRcvPkts", "infiniband.portcounters_ext.portunicastrcvpkts", |
8883 | 16 | FT_UINT64, BASE_DEC, NULL, 0x0, |
8884 | 16 | "Total number of unicast packets received from all VLs on the port", HFILL} |
8885 | 16 | }, |
8886 | 16 | { &hf_infiniband_PortCountersExt_PortMulticastXmitPkts, { |
8887 | 16 | "PortMulticastXmitPkts", "infiniband.portcounters_ext.portmulticastxmitpkts", |
8888 | 16 | FT_UINT64, BASE_DEC, NULL, 0x0, |
8889 | 16 | "Total number of multicast packets transmitted on all VLs from the port", HFILL} |
8890 | 16 | }, |
8891 | 16 | { &hf_infiniband_PortCountersExt_PortMulticastRcvPkts, { |
8892 | 16 | "PortMulticastRcvPkts", "infiniband.portcounters_ext.portmulticastrcvpkts", |
8893 | 16 | FT_UINT64, BASE_DEC, NULL, 0x0, |
8894 | 16 | "Total number of multicast packets received from all VLs on the port", HFILL} |
8895 | 16 | } |
8896 | 16 | }; |
8897 | | |
8898 | | /* Array to hold expansion options between dissections */ |
8899 | 16 | static int *ett[] = { |
8900 | | /* &ett_infiniband, */ |
8901 | 16 | &ett_all_headers, |
8902 | 16 | &ett_lrh, |
8903 | 16 | &ett_grh, |
8904 | 16 | &ett_bth, |
8905 | 16 | &ett_rwh, |
8906 | 16 | &ett_rdeth, |
8907 | 16 | &ett_deth, |
8908 | 16 | &ett_reth, |
8909 | 16 | &ett_atomiceth, |
8910 | 16 | &ett_aeth, |
8911 | 16 | &ett_aeth_syndrome, |
8912 | 16 | &ett_atomicacketh, |
8913 | 16 | &ett_immdt, |
8914 | 16 | &ett_ieth, |
8915 | 16 | &ett_payload, |
8916 | 16 | &ett_vendor, |
8917 | 16 | &ett_subn_lid_routed, |
8918 | 16 | &ett_subn_directed_route, |
8919 | 16 | &ett_subnadmin, |
8920 | 16 | &ett_cm, |
8921 | 16 | &ett_cm_sid, |
8922 | 16 | &ett_cm_ipcm, |
8923 | 16 | &ett_mad, |
8924 | 16 | &ett_rmpp, |
8925 | 16 | &ett_subm_attribute, |
8926 | 16 | &ett_suba_attribute, |
8927 | 16 | &ett_datadetails, |
8928 | 16 | &ett_noticestraps, |
8929 | | /* &ett_nodedesc, */ |
8930 | | /* &ett_nodeinfo, */ |
8931 | | /* &ett_switchinfo, */ |
8932 | | /* &ett_guidinfo, */ |
8933 | | /* &ett_portinfo, */ |
8934 | 16 | &ett_portinfo_capmask, |
8935 | 16 | &ett_pkeytable, |
8936 | 16 | &ett_sltovlmapping, |
8937 | 16 | &ett_vlarbitrationtable, |
8938 | 16 | &ett_linearforwardingtable, |
8939 | 16 | &ett_randomforwardingtable, |
8940 | 16 | &ett_multicastforwardingtable, |
8941 | 16 | &ett_sminfo, |
8942 | 16 | &ett_vendordiag, |
8943 | 16 | &ett_ledinfo, |
8944 | 16 | &ett_linkspeedwidthpairs, |
8945 | 16 | &ett_informinfo, |
8946 | 16 | &ett_linkrecord, |
8947 | 16 | &ett_servicerecord, |
8948 | 16 | &ett_pathrecord, |
8949 | 16 | &ett_mcmemberrecord, |
8950 | 16 | &ett_tracerecord, |
8951 | 16 | &ett_multipathrecord, |
8952 | 16 | &ett_serviceassocrecord, |
8953 | 16 | &ett_perfclass, |
8954 | 16 | }; |
8955 | | |
8956 | 16 | static hf_register_info hf_link[] = { |
8957 | 16 | { &hf_infiniband_link_op, { |
8958 | 16 | "Operand", "infiniband_link.op", |
8959 | 16 | FT_UINT16, BASE_DEC, VALS(Operand_Description), 0xF000, NULL, HFILL} |
8960 | 16 | }, |
8961 | 16 | { &hf_infiniband_link_fctbs, { |
8962 | 16 | "Flow Control Total Blocks Sent", "infiniband_link.fctbs", |
8963 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0FFF, NULL, HFILL} |
8964 | 16 | }, |
8965 | 16 | { &hf_infiniband_link_vl, { |
8966 | 16 | "Virtual Lane", "infiniband_link.vl", |
8967 | 16 | FT_UINT16, BASE_DEC, NULL, 0xF000, NULL, HFILL} |
8968 | 16 | }, |
8969 | 16 | { &hf_infiniband_link_fccl, { |
8970 | 16 | "Flow Control Credit Limit", "infiniband_link.fccl", |
8971 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0FFF, NULL, HFILL} |
8972 | 16 | }, |
8973 | 16 | { &hf_infiniband_link_lpcrc, { |
8974 | 16 | "Link Packet CRC", "infiniband_link.lpcrc", |
8975 | 16 | FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL} |
8976 | 16 | } |
8977 | 16 | }; |
8978 | | |
8979 | 16 | static int *ett_link_array[] = { |
8980 | 16 | &ett_link |
8981 | 16 | }; |
8982 | | |
8983 | 16 | static hf_register_info hf_eoib[] = { |
8984 | | /* Mellanox EoIB encapsulation header */ |
8985 | 16 | { &hf_infiniband_ver, { |
8986 | 16 | "Version", "infiniband.eoib.version", |
8987 | 16 | FT_UINT16, BASE_HEX, NULL, MELLANOX_VERSION_FLAG, NULL, HFILL} |
8988 | 16 | }, |
8989 | 16 | { &hf_infiniband_tcp_chk, { |
8990 | 16 | "TCP Checksum", "infiniband.eoib.tcp_chk", |
8991 | 16 | FT_UINT16, BASE_HEX, NULL, MELLANOX_TCP_CHECKSUM_FLAG, NULL, HFILL} |
8992 | 16 | }, |
8993 | 16 | { &hf_infiniband_ip_chk, { |
8994 | 16 | "IP Checksum", "infiniband.eoib.ip_chk", |
8995 | 16 | FT_UINT16, BASE_HEX, NULL, MELLANOX_IP_CHECKSUM_FLAG, NULL, HFILL} |
8996 | 16 | }, |
8997 | 16 | { &hf_infiniband_fcs, { |
8998 | 16 | "FCS Field Present", "infiniband.eoib.fcs", |
8999 | 16 | FT_BOOLEAN, 16, NULL, MELLANOX_FCS_PRESENT_FLAG, NULL, HFILL} |
9000 | 16 | }, |
9001 | 16 | { &hf_infiniband_ms, { |
9002 | 16 | "More Segments to Follow", "infiniband.eoib.ms", |
9003 | 16 | FT_BOOLEAN, 16, NULL, MELLANOX_MORE_SEGMENT_FLAG, NULL, HFILL} |
9004 | 16 | }, |
9005 | 16 | { &hf_infiniband_seg_off, { |
9006 | 16 | "Segment Offset", "infiniband.eoib.ip_seg_offset", |
9007 | 16 | FT_UINT16, BASE_DEC, NULL, MELLANOX_SEGMENT_FLAG, NULL, HFILL} |
9008 | 16 | }, |
9009 | 16 | { &hf_infiniband_seg_id, { |
9010 | 16 | "Segment ID", "infiniband.eoib.ip_seg_id", |
9011 | 16 | FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL} |
9012 | 16 | }, |
9013 | 16 | }; |
9014 | | |
9015 | 16 | static int *ett_eoib_array[] = { |
9016 | 16 | &ett_eoib |
9017 | 16 | }; |
9018 | | |
9019 | 16 | static hf_register_info hf_rc_send[] = { |
9020 | 16 | { &hf_infiniband_rc_send_fragments, |
9021 | 16 | { "Reassembled Infiniband RC Send Fragments", "infiniband.rc_send.fragments", |
9022 | 16 | FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, |
9023 | | |
9024 | 16 | { &hf_infiniband_rc_send_fragment, |
9025 | 16 | { "Infiniband RC Send Fragment", "infiniband.rc_send.fragment", |
9026 | 16 | FT_FRAMENUM, BASE_NONE, NULL, 0, NULL, HFILL }}, |
9027 | 16 | { &hf_infiniband_rc_send_fragment_overlap, |
9028 | 16 | { "Fragment overlap", "infiniband.rc_send.fragment.overlap", |
9029 | 16 | FT_BOOLEAN, BASE_NONE, NULL, 0, NULL, HFILL }}, |
9030 | | |
9031 | 16 | { &hf_infiniband_rc_send_fragment_overlap_conflict, |
9032 | 16 | { "Conflicting data in fragment overlap", "infiniband.rc_send.fragment.overlap.conflict", |
9033 | 16 | FT_BOOLEAN, BASE_NONE, NULL, 0, NULL, HFILL }}, |
9034 | | |
9035 | 16 | { &hf_infiniband_rc_send_fragment_multiple_tails, |
9036 | 16 | { "Multiple tail fragments found", "infiniband.rc_send.fragment.multipletails", |
9037 | 16 | FT_BOOLEAN, BASE_NONE, NULL, 0, NULL, HFILL }}, |
9038 | | |
9039 | 16 | { &hf_infiniband_rc_send_fragment_too_long_fragment, |
9040 | 16 | { "Fragment too long", "infiniband.rc_send.fragment.toolongfragment", |
9041 | 16 | FT_BOOLEAN, BASE_NONE, NULL, 0, NULL, HFILL }}, |
9042 | | |
9043 | 16 | { &hf_infiniband_rc_send_fragment_error, |
9044 | 16 | { "Defragmentation error", "infiniband.rc_send.fragment.error", |
9045 | 16 | FT_FRAMENUM, BASE_NONE, NULL, 0, NULL, HFILL }}, |
9046 | | |
9047 | 16 | { &hf_infiniband_rc_send_fragment_count, |
9048 | 16 | { "Fragment count", "infiniband.rc_send.fragment.count", |
9049 | 16 | FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, |
9050 | | |
9051 | 16 | { &hf_infiniband_rc_send_reassembled_in, |
9052 | 16 | { "Reassembled PDU in frame", "infiniband.rc_send.reassembled_in", |
9053 | 16 | FT_FRAMENUM, BASE_NONE, NULL, 0, NULL, HFILL }}, |
9054 | | |
9055 | 16 | { &hf_infiniband_rc_send_reassembled_length, |
9056 | 16 | { "Reassembled Infiniband RC Send length", "infiniband.rc_send.reassembled.length", |
9057 | 16 | FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, |
9058 | | |
9059 | 16 | { &hf_infiniband_rc_send_reassembled_data, |
9060 | 16 | { "Reassembled Infiniband RC Send data", "infiniband.rc_send.reassembled.data", |
9061 | 16 | FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, |
9062 | 16 | }; |
9063 | | |
9064 | 16 | static int *ett_rc_send_array[] = { |
9065 | 16 | &ett_infiniband_rc_send_fragment, |
9066 | 16 | &ett_infiniband_rc_send_fragments, |
9067 | 16 | }; |
9068 | | |
9069 | 16 | proto_infiniband = proto_register_protocol("InfiniBand", "IB", "infiniband"); |
9070 | 16 | ib_handle = register_dissector("infiniband", dissect_infiniband, proto_infiniband); |
9071 | | |
9072 | 16 | proto_register_field_array(proto_infiniband, hf, array_length(hf)); |
9073 | 16 | proto_register_subtree_array(ett, array_length(ett)); |
9074 | | |
9075 | | /* register the subdissector tables */ |
9076 | 16 | heur_dissectors_payload = register_heur_dissector_list_with_description("infiniband.payload", "InfiniBand payload", proto_infiniband); |
9077 | 16 | heur_dissectors_cm_private = register_heur_dissector_list_with_description("infiniband.mad.cm.private", "InfiniBand CM private data", proto_infiniband); |
9078 | | |
9079 | | /* register dissection preferences */ |
9080 | 16 | infiniband_module = prefs_register_protocol(proto_infiniband, proto_reg_handoff_infiniband); |
9081 | | |
9082 | 16 | prefs_register_obsolete_preference(infiniband_module, "identify_payload"); |
9083 | 16 | prefs_register_obsolete_preference(infiniband_module, "dissect_eoib"); |
9084 | 16 | prefs_register_uint_preference(infiniband_module, "rroce.port", "RRoce UDP Port", |
9085 | 16 | "The UDP port for RROCE messages (default " G_STRINGIFY(DEFAULT_RROCE_UDP_PORT) ")", |
9086 | 16 | 10, &pref_rroce_udp_port); |
9087 | 16 | prefs_register_bool_preference(infiniband_module, "try_heuristic_first", |
9088 | 16 | "Try heuristic sub-dissectors first", |
9089 | 16 | "Try to decode a packet using an heuristic sub-dissector before using Decode As", |
9090 | 16 | &try_heuristic_first); |
9091 | | |
9092 | 16 | proto_infiniband_link = proto_register_protocol("InfiniBand Link", "InfiniBand Link", "infiniband_link"); |
9093 | 16 | ib_link_handle = register_dissector("infiniband_link", dissect_infiniband_link, proto_infiniband_link); |
9094 | | |
9095 | 16 | proto_register_field_array(proto_infiniband_link, hf_link, array_length(hf_link)); |
9096 | 16 | proto_register_subtree_array(ett_link_array, array_length(ett_link_array)); |
9097 | | |
9098 | 16 | proto_mellanox_eoib = proto_register_protocol("Mellanox EoIB Encapsulation Header", "Mellanox EoIB", "infiniband.eoib"); |
9099 | 16 | proto_register_field_array(proto_infiniband, hf_eoib, array_length(hf_eoib)); |
9100 | 16 | proto_register_subtree_array(ett_eoib_array, array_length(ett_eoib_array)); |
9101 | | |
9102 | | /* initialize the hash table */ |
9103 | 16 | CM_context_table = g_hash_table_new_full(g_int64_hash, g_int64_equal, |
9104 | 16 | table_destroy_notify, table_destroy_notify); |
9105 | | |
9106 | 16 | subdissector_table = register_decode_as_next_proto(proto_infiniband, "infiniband", "Infiniband Payload", |
9107 | 16 | infiniband_payload_prompt); |
9108 | | |
9109 | | /* RC Send reassembling */ |
9110 | 16 | proto_register_field_array(proto_infiniband, hf_rc_send, array_length(hf_rc_send)); |
9111 | 16 | proto_register_subtree_array(ett_rc_send_array, array_length(ett_rc_send_array)); |
9112 | 16 | reassembly_table_register(&infiniband_rc_send_reassembly_table, |
9113 | 16 | &addresses_ports_reassembly_table_functions); |
9114 | | |
9115 | 16 | register_shutdown_routine(infiniband_shutdown); |
9116 | 16 | } |
9117 | | |
9118 | | /* Reg Handoff. Register dissectors we'll need for IPoIB and RoCE */ |
9119 | | void proto_reg_handoff_infiniband(void) |
9120 | 16 | { |
9121 | 16 | static bool initialized = false; |
9122 | 16 | static unsigned prev_rroce_udp_port; |
9123 | 16 | static dissector_handle_t rroce_handle; |
9124 | | |
9125 | 16 | if (!initialized) |
9126 | 16 | { |
9127 | 16 | dissector_handle_t roce_handle; |
9128 | 16 | int proto_ethertype; |
9129 | | |
9130 | 16 | ipv6_handle = find_dissector_add_dependency("ipv6", proto_infiniband); |
9131 | | |
9132 | | /* |
9133 | | * I haven't found an official spec for EoIB, but slide 10 |
9134 | | * of |
9135 | | * |
9136 | | * http://downloads.openfabrics.org/Media/Sonoma2009/Sonoma_2009_Tues_converged-net-bridging.pdf |
9137 | | * |
9138 | | * shows the "Eth Payload" following the "Eth Header" and optional |
9139 | | * "Vlan tag", and doesn't show an FCS; "Payload" generally |
9140 | | * refers to the data transported by the protocol, which wouldn't |
9141 | | * include the FCS. |
9142 | | * |
9143 | | * In addition, the capture attached to bug 5061 includes no |
9144 | | * Ethernet FCS. |
9145 | | * |
9146 | | * So we assume the Ethernet frames carried by EoIB don't include |
9147 | | * the Ethernet FCS. |
9148 | | */ |
9149 | 16 | eth_handle = find_dissector("eth_withoutfcs"); |
9150 | 16 | ethertype_dissector_table = find_dissector_table("ethertype"); |
9151 | | |
9152 | | /* announce an anonymous Infiniband dissector */ |
9153 | 16 | dissector_add_uint("erf.types.type", ERF_TYPE_INFINIBAND, ib_handle); |
9154 | | |
9155 | | /* announce an anonymous Infiniband dissector */ |
9156 | 16 | dissector_add_uint("erf.types.type", ERF_TYPE_INFINIBAND_LINK, ib_link_handle); |
9157 | | |
9158 | | /* create and announce an anonymous RoCE dissector */ |
9159 | 16 | roce_handle = create_dissector_handle(dissect_roce, proto_infiniband); |
9160 | 16 | dissector_add_uint("ethertype", ETHERTYPE_ROCE, roce_handle); |
9161 | | |
9162 | | /* create and announce an anonymous RRoCE dissector */ |
9163 | 16 | rroce_handle = create_dissector_handle(dissect_rroce, proto_infiniband); |
9164 | | |
9165 | | /* RROCE over IPv4 isn't standardized but it's been seen in the wild */ |
9166 | 16 | dissector_add_for_decode_as("ip.proto", rroce_handle); |
9167 | | |
9168 | 16 | dissector_add_uint("wtap_encap", WTAP_ENCAP_INFINIBAND, ib_handle); |
9169 | 16 | heur_dissector_add("infiniband.payload", dissect_mellanox_eoib, "Mellanox EoIB", "mellanox_eoib", proto_mellanox_eoib, HEURISTIC_ENABLE); |
9170 | | |
9171 | | /* This could be put in the ethernet dissector file, but since there are a few Infiniband fields in the encapsulation, |
9172 | | keep the dissector here, but associate it with ethernet */ |
9173 | 16 | proto_ethertype = proto_get_id_by_filter_name("ethertype"); |
9174 | 16 | heur_dissector_add("infiniband.payload", dissect_eth_over_ib, "Ethernet over IB", "eth_over_ib", proto_ethertype, HEURISTIC_ENABLE); |
9175 | | |
9176 | 16 | initialized = true; |
9177 | 16 | } |
9178 | 0 | else |
9179 | 0 | { |
9180 | 0 | dissector_delete_uint("udp.port", prev_rroce_udp_port, rroce_handle); |
9181 | 0 | } |
9182 | | /* We are saving the previous value of rroce udp port so we will be able to remove the dissector |
9183 | | * the next time user pref is updated and we get called back to proto_reg_handoff_infiniband. |
9184 | | * "Auto" preference not used because port isn't for the Infiniband protocol itself. |
9185 | | */ |
9186 | 16 | prev_rroce_udp_port = pref_rroce_udp_port; |
9187 | 16 | dissector_add_uint("udp.port", pref_rroce_udp_port, rroce_handle); |
9188 | 16 | } |
9189 | | |
9190 | | /* |
9191 | | * Editor modelines - https://www.wireshark.org/tools/modelines.html |
9192 | | * |
9193 | | * Local variables: |
9194 | | * c-basic-offset: 4 |
9195 | | * tab-width: 8 |
9196 | | * indent-tabs-mode: nil |
9197 | | * End: |
9198 | | * |
9199 | | * vi: set shiftwidth=4 tabstop=8 expandtab: |
9200 | | * :indentSize=4:tabSize=8:noTabs=true: |
9201 | | */ |