2 * Routines for Infiniband/ERF Dissection
3 * Copyright 2008 Endace Technology Limited
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
33 #include <epan/packet.h>
34 #include <epan/proto.h>
35 #include <epan/dissectors/packet-frame.h>
36 #include "packet-infiniband.h"
40 /* 1.) Floating "offset+=" statements should probably be "functionized" but they are inline */
41 /* Offset is only passed by reference in specific places, so do not be confused when following code */
42 /* In any code path, adding up "offset+=" statements will tell you what byte you are at */
44 dissect_infiniband(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
47 proto_item *infiniband_packet = NULL;
49 /* The Headers Subtree */
50 proto_tree *all_headers_tree = NULL;
52 /* LRH - Local Route Header */
53 proto_tree *local_route_header_tree = NULL;
54 proto_item *local_route_header_item = NULL;
56 /* GRH - Global Route Header */
57 proto_tree *global_route_header_tree = NULL;
58 proto_item *global_route_header_item = NULL;
60 /* BTH - Base Transport header */
61 proto_tree *base_transport_header_tree = NULL;
62 proto_item *base_transport_header_item = NULL;
65 proto_tree *RAWDATA_header_tree;
66 proto_item *RAWDATA_header_item;
67 guint8 lnh_val = 0; /* Link Next Header Value */
68 gint offset = 0; /* Current Offset */
70 /* General Variables */
71 gboolean bthFollows = 0; /* Tracks if we are parsing a BTH. This is a significant decision point */
72 guint8 virtualLane = 0; /* IB VirtualLane. Keyed off of for detecting subnet admin/management */
73 guint8 opCode = 0; /* OpCode from BTH header. */
74 gint32 nextHeaderSequence = -1; /* defined by this dissector. #define which indicates the upcoming header sequence from OpCode */
75 guint16 payloadLength = 0; /* Payload Length should it exist */
76 guint8 nxtHdr = 0; /* Keyed off for header dissection order */
77 guint16 packetLength = 0; /* Packet Length. We track this as tvb->length - offset. */
78 /* It provides the parsing methods a known size */
79 /* that must be available for that header. */
80 struct e_in6_addr SRCgid; /* Structures to hold GIDs should we need them */
81 struct e_in6_addr DSTgid;
84 /* Mark the Packet type as Infiniband in the wireshark UI */
85 /* Clear other columns */
88 col_set_str(pinfo->cinfo, COL_PROTOCOL, "InfiniBand");
89 col_clear(pinfo->cinfo, COL_INFO);
92 /* Get the parent tree from the ERF dissector. We don't want to nest under ERF */
93 if(tree && tree->parent)
95 /* Set the normal tree outside of ERF */
97 /* Set a global reference for nested protocols */
103 /* If no packet details are being dissected, extract some high level info for the packet view */
104 /* Assigns column values rather than full tree population */
105 dissect_general_info(tvb, offset, pinfo);
109 /* Top Level Packet */
110 infiniband_packet = proto_tree_add_item(tree, proto_infiniband, tvb, offset, -1, FALSE);
112 /* Headers Level Tree */
113 all_headers_tree = proto_item_add_subtree(infiniband_packet, ett_all_headers);
115 /* Local Route Header Subtree */
116 local_route_header_item = proto_tree_add_item(all_headers_tree, hf_infiniband_LRH, tvb, offset, 8, FALSE);
117 proto_item_set_text(local_route_header_item, "%s", "Local Route Header");
118 local_route_header_tree = proto_item_add_subtree(local_route_header_item, ett_lrh);
120 proto_tree_add_item(local_route_header_tree, hf_infiniband_virtual_lane, tvb, offset, 1, FALSE);
123 /* Get the Virtual Lane. We'll use this to identify Subnet Management and Subnet Administration Packets. */
124 virtualLane = tvb_get_guint8(tvb, offset);
125 virtualLane = virtualLane & 0xF0;
128 proto_tree_add_item(local_route_header_tree, hf_infiniband_link_version, tvb, offset, 1, FALSE); offset+=1;
129 proto_tree_add_item(local_route_header_tree, hf_infiniband_service_level, tvb, offset, 1, FALSE);
131 proto_tree_add_item(local_route_header_tree, hf_infiniband_reserved2, tvb, offset, 1, FALSE);
132 proto_tree_add_item(local_route_header_tree, hf_infiniband_link_next_header, tvb, offset, 1, FALSE);
135 /* Save Link Next Header... This tells us what the next header is. */
136 lnh_val = tvb_get_guint8(tvb, offset);
137 lnh_val = lnh_val & 0x03;
141 proto_tree_add_item(local_route_header_tree, hf_infiniband_destination_local_id, tvb, offset, 2, FALSE);
144 /* Set destination in packet view. */
145 if (check_col(pinfo->cinfo, COL_DEF_DST))
147 col_add_fstr(pinfo->cinfo, COL_DEF_DST, "DLID: %s", tvb_bytes_to_str(tvb, offset, 2));
152 proto_tree_add_item(local_route_header_tree, hf_infiniband_reserved5, tvb, offset, 2, FALSE);
154 packetLength = tvb_get_ntohs(tvb, offset); /* Get the Packet Length. This will determine payload size later on. */
155 packetLength = packetLength & 0x07FF; /* Mask off top 5 bits, they are reserved */
156 packetLength = packetLength * 4; /* Multiply by 4 to get true byte length. This is by specification. */
157 /* PktLen is size in 4 byte words (byteSize /4). */
159 proto_tree_add_item(local_route_header_tree, hf_infiniband_packet_length, tvb, offset, 2, FALSE); offset+=2;
160 proto_tree_add_item(local_route_header_tree, hf_infiniband_source_local_id, tvb, offset, 2, FALSE);
162 /* Set Source in packet view. */
163 if (check_col(pinfo->cinfo, COL_DEF_SRC))
165 col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "SLID: %s", tvb_bytes_to_str(tvb, offset, 2));
169 packetLength -= 8; /* Shave 8 bytes for the LRH. */
171 /* Key off Link Next Header. This tells us what High Level Data Format we have */
175 global_route_header_item = proto_tree_add_item(all_headers_tree, hf_infiniband_GRH, tvb, offset, 40, FALSE);
176 proto_item_set_text(global_route_header_item, "%s", "Global Route Header");
177 global_route_header_tree = proto_item_add_subtree(global_route_header_item, ett_grh);
179 proto_tree_add_item(global_route_header_tree, hf_infiniband_ip_version, tvb, offset, 1, FALSE);
180 proto_tree_add_item(global_route_header_tree, hf_infiniband_traffic_class, tvb, offset, 2, FALSE);
181 proto_tree_add_item(global_route_header_tree, hf_infiniband_flow_label, tvb, offset, 4, FALSE); offset += 4;
183 payloadLength = tvb_get_ntohs(tvb, offset);
185 proto_tree_add_item(global_route_header_tree, hf_infiniband_payload_length, tvb, offset, 2, FALSE); offset += 2;
187 nxtHdr = tvb_get_guint8(tvb, offset);
189 proto_tree_add_item(global_route_header_tree, hf_infiniband_next_header, tvb, offset, 1, FALSE); offset +=1;
190 proto_tree_add_item(global_route_header_tree, hf_infiniband_hop_limit, tvb, offset, 1, FALSE); offset +=1;
191 proto_tree_add_item(global_route_header_tree, hf_infiniband_source_gid, tvb, offset, 16, FALSE);
193 tvb_get_ipv6(tvb, offset, &SRCgid);
194 if (check_col(pinfo->cinfo, COL_DEF_SRC))
196 col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "SGID: %s", ip6_to_str(&SRCgid));
200 proto_tree_add_item(global_route_header_tree, hf_infiniband_destination_gid, tvb, offset, 16, FALSE);
202 tvb_get_ipv6(tvb, offset, &DSTgid);
203 if (check_col(pinfo->cinfo, COL_DEF_DST))
205 col_add_fstr(pinfo->cinfo, COL_DEF_DST, "DGID: %s", ip6_to_str(&DSTgid));
208 packetLength -= 40; /* Shave 40 bytes for GRH */
212 /* Some kind of packet being transported globally with IBA, but locally it is not IBA - no BTH following. */
215 /* otherwise fall through and start parsing BTH */
218 base_transport_header_item = proto_tree_add_item(all_headers_tree, hf_infiniband_BTH, tvb, offset, 12, FALSE);
219 proto_item_set_text(base_transport_header_item, "%s", "Base Transport Header");
220 base_transport_header_tree = proto_item_add_subtree(base_transport_header_item, ett_bth);
221 proto_tree_add_item(base_transport_header_tree, hf_infiniband_opcode, tvb, offset, 1, FALSE);
223 /* Get the OpCode - this tells us what headers are following */
224 opCode = tvb_get_guint8(tvb, offset);
225 if (check_col(pinfo->cinfo, COL_INFO))
227 col_append_str(pinfo->cinfo, COL_INFO, val_to_str((guint32)opCode, OpCodeMap, "Unknown OpCode"));
231 proto_tree_add_item(base_transport_header_tree, hf_infiniband_solicited_event, tvb, offset, 1, FALSE);
232 proto_tree_add_item(base_transport_header_tree, hf_infiniband_migreq, tvb, offset, 1, FALSE);
233 proto_tree_add_item(base_transport_header_tree, hf_infiniband_pad_count, tvb, offset, 1, FALSE);
234 proto_tree_add_item(base_transport_header_tree, hf_infiniband_transport_header_version, tvb, offset, 1, FALSE); offset +=1;
235 proto_tree_add_item(base_transport_header_tree, hf_infiniband_partition_key, tvb, offset, 2, FALSE); offset +=2;
236 proto_tree_add_item(base_transport_header_tree, hf_infiniband_reserved8, tvb, offset, 1, FALSE); offset +=1;
237 proto_tree_add_item(base_transport_header_tree, hf_infiniband_destination_qp, tvb, offset, 3, FALSE); offset +=3;
238 proto_tree_add_item(base_transport_header_tree, hf_infiniband_acknowledge_request, tvb, offset, 1, FALSE);
239 proto_tree_add_item(base_transport_header_tree, hf_infiniband_reserved7, tvb, offset, 1, FALSE); offset +=1;
240 proto_tree_add_item(base_transport_header_tree, hf_infiniband_packet_sequence_number, tvb, offset, 3, FALSE); offset +=3;
243 packetLength -= 12; /* Shave 12 for Base Transport Header */
247 /* Raw IPv6 Packet */
248 if (check_col(pinfo->cinfo, COL_DEF_DST))
250 col_set_str(pinfo->cinfo, COL_DEF_DST, "IPv6 over IB Packet");
251 col_set_fence(pinfo->cinfo, COL_DEF_DST);
253 parse_IPvSix(all_headers_tree, tvb, &offset, pinfo);
256 parse_RWH(all_headers_tree, tvb, &offset, pinfo);
260 RAWDATA_header_item = proto_tree_add_item(all_headers_tree, hf_infiniband_raw_data, tvb, offset, -1, FALSE);
261 proto_item_set_text(RAWDATA_header_item, "%s", "Unknown Raw Data - IB Encapsulated");
262 RAWDATA_header_tree = proto_item_add_subtree(RAWDATA_header_item, ett_rawdata);
266 /* Base Transport header is hit quite often, however it is alone since it is the exception not the rule */
267 /* Only IBA Local packets use it */
270 /* Find our next header sequence based on the Opcode
271 * Each case decrements the packetLength by the amount of bytes consumed by each header.
272 * The find_next_header_sequence method could be used to automate this.
273 * We need to keep track of this so we know much data to mark as payload/ICRC/VCRC values. */
275 nextHeaderSequence = find_next_header_sequence((guint32) opCode);
277 /* find_next_header_sequence gives us the DEFINE value corresponding to the header order following */
278 /* Enumerations are named intuitively, e.g. RDETH DETH PAYLOAD means there is an RDETH Header, DETH Header, and a packet payload */
279 switch(nextHeaderSequence)
281 case RDETH_DETH_PAYLD:
282 parse_RDETH(all_headers_tree, tvb, &offset);
283 parse_DETH(all_headers_tree, tvb, &offset);
285 packetLength -= 4; /* RDETH */
286 packetLength -= 8; /* DETH */
288 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
290 case RDETH_DETH_RETH_PAYLD:
291 parse_RDETH(all_headers_tree, tvb, &offset);
292 parse_DETH(all_headers_tree, tvb, &offset);
293 parse_RETH(all_headers_tree, tvb, &offset);
295 packetLength -= 4; /* RDETH */
296 packetLength -= 8; /* DETH */
297 packetLength -= 16; /* RETH */
299 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
301 case RDETH_DETH_IMMDT_PAYLD:
302 parse_RDETH(all_headers_tree, tvb, &offset);
303 parse_DETH(all_headers_tree, tvb, &offset);
304 parse_IMMDT(all_headers_tree, tvb, &offset);
306 packetLength -= 4; /* RDETH */
307 packetLength -= 8; /* DETH */
308 packetLength -= 4; /* IMMDT */
310 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
312 case RDETH_DETH_RETH_IMMDT_PAYLD:
313 parse_RDETH(all_headers_tree, tvb, &offset);
314 parse_DETH(all_headers_tree, tvb, &offset);
315 parse_RETH(all_headers_tree, tvb, &offset);
316 parse_IMMDT(all_headers_tree, tvb, &offset);
318 packetLength -= 4; /* RDETH */
319 packetLength -= 8; /* DETH */
320 packetLength -= 16; /* RETH */
321 packetLength -= 4; /* IMMDT */
323 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
325 case RDETH_DETH_RETH:
326 parse_RDETH(all_headers_tree, tvb, &offset);
327 parse_DETH(all_headers_tree, tvb, &offset);
328 parse_RETH(all_headers_tree, tvb, &offset);
330 packetLength -= 4; /* RDETH */
331 packetLength -= 8; /* DETH */
332 packetLength -= 16; /* RETH */
335 case RDETH_AETH_PAYLD:
336 parse_RDETH(all_headers_tree, tvb, &offset);
337 parse_AETH(all_headers_tree, tvb, &offset);
339 packetLength -= 4; /* RDETH */
340 packetLength -= 4; /* AETH */
342 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
345 parse_RDETH(all_headers_tree, tvb, &offset);
347 packetLength -= 4; /* RDETH */
349 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
352 parse_AETH(all_headers_tree, tvb, &offset);
354 packetLength -= 4; /* RDETH */
355 packetLength -= 4; /* AETH */
359 case RDETH_AETH_ATOMICACKETH:
360 parse_RDETH(all_headers_tree, tvb, &offset);
361 parse_AETH(all_headers_tree, tvb, &offset);
362 parse_ATOMICACKETH(all_headers_tree, tvb, &offset);
364 packetLength -= 4; /* RDETH */
365 packetLength -= 4; /* AETH */
366 packetLength -= 8; /* AtomicAckETH */
370 case RDETH_DETH_ATOMICETH:
371 parse_RDETH(all_headers_tree, tvb, &offset);
372 parse_DETH(all_headers_tree, tvb, &offset);
373 parse_ATOMICETH(all_headers_tree, tvb, &offset);
375 packetLength -= 4; /* RDETH */
376 packetLength -= 8; /* DETH */
377 packetLength -= 28; /* AtomicETH */
381 parse_RDETH(all_headers_tree, tvb, &offset);
382 parse_DETH(all_headers_tree, tvb, &offset);
384 packetLength -= 4; /* RDETH */
385 packetLength -= 8; /* DETH */
389 parse_DETH(all_headers_tree, tvb, &offset);
391 packetLength -= 8; /* DETH */
393 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
397 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
400 parse_IMMDT(all_headers_tree, tvb, &offset);
402 packetLength -= 4; /* IMMDT */
404 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
407 parse_RETH(all_headers_tree, tvb, &offset);
409 packetLength -= 16; /* RETH */
411 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
414 parse_RETH(all_headers_tree, tvb, &offset);
416 packetLength -= 16; /* RETH */
420 parse_AETH(all_headers_tree, tvb, &offset);
422 packetLength -= 4; /* AETH */
424 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
427 parse_AETH(all_headers_tree, tvb, &offset);
429 packetLength -= 4; /* AETH */
432 case AETH_ATOMICACKETH:
433 parse_AETH(all_headers_tree, tvb, &offset);
434 parse_ATOMICACKETH(all_headers_tree, tvb, &offset);
436 packetLength -= 4; /* AETH */
437 packetLength -= 8; /* AtomicAckETH */
441 parse_ATOMICETH(all_headers_tree, tvb, &offset);
443 packetLength -= 28; /* AtomicETH */
447 parse_IETH(all_headers_tree, tvb, &offset);
449 packetLength -= 4; /* IETH */
451 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
453 case DETH_IMMDT_PAYLD:
454 parse_DETH(all_headers_tree, tvb, &offset);
455 parse_IMMDT(all_headers_tree, tvb, &offset);
457 packetLength -= 8; /* DETH */
458 packetLength -= 4; /* IMMDT */
460 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
463 parse_VENDOR(all_headers_tree, tvb, &offset);
469 /* Display the ICRC/VCRC */
470 /* Doing it this way rather than in a variety of places according to the specific packet */
471 /* If we've already displayed it crc_length comes out 0 */
472 crc_length = tvb_reported_length_remaining(tvb, offset);
475 proto_tree_add_item(all_headers_tree, hf_infiniband_invariant_crc, tvb, offset, 4, FALSE); offset +=4;
476 proto_tree_add_item(all_headers_tree, hf_infiniband_variant_crc, tvb, offset, 2, FALSE); offset+=2;
478 else if(crc_length == 4)
480 proto_tree_add_item(all_headers_tree, hf_infiniband_invariant_crc, tvb, offset, 4, FALSE); offset +=4;
482 else if(crc_length == 2)
484 proto_tree_add_item(all_headers_tree, hf_infiniband_variant_crc, tvb, offset, 2, FALSE); offset+=2;
489 /* Description: Finds the header sequence that follows the Base Transport Header.
490 * Somwhat inefficient (should be using a single key,value pair data structure)
491 * But uses pure probablity to take a stab at better efficiency.
492 * Searches largest header sequence groups first, and then finally resorts to single matches for unique header sequences
493 * IN: OpCode: The OpCode from the Base Transport Header.
494 * OUT: The Header Sequence enumeration. See Declarations for #defines from (0-22) */
496 find_next_header_sequence(guint32 OpCode)
498 if(contains(OpCode, &opCode_PAYLD[0], (gint32)sizeof(opCode_PAYLD)))
501 if(contains(OpCode, &opCode_IMMDT_PAYLD[0], (gint32)sizeof(opCode_IMMDT_PAYLD)))
504 if(contains(OpCode, &opCode_RDETH_DETH_PAYLD[0], (gint32)sizeof(opCode_RDETH_DETH_PAYLD)))
505 return RDETH_DETH_PAYLD;
507 if(contains(OpCode, &opCode_RETH_PAYLD[0], (gint32)sizeof(opCode_RETH_PAYLD)))
510 if(contains(OpCode, &opCode_RDETH_AETH_PAYLD[0], (gint32)sizeof(opCode_RDETH_AETH_PAYLD)))
511 return RDETH_AETH_PAYLD;
513 if(contains(OpCode, &opCode_AETH_PAYLD[0], (gint32)sizeof(opCode_AETH_PAYLD)))
516 if(contains(OpCode, &opCode_RDETH_DETH_IMMDT_PAYLD[0], (gint32)sizeof(opCode_RDETH_DETH_IMMDT_PAYLD)))
517 return RDETH_DETH_IMMDT_PAYLD;
519 if(contains(OpCode, &opCode_RETH_IMMDT_PAYLD[0], (gint32)sizeof(opCode_RETH_IMMDT_PAYLD)))
520 return RETH_IMMDT_PAYLD;
522 if(contains(OpCode, &opCode_RDETH_DETH_RETH_PAYLD[0], (gint32)sizeof(opCode_RDETH_DETH_RETH_PAYLD)))
523 return RDETH_DETH_RETH_PAYLD;
525 if(contains(OpCode, &opCode_ATOMICETH[0], (gint32)sizeof(opCode_ATOMICETH)))
528 if(contains(OpCode, &opCode_IETH_PAYLD[0], (gint32)sizeof(opCode_IETH_PAYLD)))
531 if(contains(OpCode, &opCode_RDETH_DETH_ATOMICETH[0], (gint32)sizeof(opCode_RDETH_DETH_ATOMICETH)))
532 return RDETH_DETH_ATOMICETH;
534 if((OpCode ^ RC_ACKNOWLEDGE) == 0)
537 if((OpCode ^ RC_RDMA_READ_REQUEST) == 0)
540 if((OpCode ^ RC_ATOMIC_ACKNOWLEDGE) == 0)
541 return AETH_ATOMICACKETH;
543 if((OpCode ^ RD_RDMA_READ_RESPONSE_MIDDLE) == 0)
546 if((OpCode ^ RD_ACKNOWLEDGE) == 0)
549 if((OpCode ^ RD_ATOMIC_ACKNOWLEDGE) == 0)
550 return RDETH_AETH_ATOMICACKETH;
552 if((OpCode ^ RD_RDMA_WRITE_ONLY_IMM) == 0)
553 return RDETH_DETH_RETH_IMMDT_PAYLD;
555 if((OpCode ^ RD_RDMA_READ_REQUEST) == 0)
556 return RDETH_DETH_RETH;
558 if((OpCode ^ RD_RESYNC) == 0)
561 if((OpCode ^ UD_SEND_ONLY) == 0)
564 if((OpCode ^ UD_SEND_ONLY_IMM) == 0)
565 return DETH_IMMDT_PAYLD;
570 /* Description: Finds if a given value is present in an array. This is probably in a standard library somewhere,
571 * But I'd rather define my own.
572 * IN: OpCode: The OpCode you are looking for
573 * IN: Codes: The organized array of OpCodes to look through
574 * IN: Array length, because we're in C++...
575 * OUT: Boolean indicating if that OpCode was found in OpCodes */
577 contains(guint32 OpCode, guint32* Codes, gint32 length)
580 for(i = 0; i < length; i++)
582 if((OpCode ^ Codes[i]) == 0)
588 /* Parse RDETH - Reliable Datagram Extended Transport Header
589 * IN: parentTree to add the dissection to - in this code the all_headers_tree
590 * IN: tvb - the data buffer from wireshark
591 * IN/OUT: The current and updated offset */
593 parse_RDETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
595 gint local_offset = *offset;
596 /* RDETH - Reliable Datagram Extended Transport Header */
597 proto_tree *RDETH_header_tree = NULL;
598 proto_item *RDETH_header_item = NULL;
600 RDETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_RDETH, tvb, local_offset, 4, FALSE);
601 proto_item_set_text(RDETH_header_item, "%s", "RDETH - Reliable Datagram Extended Transport Header");
602 RDETH_header_tree = proto_item_add_subtree(RDETH_header_item, ett_rdeth);
604 proto_tree_add_item(RDETH_header_tree, hf_infiniband_reserved8_RDETH, tvb, local_offset, 1, FALSE); local_offset+=1;
605 proto_tree_add_item(RDETH_header_tree, hf_infiniband_ee_context, tvb, local_offset, 3, FALSE); local_offset+=3;
606 *offset = local_offset;
609 /* Parse DETH - Datagram Extended Transport Header
610 * IN: parentTree to add the dissection to - in this code the all_headers_tree
611 * IN: tvb - the data buffer from wireshark
612 * IN/OUT: The current and updated offset */
614 parse_DETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
616 gint local_offset = *offset;
617 /* DETH - Datagram Extended Transport Header */
618 proto_tree *DETH_header_tree = NULL;
619 proto_item *DETH_header_item = NULL;
621 DETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_DETH, tvb, local_offset, 8, FALSE);
622 proto_item_set_text(DETH_header_item, "%s", "DETH - Datagram Extended Transport Header");
623 DETH_header_tree = proto_item_add_subtree(DETH_header_item, ett_deth);
625 proto_tree_add_item(DETH_header_tree, hf_infiniband_queue_key, tvb, local_offset, 4, FALSE); local_offset+=4;
626 proto_tree_add_item(DETH_header_tree, hf_infiniband_reserved8_DETH, tvb, local_offset, 1, FALSE); local_offset+=1;
627 proto_tree_add_item(DETH_header_tree, hf_infiniband_source_qp, tvb, local_offset, 3, FALSE); local_offset+=3;
629 *offset = local_offset;
632 /* Parse RETH - RDMA Extended Transport Header
633 * IN: parentTree to add the dissection to - in this code the all_headers_tree
634 * IN: tvb - the data buffer from wireshark
635 * IN/OUT: The current and updated offset */
637 parse_RETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
639 gint local_offset = *offset;
640 /* RETH - RDMA Extended Transport Header */
641 proto_tree *RETH_header_tree = NULL;
642 proto_item *RETH_header_item = NULL;
644 RETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_RETH, tvb, local_offset, 16, FALSE);
645 proto_item_set_text(RETH_header_item, "%s", "RETH - RDMA Extended Transport Header");
646 RETH_header_tree = proto_item_add_subtree(RETH_header_item, ett_reth);
648 proto_tree_add_item(RETH_header_tree, hf_infiniband_virtual_address, tvb, local_offset, 8, FALSE); local_offset+=8;
649 proto_tree_add_item(RETH_header_tree, hf_infiniband_remote_key, tvb, local_offset, 4, FALSE); local_offset+=4;
650 proto_tree_add_item(RETH_header_tree, hf_infiniband_dma_length, tvb, local_offset, 4, FALSE); local_offset+=4;
652 *offset = local_offset;
655 /* Parse AtomicETH - Atomic Extended Transport Header
656 * IN: parentTree to add the dissection to - in this code the all_headers_tree
657 * IN: tvb - the data buffer from wireshark
658 * IN/OUT: The current and updated offset */
660 parse_ATOMICETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
662 gint local_offset = *offset;
663 /* AtomicETH - Atomic Extended Transport Header */
664 proto_tree *ATOMICETH_header_tree = NULL;
665 proto_item *ATOMICETH_header_item = NULL;
667 ATOMICETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_AtomicETH, tvb, local_offset, 28, FALSE);
668 proto_item_set_text(ATOMICETH_header_item, "%s", "AtomicETH - Atomic Extended Transport Header");
669 ATOMICETH_header_tree = proto_item_add_subtree(ATOMICETH_header_item, ett_atomiceth);
671 proto_tree_add_item(ATOMICETH_header_tree, hf_infiniband_virtual_address, tvb, local_offset, 8, FALSE); local_offset+=8;
672 proto_tree_add_item(ATOMICETH_header_tree, hf_infiniband_remote_key, tvb, local_offset, 4, FALSE); local_offset+=4;
673 proto_tree_add_item(ATOMICETH_header_tree, hf_infiniband_swap_or_add_data, tvb, local_offset, 8, FALSE); local_offset+=8;
674 proto_tree_add_item(ATOMICETH_header_tree, hf_infiniband_compare_data, tvb, local_offset, 8, FALSE); local_offset+=8;
675 *offset = local_offset;
678 /* Parse AETH - ACK Extended Transport Header
679 * IN: parentTree to add the dissection to - in this code the all_headers_tree
680 * IN: tvb - the data buffer from wireshark
681 * IN/OUT: The current and updated offset */
683 parse_AETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
685 gint local_offset = *offset;
686 /* AETH - ACK Extended Transport Header */
687 proto_tree *AETH_header_tree = NULL;
688 proto_item *AETH_header_item = NULL;
690 AETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_AETH, tvb, local_offset, 4, FALSE);
691 proto_item_set_text(AETH_header_item, "%s", "AETH - ACK Extended Transport Header");
692 AETH_header_tree = proto_item_add_subtree(AETH_header_item, ett_aeth);
694 proto_tree_add_item(AETH_header_tree, hf_infiniband_syndrome, tvb, local_offset, 1, FALSE); local_offset+=1;
695 proto_tree_add_item(AETH_header_tree, hf_infiniband_message_sequence_number, tvb, local_offset, 3, FALSE); local_offset+=3;
697 *offset = local_offset;
700 /* Parse AtomicAckEth - Atomic ACK Extended Transport Header
701 * IN: parentTree to add the dissection to - in this code the all_headers_tree
702 * IN: tvb - the data buffer from wireshark
703 * IN/OUT: The current and updated offset */
705 parse_ATOMICACKETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
707 gint local_offset = *offset;
708 /* AtomicAckEth - Atomic ACK Extended Transport Header */
709 proto_tree *ATOMICACKETH_header_tree = NULL;
710 proto_item *ATOMICACKETH_header_item = NULL;
712 ATOMICACKETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_AtomicAckETH, tvb, local_offset, 8, FALSE);
713 proto_item_set_text(ATOMICACKETH_header_item, "%s", "ATOMICACKETH - Atomic ACK Extended Transport Header");
714 ATOMICACKETH_header_tree = proto_item_add_subtree(ATOMICACKETH_header_item, ett_atomicacketh);
715 proto_tree_add_item(ATOMICACKETH_header_tree, hf_infiniband_original_remote_data, tvb, local_offset, 8, FALSE); local_offset+=8;
716 *offset = local_offset;
719 /* Parse IMMDT - Immediate Data Extended Transport Header
720 * IN: parentTree to add the dissection to - in this code the all_headers_tree
721 * IN: tvb - the data buffer from wireshark
722 * IN/OUT: The current and updated offset */
724 parse_IMMDT(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
726 gint local_offset = *offset;
727 /* IMMDT - Immediate Data Extended Transport Header */
728 proto_tree *IMMDT_header_tree = NULL;
729 proto_item *IMMDT_header_item = NULL;
731 IMMDT_header_item = proto_tree_add_item(parentTree, hf_infiniband_IMMDT, tvb, local_offset, 4, FALSE);
732 proto_item_set_text(IMMDT_header_item, "%s", "IMMDT - Immediate Data Extended Transport Header");
733 IMMDT_header_tree = proto_item_add_subtree(IMMDT_header_item, ett_immdt);
734 proto_tree_add_item(IMMDT_header_tree, hf_infiniband_IMMDT, tvb, local_offset, 4, FALSE); local_offset+=4;
735 *offset = local_offset;
738 /* Parse IETH - Invalidate Extended Transport Header
739 * IN: parentTree to add the dissection to - in this code the all_headers_tree
740 * IN: tvb - the data buffer from wireshark
741 * IN/OUT: The current and updated offset */
743 parse_IETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
745 gint local_offset = *offset;
746 /* IETH - Invalidate Extended Transport Header */
747 proto_tree *IETH_header_tree = NULL;
748 proto_item *IETH_header_item = NULL;
750 IETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_IETH, tvb, local_offset, 4, FALSE);
751 proto_item_set_text(IETH_header_item, "%s", "IETH - Invalidate Extended Transport Header");
752 IETH_header_tree = proto_item_add_subtree(IETH_header_item, ett_ieth);
754 proto_tree_add_item(IETH_header_tree, hf_infiniband_IETH, tvb, local_offset, 4, FALSE); local_offset+=4;
756 *offset = local_offset;
759 /* Parse Payload - Packet Payload / Invariant CRC / Variant CRC
760 * IN: parentTree to add the dissection to - in this code the all_headers_tree
761 * IN: pinfo - packet info from wireshark
762 * IN: tvb - the data buffer from wireshark
763 * IN/OUT: The current and updated offset
764 * IN: Length of Payload */
765 static void parse_PAYLOAD(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, gint *offset, gint length, guint8 virtualLane)
767 gint local_offset = *offset;
768 /* Payload - Packet Payload */
769 proto_tree *PAYLOAD_header_tree = NULL;
770 proto_item *PAYLOAD_header_item = NULL;
771 guint8 management_class;
772 tvbuff_t *volatile next_tvb;
773 gint captured_length, reported_length;
774 guint16 etype, reserved;
775 const char *saved_proto;
776 volatile gboolean dissector_found = FALSE;
778 if(!tvb_bytes_exist(tvb, *offset, length)) /* previously consumed bytes + offset was all the data - none or corrupt payload */
780 if (check_col(pinfo->cinfo, COL_INFO))
782 col_set_str(pinfo->cinfo, COL_INFO, "Invalid Packet Length from LRH! [Malformed Packet]");
783 col_set_fence(pinfo->cinfo, COL_INFO);
787 if(virtualLane == 0xF0)
789 management_class = tvb_get_guint8(tvb, (*offset) + 1);
791 if(((management_class >= (guint8)VENDOR_1_START) && (management_class <= (guint8)VENDOR_1_END))
792 || ((management_class >= (guint8)VENDOR_2_START) && (management_class <= (guint8)VENDOR_2_END)))
794 /* parse vendor specific */
795 parse_VENDOR_MANAGEMENT(parentTree, tvb, offset);
797 else if((management_class >= (guint8)APPLICATION_START) && (management_class <= (guint8)APPLICATION_END))
799 /* parse application specific */
800 parse_APPLICATION_MANAGEMENT(parentTree, tvb, offset);
802 else if(((management_class == (guint8)0x00) || (management_class == (guint8)0x02))
803 || ((management_class >= (guint8)0x50) && (management_class <= (guint8)0x80))
804 || ((management_class >= (guint8)0x82)))
806 /* parse reserved classes */
807 parse_RESERVED_MANAGEMENT(parentTree, tvb, offset);
809 else /* we have a normal management_class */
811 switch(management_class)
813 case SUBN_LID_ROUTED:
814 /* parse subn man lid routed */
815 parse_SUBN_LID_ROUTED(parentTree, pinfo, tvb, &local_offset);
817 case SUBN_DIRECTED_ROUTE:
818 /* parse subn directed route */
819 parse_SUBN_DIRECTED_ROUTE(parentTree, pinfo, tvb, &local_offset);
822 /* parse sub admin */
823 parse_SUBNADMN(parentTree, pinfo, tvb, &local_offset);
826 /* parse performance */
827 parse_PERF(parentTree, tvb, &local_offset);
830 /* parse baseboard mgmt */
831 parse_BM(parentTree, tvb, &local_offset);
834 /* parse device management */
835 parse_DEV_MGT(parentTree, tvb, &local_offset);
838 /* parse communication management */
839 parse_COM_MGT(parentTree, tvb, &local_offset);
842 /* parse snmp tunneling */
843 parse_SNMP(parentTree, tvb, &local_offset);
850 else /* Normal Data Packet - Parse as such */
853 /* Calculation for Payload:
854 * (tvb->length) Length of entire packet - (local_offset) Starting byte of Payload Data
855 * offset addition is more complex for the payload.
856 * We need the total length of the packet, - length of previous headers, + offset where payload started.
857 * We also need to reserve 6 bytes for the CRCs which are not actually part of the payload. */
859 /* IBA packet data could be anything in principle, however it is common
860 * practice to carry non-IBA data encapsulated with an EtherType header,
861 * similar to the RWH header. There is no way to identify these frames
864 * We see if the first few bytes look like an EtherType header, and if so
865 * call the appropriate dissector. If not we call the "data" dissector.
868 etype = tvb_get_ntohs(tvb, local_offset);
869 reserved = tvb_get_ntohs(tvb, local_offset + 2);
873 /* Get the captured length and reported length of the data
874 after the Ethernet type. */
875 captured_length = tvb_length_remaining(tvb, local_offset+4);
876 reported_length = tvb_reported_length_remaining(tvb,
879 next_tvb = tvb_new_subset(tvb, local_offset+4, captured_length,
882 pinfo->ethertype = etype;
884 /* Look for sub-dissector, and call it if found.
885 Catch exceptions, so that if the reported length of "next_tvb"
886 was reduced by some dissector before an exception was thrown,
887 we can still put in an item for the trailer. */
888 saved_proto = pinfo->current_proto;
890 dissector_found = dissector_try_port(ethertype_dissector_table,
891 etype, next_tvb, pinfo, top_tree);
894 /* Somebody threw BoundsError, which means that:
896 1) a dissector was found, so we don't need to
897 dissect the payload as data or update the
898 protocol or info columns;
900 2) dissecting the payload found that the packet was
901 cut off by a snapshot length before the end of
902 the payload. The trailer comes after the payload,
903 so *all* of the trailer is cut off, and we'll
904 just get another BoundsError if we add the trailer.
906 Therefore, we just rethrow the exception so it gets
907 reported; we don't dissect the trailer or do anything
911 CATCH(OutOfMemoryError) {
915 /* Somebody threw an exception other than BoundsError, which
916 means that a dissector was found, so we don't need to
917 dissect the payload as data or update the protocol or info
918 columns. We just show the exception and then drive on
919 to show the trailer, after noting that a dissector was
920 found and restoring the protocol value that was in effect
921 before we called the subdissector. */
922 show_exception(next_tvb, pinfo, top_tree, EXCEPT_CODE, GET_MESSAGE);
923 dissector_found = TRUE;
924 pinfo->current_proto = saved_proto;
928 if (dissector_found) {
929 /* now create payload entry to show Ethertype */
930 PAYLOAD_header_item = proto_tree_add_item(parentTree, hf_infiniband_payload, tvb, local_offset, tvb_reported_length_remaining(tvb, local_offset)-6, FALSE);
931 proto_item_set_text(PAYLOAD_header_item, "%s", "IBA Payload - appears to be EtherType encapsulated");
932 PAYLOAD_header_tree = proto_item_add_subtree(PAYLOAD_header_item, ett_payload);
933 proto_tree_add_uint(PAYLOAD_header_tree, hf_infiniband_etype, tvb,
934 local_offset, 2, tvb_get_ntohs(tvb, local_offset));
938 proto_tree_add_uint(PAYLOAD_header_tree, hf_infiniband_reserved16_RWH, tvb,
939 local_offset, 2, tvb_get_ntohs(tvb, local_offset));
945 if (!dissector_found) {
946 /* No sub-dissector found.
947 Label rest of packet as "Data" */
949 captured_length = tvb_length_remaining(tvb, local_offset);
950 reported_length = tvb_reported_length_remaining(tvb,
953 if (reported_length >= 6)
954 reported_length -= 6;
955 if (captured_length > reported_length)
956 captured_length = reported_length;
958 next_tvb = tvb_new_subset(tvb, local_offset,
962 call_dissector(data_handle, next_tvb, pinfo, top_tree);
967 /*parse_RWH(parentTree, tvb, &local_offset, pinfo);*/
969 /* Will contain ICRC and VCRC = 4+2 */
970 local_offset = tvb_reported_length(tvb) - 6;
973 *offset = local_offset;
976 /* Parse VENDOR - Parse a vendor specific or unknown header sequence
977 * IN: parentTree to add the dissection to - in this code the all_headers_tree
978 * IN: tvb - the data buffer from wireshark
979 * IN/OUT: The current and updated offset */
980 static void parse_VENDOR(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
982 gint local_offset = *offset;
983 proto_tree *VENDOR_header_tree = NULL;
984 proto_item *VENDOR_header_item = NULL;
986 VENDOR_header_item = proto_tree_add_item(parentTree, hf_infiniband_vendor, tvb, local_offset, 4, FALSE);
987 proto_item_set_text(VENDOR_header_item, "%s", "Vendor Specific or Unknown Header Sequence");
988 VENDOR_header_tree = proto_item_add_subtree(VENDOR_header_item, ett_vendor);
989 proto_tree_add_item(VENDOR_header_tree, hf_infiniband_vendor, tvb, local_offset, -1, FALSE);
990 *offset = local_offset;
993 /* Parse IPv6 - Parse an IPv6 Packet
994 * IN: parentTree to add the dissection to - in this code the all_headers_tree
995 * IN: tvb - the data buffer from wireshark
996 * IN/OUT: The current and updated offset
997 * IN: pinfo - packet info from wireshark */
998 static void parse_IPvSix(proto_tree *parentTree, tvbuff_t *tvb, gint *offset, packet_info *pinfo)
1002 /* (- 2) for VCRC which lives at the end of the packet */
1003 ipv6_tvb = tvb_new_subset(tvb, *offset,
1004 tvb_length_remaining(tvb, *offset) - 2,
1005 tvb_reported_length_remaining(tvb, *offset) - 2);
1006 call_dissector(ipv6_handle, ipv6_tvb, pinfo, parentTree);
1007 *offset = tvb_reported_length(tvb) - 2;
1009 /* Display the VCRC */
1010 proto_tree_add_item(parentTree, hf_infiniband_variant_crc, tvb, *offset, 2, FALSE);
1013 /* Parse EtherType - Parse a generic IP packaet with an EtherType of IP or ARP
1014 * IN: parentTree to add the dissection to - in this code the all_headers_tree
1015 * IN: tvb - the data buffer from wireshark
1016 * IN/OUT: The current and updated offset
1017 * IN: pinfo - packet info from wireshark */
1018 static void parse_RWH(proto_tree *ah_tree, tvbuff_t *tvb, gint *offset, packet_info *pinfo)
1023 /* RWH - Raw Header */
1024 proto_tree *RWH_header_tree = NULL;
1025 proto_item *RWH_header_item = NULL;
1027 gint captured_length, reported_length;
1029 RWH_header_item = proto_tree_add_item(ah_tree, hf_infiniband_RWH, tvb, *offset, 4, FALSE);
1030 proto_item_set_text(RWH_header_item, "%s", "RWH - Raw Header");
1031 RWH_header_tree = proto_item_add_subtree(RWH_header_item, ett_rwh);
1033 ether_type = tvb_get_ntohs(tvb, *offset);
1035 ether_type = ether_type & 0x0F; /* mask off reserved bits just in case. */
1037 proto_tree_add_uint(RWH_header_tree, hf_infiniband_etype, tvb, *offset, 2,
1041 proto_tree_add_item(RWH_header_tree, hf_infiniband_reserved16_RWH, tvb,
1046 /* Get the captured length and reported length of the data
1047 * after the Ethernet type. */
1048 captured_length = tvb_length_remaining(tvb, *offset);
1049 reported_length = tvb_reported_length_remaining(tvb, *offset);
1051 /* Construct a tvbuff for the payload after the Ethernet type,
1052 * not including the FCS. */
1053 if (captured_length >= 0 && reported_length >= 0) {
1054 if (reported_length >= 2)
1055 reported_length -= 2;
1056 if (captured_length > reported_length)
1057 captured_length = reported_length;
1060 next_tvb = tvb_new_subset(tvb, *offset, captured_length, reported_length);
1061 if (!dissector_try_port(ethertype_dissector_table, ether_type,
1062 next_tvb, pinfo, top_tree))
1063 call_dissector(data_handle, next_tvb, pinfo, top_tree);
1065 *offset = tvb_reported_length(tvb) - 2;
1066 /* Display the VCRC */
1067 proto_tree_add_item(ah_tree, hf_infiniband_variant_crc, tvb, *offset, 2, FALSE);
1070 /* Parse Subnet Management (LID Routed)
1071 * IN: parentTree to add the dissection to
1072 * IN: pinfo - packet info from wireshark
1073 * IN: tvb - the data buffer from wireshark
1074 * IN/OUT: The current and updated offset */
1075 static void parse_SUBN_LID_ROUTED(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, gint *offset)
1077 /* Parse the Common MAD Header */
1080 proto_tree *SUBN_LID_ROUTED_header_tree = NULL;
1081 proto_item *SUBN_LID_ROUTED_header_item = NULL;
1083 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
1085 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
1089 local_offset = *offset;
1091 /* local_offset - 24 here because when we come out of parse_MAD_Common, the offset it sitting at the data section. */
1092 SUBN_LID_ROUTED_header_item = proto_tree_add_item(parentTree, hf_infiniband_SMP_LID, tvb, local_offset - 24, 256, FALSE);
1093 proto_item_set_text(SUBN_LID_ROUTED_header_item, "%s", "SMP (LID Routed) ");
1094 SUBN_LID_ROUTED_header_tree = proto_item_add_subtree(SUBN_LID_ROUTED_header_item, ett_subn_lid_routed);
1095 proto_tree_add_item(SUBN_LID_ROUTED_header_tree, hf_infiniband_m_key, tvb, local_offset, 8, FALSE); local_offset +=8;
1096 proto_tree_add_item(SUBN_LID_ROUTED_header_tree, hf_infiniband_reserved256, tvb, local_offset, 32, FALSE); local_offset +=32;
1098 label_SUBM_Method(SUBN_LID_ROUTED_header_item, &MadData, pinfo);
1099 label_SUBM_Attribute(SUBN_LID_ROUTED_header_item, &MadData, pinfo);
1101 /* 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. */
1102 if(!parse_SUBM_Attribute(SUBN_LID_ROUTED_header_tree, tvb, &local_offset, &MadData))
1104 proto_tree_add_item(SUBN_LID_ROUTED_header_tree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE); local_offset +=64;
1107 proto_tree_add_item(SUBN_LID_ROUTED_header_tree, hf_infiniband_reserved1024, tvb, local_offset, 128, FALSE); local_offset +=128;
1108 *offset = local_offset;
1111 /* Parse Subnet Management (Directed Route)
1112 * IN: parentTree to add the dissection to
1113 * IN: tvb - the data buffer from wireshark
1114 * IN/OUT: The current and updated offset */
1115 static void parse_SUBN_DIRECTED_ROUTE(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, gint *offset)
1117 /* Parse the Common MAD Header */
1120 proto_tree *SUBN_DIRECTED_ROUTE_header_tree = NULL;
1121 proto_item *SUBN_DIRECTED_ROUTE_header_item = NULL;
1123 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
1125 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
1129 local_offset = *offset;
1131 /* local_offset - 24 here because when we come out of parse_MAD_Common, the offset it sitting at the data section.
1132 * We need to go backwards because this particular SMP uses the class specific portion of the Common MAD Header */
1133 SUBN_DIRECTED_ROUTE_header_item = proto_tree_add_item(parentTree, hf_infiniband_SMP_DIRECTED, tvb, local_offset - 24, 256, FALSE);
1134 proto_item_set_text(SUBN_DIRECTED_ROUTE_header_item, "%s", "SMP (Directed Route) ");
1135 SUBN_DIRECTED_ROUTE_header_tree = proto_item_add_subtree(SUBN_DIRECTED_ROUTE_header_item, ett_subn_directed_route);
1137 label_SUBM_Method(SUBN_DIRECTED_ROUTE_header_item, &MadData, pinfo);
1138 label_SUBM_Attribute(SUBN_DIRECTED_ROUTE_header_item, &MadData, pinfo);
1140 /* Place us at offset 4, the "D" Bit (Direction bit for Directed Route SMPs) */
1142 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_d, tvb, local_offset, 1, FALSE);
1143 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_smp_status, tvb, local_offset, 2, FALSE); local_offset +=2;
1144 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_hop_pointer, tvb, local_offset, 1, FALSE); local_offset +=1;
1145 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_hop_count, tvb, local_offset, 1, FALSE); local_offset +=1;
1146 local_offset += 16; /* Skip over the rest of the Common MAD Header... It's already dissected by parse_MAD_Common */
1147 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_m_key, tvb, local_offset, 8, FALSE); local_offset +=8;
1148 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_dr_slid, tvb, local_offset, 2, FALSE); local_offset +=2;
1149 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_dr_dlid, tvb, local_offset, 2, FALSE); local_offset +=2;
1150 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_reserved28, tvb, local_offset, 28, FALSE); local_offset +=28;
1152 /* 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. */
1153 if(!parse_SUBM_Attribute(SUBN_DIRECTED_ROUTE_header_tree, tvb, &local_offset, &MadData))
1155 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE); local_offset +=64;
1158 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_initial_path, tvb, local_offset, 64, FALSE); local_offset +=64;
1159 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_return_path, tvb, local_offset, 64, FALSE); local_offset +=64;
1160 *offset = local_offset;
1163 /* Parse Subnet Administration
1164 * IN: parentTree to add the dissection to
1165 * IN: pinfo - packet info from wireshark
1166 * IN: tvb - the data buffer from wireshark
1167 * IN/OUT: The current and updated offset */
1168 static void parse_SUBNADMN(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, gint *offset)
1170 /* Parse the Common MAD Header */
1173 proto_tree *SUBNADMN_header_tree = NULL;
1174 proto_item *SUBNADMN_header_item = NULL;
1176 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
1178 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
1181 if(!parse_RMPP(parentTree, tvb, offset))
1183 /* TODO: Mark Corrupt Packet */
1186 local_offset = *offset;
1188 SUBNADMN_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset - 36, 256, FALSE);
1189 proto_item_set_text(SUBNADMN_header_item, "%s", "SMA");
1190 SUBNADMN_header_tree = proto_item_add_subtree(SUBNADMN_header_item, ett_subnadmin);
1192 proto_tree_add_item(SUBNADMN_header_tree, hf_infiniband_sm_key, tvb, local_offset, 8, FALSE); local_offset+=8;
1193 proto_tree_add_item(SUBNADMN_header_tree, hf_infiniband_attribute_offset, tvb, local_offset, 2, FALSE); local_offset+=4;
1194 proto_tree_add_item(SUBNADMN_header_tree, hf_infiniband_reserved16, tvb, local_offset, 2, FALSE); local_offset+=4;
1195 proto_tree_add_item(SUBNADMN_header_tree, hf_infiniband_component_mask, tvb, local_offset, 8, FALSE); local_offset+=8;
1197 label_SUBA_Method(SUBNADMN_header_item, &MadData, pinfo);
1198 label_SUBA_Attribute(SUBNADMN_header_item, &MadData, pinfo);
1200 if(!parse_SUBA_Attribute(SUBNADMN_header_tree, tvb, &local_offset, &MadData))
1202 proto_tree_add_item(SUBNADMN_header_tree, hf_infiniband_subnet_admin_data, tvb, local_offset, 200, FALSE); local_offset+=200;
1204 *offset = local_offset;
1207 /* Parse Performance Management
1208 * IN: parentTree to add the dissection to
1209 * IN: tvb - the data buffer from wireshark
1210 * IN/OUT: The current and updated offset */
1211 static void parse_PERF(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
1213 /* Parse the Common MAD Header */
1216 proto_item *PERF_header_item = NULL;
1218 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
1220 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
1223 local_offset = *offset;
1224 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 256, FALSE); local_offset += 256;
1225 proto_item_set_text(PERF_header_item, "%s", "PERF - Performance Management MAD (Dissector Not Implemented)");
1226 *offset = local_offset;
1229 /* Parse Baseboard Management
1230 * IN: parentTree to add the dissection to
1231 * IN: tvb - the data buffer from wireshark
1232 * IN/OUT: The current and updated offset */
1233 static void parse_BM(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
1235 /* Parse the Common MAD Header */
1238 proto_item *PERF_header_item = NULL;
1240 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
1242 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
1245 local_offset = *offset;
1247 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 256, FALSE); local_offset += 256;
1248 proto_item_set_text(PERF_header_item, "%s", "BM - Baseboard Management MAD (Dissector Not Implemented)");
1249 *offset = local_offset;
1252 /* Parse Device Management
1253 * IN: parentTree to add the dissection to
1254 * IN: tvb - the data buffer from wireshark
1255 * IN/OUT: The current and updated offset */
1256 static void parse_DEV_MGT(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
1258 /* Parse the Common MAD Header */
1261 proto_item *PERF_header_item = NULL;
1263 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
1265 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
1268 local_offset = *offset;
1269 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 256, FALSE); local_offset += 256;
1270 proto_item_set_text(PERF_header_item, "%s", "DEV_MGT - Device Management MAD (Dissector Not Implemented)");
1271 *offset = local_offset;
1274 /* Parse Communications Management
1275 * IN: parentTree to add the dissection to
1276 * IN: tvb - the data buffer from wireshark
1277 * IN/OUT: The current and updated offset */
1278 static void parse_COM_MGT(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
1280 /* Parse the Common MAD Header */
1283 proto_item *PERF_header_item = NULL;
1285 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
1287 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
1290 local_offset = *offset;
1291 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 256, FALSE); local_offset += 256;
1292 proto_item_set_text(PERF_header_item, "%s", "COMM - Communication Management MAD (Dissector Not Implemented)");
1293 *offset = local_offset;
1296 /* Parse SNMP Tunneling
1297 * IN: parentTree to add the dissection to
1298 * IN: tvb - the data buffer from wireshark
1299 * IN/OUT: The current and updated offset */
1300 static void parse_SNMP(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
1302 /* Parse the Common MAD Header */
1305 proto_item *PERF_header_item = NULL;
1307 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
1309 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
1312 local_offset = *offset;
1314 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 256, FALSE); local_offset += 256;
1315 proto_item_set_text(PERF_header_item, "%s", "SNMP - SNMP Tunneling MAD (Dissector Not Implemented)");
1316 *offset = local_offset;
1319 /* Parse Vendor Specific Management Packets
1320 * IN: parentTree to add the dissection to
1321 * IN: tvb - the data buffer from wireshark
1322 * IN/OUT: The current and updated offset */
1323 static void parse_VENDOR_MANAGEMENT(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
1325 /* Parse the Common MAD Header */
1328 proto_item *PERF_header_item = NULL;
1330 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
1332 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
1335 local_offset = *offset;
1337 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 256, FALSE); local_offset += 256;
1338 proto_item_set_text(PERF_header_item, "%s", "VENDOR - Vendor Specific Management MAD (Dissector Not Implemented)");
1339 *offset = local_offset;
1342 /* Parse Application Specific Management Packets
1343 * IN: parentTree to add the dissection to
1344 * IN: tvb - the data buffer from wireshark
1345 * IN/OUT: The current and updated offset */
1346 static void parse_APPLICATION_MANAGEMENT(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
1348 /* Parse the Common MAD Header */
1351 proto_item *PERF_header_item = NULL;
1353 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
1355 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
1358 local_offset = *offset;
1359 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 256, FALSE); local_offset += 256;
1360 proto_item_set_text(PERF_header_item, "%s", "APP - Application Specific MAD (Dissector Not Implemented)");
1361 *offset = local_offset;
1364 /* Parse Reserved Management Packets.
1366 * This is an !ERROR CONDITION!
1367 * It means that the Management Class value used was defined as a reserved value for furture use.
1368 * This method is here since we will want to report this information directly to the UI without blowing up Wireshark.
1370 * IN: parentTree to add the dissection to
1371 * IN: tvb - the data buffer from wireshark
1372 * IN/OUT: The current and updated offset */
1373 static void parse_RESERVED_MANAGEMENT(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
1375 /* Parse the Common MAD Header */
1378 proto_item *PERF_header_item = NULL;
1380 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
1382 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
1385 local_offset = *offset;
1386 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 256, FALSE); local_offset += 256;
1387 proto_item_set_text(PERF_header_item, "%s", "RESERVED - Reserved MAD Type (Possible Device Error)");
1388 *offset = local_offset;
1391 /* Parse the common MAD Header
1392 * IN: parentTree to add the dissection to
1393 * IN: tvb - the data buffer from wireshark
1394 * IN/OUT: The current and updated offset
1395 * IN/OUT: MadData - the data from the MAD header */
1396 static gboolean parse_MAD_Common(proto_tree *parentTree, tvbuff_t *tvb, gint *offset, MAD_Data* MadData)
1398 gint local_offset = *offset;
1399 proto_tree *MAD_header_tree = NULL;
1400 proto_item *MAD_header_item = NULL;
1404 if(!tvb_bytes_exist(tvb, *offset, 256))
1407 /* Get the Management Class to decide between LID Routed and Direct Route */
1408 MadData->managementClass = tvb_get_guint8(tvb, local_offset + 1);
1409 MadData->classVersion = tvb_get_guint8(tvb, local_offset + 2);
1410 MadData->method = tvb_get_guint8(tvb, local_offset + 3);
1411 MadData->status = tvb_get_guint8(tvb, local_offset + 4);
1412 MadData->classSpecific = tvb_get_ntohs(tvb, local_offset + 6);
1413 MadData->transactionID = tvb_get_ntoh64(tvb, local_offset + 8);
1414 MadData->attributeID = tvb_get_ntohs(tvb, local_offset + 16);
1415 MadData->attributeModifier = tvb_get_ntohl(tvb, local_offset + 20);
1416 tvb_memcpy(tvb, MadData->data, local_offset + 24, 232);
1418 /* Populate the Dissector Tree */
1420 MAD_header_item = proto_tree_add_item(parentTree, hf_infiniband_MAD, tvb, local_offset, 256, FALSE);
1421 proto_item_set_text(MAD_header_item, "%s", "MAD Header - Common Management Datagram");
1422 MAD_header_tree = proto_item_add_subtree(MAD_header_item, ett_mad);
1424 proto_tree_add_item(MAD_header_tree, hf_infiniband_base_version, tvb, local_offset, 1, FALSE); local_offset+=1;
1425 proto_tree_add_item(MAD_header_tree, hf_infiniband_mgmt_class, tvb, local_offset, 1, FALSE); local_offset+=1;
1426 proto_tree_add_item(MAD_header_tree, hf_infiniband_class_version, tvb, local_offset, 1, FALSE); local_offset+=1;
1427 proto_tree_add_item(MAD_header_tree, hf_infiniband_method, tvb, local_offset, 1, FALSE); local_offset+=1;
1428 proto_tree_add_item(MAD_header_tree, hf_infiniband_status, tvb, local_offset, 2, FALSE); local_offset+=2;
1429 proto_tree_add_item(MAD_header_tree, hf_infiniband_class_specific, tvb, local_offset, 2, FALSE); local_offset+=2;
1430 proto_tree_add_item(MAD_header_tree, hf_infiniband_transaction_id, tvb, local_offset, 8, FALSE); local_offset+=8;
1431 proto_tree_add_item(MAD_header_tree, hf_infiniband_attribute_id, tvb, local_offset, 2, FALSE); local_offset+=2;
1432 proto_tree_add_item(MAD_header_tree, hf_infiniband_reserved16, tvb, local_offset, 2, FALSE); local_offset+=2;
1433 proto_tree_add_item(MAD_header_tree, hf_infiniband_attribute_modifier, tvb, local_offset, 4, FALSE); local_offset+=4;
1434 proto_tree_add_item(MAD_header_tree, hf_infiniband_data, tvb, local_offset, 232, FALSE); local_offset+=232;
1435 *offset = (local_offset - 232); /* Move the offset back to the start of the Data field - this will be where the other parsers start. */
1440 /* Parse the RMPP (Reliable Multi-Packet Transaction Protocol
1441 * IN: parentTree to add the dissection to
1442 * IN: tvb - the data buffer from wireshark
1443 * IN/OUT: The current and updated offset */
1444 static gboolean parse_RMPP(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
1446 gint local_offset = *offset;
1447 guint8 RMPP_Type = tvb_get_guint8(tvb, local_offset + 1);
1448 proto_tree *RMPP_header_tree = NULL;
1449 proto_item *RMPP_header_item = NULL;
1451 RMPP_header_item = proto_tree_add_item(parentTree, hf_infiniband_RMPP, tvb, local_offset, 12, FALSE);
1452 proto_item_set_text(RMPP_header_item, "%s", val_to_str(RMPP_Type, RMPP_Packet_Types, "Reserved RMPP Type! (0x%02x)"));
1453 RMPP_header_tree = proto_item_add_subtree(RMPP_header_item, ett_rmpp);
1455 proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_version, tvb, local_offset, 1, FALSE); local_offset+=1;
1456 proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_type, tvb, local_offset, 1, FALSE); local_offset+=1;
1457 proto_tree_add_item(RMPP_header_tree, hf_infiniband_r_resp_time, tvb, local_offset, 1, FALSE);
1458 proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_flags, tvb, local_offset, 1, FALSE); local_offset+=1;
1459 proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_status, tvb, local_offset, 1, FALSE); local_offset+=1;
1463 proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_data1, tvb, local_offset, 32, FALSE); local_offset+=32;
1464 proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_data2, tvb, local_offset, 32, FALSE); local_offset+=32;
1467 proto_tree_add_item(RMPP_header_tree, hf_infiniband_segment_number, tvb, local_offset, 4, FALSE); local_offset+=4;
1468 proto_tree_add_item(RMPP_header_tree, hf_infiniband_payload_length32, tvb, local_offset, 4, FALSE); local_offset+=4;
1469 proto_tree_add_item(RMPP_header_tree, hf_infiniband_transferred_data, tvb, local_offset, 220, FALSE);
1472 proto_tree_add_item(RMPP_header_tree, hf_infiniband_segment_number, tvb, local_offset, 4, FALSE); local_offset+=4;
1473 proto_tree_add_item(RMPP_header_tree, hf_infiniband_new_window_last, tvb, local_offset, 4, FALSE); local_offset+=4;
1474 proto_tree_add_item(RMPP_header_tree, hf_infiniband_reserved220, tvb, local_offset, 220, FALSE);
1478 proto_tree_add_item(RMPP_header_tree, hf_infiniband_reserved32, tvb, local_offset, 4, FALSE); local_offset+=4;
1479 proto_tree_add_item(RMPP_header_tree, hf_infiniband_reserved32, tvb, local_offset, 4, FALSE); local_offset+=4;
1480 proto_tree_add_item(RMPP_header_tree, hf_infiniband_optional_extended_error_data, tvb, local_offset, 220, FALSE);
1485 *offset = local_offset;
1489 /* Parse the Method from the MAD Common Header.
1490 * Simply used to generate the identifier.
1491 * IN: SubMItem - the item to append the method label to.
1492 * IN: MadHeader - the MadData structure that contains the information from the Common MAD header.
1493 * IN: pinfo - packet info from wireshark. */
1494 static void label_SUBM_Method(proto_item *SubMItem, MAD_Data *MadHeader, packet_info *pinfo)
1496 const char *label = val_to_str(MadHeader->method, SUBM_Methods, "(Unknown SubManagement Method!)");
1498 proto_item_append_text(SubMItem, "%s", label);
1499 col_append_str(pinfo->cinfo, COL_INFO, label);
1502 /* Parse the SA Method from the MAD Common Header.
1503 * Simply used to generate the identifier.
1504 * IN: SubAItem - the item to append the method label to.
1505 * IN: MadHeader - the MadData structure that contains the information from the Common MAD header.
1506 * IN: pinfo - packet info from wireshark. */
1507 static void label_SUBA_Method(proto_item *SubAItem, MAD_Data *MadHeader, packet_info *pinfo)
1509 const char *label = val_to_str(MadHeader->method, SUBA_Methods, "(Unknown SubAdministration Method!)");
1511 proto_item_append_text(SubAItem, "%s", label);
1512 col_append_str(pinfo->cinfo, COL_INFO, label);
1515 /* Parse the Attribute from the MAD Common Header
1516 * Simply used to generate the identifier.
1517 * IN: SubMItem - the item to append the Attribute label to.
1518 * IN: MadHeader - the MadData structure that contains the information from the Common MAD header.
1519 * IN: pinfo - packet info from wireshark. */
1520 static void label_SUBM_Attribute(proto_item *SubMItem, MAD_Data *MadHeader, packet_info *pinfo)
1522 const char *label = val_to_str(MadHeader->attributeID, SUBM_Attributes, "(Unknown SubManagement Attribute!)");
1524 proto_item_append_text(SubMItem, "%s", &label[11]);
1525 col_append_str(pinfo->cinfo, COL_INFO, &label[11]);
1528 /* Parse the SA Attribute from the MAD Common Header
1529 * Simply used to generate the identifier.
1530 * IN: SubAItem - the item to append the Attribute label to.
1531 * IN: MadHeader - the MadData structure that contains the information from the Common MAD header.
1532 * IN: pinfo - packet info from wireshark. */
1533 static void label_SUBA_Attribute(proto_item *SubAItem, MAD_Data *MadHeader, packet_info *pinfo)
1535 const char *label = val_to_str(MadHeader->attributeID, SUBA_Attributes, "(Unknown SubAdministration Attribute!)");
1537 proto_item_append_text(SubAItem, "%s", &label[11]);
1538 col_append_str(pinfo->cinfo, COL_INFO, &label[11]);
1541 /* Parse the attribute from a Subnet Management Packet.
1542 * IN: Parent Tree to add the item to in the dissection tree
1543 * IN: tvbuff, offset - the data and where it is.
1544 * IN: MAD_Data the data from the Common MAD Header that provides the information we need */
1545 static gboolean parse_SUBM_Attribute(proto_tree *parentTree, tvbuff_t *tvb, gint *offset, MAD_Data *MadHeader)
1547 guint16 attributeID = MadHeader->attributeID;
1548 proto_tree *SUBM_Attribute_header_tree = NULL;
1549 proto_item *SUBM_Attribute_header_item = NULL;
1551 SUBM_Attribute_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, *offset, 64, FALSE);
1552 proto_item_set_text(SUBM_Attribute_header_item, "%s", val_to_str(attributeID, SUBM_Attributes, "Unknown Attribute Type! (0x%02x)"));
1553 SUBM_Attribute_header_tree = proto_item_add_subtree(SUBM_Attribute_header_item, ett_subm_attribute);
1559 parse_NoticesAndTraps(SUBM_Attribute_header_tree , tvb, offset);
1562 parse_NodeDescription(SUBM_Attribute_header_tree , tvb, offset);
1565 parse_NodeInfo(SUBM_Attribute_header_tree , tvb, offset);
1568 parse_SwitchInfo(SUBM_Attribute_header_tree , tvb, offset);
1571 parse_GUIDInfo(SUBM_Attribute_header_tree , tvb, offset);
1574 parse_PortInfo(SUBM_Attribute_header_tree , tvb, offset);
1577 parse_P_KeyTable(SUBM_Attribute_header_tree , tvb, offset);
1580 parse_SLtoVLMappingTable(SUBM_Attribute_header_tree , tvb, offset);
1583 parse_VLArbitrationTable(SUBM_Attribute_header_tree , tvb, offset);
1586 parse_LinearForwardingTable(SUBM_Attribute_header_tree , tvb, offset);
1589 parse_RandomForwardingTable(SUBM_Attribute_header_tree , tvb, offset);
1592 parse_MulticastForwardingTable(SUBM_Attribute_header_tree , tvb, offset);
1595 parse_SMInfo(SUBM_Attribute_header_tree , tvb, offset);
1598 parse_VendorDiag(SUBM_Attribute_header_tree , tvb, offset);
1601 parse_LedInfo(SUBM_Attribute_header_tree , tvb, offset);
1604 parse_LinkSpeedWidthPairsTable(SUBM_Attribute_header_tree , tvb, offset);
1615 /* Parse the attribute from a Subnet Administration Packet.
1616 * IN: Parent Tree to add the item to in the dissection tree
1617 * IN: tvbuff, offset - the data and where it is.
1618 * IN: MAD_Data the data from the Common MAD Header that provides the information we need */
1619 static gboolean parse_SUBA_Attribute(proto_tree *parentTree, tvbuff_t *tvb, gint *offset, MAD_Data *MadHeader)
1621 guint16 attributeID = MadHeader->attributeID;
1622 proto_tree *SUBA_Attribute_header_tree = NULL;
1623 proto_item *SUBA_Attribute_header_item = NULL;
1625 SUBA_Attribute_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, *offset, 200, FALSE);
1626 proto_item_set_text(SUBA_Attribute_header_item, "%s", val_to_str(attributeID, SUBA_Attributes, "Unknown Attribute Type! (0x%02x)"));
1627 SUBA_Attribute_header_tree = proto_item_add_subtree(SUBA_Attribute_header_item, ett_suba_attribute);
1629 /* Skim off the RID fields should they be present */
1630 parse_RID(SUBA_Attribute_header_tree, tvb, offset, MadHeader);
1632 /* Parse the rest of the attributes */
1633 switch(MadHeader->attributeID)
1635 case 0x0001: /* (ClassPortInfo) */
1636 parse_PortInfo(SUBA_Attribute_header_tree, tvb, offset);
1638 case 0x0002: /* (Notice) */
1639 parse_NoticesAndTraps(SUBA_Attribute_header_tree, tvb, offset);
1641 case 0x0003: /* (InformInfo) */
1642 parse_InformInfo(SUBA_Attribute_header_tree, tvb, offset);
1644 case 0x0011: /* (NodeRecord) */
1645 parse_NodeInfo(SUBA_Attribute_header_tree, tvb, offset);
1647 parse_NodeDescription(SUBA_Attribute_header_tree, tvb, offset);
1649 case 0x0012: /* (PortInfoRecord) */
1650 parse_PortInfo(SUBA_Attribute_header_tree, tvb, offset);
1652 case 0x0013: /* (SLtoVLMappingTableRecord) */
1653 parse_SLtoVLMappingTable(SUBA_Attribute_header_tree, tvb, offset);
1655 case 0x0014: /* (SwitchInfoRecord) */
1656 parse_SwitchInfo(SUBA_Attribute_header_tree, tvb, offset);
1658 case 0x0015: /*(LinearForwardingTableRecord) */
1659 parse_LinearForwardingTable(SUBA_Attribute_header_tree, tvb, offset);
1661 case 0x0016: /* (RandomForwardingTableRecord) */
1662 parse_RandomForwardingTable(SUBA_Attribute_header_tree, tvb, offset);
1664 case 0x0017: /* (MulticastForwardingTableRecord) */
1665 parse_MulticastForwardingTable(SUBA_Attribute_header_tree, tvb, offset);
1667 case 0x0018: /* (SMInfoRecord) */
1668 parse_SMInfo(SUBA_Attribute_header_tree, tvb, offset);
1670 case 0x0019: /* (LinkSpeedWidthPairsTableRecord) */
1671 parse_LinkSpeedWidthPairsTable(SUBA_Attribute_header_tree, tvb, offset);
1673 case 0x00F3: /*(InformInfoRecord) */
1674 parse_InformInfo(SUBA_Attribute_header_tree, tvb, offset);
1676 case 0x0020: /* (LinkRecord) */
1677 parse_LinkRecord(SUBA_Attribute_header_tree, tvb, offset);
1679 case 0x0030: /* (GuidInforecord) */
1680 parse_GUIDInfo(SUBA_Attribute_header_tree, tvb, offset);
1682 case 0x0031: /*(ServiceRecord) */
1683 parse_ServiceRecord(SUBA_Attribute_header_tree, tvb, offset);
1685 case 0x0033: /* (P_KeyTableRecord) */
1686 parse_P_KeyTable(SUBA_Attribute_header_tree, tvb, offset);
1688 case 0x0035: /* (PathRecord) */
1689 parse_PathRecord(SUBA_Attribute_header_tree, tvb, offset);
1691 case 0x0036: /* (VLArbitrationTableRecord) */
1692 parse_VLArbitrationTable(SUBA_Attribute_header_tree, tvb, offset);
1694 case 0x0038: /* (MCMemberRecord) */
1695 parse_MCMemberRecord(SUBA_Attribute_header_tree, tvb, offset);
1697 case 0x0039: /* (TraceRecord) */
1698 parse_TraceRecord(SUBA_Attribute_header_tree, tvb, offset);
1700 case 0x003A: /* (MultiPathRecord) */
1701 parse_MultiPathRecord(SUBA_Attribute_header_tree, tvb, offset);
1703 case 0x003B: /* (ServiceAssociationRecord) */
1704 parse_ServiceAssociationRecord(SUBA_Attribute_header_tree, tvb, offset);
1706 default: /* (Unknown SubAdministration Attribute!) */
1707 /* We've already labeled as unknown in item construction */
1715 /* Subnet Management Attribute Parsing Methods.
1716 * Also Parsing for Attributes common to both SM/SA.
1717 * The Subnet Admin Parsing methods will call some of these methods when an attribute is present within an SA MAD
1721 /* Parse NoticeDataDetails Attribute Field
1722 * IN: parentTree - The tree to add the dissection to
1723 * tvb - The tvbbuff of packet data
1724 * offset - The offset in TVB where the attribute begins
1725 * trapNumber - The Trap ID of the Trap Data being Dissected */
1727 static void parse_NoticeDataDetails(proto_tree* parentTree, tvbuff_t* tvb, gint *offset, guint16 trapNumber)
1729 gint local_offset = *offset;
1730 proto_tree *DataDetails_header_tree = NULL;
1731 proto_item *DataDetails_header_item = NULL;
1736 DataDetails_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 54, FALSE);
1737 DataDetails_header_tree = proto_item_add_subtree(DataDetails_header_item, ett_datadetails);
1743 proto_item_set_text(DataDetails_header_item, "%s", "Trap 64 DataDetails");
1745 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR, tvb, local_offset, 16, FALSE); local_offset+=16;
1748 proto_item_set_text(DataDetails_header_item, "%s", "Trap 65 DataDetails");
1750 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR, tvb, local_offset, 16, FALSE); local_offset+=16;
1753 proto_item_set_text(DataDetails_header_item, "%s", "Trap 66 DataDetails");
1755 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR, tvb, local_offset, 16, FALSE); local_offset+=16;
1758 proto_item_set_text(DataDetails_header_item, "%s", "Trap 67 DataDetails");
1760 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR, tvb, local_offset, 16, FALSE); local_offset+=16;
1763 proto_item_set_text(DataDetails_header_item, "%s", "Trap 68 DataDetails");
1764 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_COMP_MASK, tvb, local_offset, 8, FALSE); local_offset+=8;
1765 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_WAIT_FOR_REPATH, tvb, local_offset, 1, FALSE);
1768 proto_item_set_text(DataDetails_header_item, "%s", "Trap 69 DataDetails");
1769 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_COMP_MASK, tvb, local_offset, 8, FALSE); local_offset+=8;
1770 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_WAIT_FOR_REPATH, tvb, local_offset, 1, FALSE);
1773 proto_item_set_text(DataDetails_header_item, "%s", "Trap 128 DataDetails");
1774 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
1777 proto_item_set_text(DataDetails_header_item, "%s", "Trap 129 DataDetails");
1779 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
1780 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_PORTNO, tvb, local_offset, 1, FALSE); local_offset+=1;
1783 proto_item_set_text(DataDetails_header_item, "%s", "Trap 130 DataDetails");
1785 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
1786 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_PORTNO, tvb, local_offset, 1, FALSE); local_offset+=1;
1789 proto_item_set_text(DataDetails_header_item, "%s", "Trap 131 DataDetails");
1791 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
1792 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_PORTNO, tvb, local_offset, 1, FALSE); local_offset+=1;
1795 proto_item_set_text(DataDetails_header_item, "%s", "Trap 144 DataDetails");
1797 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
1799 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_OtherLocalChanges, tvb, local_offset, 1, FALSE); local_offset+=1;
1800 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_CAPABILITYMASK, tvb, local_offset, 4, FALSE); local_offset+=4;
1802 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LinkSpeecEnabledChange, tvb, local_offset, 1, FALSE);
1803 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LinkWidthEnabledChange, tvb, local_offset, 1, FALSE);
1804 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_NodeDescriptionChange, tvb, local_offset, 1, FALSE);
1807 proto_item_set_text(DataDetails_header_item, "%s", "Trap 145 DataDetails");
1809 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
1811 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_SYSTEMIMAGEGUID, tvb, local_offset, 8, FALSE); local_offset+=8;
1814 proto_item_set_text(DataDetails_header_item, "%s", "Trap 256 DataDetails");
1816 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
1817 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DRSLID, tvb, local_offset, 2, FALSE); local_offset+=2;
1818 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_METHOD, tvb, local_offset, 1, FALSE); local_offset+=1;
1820 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_ATTRIBUTEID, tvb, local_offset, 2, FALSE); local_offset+=2;
1821 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_ATTRIBUTEMODIFIER, tvb, local_offset, 4, FALSE); local_offset+=4;
1822 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_MKEY, tvb, local_offset, 8, FALSE); local_offset+=8;
1824 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DRNotice, tvb, local_offset, 1, FALSE);
1825 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DRPathTruncated, tvb, local_offset, 1, FALSE);
1826 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DRHopCount, tvb, local_offset, 1, FALSE); local_offset+=1;
1827 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DRNoticeReturnPath, tvb, local_offset, 30, FALSE); local_offset+=30;
1830 proto_item_set_text(DataDetails_header_item, "%s", "Trap 257 DataDetails");
1832 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR1, tvb, local_offset, 2, FALSE); local_offset+=2;
1833 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR2, tvb, local_offset, 2, FALSE); local_offset+=2;
1834 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_KEY, tvb, local_offset, 4, FALSE); local_offset+=4;
1835 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_SL, tvb, local_offset, 1, FALSE); local_offset+=1;
1836 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP1, tvb, local_offset, 3, FALSE); local_offset+=3;
1838 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP2, tvb, local_offset, 3, FALSE); local_offset+=3;
1839 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR1, tvb, local_offset, 16, FALSE); local_offset+=16;
1840 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR2, tvb, local_offset, 16, FALSE); local_offset+=16;
1843 proto_item_set_text(DataDetails_header_item, "%s", "Trap 258 DataDetails");
1845 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR1, tvb, local_offset, 2, FALSE); local_offset+=2;
1846 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR2, tvb, local_offset, 2, FALSE); local_offset+=2;
1847 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_KEY, tvb, local_offset, 4, FALSE); local_offset+=4;
1848 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_SL, tvb, local_offset, 1, FALSE); local_offset +=1;
1849 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP1, tvb, local_offset, 3, FALSE); local_offset+=3;
1851 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP2, tvb, local_offset, 3, FALSE); local_offset+=3;
1852 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR1, tvb, local_offset, 16, FALSE); local_offset+=16;
1853 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR2, tvb, local_offset, 16, FALSE); local_offset+=16;
1856 proto_item_set_text(DataDetails_header_item, "%s", "Trap 259 DataDetails");
1857 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DataValid, tvb, local_offset, 2, FALSE); local_offset+=2;
1858 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR1, tvb, local_offset, 2, FALSE); local_offset+=2;
1859 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR2, tvb, local_offset, 2, FALSE); local_offset+=2;
1860 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_PKEY, tvb, local_offset, 2, FALSE); local_offset+=2;
1861 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_SL, tvb, local_offset, 1, FALSE); local_offset+=1;
1862 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP1, tvb, local_offset, 3, FALSE); local_offset+=3;
1864 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP2, tvb, local_offset, 3, FALSE); local_offset+=3;
1865 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR1, tvb, local_offset, 16, FALSE); local_offset+=16;
1866 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR2, tvb, local_offset, 16, FALSE); local_offset+=16;
1867 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_SWLIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
1868 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_PORTNO, tvb, local_offset, 1, FALSE); local_offset+=1;
1871 proto_item_set_text(DataDetails_header_item, "%s", "Vendor Specific Subnet Management Trap"); local_offset +=54;
1877 /* Parse NoticesAndTraps Attribute
1878 * IN: parentTree - The tree to add the dissection to
1879 * tvb - The tvbbuff of packet data
1880 * offset - The offset in TVB where the attribute begins
1881 * MadHeader - The common MAD header of the current SMP/SMA */
1882 static void parse_NoticesAndTraps(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
1884 gint local_offset = *offset;
1885 proto_tree *NoticesAndTraps_header_tree = NULL;
1886 proto_item *NoticesAndTraps_header_item = NULL;
1887 guint16 trapNumber = tvb_get_ntohs(tvb, local_offset + 4);
1892 NoticesAndTraps_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
1893 proto_item_set_text(NoticesAndTraps_header_item, "%s", val_to_str(trapNumber, Trap_Description, "Unknown or Vendor Specific Trap Number! (0x%02x)"));
1894 NoticesAndTraps_header_tree = proto_item_add_subtree(NoticesAndTraps_header_item, ett_noticestraps);
1896 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_IsGeneric, tvb, local_offset, 1, FALSE);
1897 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_Type, tvb, local_offset, 1, FALSE); local_offset+=1;
1898 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_ProducerTypeVendorID, tvb, local_offset, 3, FALSE); local_offset+=3;
1899 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_TrapNumberDeviceID, tvb, local_offset, 2, FALSE); local_offset+=2;
1900 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_IssuerLID, tvb, local_offset, 2, FALSE); local_offset+=2;
1901 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_NoticeToggle, tvb, local_offset, 1, FALSE);
1902 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_NoticeCount, tvb, local_offset, 2, FALSE); local_offset+=2;
1904 parse_NoticeDataDetails(NoticesAndTraps_header_tree, tvb, &local_offset, trapNumber);
1905 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_DataDetails, tvb, local_offset, 54, FALSE); local_offset+=54;
1907 /* Only Defined For GMPs not SMPs which is not part of this dissector phase
1908 *proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_IssuerGID, tvb, local_offset, 16, FALSE); local_offset+=16;
1909 *proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_ClassTrapSpecificData, tvb, local_offset, 1, FALSE); local_offset+=1; */
1913 /* Parse NodeDescription Attribute
1914 * IN: parentTree - The tree to add the dissection to
1915 * tvb - The tvbbuff of packet data
1916 * offset - The offset in TVB where the attribute begins
1917 * MadHeader - The common MAD header of the current SMP/SMA */
1918 static void parse_NodeDescription(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
1920 gint local_offset = *offset;
1921 proto_tree *NodeDescription_header_tree = NULL;
1926 NodeDescription_header_tree = parentTree;
1927 proto_tree_add_item(NodeDescription_header_tree, hf_infiniband_NodeDescription_NodeString, tvb, local_offset, 64, FALSE);
1930 /* Parse NodeInfo Attribute
1931 * IN: parentTree - The tree to add the dissection to
1932 * tvb - The tvbbuff of packet data
1933 * offset - The offset in TVB where the attribute begins
1934 * MadHeader - The common MAD header of the current SMP/SMA */
1935 static void parse_NodeInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
1937 gint local_offset = *offset;
1938 proto_tree *NodeInfo_header_tree = NULL;
1943 NodeInfo_header_tree = parentTree;
1945 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_BaseVersion, tvb, local_offset, 1, FALSE); local_offset +=1;
1946 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_ClassVersion, tvb, local_offset, 1, FALSE); local_offset +=1;
1947 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_NodeType, tvb, local_offset, 1, FALSE); local_offset +=1;
1948 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_NumPorts, tvb, local_offset, 1, FALSE); local_offset +=1;
1949 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_SystemImageGUID, tvb, local_offset, 8, FALSE); local_offset +=8;
1950 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_NodeGUID, tvb, local_offset, 8, FALSE); local_offset +=8;
1951 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_PortGUID, tvb, local_offset, 8, FALSE); local_offset +=8;
1952 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_PartitionCap, tvb, local_offset, 2, FALSE); local_offset +=2;
1953 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_DeviceID, tvb, local_offset, 2, FALSE); local_offset +=2;
1954 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_Revision, tvb, local_offset, 4, FALSE); local_offset +=4;
1955 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_LocalPortNum, tvb, local_offset, 1, FALSE); local_offset +=1;
1956 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_VendorID, tvb, local_offset, 3, FALSE); local_offset +=3;
1960 /* Parse SwitchInfo Attribute
1961 * IN: parentTree - The tree to add the dissection to
1962 * tvb - The tvbbuff of packet data
1963 * offset - The offset in TVB where the attribute begins
1964 * MadHeader - The common MAD header of the current SMP/SMA */
1965 static void parse_SwitchInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
1967 gint local_offset = *offset;
1968 proto_tree *SwitchInfo_header_tree = NULL;
1973 SwitchInfo_header_tree = parentTree;
1975 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_LinearFDBCap, tvb, local_offset, 2, FALSE); local_offset +=2;
1976 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_RandomFDBCap, tvb, local_offset, 2, FALSE); local_offset +=2;
1977 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_MulticastFDBCap, tvb, local_offset, 2, FALSE); local_offset +=2;
1978 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_LinearFDBTop, tvb, local_offset, 2, FALSE); local_offset +=2;
1979 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_DefaultPort, tvb, local_offset, 1, FALSE); local_offset +=1;
1980 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_DefaultMulticastPrimaryPort, tvb, local_offset, 1, FALSE); local_offset +=1;
1981 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_DefaultMulticastNotPrimaryPort, tvb, local_offset, 1, FALSE); local_offset +=1;
1982 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_LifeTimeValue, tvb, local_offset, 1, FALSE);
1983 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_PortStateChange, tvb, local_offset, 1, FALSE);
1984 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_OptimizedSLtoVLMappingProgramming, tvb, local_offset, 1, FALSE); local_offset +=1;
1985 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_LIDsPerPort, tvb, local_offset, 2, FALSE); local_offset +=2;
1986 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_PartitionEnforcementCap, tvb, local_offset, 2, FALSE); local_offset +=2;
1987 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_InboundEnforcementCap, tvb, local_offset, 1, FALSE);
1988 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_OutboundEnforcementCap, tvb, local_offset, 1, FALSE);
1989 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_FilterRawInboundCap, tvb, local_offset, 1, FALSE);
1990 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_FilterRawOutboundCap, tvb, local_offset, 1, FALSE);
1991 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_EnhancedPortZero, tvb, local_offset, 1, FALSE); local_offset +=1;
1994 /* Parse GUIDInfo Attribute
1995 * IN: parentTree - The tree to add the dissection to
1996 * tvb - The tvbbuff of packet data
1997 * offset - The offset in TVB where the attribute begins
1998 * MadHeader - The common MAD header of the current SMP/SMA */
1999 static void parse_GUIDInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2001 gint local_offset = *offset;
2002 proto_tree *GUIDInfo_header_tree = NULL;
2003 proto_item *tempItemLow = NULL;
2009 GUIDInfo_header_tree = parentTree;
2011 for(i = 0; i < 8; i++)
2013 proto_tree_add_item(GUIDInfo_header_tree, hf_infiniband_GUIDInfo_GUID, tvb, local_offset, 8, FALSE); local_offset +=8;
2014 proto_item_append_text(tempItemLow, "(%u)", i);
2019 /* Parse PortInfo Attribute
2020 * IN: parentTree - The tree to add the dissection to
2021 * tvb - The tvbbuff of packet data
2022 * offset - The offset in TVB where the attribute begins
2023 * MadHeader - The common MAD header of the current SMP/SMA */
2024 static void parse_PortInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2026 gint local_offset = *offset;
2027 proto_tree *PortInfo_header_tree = NULL;
2028 proto_tree *PortInfo_CapabilityMask_tree = NULL;
2029 proto_item *PortInfo_CapabilityMask_item = NULL;
2030 proto_item *temp_item = NULL;
2031 guint16 temp_val = 0;
2036 PortInfo_header_tree = parentTree;
2038 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_M_Key, tvb, local_offset, 8, FALSE); local_offset +=8;
2039 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_GidPrefix, tvb, local_offset, 8, FALSE); local_offset +=8;
2040 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LID, tvb, local_offset, 2, FALSE); local_offset +=2;
2041 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_MasterSMLID, tvb, local_offset, 2, FALSE); local_offset +=2;
2043 /* Capability Mask Flags */
2044 PortInfo_CapabilityMask_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_CapabilityMask, tvb, local_offset, 4, FALSE);
2045 PortInfo_CapabilityMask_tree = proto_item_add_subtree(PortInfo_CapabilityMask_item, ett_portinfo_capmask);
2047 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_SM, tvb, local_offset, 4, FALSE);
2048 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_NoticeSupported, tvb, local_offset, 4, FALSE);
2049 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_TrapSupported, tvb, local_offset, 4, FALSE);
2050 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_OptionalPDSupported, tvb, local_offset, 4, FALSE);
2051 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_AutomaticMigrationSupported, tvb, local_offset, 4, FALSE);
2052 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_SLMappingSupported, tvb, local_offset, 4, FALSE);
2053 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_MKeyNVRAM, tvb, local_offset, 4, FALSE);
2054 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_PKeyNVRAM, tvb, local_offset, 4, FALSE);
2055 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_LEDInfoSupported, tvb, local_offset, 4, FALSE);
2056 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_SMdisabled, tvb, local_offset, 4, FALSE);
2057 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_SystemImageGUIDSupported, tvb, local_offset, 4, FALSE);
2058 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_PKeySwitchExternalPortTrapSupported, tvb, local_offset, 4, FALSE);
2059 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_CommunicationsManagementSupported, tvb, local_offset, 4, FALSE);
2060 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_SNMPTunnelingSupported, tvb, local_offset, 4, FALSE);
2061 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_ReinitSupported, tvb, local_offset, 4, FALSE);
2062 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_DeviceManagementSupported, tvb, local_offset, 4, FALSE);
2063 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_VendorClassSupported, tvb, local_offset, 4, FALSE);
2064 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_DRNoticeSupported, tvb, local_offset, 4, FALSE);
2065 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_CapabilityMaskNoticeSupported, tvb, local_offset, 4, FALSE);
2066 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_BootManagementSupported, tvb, local_offset, 4, FALSE);
2067 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_LinkRoundTripLatencySupported, tvb, local_offset, 4, FALSE);
2068 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_ClientRegistrationSupported, tvb, local_offset, 4, FALSE);
2069 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_OtherLocalChangesNoticeSupported, tvb, local_offset, 4, FALSE);
2070 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_LinkSpeedWIdthPairsTableSupported, tvb, local_offset, 4, FALSE);
2072 /* End Capability Mask Flags */
2075 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_DiagCode, tvb, local_offset, 2, FALSE);
2076 temp_val = tvb_get_ntohs(tvb, local_offset);
2078 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, DiagCode, "Reserved DiagCode! Possible Error"));
2082 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_M_KeyLeasePeriod, tvb, local_offset, 2, FALSE); local_offset +=2;
2083 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LocalPortNum, tvb, local_offset, 1, FALSE); local_offset +=1;
2085 /* LinkWidthEnabled */
2086 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkWidthEnabled, tvb, local_offset, 1, FALSE);
2087 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2089 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, LinkWidthEnabled, "Reserved LinkWidthEnabled Value! Possible Error"));
2091 /* End LinkWidthEnabled */
2093 /* LinkWidthSupported */
2094 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkWidthSupported, tvb, local_offset, 1, FALSE);
2095 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2097 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, LinkWidthSupported, "Reserved LinkWidthSupported Value! Possible Error"));
2099 /* End LinkWidthSupported */
2101 /* LinkWidthActive */
2102 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkWidthActive, tvb, local_offset, 1, FALSE);
2103 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2105 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, LinkWidthActive, "Reserved LinkWidthActive Value! Possible Error"));
2107 /* End LinkWidthActive */
2109 /* LinkSpeedSupported */
2110 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkSpeedSupported, tvb, local_offset, 1, FALSE);
2111 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2113 /* 4 bit values = mask and shift */
2114 temp_val = temp_val & 0x00F0;
2115 temp_val = temp_val >> 4;
2117 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, LinkSpeedSupported, "Reserved LinkWidthSupported Value! Possible Error"));
2118 /* End LinkSpeedSupported */
2121 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_PortState, tvb, local_offset, 1, FALSE);
2122 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2124 /* 4 bit values = mask and shift */
2125 temp_val = temp_val & 0x000F;
2126 /*temp_val = temp_val >> 4 */
2128 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, PortState, "Reserved PortState Value! Possible Error"));
2132 /* PortPhysicalState */
2133 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_PortPhysicalState, tvb, local_offset, 1, FALSE);
2134 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2136 /* 4 bit values = mask and shift */
2137 temp_val = temp_val & 0x00F0;
2138 temp_val = temp_val >> 4;
2140 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, PortPhysicalState, "Reserved PortPhysicalState Value! Possible Error"));
2141 /* End PortPhysicalState */
2143 /* LinkDownDefaultState */
2144 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkDownDefaultState, tvb, local_offset, 1, FALSE);
2145 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2147 /* 4 bit values = mask and shift */
2148 temp_val = temp_val & 0x000F;
2149 /*temp_val = temp_val >> 4 */
2151 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, LinkDownDefaultState, "Reserved LinkDownDefaultState Value! Possible Error"));
2153 /* End LinkDownDefaultState */
2155 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_M_KeyProtectBits, tvb, local_offset, 1, FALSE);
2156 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LMC, tvb, local_offset, 1, FALSE); local_offset +=1;
2158 /* LinkSpeedActive */
2159 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkSpeedActive, tvb, local_offset, 1, FALSE);
2160 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2162 /* 4 bit values = mask and shift */
2163 temp_val = temp_val & 0x00F0;
2164 temp_val = temp_val >> 4;
2166 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, LinkSpeedActive, "Reserved LinkSpeedActive Value! Possible Error"));
2167 /* End LinkSpeedActive */
2169 /* LinkSpeedEnabled */
2170 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkSpeedEnabled, tvb, local_offset, 1, FALSE);
2171 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2173 /* 4 bit values = mask and shift */
2174 temp_val = temp_val & 0x000F;
2175 /*temp_val = temp_val >> 4 */
2177 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, LinkSpeedEnabled, "Reserved LinkSpeedEnabled Value! Possible Error"));
2179 /* End LinkSpeedEnabled */
2182 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_NeighborMTU, tvb, local_offset, 1, FALSE);
2183 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2185 /* 4 bit values = mask and shift */
2186 temp_val = temp_val & 0x00F0;
2187 temp_val = temp_val >> 4;
2189 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, NeighborMTU, "Reserved NeighborMTU Value! Possible Error"));
2191 /* End NeighborMTU */
2193 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_MasterSMSL, tvb, local_offset, 1, FALSE); local_offset +=1;
2196 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_VLCap, tvb, local_offset, 1, FALSE);
2197 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2199 /* 4 bit values = mask and shift */
2200 temp_val = temp_val & 0x00F0;
2201 temp_val = temp_val >> 4;
2203 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, VLCap, "Reserved VLCap Value! Possible Error"));
2207 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_InitType, tvb, local_offset, 1, FALSE); local_offset +=1;
2208 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_VLHighLimit, tvb, local_offset, 1, FALSE); local_offset +=1;
2209 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_VLArbitrationHighCap, tvb, local_offset, 1, FALSE); local_offset +=1;
2210 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_VLArbitrationLowCap, tvb, local_offset, 1, FALSE); local_offset +=1;
2211 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_InitTypeReply, tvb, local_offset, 1, FALSE);
2214 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_MTUCap, tvb, local_offset, 1, FALSE);
2215 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2217 /* 4 bit values = mask and shift */
2218 temp_val = temp_val & 0x000F;
2219 /*temp_val = temp_val >> 4 */
2221 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, MTUCap, "Reserved MTUCap Value! Possible Error"));
2225 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_VLStallCount, tvb, local_offset, 1, FALSE);
2226 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_HOQLife, tvb, local_offset, 1, FALSE); local_offset +=1;
2228 /* OperationalVLs */
2229 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_OperationalVLs, tvb, local_offset, 1, FALSE);
2230 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2232 /* 4 bit values = mask and shift */
2233 temp_val = temp_val & 0x00F0;
2234 temp_val = temp_val >> 4;
2236 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, OperationalVLs, "Reserved OperationalVLs Value! Possible Error"));
2237 /* End OperationalVLs */
2239 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_PartitionEnforcementInbound, tvb, local_offset, 1, FALSE);
2240 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_PartitionEnforcementOutbound, tvb, local_offset, 1, FALSE);
2241 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_FilterRawInbound, tvb, local_offset, 1, FALSE);
2242 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_FilterRawOutbound, tvb, local_offset, 1, FALSE); local_offset +=1;
2243 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_M_KeyViolations, tvb, local_offset, 2, FALSE); local_offset +=2;
2244 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_P_KeyViolations, tvb, local_offset, 2, FALSE); local_offset +=2;
2245 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_Q_KeyViolations, tvb, local_offset, 2, FALSE); local_offset +=2;
2246 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_GUIDCap, tvb, local_offset, 1, FALSE); local_offset +=1;
2247 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_ClientReregister, tvb, local_offset, 1, FALSE);
2248 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_SubnetTimeOut, tvb, local_offset, 1, FALSE); local_offset +=1;
2249 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_RespTimeValue, tvb, local_offset, 1, FALSE); local_offset +=1;
2250 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LocalPhyErrors, tvb, local_offset, 1, FALSE);
2251 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_OverrunErrors, tvb, local_offset, 1, FALSE); local_offset +=1;
2252 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_MaxCreditHint, tvb, local_offset, 2, FALSE); local_offset +=3; /* 2 + 1 Reserved */
2253 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkRoundTripLatency, tvb, local_offset, 3, FALSE); local_offset +=3;
2256 /* Parse P_KeyTable Attribute
2257 * IN: parentTree - The tree to add the dissection to
2258 * tvb - The tvbbuff of packet data
2259 * offset - The offset in TVB where the attribute begins
2260 * MadHeader - The common MAD header of the current SMP/SMA */
2261 static void parse_P_KeyTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2263 gint local_offset = *offset;
2265 proto_tree *P_KeyTable_header_tree = NULL;
2266 proto_item *P_KeyTable_header_item = NULL;
2267 proto_item *tempItemLow = NULL;
2268 proto_item *tempItemHigh = NULL;
2273 P_KeyTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_P_KeyTable_P_KeyTableBlock, tvb, local_offset, 64, FALSE);
2274 proto_item_set_text(P_KeyTable_header_item, "%s", "P_KeyTable");
2275 P_KeyTable_header_tree = proto_item_add_subtree(P_KeyTable_header_item, ett_pkeytable);
2277 for(i = 0; i < 32; i++)
2279 tempItemLow = proto_tree_add_item(P_KeyTable_header_tree, hf_infiniband_P_KeyTable_MembershipType, tvb, local_offset, 1, FALSE);
2280 tempItemHigh = proto_tree_add_item(P_KeyTable_header_tree, hf_infiniband_P_KeyTable_P_KeyBase, tvb, local_offset, 2, FALSE); local_offset +=2;
2281 proto_item_append_text(tempItemLow, "(%u)", i);
2282 proto_item_append_text(tempItemHigh,"(%u)", i+1);
2286 /* Parse SLtoVLMappingTable Attribute
2287 * IN: parentTree - The tree to add the dissection to
2288 * tvb - The tvbbuff of packet data
2289 * offset - The offset in TVB where the attribute begins
2290 * MadHeader - The common MAD header of the current SMP/SMA */
2291 static void parse_SLtoVLMappingTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2293 gint local_offset = *offset;
2294 proto_tree *SLtoVLMappingTable_header_tree = NULL;
2295 proto_item *SLtoVLMappingTable_header_item = NULL;
2296 proto_item *tempItemLow = NULL;
2297 proto_item *tempItemHigh = NULL;
2303 SLtoVLMappingTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
2304 proto_item_set_text(SLtoVLMappingTable_header_item, "%s", "SLtoVLMappingTable");
2305 SLtoVLMappingTable_header_tree = proto_item_add_subtree(SLtoVLMappingTable_header_item, ett_sltovlmapping);
2307 for(i = 0; i < 8; i++)
2309 tempItemLow = proto_tree_add_item(SLtoVLMappingTable_header_tree, hf_infiniband_SLtoVLMappingTable_SLtoVL_HighBits, tvb, local_offset, 1, FALSE);
2310 tempItemHigh = proto_tree_add_item(SLtoVLMappingTable_header_tree, hf_infiniband_SLtoVLMappingTable_SLtoVL_LowBits, tvb, local_offset, 1, FALSE); local_offset +=1;
2311 proto_item_append_text(tempItemLow, "(%u)", i);
2312 proto_item_append_text(tempItemHigh,"(%u)", i+1);
2316 /* Parse VLArbitrationTable Attribute
2317 * IN: parentTree - The tree to add the dissection to
2318 * tvb - The tvbbuff of packet data
2319 * offset - The offset in TVB where the attribute begins
2320 * MadHeader - The common MAD header of the current SMP/SMA */
2321 static void parse_VLArbitrationTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2323 gint local_offset = *offset;
2325 proto_tree *VLArbitrationTable_header_tree = NULL;
2326 proto_item *VLArbitrationTable_header_item = NULL;
2327 proto_item *tempItemLow = NULL;
2328 proto_item *tempItemHigh = NULL;
2333 VLArbitrationTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
2334 proto_item_set_text(VLArbitrationTable_header_item, "%s", "VLArbitrationTable");
2335 VLArbitrationTable_header_tree = proto_item_add_subtree(VLArbitrationTable_header_item, ett_vlarbitrationtable);
2337 for(i = 0; i < 32; i++)
2339 tempItemLow = proto_tree_add_item(VLArbitrationTable_header_tree, hf_infiniband_VLArbitrationTable_VL, tvb, local_offset, 1, FALSE); local_offset +=1;
2340 tempItemHigh = proto_tree_add_item(VLArbitrationTable_header_tree, hf_infiniband_VLArbitrationTable_Weight, tvb, local_offset, 1, FALSE); local_offset +=1;
2341 proto_item_append_text(tempItemLow, "(%u)", i);
2342 proto_item_append_text(tempItemHigh,"(%u)", i);
2346 /* Parse LinearForwardingTable Attribute
2347 * IN: parentTree - The tree to add the dissection to
2348 * tvb - The tvbbuff of packet data
2349 * offset - The offset in TVB where the attribute begins
2350 * MadHeader - The common MAD header of the current SMP/SMA */
2351 static void parse_LinearForwardingTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2354 gint local_offset = *offset;
2355 proto_tree *LinearForwardingTable_header_tree = NULL;
2356 proto_item *LinearForwardingTable_header_item = NULL;
2357 proto_item *tempItemLow = NULL;
2362 LinearForwardingTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
2363 proto_item_set_text(LinearForwardingTable_header_item, "%s", "LinearForwardingTable");
2364 LinearForwardingTable_header_tree = proto_item_add_subtree(LinearForwardingTable_header_item, ett_linearforwardingtable);
2366 for(i = 0; i < 64; i++)
2368 tempItemLow = proto_tree_add_item(LinearForwardingTable_header_tree, hf_infiniband_LinearForwardingTable_Port, tvb, local_offset, 1, FALSE); local_offset +=1;
2369 proto_item_append_text(tempItemLow, "(%u)", i);
2373 /* Parse RandomForwardingTable Attribute
2374 * IN: parentTree - The tree to add the dissection to
2375 * tvb - The tvbbuff of packet data
2376 * offset - The offset in TVB where the attribute begins
2377 * MadHeader - The common MAD header of the current SMP/SMA */
2378 static void parse_RandomForwardingTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2381 gint local_offset = *offset;
2382 proto_tree *RandomForwardingTable_header_tree = NULL;
2383 proto_item *RandomForwardingTable_header_item = NULL;
2384 proto_item *tempItemLow = NULL;
2389 RandomForwardingTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
2390 proto_item_set_text(RandomForwardingTable_header_item, "%s", "RandomForwardingTable");
2391 RandomForwardingTable_header_tree = proto_item_add_subtree(RandomForwardingTable_header_item, ett_randomforwardingtable);
2393 for(i = 0; i < 16; i++)
2395 tempItemLow = proto_tree_add_item(RandomForwardingTable_header_tree, hf_infiniband_RandomForwardingTable_LID, tvb, local_offset, 2, FALSE); local_offset +=2;
2396 proto_item_append_text(tempItemLow, "(%u)", i);
2397 tempItemLow = proto_tree_add_item(RandomForwardingTable_header_tree, hf_infiniband_RandomForwardingTable_Valid, tvb, local_offset, 1, FALSE);
2398 proto_item_append_text(tempItemLow, "(%u)", i);
2399 tempItemLow = proto_tree_add_item(RandomForwardingTable_header_tree, hf_infiniband_RandomForwardingTable_LMC, tvb, local_offset, 1, FALSE); local_offset +=1;
2400 proto_item_append_text(tempItemLow, "(%u)", i);
2401 tempItemLow = proto_tree_add_item(RandomForwardingTable_header_tree, hf_infiniband_RandomForwardingTable_Port, tvb, local_offset, 1, FALSE); local_offset +=1;
2402 proto_item_append_text(tempItemLow, "(%u)", i);
2406 /* Parse NoticesAndTraps Attribute
2407 * IN: parentTree - The tree to add the dissection to
2408 * tvb - The tvbbuff of packet data
2409 * offset - The offset in TVB where the attribute begins
2410 * MadHeader - The common MAD header of the current SMP/SMA */
2411 static void parse_MulticastForwardingTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2414 gint local_offset = *offset;
2415 proto_tree *MulticastForwardingTable_header_tree = NULL;
2416 proto_item *MulticastForwardingTable_header_item = NULL;
2417 proto_item *tempItemLow = NULL;
2422 MulticastForwardingTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
2423 proto_item_set_text(MulticastForwardingTable_header_item, "%s", "MulticastForwardingTable");
2424 MulticastForwardingTable_header_tree = proto_item_add_subtree(MulticastForwardingTable_header_item, ett_multicastforwardingtable);
2426 for(i = 0; i < 16; i++)
2428 tempItemLow = proto_tree_add_item(MulticastForwardingTable_header_tree, hf_infiniband_MulticastForwardingTable_PortMask, tvb, local_offset, 2, FALSE); local_offset +=2;
2429 proto_item_append_text(tempItemLow, "(%u)", i);
2434 /* Parse SMInfo Attribute
2435 * IN: parentTree - The tree to add the dissection to
2436 * tvb - The tvbbuff of packet data
2437 * offset - The offset in TVB where the attribute begins
2438 * MadHeader - The common MAD header of the current SMP/SMA */
2439 static void parse_SMInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2441 gint local_offset = *offset;
2442 proto_tree *SMInfo_header_tree = NULL;
2443 proto_item *SMInfo_header_item = NULL;
2448 SMInfo_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
2449 proto_item_set_text(SMInfo_header_item, "%s", "SMInfo");
2450 SMInfo_header_tree = proto_item_add_subtree(SMInfo_header_item, ett_sminfo);
2452 proto_tree_add_item(SMInfo_header_tree, hf_infiniband_SMInfo_GUID, tvb, local_offset, 8, FALSE); local_offset +=8;
2453 proto_tree_add_item(SMInfo_header_tree, hf_infiniband_SMInfo_SM_Key, tvb, local_offset, 8, FALSE); local_offset +=8;
2454 proto_tree_add_item(SMInfo_header_tree, hf_infiniband_SMInfo_ActCount, tvb, local_offset, 4, FALSE); local_offset +=4;
2455 proto_tree_add_item(SMInfo_header_tree, hf_infiniband_SMInfo_Priority, tvb, local_offset, 1, FALSE);
2456 proto_tree_add_item(SMInfo_header_tree, hf_infiniband_SMInfo_SMState, tvb, local_offset, 1, FALSE); local_offset +=1;
2459 /* Parse VendorDiag Attribute
2460 * IN: parentTree - The tree to add the dissection to
2461 * tvb - The tvbbuff of packet data
2462 * offset - The offset in TVB where the attribute begins
2463 * MadHeader - The common MAD header of the current SMP/SMA */
2464 static void parse_VendorDiag(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2466 gint local_offset = *offset;
2467 proto_tree *VendorDiag_header_tree = NULL;
2468 proto_item *VendorDiag_header_item = NULL;
2473 VendorDiag_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
2474 proto_item_set_text(VendorDiag_header_item, "%s", "VendorDiag");
2475 VendorDiag_header_tree = proto_item_add_subtree(VendorDiag_header_item, ett_vendordiag);
2477 proto_tree_add_item(VendorDiag_header_tree, hf_infiniband_VendorDiag_NextIndex, tvb, local_offset, 2, FALSE); local_offset +=2;
2478 proto_tree_add_item(VendorDiag_header_tree, hf_infiniband_VendorDiag_DiagData, tvb, local_offset, 62, FALSE); local_offset +=62;
2481 /* Parse LedInfo Attribute
2482 * IN: parentTree - The tree to add the dissection to
2483 * tvb - The tvbbuff of packet data
2484 * offset - The offset in TVB where the attribute begins
2485 * MadHeader - The common MAD header of the current SMP/SMA */
2486 static void parse_LedInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2488 gint local_offset = *offset;
2489 proto_tree *LedInfo_header_tree = NULL;
2490 proto_item *LedInfo_header_item = NULL;
2495 LedInfo_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
2496 proto_item_set_text(LedInfo_header_item, "%s", "LedInfo");
2497 LedInfo_header_tree = proto_item_add_subtree(LedInfo_header_item, ett_ledinfo);
2499 proto_tree_add_item(LedInfo_header_tree, hf_infiniband_LedInfo_LedMask, tvb, local_offset, 1, FALSE);
2502 /* Parse LinkSpeedWidthPairsTable Attribute
2503 * IN: parentTree - The tree to add the dissection to
2504 * tvb - The tvbbuff of packet data
2505 * offset - The offset in TVB where the attribute begins
2506 * MadHeader - The common MAD header of the current SMP/SMA */
2507 static void parse_LinkSpeedWidthPairsTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2509 gint local_offset = *offset;
2510 proto_tree *LinkSpeedWidthPairsTable_header_tree = NULL;
2511 proto_item *LinkSpeedWidthPairsTable_header_item = NULL;
2516 LinkSpeedWidthPairsTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
2517 proto_item_set_text(LinkSpeedWidthPairsTable_header_item, "%s", "LinkSpeedWidthPairsTable");
2518 LinkSpeedWidthPairsTable_header_tree = proto_item_add_subtree(LinkSpeedWidthPairsTable_header_item, ett_linkspeedwidthpairs);
2520 proto_tree_add_item(LinkSpeedWidthPairsTable_header_tree, hf_infiniband_LinkSpeedWidthPairsTable_NumTables, tvb, local_offset, 1, FALSE); local_offset +=1;
2521 proto_tree_add_item(LinkSpeedWidthPairsTable_header_tree, hf_infiniband_LinkSpeedWidthPairsTable_PortMask, tvb, local_offset, 32, FALSE); local_offset +=32;
2522 proto_tree_add_item(LinkSpeedWidthPairsTable_header_tree, hf_infiniband_LinkSpeedWidthPairsTable_SpeedTwoFive, tvb, local_offset, 1, FALSE); local_offset +=1;
2523 proto_tree_add_item(LinkSpeedWidthPairsTable_header_tree, hf_infiniband_LinkSpeedWidthPairsTable_SpeedFive, tvb, local_offset, 1, FALSE); local_offset +=1;
2524 proto_tree_add_item(LinkSpeedWidthPairsTable_header_tree, hf_infiniband_LinkSpeedWidthPairsTable_SpeedTen, tvb, local_offset, 1, FALSE); local_offset +=1;
2527 /* Parse RID Field from Subnet Administraiton Packets.
2528 * IN: SA_header_tree - the dissection tree of the subnet admin attribute.
2529 * tvb - the packet buffer
2530 * MadHeader - the Common MAD header from this packet.
2531 * IN/OUT: offset - the current and updated offset in the packet buffer */
2532 static void parse_RID(proto_tree* SA_header_tree, tvbuff_t* tvb, gint *offset, MAD_Data* MadHeader)
2534 gint local_offset = *offset;
2539 switch(MadHeader->attributeID)
2543 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
2544 local_offset+=2; /* Reserved bits */
2547 /* PortInfoRecord */
2548 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_EndportLID, tvb, local_offset, 2, FALSE); local_offset+=2;
2549 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_PortNum, tvb, local_offset, 1, FALSE); local_offset+=1;
2550 local_offset+=1; /* Reserved bits */
2553 /* SLtoVLMappingTableRecord */
2554 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
2555 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_InputPortNum, tvb, local_offset, 1, FALSE); local_offset+=1;
2556 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_OutputPortNum, tvb, local_offset, 1, FALSE); local_offset+=1;
2557 local_offset+=4; /* Reserved bits */
2560 /* SwitchInfoRecord */
2561 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
2562 local_offset+=2; /* Reserved bits */
2565 /* LinearForwardingTableRecord */
2566 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
2567 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_SixteenBit, tvb, local_offset, 2, FALSE); local_offset+=2;
2568 local_offset+=4; /* Reserved bits */
2571 /* RandomForwardingTableRecord */
2572 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
2573 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_SixteenBit, tvb, local_offset, 2, FALSE); local_offset+=2;
2574 local_offset+=4; /* Reserved bits */
2577 /* MulticastForwardingTableRecord */
2578 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
2579 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_Position, tvb, local_offset, 1, FALSE);
2580 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_NineBit, tvb, local_offset, 2, FALSE); local_offset+=2;
2581 local_offset+=4; /* Reserved bits */
2584 /*VLArbitrationTableRecord */
2585 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
2586 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_OutputPortNum, tvb, local_offset, 1, FALSE); local_offset+=1;
2587 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_EightBit, tvb, local_offset, 1, FALSE); local_offset+=1;
2588 local_offset+=4; /* Reserved bits */
2592 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
2593 local_offset+=2; /* Reserved bits */
2596 /* P_KeyTableRecord */
2597 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
2598 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_SixteenBit, tvb, local_offset, 2, FALSE); local_offset+=2;
2599 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_PortNum, tvb, local_offset, 1, FALSE); local_offset+=1;
2600 local_offset+=3; /* Reserved bits */
2603 /* InformInfoRecord */
2604 proto_tree_add_item(SA_header_tree, hf_infiniband_InformInfoRecord_SubscriberGID, tvb, local_offset, 16, FALSE); local_offset+=16;
2605 proto_tree_add_item(SA_header_tree, hf_infiniband_InformInfoRecord_Enum, tvb, local_offset, 2, FALSE); local_offset+=2;
2606 local_offset+=6; /* Reserved bits */
2610 proto_tree_add_item(SA_header_tree, hf_infiniband_LinkRecord_FromLID, tvb, local_offset, 2, FALSE); local_offset+=2;
2611 proto_tree_add_item(SA_header_tree, hf_infiniband_LinkRecord_FromPort, tvb, local_offset, 1, FALSE); local_offset+=1;
2615 proto_tree_add_item(SA_header_tree, hf_infiniband_ServiceRecord_ServiceID, tvb, local_offset, 8, FALSE); local_offset+=8;
2616 proto_tree_add_item(SA_header_tree, hf_infiniband_ServiceRecord_ServiceGID, tvb, local_offset, 16, FALSE); local_offset+=16;
2617 proto_tree_add_item(SA_header_tree, hf_infiniband_ServiceRecord_ServiceP_Key, tvb, local_offset, 2, FALSE); local_offset+=2;
2621 /* MCMemberRecord */
2622 proto_tree_add_item(SA_header_tree, hf_infiniband_MCMemberRecord_MGID, tvb, local_offset, 16, FALSE); local_offset+=16;
2623 proto_tree_add_item(SA_header_tree, hf_infiniband_MCMemberRecord_PortGID, tvb, local_offset, 16, FALSE); local_offset+=16;
2626 /* GuidInfoRecord */
2627 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
2628 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_EightBit, tvb, local_offset, 1, FALSE); local_offset+=2;
2635 *offset = local_offset;
2638 /* Parse InformInfo Attribute
2639 * IN: parentTree - The tree to add the dissection to
2640 * tvb - The tvbbuff of packet data
2641 * offset - The offset in TVB where the attribute begins
2642 * MadHeader - The common MAD header of the current SMP/SMA */
2643 static void parse_InformInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2645 gint local_offset = *offset;
2646 proto_tree *InformInfo_header_tree = NULL;
2647 proto_item *InformInfo_header_item = NULL;
2652 InformInfo_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 36, FALSE);
2653 proto_item_set_text(InformInfo_header_item, "%s", "InformInfo");
2654 InformInfo_header_tree = proto_item_add_subtree(InformInfo_header_item, ett_informinfo);
2656 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_GID, tvb, local_offset, 16, FALSE); local_offset+=16;
2657 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_LIDRangeBegin, tvb, local_offset, 2, FALSE); local_offset+=2;
2658 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_LIDRangeEnd, tvb, local_offset, 2, FALSE); local_offset+=2;
2659 local_offset+=2; /* Reserved Bits */
2660 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_IsGeneric, tvb, local_offset, 1, FALSE); local_offset+=1;
2661 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_Subscribe, tvb, local_offset, 1, FALSE); local_offset+=1;
2662 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_Type, tvb, local_offset, 2, FALSE); local_offset+=2;
2663 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_TrapNumberDeviceID, tvb, local_offset, 2, FALSE); local_offset+=2;
2664 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_QPN, tvb, local_offset, 3, FALSE); local_offset+=3;
2665 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_RespTimeValue, tvb, local_offset, 1, FALSE); local_offset+=1;
2667 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_ProducerTypeVendorID, tvb, local_offset, 3, FALSE); local_offset+=3;
2670 /* Parse LinkRecord Attribute
2671 * IN: parentTree - The tree to add the dissection to
2672 * tvb - The tvbbuff of packet data
2673 * offset - The offset in TVB where the attribute begins
2674 * MadHeader - The common MAD header of the current SMP/SMA */
2675 static void parse_LinkRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2677 gint local_offset = *offset;
2678 proto_tree *LinkRecord_header_tree = NULL;
2679 proto_item *LinkRecord_header_item = NULL;
2686 LinkRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 3, FALSE);
2687 proto_item_set_text(LinkRecord_header_item, "%s", "LinkRecord");
2688 LinkRecord_header_tree = proto_item_add_subtree(LinkRecord_header_item, ett_linkrecord);
2690 proto_tree_add_item(LinkRecord_header_tree, hf_infiniband_LinkRecord_ToPort, tvb, local_offset, 1, FALSE); local_offset+=1;
2691 proto_tree_add_item(LinkRecord_header_tree, hf_infiniband_LinkRecord_ToLID, tvb, local_offset, 2, FALSE); local_offset +=2;
2694 /* Parse ServiceRecord Attribute
2695 * IN: parentTree - The tree to add the dissection to
2696 * tvb - The tvbbuff of packet data
2697 * offset - The offset in TVB where the attribute begins
2698 * MadHeader - The common MAD header of the current SMP/SMA */
2699 static void parse_ServiceRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2701 gint local_offset = *offset;
2702 proto_tree *ServiceRecord_header_tree = NULL;
2703 proto_item *ServiceRecord_header_item = NULL;
2704 proto_item *tempData = NULL;
2711 ServiceRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 176, FALSE);
2712 proto_item_set_text(ServiceRecord_header_item, "%s", "ServiceRecord");
2713 ServiceRecord_header_tree = proto_item_add_subtree(ServiceRecord_header_item, ett_servicerecord);
2715 proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceLease, tvb, local_offset, 4, FALSE); local_offset+=4;
2716 proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceKey, tvb, local_offset, 16, FALSE); local_offset+=16;
2717 proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceName, tvb, local_offset, 64, FALSE); local_offset+=64;
2719 tempData = proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceData, tvb, local_offset, 16, FALSE); local_offset+=16;
2720 proto_item_append_text(tempData, "%s", "(ServiceData 8.1, 8.16)");
2721 tempData = proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceData, tvb, local_offset, 16, FALSE); local_offset+=16;
2722 proto_item_append_text(tempData, "%s", "(ServiceData 16.1, 16.8)");
2723 tempData = proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceData, tvb, local_offset, 16, FALSE); local_offset+=16;
2724 proto_item_append_text(tempData, "%s", "(ServiceData 32.1, 32.4)");
2725 tempData = proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceData, tvb, local_offset, 16, FALSE); local_offset+=16;
2726 proto_item_append_text(tempData, "%s", "(ServiceData 64.1, 64.2)");
2729 /* Parse PathRecord Attribute
2730 * IN: parentTree - The tree to add the dissection to
2731 * tvb - The tvbbuff of packet data
2732 * offset - The offset in TVB where the attribute begins
2733 * MadHeader - The common MAD header of the current SMP/SMA */
2734 static void parse_PathRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2736 gint local_offset = *offset;
2737 proto_tree *PathRecord_header_tree = NULL;
2738 proto_item *PathRecord_header_item = NULL;
2745 PathRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 64, FALSE);
2746 proto_item_set_text(PathRecord_header_item, "%s", "PathRecord");
2747 PathRecord_header_tree = proto_item_add_subtree(PathRecord_header_item, ett_pathrecord);
2748 local_offset += 8; /* Reserved Bits */
2750 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_DGID, tvb, local_offset, 16, FALSE); local_offset+=16;
2751 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_SGID, tvb, local_offset, 16, FALSE); local_offset+=16;
2752 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_DLID, tvb, local_offset, 2, FALSE); local_offset+=2;
2753 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_SLID, tvb, local_offset, 2, FALSE); local_offset+=2;
2754 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_RawTraffic, tvb, local_offset, 1, FALSE);
2755 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_FlowLabel, tvb, local_offset, 3, FALSE); local_offset+=3;
2756 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_HopLimit, tvb, local_offset, 1, FALSE); local_offset+=1;
2757 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_TClass, tvb, local_offset, 1, FALSE); local_offset+=1;
2758 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_Reversible, tvb, local_offset, 1, FALSE);
2759 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_NumbPath, tvb, local_offset, 1, FALSE); local_offset+=1;
2760 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_P_Key, tvb, local_offset, 2, FALSE); local_offset+=2;
2761 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_SL, tvb, local_offset, 2, FALSE); local_offset+=2;
2762 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_MTUSelector, tvb, local_offset, 1, FALSE);
2763 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_MTU, tvb, local_offset, 1, FALSE); local_offset+=1;
2764 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_RateSelector, tvb, local_offset, 1, FALSE);
2765 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_Rate, tvb, local_offset, 1, FALSE); local_offset+=1;
2766 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_PacketLifeTimeSelector, tvb, local_offset, 1, FALSE);
2767 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_PacketLifeTime, tvb, local_offset, 1, FALSE); local_offset+=1;
2768 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_Preference, tvb, local_offset, 1, FALSE); local_offset+=1;
2770 /* Parse MCMemberRecord Attribute
2771 * IN: parentTree - The tree to add the dissection to
2772 * tvb - The tvbbuff of packet data
2773 * offset - The offset in TVB where the attribute begins
2774 * MadHeader - The common MAD header of the current SMP/SMA */
2775 static void parse_MCMemberRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2777 gint local_offset = *offset;
2778 proto_tree *MCMemberRecord_header_tree = NULL;
2779 proto_item *MCMemberRecord_header_item = NULL;
2786 MCMemberRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 64, FALSE);
2787 proto_item_set_text(MCMemberRecord_header_item, "%s", "MCMemberRecord");
2788 MCMemberRecord_header_tree = proto_item_add_subtree(MCMemberRecord_header_item, ett_mcmemberrecord);
2790 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_Q_Key, tvb, local_offset, 4, FALSE); local_offset+=4;
2791 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_MLID, tvb, local_offset, 2, FALSE); local_offset+=2;
2792 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_MTUSelector, tvb, local_offset, 1, FALSE);
2793 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_MTU, tvb, local_offset, 1, FALSE); local_offset+=1;
2794 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_TClass, tvb, local_offset, 1, FALSE); local_offset+=1;
2795 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_P_Key, tvb, local_offset, 2, FALSE); local_offset+=2;
2796 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_RateSelector, tvb, local_offset, 1, FALSE);
2797 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_Rate, tvb, local_offset, 1, FALSE); local_offset+=1;
2798 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_PacketLifeTimeSelector, tvb, local_offset, 1, FALSE);
2799 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_PacketLifeTime, tvb, local_offset, 1, FALSE); local_offset+=1;
2800 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_SL, tvb, local_offset, 1, FALSE);
2801 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_FlowLabel, tvb, local_offset, 3, FALSE); local_offset+=3;
2802 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_HopLimit, tvb, local_offset, 1, FALSE); local_offset+=1;
2803 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_Scope, tvb, local_offset, 1, FALSE);
2804 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_JoinState, tvb, local_offset, 1, FALSE); local_offset+=1;
2805 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_ProxyJoin, tvb, local_offset, 1, FALSE); local_offset+=3;
2808 /* Parse TraceRecord Attribute
2809 * IN: parentTree - The tree to add the dissection to
2810 * tvb - The tvbbuff of packet data
2811 * offset - The offset in TVB where the attribute begins
2812 * MadHeader - The common MAD header of the current SMP/SMA */
2813 static void parse_TraceRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2815 gint local_offset = *offset;
2816 proto_tree *TraceRecord_header_tree = NULL;
2817 proto_item *TraceRecord_header_item = NULL;
2824 TraceRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 46, FALSE);
2825 proto_item_set_text(TraceRecord_header_item, "%s", "TraceRecord");
2826 TraceRecord_header_tree = proto_item_add_subtree(TraceRecord_header_item, ett_tracerecord);
2828 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_GIDPrefix, tvb, local_offset, 8, FALSE); local_offset+=8;
2829 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_IDGeneration, tvb, local_offset, 2, FALSE); local_offset+=2;
2830 local_offset+=1; /* Reserved Bits */
2831 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_NodeType, tvb, local_offset, 1, FALSE); local_offset+=1;
2832 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_NodeID, tvb, local_offset, 8, FALSE); local_offset+=8;
2833 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_ChassisID, tvb, local_offset, 8, FALSE); local_offset+=8;
2834 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_EntryPortID, tvb, local_offset, 8, FALSE); local_offset+=8;
2835 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_ExitPortID, tvb, local_offset, 8, FALSE); local_offset+=8;
2836 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_EntryPort, tvb, local_offset, 1, FALSE); local_offset+=1;
2837 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_ExitPort, tvb, local_offset, 1, FALSE); local_offset+=1;
2839 /* Parse MultiPathRecord Attribute
2840 * IN: parentTree - The tree to add the dissection to
2841 * tvb - The tvbbuff of packet data
2842 * offset - The offset in TVB where the attribute begins
2843 * MadHeader - The common MAD header of the current SMP/SMA */
2844 static void parse_MultiPathRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2846 gint local_offset = *offset;
2847 proto_tree *MultiPathRecord_header_tree = NULL;
2848 proto_item *MultiPathRecord_header_item = NULL;
2849 proto_item *SDGID = NULL;
2850 guint8 SDGIDCount = 0;
2851 guint8 DGIDCount = 0;
2859 MultiPathRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 200, FALSE);
2860 proto_item_set_text(MultiPathRecord_header_item, "%s", "MultiPathRecord");
2861 MultiPathRecord_header_tree = proto_item_add_subtree(MultiPathRecord_header_item, ett_multipathrecord);
2863 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_RawTraffic, tvb, local_offset, 1, FALSE);
2864 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_FlowLabel, tvb, local_offset, 3, FALSE); local_offset+=3;
2865 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_HopLimit, tvb, local_offset, 1, FALSE); local_offset+=1;
2866 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_TClass, tvb, local_offset, 1, FALSE); local_offset+=1;
2867 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_Reversible, tvb, local_offset, 1, FALSE);
2868 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_NumbPath, tvb, local_offset, 1, FALSE); local_offset+=1;
2869 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_P_Key, tvb, local_offset, 2, FALSE); local_offset+=2;
2870 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_SL, tvb, local_offset, 2, FALSE); local_offset+=2;
2871 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_MTUSelector, tvb, local_offset, 1, FALSE);
2872 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_MTU, tvb, local_offset, 1, FALSE); local_offset+=1;
2873 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_RateSelector, tvb, local_offset, 1, FALSE);
2874 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_Rate, tvb, local_offset, 1, FALSE); local_offset+=1;
2875 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_PacketLifeTimeSelector, tvb, local_offset, 1, FALSE);
2876 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_PacketLifeTime, tvb, local_offset, 1, FALSE); local_offset+=1;
2877 local_offset+=1; /* Reserved Bits */
2878 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_IndependenceSelector, tvb, local_offset, 1, FALSE);
2879 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_GIDScope, tvb, local_offset, 1, FALSE); local_offset+=1;
2881 SDGIDCount = tvb_get_guint8(tvb, local_offset);
2882 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_SGIDCount, tvb, local_offset, 1, FALSE); local_offset+=1;
2883 DGIDCount = tvb_get_guint8(tvb, local_offset);
2884 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_DGIDCount, tvb, local_offset, 1, FALSE); local_offset+=1;
2885 local_offset+=7; /*Reserved Bits */
2887 for(i = 0; i < SDGIDCount; i++)
2889 SDGID = proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_SDGID, tvb, local_offset, 16, FALSE); local_offset+=16;
2890 proto_item_set_text(SDGID, "(%s%u)","SGID", i);
2892 for(i = 0; i < DGIDCount; i++)
2894 SDGID = proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_SDGID, tvb, local_offset, 16, FALSE); local_offset+=16;
2895 proto_item_set_text(SDGID, "(%s%u)","DGID", i);
2898 /* Parse ServiceAssociationRecord Attribute
2899 * IN: parentTree - The tree to add the dissection to
2900 * tvb - The tvbbuff of packet data
2901 * offset - The offset in TVB where the attribute begins
2902 * MadHeader - The common MAD header of the current SMP/SMA */
2903 static void parse_ServiceAssociationRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2905 gint local_offset = *offset;
2906 proto_tree *ServiceAssociationRecord_header_tree = NULL;
2907 proto_item *ServiceAssociationRecord_header_item = NULL;
2914 ServiceAssociationRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 80, FALSE);
2915 proto_item_set_text(ServiceAssociationRecord_header_item, "%s", "ServiceAssociationRecord");
2916 ServiceAssociationRecord_header_tree = proto_item_add_subtree(ServiceAssociationRecord_header_item, ett_serviceassocrecord);
2918 proto_tree_add_item(ServiceAssociationRecord_header_tree, hf_infiniband_ServiceAssociationRecord_ServiceKey, tvb, local_offset, 16, FALSE); local_offset +=16;
2919 proto_tree_add_item(ServiceAssociationRecord_header_tree, hf_infiniband_ServiceAssociationRecord_ServiceName, tvb, local_offset, 64, FALSE); local_offset +=64;
2922 /* dissect_general_info
2923 * Used to extract very few values from the packet in the case that full dissection is disabled by the user.
2925 * tvb - The tvbbuff of packet data
2926 * offset - The offset in TVB where the attribute begins
2927 * pinfo - The packet info structure with column information */
2928 static void dissect_general_info(tvbuff_t *tvb, gint offset, packet_info *pinfo)
2930 guint8 lnh_val = 0; /* The Link Next Header Value. Tells us which headers are coming */
2931 gboolean bthFollows = 0; /* Tracks if we are parsing a BTH. This is a significant decision point */
2932 guint8 virtualLane = 0; /* The Virtual Lane of the current Packet */
2933 guint8 opCode = 0; /* OpCode from BTH header. */
2934 gint32 nextHeaderSequence = -1; /* defined by this dissector. #define which indicates the upcoming header sequence from OpCode */
2935 guint8 nxtHdr = 0; /* that must be available for that header. */
2936 struct e_in6_addr SRCgid; /* Struct to display ipv6 Address */
2937 struct e_in6_addr DSTgid; /* Struct to display ipv6 Address */
2938 guint8 management_class = 0;
2942 virtualLane = tvb_get_guint8(tvb, offset);
2943 virtualLane = virtualLane & 0xF0;
2946 /* Save Link Next Header... This tells us what the next header is. */
2947 lnh_val = tvb_get_guint8(tvb, offset);
2948 lnh_val = lnh_val & 0x03;
2951 /* Set destination in packet view. */
2952 if (check_col(pinfo->cinfo, COL_DEF_DST))
2954 col_add_fstr(pinfo->cinfo, COL_DEF_DST, "DLID: %s", tvb_bytes_to_str(tvb, offset, 2));
2958 /* Set Source in packet view. */
2959 if (check_col(pinfo->cinfo, COL_DEF_SRC))
2961 col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "SLID: %s", tvb_bytes_to_str(tvb, offset, 2));
2969 nxtHdr = tvb_get_guint8(tvb, offset);
2972 tvb_get_ipv6(tvb, offset, &SRCgid);
2973 if (check_col(pinfo->cinfo, COL_DEF_SRC))
2975 col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "SGID: %s", ip6_to_str(&SRCgid));
2979 tvb_get_ipv6(tvb, offset, &DSTgid);
2980 if (check_col(pinfo->cinfo, COL_DEF_DST))
2982 col_add_fstr(pinfo->cinfo, COL_DEF_DST, "DGID: %s", ip6_to_str(&DSTgid));
2988 /* Some kind of packet being transported globally with IBA, but locally it is not IBA - no BTH following. */
2993 * Fall through switch and start parsing Local Headers and BTH
2999 /* Get the OpCode - this tells us what headers are following */
3000 opCode = tvb_get_guint8(tvb, offset);
3001 if (check_col(pinfo->cinfo, COL_INFO))
3003 col_append_str(pinfo->cinfo, COL_INFO, val_to_str((guint32)opCode, OpCodeMap, "Unknown OpCode"));
3008 /* Raw IPv6 Packet */
3009 if (check_col(pinfo->cinfo, COL_DEF_DST))
3011 col_set_str(pinfo->cinfo, COL_DEF_DST, "IPv6 over IB Packet");
3012 col_set_fence(pinfo->cinfo, COL_DEF_DST);
3023 /* Find our next header sequence based on the Opcode
3024 * Since we're not doing dissection here, we just need the proper offsets to get our labels in packet view */
3026 nextHeaderSequence = find_next_header_sequence((guint32) opCode);
3027 switch(nextHeaderSequence)
3029 case RDETH_DETH_PAYLD:
3030 offset += 4; /* RDETH */
3031 offset += 8; /* DETH */
3033 case RDETH_DETH_RETH_PAYLD:
3034 offset += 4; /* RDETH */
3035 offset += 8; /* DETH */
3036 offset += 16; /* RETH */
3038 case RDETH_DETH_IMMDT_PAYLD:
3039 offset += 4; /* RDETH */
3040 offset += 8; /* DETH */
3041 offset += 4; /* IMMDT */
3043 case RDETH_DETH_RETH_IMMDT_PAYLD:
3044 offset += 4; /* RDETH */
3045 offset += 8; /* DETH */
3046 offset += 16; /* RETH */
3047 offset += 4; /* IMMDT */
3049 case RDETH_DETH_RETH:
3050 offset += 4; /* RDETH */
3051 offset += 8; /* DETH */
3052 offset += 16; /* RETH */
3054 case RDETH_AETH_PAYLD:
3055 offset += 4; /* RDETH */
3056 offset += 4; /* AETH */
3059 offset += 4; /* RDETH */
3062 offset += 4; /* RDETH */
3063 offset += 4; /* AETH */
3065 case RDETH_AETH_ATOMICACKETH:
3066 offset += 4; /* RDETH */
3067 offset += 4; /* AETH */
3068 offset += 8; /* AtomicAckETH */
3070 case RDETH_DETH_ATOMICETH:
3071 offset += 4; /* RDETH */
3072 offset += 8; /* DETH */
3073 offset += 28; /* AtomicETH */
3076 offset += 4; /* RDETH */
3077 offset += 8; /* DETH */
3080 offset += 8; /* DETH */
3085 offset += 4; /* IMMDT */
3088 offset += 16; /* RETH */
3091 offset += 16; /* RETH */
3094 offset += 4; /* AETH */
3097 offset += 4; /* AETH */
3099 case AETH_ATOMICACKETH:
3100 offset += 4; /* AETH */
3101 offset += 8; /* AtomicAckETH */
3104 offset += 28; /* AtomicETH */
3107 offset += 4; /* IETH */
3109 case DETH_IMMDT_PAYLD:
3110 offset += 8; /* DETH */
3111 offset += 4; /* IMMDT */
3117 if(virtualLane == 0xF0)
3119 management_class = tvb_get_guint8(tvb, offset + 1);
3120 if(((management_class >= (guint8)VENDOR_1_START) && (management_class <= (guint8)VENDOR_1_END))
3121 || ((management_class >= (guint8)VENDOR_2_START) && (management_class <= (guint8)VENDOR_2_END)))
3125 else if((management_class >= (guint8)APPLICATION_START) && (management_class <= (guint8)APPLICATION_END))
3129 else if(((management_class == (guint8)0x00) || (management_class == (guint8)0x02))
3130 || ((management_class >= (guint8)0x50) && (management_class <= (guint8)0x80))
3131 || ((management_class >= (guint8)0x82)))
3135 else /* we have a normal management_class */
3137 parse_MAD_Common(NULL, tvb, &offset, &MadData);
3138 label_SUBM_Method(NULL, &MadData, pinfo);
3139 label_SUBM_Attribute(NULL, &MadData, pinfo);
3146 /* Protocol Registration */
3147 void proto_register_infiniband(void)
3149 /* Field dissector structures.
3150 * For reserved fields, reservedX denotes the reserved field is X bits in length.
3151 * e.g. reserved2 is a reserved field 2 bits in length.
3152 * The third parameter is a filter string associated for this field.
3153 * So for instance, to filter packets for a given virtual lane,
3154 * The filter (infiniband.LRH.vl == 3) or something similar would be used. */
3156 /* XXX: ToDo: Verify against Infiniband 1.2.1 Specification */
3157 /* Fields verified/corrected: Those after comment "XX: All following ..." */
3159 static hf_register_info hf[] = {
3160 /* Local Route Header (LRH) */
3161 { &hf_infiniband_LRH, {
3162 "Local Route Header", "infiniband.lrh",
3163 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3165 { &hf_infiniband_virtual_lane, {
3166 "Virtual Lane", "infiniband.lrh.vl",
3167 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
3169 { &hf_infiniband_link_version, {
3170 "Link Version", "infiniband.lrh.lver",
3171 FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL}
3173 { &hf_infiniband_service_level, {
3174 "Service Level", "infiniband.lrh.sl",
3175 FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL}
3177 { &hf_infiniband_reserved2, {
3178 "Reserved (2 bits)", "infiniband.lrh.reserved2",
3179 FT_UINT8, BASE_DEC, NULL, 0x0C, NULL, HFILL}
3181 { &hf_infiniband_link_next_header, {
3182 "Link Next Header", "infiniband.lrh.lnh",
3183 FT_UINT8, BASE_HEX, NULL, 0x03, NULL, HFILL}
3185 { &hf_infiniband_destination_local_id, {
3186 "Destination Local ID", "infiniband.lrh.dlid",
3187 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
3189 { &hf_infiniband_reserved5, {
3190 "Reserved (5 bits)", "infiniband.lrh.reserved5",
3191 FT_UINT16, BASE_DEC, NULL, 0xF800, NULL, HFILL}
3193 { &hf_infiniband_packet_length, {
3194 "Packet Length", "infiniband.lrh.pktlen",
3195 FT_UINT16, BASE_DEC, NULL, 0x07FF, NULL, HFILL}
3197 { &hf_infiniband_source_local_id, {
3198 "Source Local ID", "infiniband.lrh.slid",
3199 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
3202 /* Global Route Header (GRH) */
3203 { &hf_infiniband_GRH, {
3204 "Global Route Header", "infiniband.grh",
3205 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3207 { &hf_infiniband_ip_version, {
3208 "IP Version", "infiniband.grh.ipver",
3209 FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL}
3211 { &hf_infiniband_traffic_class, {
3212 "Traffic Class", "infiniband.grh.tclass",
3213 FT_UINT16, BASE_DEC, NULL, 0x0FF0, NULL, HFILL}
3215 { &hf_infiniband_flow_label, {
3216 "Flow Label", "infiniband.grh.flowlabel",
3217 FT_UINT32, BASE_DEC, NULL, 0x000FFFFF, NULL, HFILL}
3219 { &hf_infiniband_payload_length, {
3220 "Payload Length", "infiniband.grh.paylen",
3221 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
3223 { &hf_infiniband_next_header, {
3224 "Next Header", "infiniband.grh.nxthdr",
3225 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
3227 { &hf_infiniband_hop_limit, {
3228 "Hop Limit", "infiniband.grh.hoplmt",
3229 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
3231 { &hf_infiniband_source_gid, {
3232 "Source GID", "infiniband.grh.sgid",
3233 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
3235 { &hf_infiniband_destination_gid, {
3236 "Destination GID", "infiniband.grh.dgid",
3237 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
3240 /* Base Transport Header (BTH) */
3241 { &hf_infiniband_BTH, {
3242 "Base Transport Header", "infiniband.bth",
3243 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3245 { &hf_infiniband_opcode, {
3246 "Opcode", "infiniband.bth.opcode",
3247 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
3249 { &hf_infiniband_solicited_event, {
3250 "Solicited Event", "infiniband.bth.se",
3251 FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL}
3253 { &hf_infiniband_migreq, {
3254 "MigReq", "infiniband.bth.m",
3255 FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL}
3257 { &hf_infiniband_pad_count, {
3258 "Pad Count", "infiniband.bth.padcnt",
3259 FT_UINT8, BASE_DEC, NULL, 0x30, NULL, HFILL}
3261 { &hf_infiniband_transport_header_version, {
3262 "Header Version", "infiniband.bth.tver",
3263 FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL}
3265 { &hf_infiniband_partition_key, {
3266 "Partition Key", "infiniband.bth.p_key",
3267 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
3269 { &hf_infiniband_reserved8, {
3270 "Reserved (8 bits)", "infiniband.bth.reserved8",
3271 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
3273 { &hf_infiniband_destination_qp, {
3274 "Destination Queue Pair", "infiniband.bth.destqp",
3275 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
3277 { &hf_infiniband_acknowledge_request, {
3278 "Acknowledge Request", "infiniband.bth.a",
3279 FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL}
3281 { &hf_infiniband_reserved7, {
3282 "Reserved (7 bits)", "infiniband.bth.reserved7",
3283 FT_UINT8, BASE_DEC, NULL, 0x7F, NULL, HFILL}
3285 { &hf_infiniband_packet_sequence_number, {
3286 "Packet Sequence Number", "infiniband.bth.psn",
3287 FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL}
3290 /* Raw Header (RWH) */
3291 { &hf_infiniband_RWH, {
3292 "Raw Header", "infiniband.rwh",
3293 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3295 { &hf_infiniband_reserved16_RWH, {
3296 "Reserved (16 bits)", "infiniband.rwh.reserved",
3297 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
3299 { &hf_infiniband_etype, {
3300 "Ethertype", "infiniband.rwh.etype",
3301 FT_UINT16, BASE_HEX, NULL /*VALS(etype_vals)*/, 0x0, "Type", HFILL }
3304 /* Reliable Datagram Extended Transport Header (RDETH) */
3305 { &hf_infiniband_RDETH, {
3306 "Reliable Datagram Extended Transport Header", "infiniband.rdeth",
3307 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3309 { &hf_infiniband_reserved8_RDETH, {
3310 "Reserved (8 bits)", "infiniband.rdeth.reserved8",
3311 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
3313 { &hf_infiniband_ee_context, {
3314 "E2E Context", "infiniband.rdeth.eecnxt",
3315 FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL}
3318 /* Datagram Extended Transport Header (DETH) */
3319 { &hf_infiniband_DETH, {
3320 "Datagram Extended Transport Header", "infiniband.deth",
3321 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3323 { &hf_infiniband_queue_key, {
3324 "Queue Key", "infiniband.deth.q_key",
3325 FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL}
3327 { &hf_infiniband_reserved8_DETH, {
3328 "Reserved (8 bits)", "infiniband.deth.reserved8",
3329 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
3331 { &hf_infiniband_source_qp, {
3332 "Source Queue Pair", "infiniband.deth.srcqp",
3333 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
3336 /* RDMA Extended Transport Header (RETH) */
3337 { &hf_infiniband_RETH, {
3338 "RDMA Extended Transport Header", "infiniband.reth",
3339 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3341 { &hf_infiniband_virtual_address, {
3342 "Virtual Address", "infiniband.reth.va",
3343 FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL}
3345 { &hf_infiniband_remote_key, {
3346 "Remote Key", "infiniband.reth.r_key",
3347 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
3349 { &hf_infiniband_dma_length, {
3350 "DMA Length", "infiniband.reth.dmalen",
3351 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
3354 /* Atomic Extended Transport Header (AtomicETH) */
3355 { &hf_infiniband_AtomicETH, {
3356 "Atomic Extended Transport Header", "infiniband.atomiceth",
3357 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3360 { &hf_infiniband_virtual_address_AtomicETH, {
3361 "Virtual Address", "infiniband.atomiceth.va",
3362 FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL}
3364 { &hf_infiniband_remote_key_AtomicETH, {
3365 "Remote Key", "infiniband.atomiceth.r_key",
3366 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
3369 { &hf_infiniband_swap_or_add_data, {
3370 "Swap (Or Add) Data", "infiniband.atomiceth.swapdt",
3371 FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL}
3373 { &hf_infiniband_compare_data, {
3374 "Compare Data", "infiniband.atomiceth.cmpdt",
3375 FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL}
3378 /* ACK Extended Transport Header (AETH) */
3379 { &hf_infiniband_AETH, {
3380 "ACK Extended Transport Header", "infiniband.aeth",
3381 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3383 { &hf_infiniband_syndrome, {
3384 "Syndrome", "infiniband.aeth.syndrome",
3385 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
3387 { &hf_infiniband_message_sequence_number, {
3388 "Message Sequence Number", "infiniband.aeth.msn",
3389 FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL}
3392 /* Atomic ACK Extended Transport Header (AtomicAckETH) */
3393 { &hf_infiniband_AtomicAckETH, {
3394 "Atomic ACK Extended Transport Header", "infiniband.atomicacketh",
3395 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3397 { &hf_infiniband_original_remote_data, {
3398 "Original Remote Data", "infiniband.atomicacketh.origremdt",
3399 FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL}
3402 /* Immediate Extended Transport Header (ImmDT) */
3403 { &hf_infiniband_IMMDT, {
3404 "Immediate Data", "infiniband.immdt",
3405 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3408 /* Invalidate Extended Transport Header (IETH) */
3409 { &hf_infiniband_IETH, {
3410 "RKey", "infiniband.ieth",
3411 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3415 { &hf_infiniband_payload, {
3416 "Payload", "infiniband.payload",
3417 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3419 { &hf_infiniband_invariant_crc, {
3420 "Invariant CRC", "infiniband.invariant.crc",
3421 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
3423 { &hf_infiniband_variant_crc, {
3424 "Variant CRC", "infiniband.variant.crc",
3425 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3427 { &hf_infiniband_raw_data, {
3428 "Raw Data", "infiniband.rawdata",
3429 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3431 /* Unknown or Vendor Specific */
3432 { &hf_infiniband_vendor, {
3433 "Unknown/Vendor Specific Data", "infiniband.vendor",
3434 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3437 /* MAD Base Header */
3438 { &hf_infiniband_MAD, {
3439 "MAD (Management Datagram) Common Header", "infiniband.mad",
3440 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3442 { &hf_infiniband_base_version, {
3443 "Base Version", "infiniband.mad.baseversion",
3444 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3446 { &hf_infiniband_mgmt_class, {
3447 "Management Class", "infiniband.mad.mgmtclass",
3448 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3450 { &hf_infiniband_class_version, {
3451 "Class Version", "infiniband.mad.classversion",
3452 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3455 { &hf_infiniband_reserved1, {
3456 "Reserved", "infiniband.mad.reserved1",
3457 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
3460 { &hf_infiniband_method, {
3461 "Method", "infiniband.mad.method",
3462 FT_UINT8, BASE_HEX, NULL, 0x7F, NULL, HFILL}
3464 { &hf_infiniband_status, {
3465 "Status", "infiniband.mad.status",
3466 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3468 { &hf_infiniband_class_specific, {
3469 "Class Specific", "infiniband.mad.classspecific",
3470 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3472 { &hf_infiniband_transaction_id, {
3473 "Transaction ID", "infiniband.mad.transactionid",
3474 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
3476 { &hf_infiniband_attribute_id, {
3477 "Attribute ID", "infiniband.mad.attributeid",
3478 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3480 { &hf_infiniband_reserved16, {
3481 "Reserved", "infiniband.mad.reserved16",
3482 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3484 { &hf_infiniband_attribute_modifier, {
3485 "Attribute Modifier", "infiniband.mad.attributemodifier",
3486 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
3488 { &hf_infiniband_data, {
3489 "MAD Data Payload", "infiniband.mad.data",
3490 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3494 { &hf_infiniband_RMPP, {
3495 "RMPP (Reliable Multi-Packet Transaction Protocol)", "infiniband.rmpp",
3496 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3498 { &hf_infiniband_rmpp_version, {
3499 "RMPP Type", "infiniband.rmpp.rmppversion",
3500 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3502 { &hf_infiniband_rmpp_type, {
3503 "RMPP Type", "infiniband.rmpp.rmpptype",
3504 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3506 { &hf_infiniband_r_resp_time, {
3507 "R Resp Time", "infiniband.rmpp.rresptime",
3508 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
3510 { &hf_infiniband_rmpp_flags, {
3511 "RMPP Flags", "infiniband.rmpp.rmppflags",
3512 FT_UINT8, BASE_HEX, VALS(RMPP_Flags), 0x0F, NULL, HFILL}
3514 { &hf_infiniband_rmpp_status, {
3515 "RMPP Status", "infiniband.rmpp.rmppstatus",
3516 FT_UINT8, BASE_HEX, VALS(RMPP_Status), 0x0, NULL, HFILL}
3518 { &hf_infiniband_rmpp_data1, {
3519 "RMPP Data 1", "infiniband.rmpp.data1",
3520 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
3522 { &hf_infiniband_rmpp_data2, {
3523 "RMPP Data 2", "infiniband.rmpp.data2",
3524 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
3529 { &hf_infiniband_RMPP_DATA, {
3530 "RMPP Data (Reliable Multi-Packet Transaction Protocol)", "infiniband.rmpp.data",
3531 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3534 { &hf_infiniband_segment_number, {
3535 "Segment Number", "infiniband.rmpp.segmentnumber",
3536 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
3538 { &hf_infiniband_payload_length32, {
3539 "Payload Length", "infiniband.rmpp.payloadlength",
3540 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
3542 { &hf_infiniband_transferred_data, {
3543 "Transferred Data", "infiniband.rmpp.transferreddata",
3544 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3548 { &hf_infiniband_new_window_last, {
3549 "New Window Last", "infiniband.rmpp.newwindowlast",
3550 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
3552 { &hf_infiniband_reserved220, {
3553 "Segment Number", "infiniband.rmpp.reserved220",
3554 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3557 /* RMPP ABORT/STOP */
3558 { &hf_infiniband_optional_extended_error_data, {
3559 "Optional Extended Error Data", "infiniband.rmpp.extendederrordata",
3560 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3563 /* SMP Data (LID Routed) */
3564 { &hf_infiniband_SMP_LID, {
3565 "Subnet Management Packet (LID Routed)", "infiniband.smplid",
3566 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3568 { &hf_infiniband_m_key, {
3569 "M_Key", "infiniband.smplid.mkey",
3570 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
3572 { &hf_infiniband_smp_data, {
3573 "SMP Data", "infiniband.smplid.smpdata",
3574 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3576 { &hf_infiniband_reserved1024, {
3577 "Reserved (1024 bits)", "infiniband.smplid.reserved1024",
3578 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3580 { &hf_infiniband_reserved256, {
3581 "Reserved (256 bits)", "infiniband.smplid.reserved256",
3582 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3585 /* XX: All following verified/corrected against Infiniband 1.2.1 Specification */
3586 /* SMP Data Directed Route */
3587 { &hf_infiniband_SMP_DIRECTED, {
3588 "Subnet Management Packet (Directed Route)", "infiniband.smpdirected",
3589 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3591 { &hf_infiniband_smp_status, {
3592 "Status", "infiniband.smpdirected.smpstatus",
3593 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3595 { &hf_infiniband_hop_pointer, {
3596 "Hop Pointer", "infiniband.smpdirected.hoppointer",
3597 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3599 { &hf_infiniband_hop_count, {
3600 "Hop Count", "infiniband.smpdirected.hopcount",
3601 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3603 { &hf_infiniband_dr_slid, {
3604 "DrSLID", "infiniband.smpdirected.drslid",
3605 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3607 { &hf_infiniband_dr_dlid, {
3608 "DrDLID", "infiniband.smpdirected.drdlid",
3609 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3611 { &hf_infiniband_reserved28, {
3612 "Reserved (224 bits)", "infiniband.smpdirected.reserved28",
3613 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3615 { &hf_infiniband_d, {
3616 "D (Direction Bit)", "infiniband.smpdirected.d",
3617 FT_UINT64, BASE_HEX, NULL, 0x8000, NULL, HFILL}
3619 { &hf_infiniband_initial_path, {
3620 "Initial Path", "infiniband.smpdirected.initialpath",
3621 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3623 { &hf_infiniband_return_path, {
3624 "Return Path", "infiniband.smpdirected.returnpath",
3625 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3629 { &hf_infiniband_SA, {
3630 "SA Packet (Subnet Administration)", "infiniband.sa.drdlid",
3631 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3633 { &hf_infiniband_sm_key, {
3634 "SM_Key (Verification Key)", "infiniband.sa.smkey",
3635 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
3637 { &hf_infiniband_attribute_offset, {
3638 "Attribute Offset", "infiniband.sa.attributeoffset",
3639 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3641 { &hf_infiniband_component_mask, {
3642 "Component Mask", "infiniband.sa.componentmask",
3643 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
3645 { &hf_infiniband_subnet_admin_data, {
3646 "Subnet Admin Data", "infiniband.sa.subnetadmindata",
3647 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3650 /* NodeDescription */
3651 { &hf_infiniband_NodeDescription_NodeString, {
3652 "NodeString", "infiniband.nodedescription.nodestring",
3653 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}
3657 { &hf_infiniband_NodeInfo_BaseVersion, {
3658 "BaseVersion", "infiniband.nodeinfo.baseversion",
3659 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3661 { &hf_infiniband_NodeInfo_ClassVersion, {
3662 "ClassVersion", "infiniband.nodeinfo.classversion",
3663 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3665 { &hf_infiniband_NodeInfo_NodeType, {
3666 "NodeType", "infiniband.nodeinfo.nodetype",
3667 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3669 { &hf_infiniband_NodeInfo_NumPorts, {
3670 "NumPorts", "infiniband.nodeinfo.numports",
3671 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3673 { &hf_infiniband_NodeInfo_SystemImageGUID, {
3674 "SystemImageGUID", "infiniband.nodeinfo.systemimageguid",
3675 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
3677 { &hf_infiniband_NodeInfo_NodeGUID, {
3678 "NodeGUID", "infiniband.nodeinfo.nodeguid",
3679 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
3681 { &hf_infiniband_NodeInfo_PortGUID, {
3682 "PortGUID", "infiniband.nodeinfo.portguid",
3683 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
3685 { &hf_infiniband_NodeInfo_PartitionCap, {
3686 "PartitionCap", "infiniband.nodeinfo.partitioncap",
3687 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3689 { &hf_infiniband_NodeInfo_DeviceID, {
3690 "DeviceID", "infiniband.nodeinfo.deviceid",
3691 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3693 { &hf_infiniband_NodeInfo_Revision, {
3694 "Revision", "infiniband.nodeinfo.revision",
3695 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
3697 { &hf_infiniband_NodeInfo_LocalPortNum, {
3698 "LocalPortNum", "infiniband.nodeinfo.localportnum",
3699 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3701 { &hf_infiniband_NodeInfo_VendorID, {
3702 "VendorID", "infiniband.nodeinfo.vendorid",
3703 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
3707 { &hf_infiniband_SwitchInfo_LinearFDBCap, {
3708 "LinearFDBCap", "infiniband.switchinfo.linearfdbcap",
3709 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3711 { &hf_infiniband_SwitchInfo_RandomFDBCap, {
3712 "RandomFDBCap", "infiniband.switchinfo.randomfdbcap",
3713 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3715 { &hf_infiniband_SwitchInfo_MulticastFDBCap, {
3716 "MulticastFDBCap", "infiniband.switchinfo.multicastfdbcap",
3717 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3719 { &hf_infiniband_SwitchInfo_LinearFDBTop, {
3720 "LinearFDBTop", "infiniband.switchinfo.linearfdbtop",
3721 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3723 { &hf_infiniband_SwitchInfo_DefaultPort, {
3724 "DefaultPort", "infiniband.switchinfo.defaultport",
3725 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3727 { &hf_infiniband_SwitchInfo_DefaultMulticastPrimaryPort, {
3728 "DefaultMulticastPrimaryPort", "infiniband.switchinfo.defaultmulticastprimaryport",
3729 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3731 { &hf_infiniband_SwitchInfo_DefaultMulticastNotPrimaryPort, {
3732 "DefaultMulticastNotPrimaryPort", "infiniband.switchinfo.defaultmulticastnotprimaryport",
3733 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3735 { &hf_infiniband_SwitchInfo_LifeTimeValue, {
3736 "LifeTimeValue", "infiniband.switchinfo.lifetimevalue",
3737 FT_UINT8, BASE_HEX, NULL, 0xF8, NULL, HFILL}
3739 { &hf_infiniband_SwitchInfo_PortStateChange, {
3740 "PortStateChange", "infiniband.switchinfo.portstatechange",
3741 FT_UINT8, BASE_HEX, NULL, 0x04, NULL, HFILL}
3743 { &hf_infiniband_SwitchInfo_OptimizedSLtoVLMappingProgramming, {
3744 "OptimizedSLtoVLMappingProgramming", "infiniband.switchinfo.optimizedsltovlmappingprogramming",
3745 FT_UINT8, BASE_HEX, NULL, 0x03, NULL, HFILL}
3747 { &hf_infiniband_SwitchInfo_LIDsPerPort, {
3748 "LIDsPerPort", "infiniband.switchinfo.lidsperport",
3749 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3751 { &hf_infiniband_SwitchInfo_PartitionEnforcementCap, {
3752 "PartitionEnforcementCap", "infiniband.switchinfo.partitionenforcementcap",
3753 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3755 { &hf_infiniband_SwitchInfo_InboundEnforcementCap, {
3756 "InboundEnforcementCap", "infiniband.switchinfo.inboundenforcementcap",
3757 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
3759 { &hf_infiniband_SwitchInfo_OutboundEnforcementCap, {
3760 "OutboundEnforcementCap", "infiniband.switchinfo.outboundenforcementcap",
3761 FT_UINT8, BASE_HEX, NULL, 0x40, NULL, HFILL}
3763 { &hf_infiniband_SwitchInfo_FilterRawInboundCap, {
3764 "FilterRawInboundCap", "infiniband.switchinfo.filterrawinboundcap",
3765 FT_UINT8, BASE_HEX, NULL, 0x20, NULL, HFILL}
3767 { &hf_infiniband_SwitchInfo_FilterRawOutboundCap, {
3768 "FilterRawOutboundCap", "infiniband.switchinfo.filterrawoutboundcap",
3769 FT_UINT8, BASE_HEX, NULL, 0x10, NULL, HFILL}
3771 { &hf_infiniband_SwitchInfo_EnhancedPortZero, {
3772 "EnhancedPortZero", "infiniband.switchinfo.enhancedportzero",
3773 FT_UINT8, BASE_HEX, NULL, 0x08, NULL, HFILL}
3778 { &hf_infiniband_GUIDInfo_GUIDBlock, {
3779 "GUIDBlock", "infiniband.switchinfo.guidblock",
3780 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3783 { &hf_infiniband_GUIDInfo_GUID, {
3784 "GUID", "infiniband.switchinfo.guid",
3785 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
3789 { &hf_infiniband_PortInfo_M_Key, {
3790 "M_Key", "infiniband.portinfo.m_key",
3791 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
3793 { &hf_infiniband_PortInfo_GidPrefix, {
3794 "GidPrefix", "infiniband.portinfo.guid",
3795 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
3797 { &hf_infiniband_PortInfo_LID, {
3798 "LID", "infiniband.portinfo.lid",
3799 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3801 { &hf_infiniband_PortInfo_MasterSMLID, {
3802 "MasterSMLID", "infiniband.portinfo.mastersmlid",
3803 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3805 { &hf_infiniband_PortInfo_CapabilityMask, {
3806 "CapabilityMask", "infiniband.portinfo.capabilitymask",
3807 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
3810 /* Capability Mask Flags */
3811 { &hf_infiniband_PortInfo_CapabilityMask_SM, {
3812 "SM", "infiniband.portinfo.capabilitymask.issm",
3813 FT_UINT32, BASE_HEX, NULL, 0x00000002, NULL, HFILL}
3815 { &hf_infiniband_PortInfo_CapabilityMask_NoticeSupported, {
3816 "NoticeSupported", "infiniband.portinfo.capabilitymask.noticesupported",
3817 FT_UINT32, BASE_HEX, NULL, 0x00000004, NULL, HFILL}
3819 { &hf_infiniband_PortInfo_CapabilityMask_TrapSupported, {
3820 "TrapSupported", "infiniband.portinfo.capabilitymask.trapsupported",
3821 FT_UINT32, BASE_HEX, NULL, 0x00000008, NULL, HFILL}
3823 { &hf_infiniband_PortInfo_CapabilityMask_OptionalPDSupported, {
3824 "OptionalPDSupported", "infiniband.portinfo.capabilitymask.optionalpdsupported",
3825 FT_UINT32, BASE_HEX, NULL, 0x00000010, NULL, HFILL}
3827 { &hf_infiniband_PortInfo_CapabilityMask_AutomaticMigrationSupported, {
3828 "AutomaticMigrationSupported", "infiniband.portinfo.capabilitymask.automaticmigrationsupported",
3829 FT_UINT32, BASE_HEX, NULL, 0x00000020, NULL, HFILL}
3831 { &hf_infiniband_PortInfo_CapabilityMask_SLMappingSupported, {
3832 "SLMappingSupported", "infiniband.portinfo.capabilitymask.slmappingsupported",
3833 FT_UINT32, BASE_HEX, NULL, 0x00000040, NULL, HFILL}
3835 { &hf_infiniband_PortInfo_CapabilityMask_MKeyNVRAM, {
3836 "MKeyNVRAM", "infiniband.portinfo.capabilitymask.mkeynvram",
3837 FT_UINT32, BASE_HEX, NULL, 0x00000080, NULL, HFILL}
3839 { &hf_infiniband_PortInfo_CapabilityMask_PKeyNVRAM, {
3840 "PKeyNVRAM", "infiniband.portinfo.capabilitymask.pkeynvram",
3841 FT_UINT32, BASE_HEX, NULL, 0x00000100, NULL, HFILL}
3843 { &hf_infiniband_PortInfo_CapabilityMask_LEDInfoSupported, {
3844 "LEDInfoSupported", "infiniband.portinfo.capabilitymask.ledinfosupported",
3845 FT_UINT32, BASE_HEX, NULL, 0x00000200, NULL, HFILL}
3847 { &hf_infiniband_PortInfo_CapabilityMask_SMdisabled, {
3848 "SMdisabled", "infiniband.portinfo.capabilitymask.smdisabled",
3849 FT_UINT32, BASE_HEX, NULL, 0x00000400, NULL, HFILL}
3851 { &hf_infiniband_PortInfo_CapabilityMask_SystemImageGUIDSupported, {
3852 "SystemImageGUIDSupported", "infiniband.portinfo.capabilitymask.systemimageguidsupported",
3853 FT_UINT32, BASE_HEX, NULL, 0x00000800, NULL, HFILL}
3855 { &hf_infiniband_PortInfo_CapabilityMask_PKeySwitchExternalPortTrapSupported, {
3856 "PKeySwitchExternalPortTrapSupported", "infiniband.portinfo.capabilitymask.pkeyswitchexternalporttrapsupported",
3857 FT_UINT32, BASE_HEX, NULL, 0x00001000, NULL, HFILL}
3859 { &hf_infiniband_PortInfo_CapabilityMask_CommunicationsManagementSupported, {
3860 "CommunicationsManagementSupported", "infiniband.portinfo.capabilitymask.communicationsmanagementsupported",
3861 FT_UINT32, BASE_HEX, NULL, 0x00010000, NULL, HFILL}
3863 { &hf_infiniband_PortInfo_CapabilityMask_SNMPTunnelingSupported, {
3864 "SNMPTunnelingSupported", "infiniband.portinfo.capabilitymask.snmptunnelingsupported",
3865 FT_UINT32, BASE_HEX, NULL, 0x00020000, NULL, HFILL}
3867 { &hf_infiniband_PortInfo_CapabilityMask_ReinitSupported, {
3868 "ReinitSupported", "infiniband.portinfo.capabilitymask.reinitsupported",
3869 FT_UINT32, BASE_HEX, NULL, 0x00040000, NULL, HFILL}
3871 { &hf_infiniband_PortInfo_CapabilityMask_DeviceManagementSupported, {
3872 "DeviceManagementSupported", "infiniband.portinfo.capabilitymask.devicemanagementsupported",
3873 FT_UINT32, BASE_HEX, NULL, 0x00080000, NULL, HFILL}
3875 { &hf_infiniband_PortInfo_CapabilityMask_VendorClassSupported, {
3876 "VendorClassSupported", "infiniband.portinfo.capabilitymask.vendorclasssupported",
3877 FT_UINT32, BASE_HEX, NULL, 0x00100000, NULL, HFILL}
3879 { &hf_infiniband_PortInfo_CapabilityMask_DRNoticeSupported, {
3880 "DRNoticeSupported", "infiniband.portinfo.capabilitymask.drnoticesupported",
3881 FT_UINT32, BASE_HEX, NULL, 0x00200000, NULL, HFILL}
3883 { &hf_infiniband_PortInfo_CapabilityMask_CapabilityMaskNoticeSupported, {
3884 "CapabilityMaskNoticeSupported", "infiniband.portinfo.capabilitymask.capabilitymasknoticesupported",
3885 FT_UINT32, BASE_HEX, NULL, 0x00400000, NULL, HFILL}
3887 { &hf_infiniband_PortInfo_CapabilityMask_BootManagementSupported, {
3888 "BootManagementSupported", "infiniband.portinfo.capabilitymask.bootmanagementsupported",
3889 FT_UINT32, BASE_HEX, NULL, 0x00800000, NULL, HFILL}
3891 { &hf_infiniband_PortInfo_CapabilityMask_LinkRoundTripLatencySupported, {
3892 "LinkRoundTripLatencySupported", "infiniband.portinfo.capabilitymask.linkroundtriplatencysupported",
3893 FT_UINT32, BASE_HEX, NULL, 0x01000000, NULL, HFILL}
3895 { &hf_infiniband_PortInfo_CapabilityMask_ClientRegistrationSupported, {
3896 "ClientRegistrationSupported", "infiniband.portinfo.capabilitymask.clientregistrationsupported",
3897 FT_UINT32, BASE_HEX, NULL, 0x02000000, NULL, HFILL}
3899 { &hf_infiniband_PortInfo_CapabilityMask_OtherLocalChangesNoticeSupported, {
3900 "OtherLocalChangesNoticeSupported", "infiniband.portinfo.capabilitymask.otherlocalchangesnoticesupported",
3901 FT_UINT32, BASE_HEX, NULL, 0x04000000, NULL, HFILL}
3903 { &hf_infiniband_PortInfo_CapabilityMask_LinkSpeedWIdthPairsTableSupported, {
3904 "LinkSpeedWIdthPairsTableSupported", "infiniband.portinfo.capabilitymask.linkspeedwidthpairstablesupported",
3905 FT_UINT32, BASE_HEX, NULL, 0x08000000, NULL, HFILL}
3907 /* End Capability Mask Flags */
3910 { &hf_infiniband_PortInfo_DiagCode, {
3911 "DiagCode", "infiniband.portinfo.diagcode",
3912 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3914 { &hf_infiniband_PortInfo_M_KeyLeasePeriod, {
3915 "M_KeyLeasePeriod", "infiniband.portinfo.m_keyleaseperiod",
3916 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3918 { &hf_infiniband_PortInfo_LocalPortNum, {
3919 "LocalPortNum", "infiniband.portinfo.localportnum",
3920 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3922 { &hf_infiniband_PortInfo_LinkWidthEnabled, {
3923 "LinkWidthEnabled", "infiniband.portinfo.linkwidthenabled",
3924 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3926 { &hf_infiniband_PortInfo_LinkWidthSupported, {
3927 "LinkWidthSupported", "infiniband.portinfo.linkwidthsupported",
3928 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3930 { &hf_infiniband_PortInfo_LinkWidthActive, {
3931 "LinkWidthActive", "infiniband.portinfo.linkwidthactive",
3932 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3934 { &hf_infiniband_PortInfo_LinkSpeedSupported, {
3935 "LinkSpeedSupported", "infiniband.portinfo.linkspeedsupported",
3936 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
3938 { &hf_infiniband_PortInfo_PortState, {
3939 "PortState", "infiniband.portinfo.portstate",
3940 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
3942 { &hf_infiniband_PortInfo_PortPhysicalState, {
3943 "PortPhysicalState", "infiniband.portinfo.portphysicalstate",
3944 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
3946 { &hf_infiniband_PortInfo_LinkDownDefaultState, {
3947 "LinkDownDefaultState", "infiniband.portinfo.linkdowndefaultstate",
3948 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
3950 { &hf_infiniband_PortInfo_M_KeyProtectBits, {
3951 "M_KeyProtectBits", "infiniband.portinfo.m_keyprotectbits",
3952 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
3954 { &hf_infiniband_PortInfo_LMC, {
3955 "LMC", "infiniband.portinfo.lmc",
3956 FT_UINT8, BASE_HEX, NULL, 0x07, NULL, HFILL}
3958 { &hf_infiniband_PortInfo_LinkSpeedActive, {
3959 "LinkSpeedActive", "infiniband.portinfo.linkspeedactive",
3960 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
3962 { &hf_infiniband_PortInfo_LinkSpeedEnabled, {
3963 "LinkSpeedEnabled", "infiniband.portinfo.linkspeedenabled",
3964 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
3966 { &hf_infiniband_PortInfo_NeighborMTU, {
3967 "NeighborMTU", "infiniband.portinfo.neighbormtu",
3968 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
3970 { &hf_infiniband_PortInfo_MasterSMSL, {
3971 "MasterSMSL", "infiniband.portinfo.mastersmsl",
3972 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
3974 { &hf_infiniband_PortInfo_VLCap, {
3975 "VLCap", "infiniband.portinfo.vlcap",
3976 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
3978 { &hf_infiniband_PortInfo_InitType, {
3979 "InitType", "infiniband.portinfo.inittype",
3980 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
3982 { &hf_infiniband_PortInfo_VLHighLimit, {
3983 "VLHighLimit", "infiniband.portinfo.vlhighlimit",
3984 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3986 { &hf_infiniband_PortInfo_VLArbitrationHighCap, {
3987 "VLArbitrationHighCap", "infiniband.portinfo.vlarbitrationhighcap",
3988 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3990 { &hf_infiniband_PortInfo_VLArbitrationLowCap, {
3991 "VLArbitrationLowCap", "infiniband.portinfo.vlarbitrationlowcap",
3992 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3994 { &hf_infiniband_PortInfo_InitTypeReply, {
3995 "InitTypeReply", "infiniband.portinfo.inittypereply",
3996 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
3998 { &hf_infiniband_PortInfo_MTUCap, {
3999 "MTUCap", "infiniband.portinfo.mtucap",
4000 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
4002 { &hf_infiniband_PortInfo_VLStallCount, {
4003 "VLStallCount", "infiniband.portinfo.vlstallcount",
4004 FT_UINT8, BASE_HEX, NULL, 0xE0, NULL, HFILL}
4006 { &hf_infiniband_PortInfo_HOQLife, {
4007 "HOQLife", "infiniband.portinfo.hoqlife",
4008 FT_UINT8, BASE_HEX, NULL, 0x1F, NULL, HFILL}
4010 { &hf_infiniband_PortInfo_OperationalVLs, {
4011 "OperationalVLs", "infiniband.portinfo.operationalvls",
4012 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
4014 { &hf_infiniband_PortInfo_PartitionEnforcementInbound, {
4015 "PartitionEnforcementInbound", "infiniband.portinfo.partitionenforcementinbound",
4016 FT_UINT8, BASE_HEX, NULL, 0x08, NULL, HFILL}
4018 { &hf_infiniband_PortInfo_PartitionEnforcementOutbound, {
4019 "PartitionEnforcementOutbound", "infiniband.portinfo.partitionenforcementoutbound",
4020 FT_UINT8, BASE_HEX, NULL, 0x04, NULL, HFILL}
4022 { &hf_infiniband_PortInfo_FilterRawInbound, {
4023 "FilterRawInbound", "infiniband.portinfo.filterrawinbound",
4024 FT_UINT8, BASE_HEX, NULL, 0x02, NULL, HFILL}
4026 { &hf_infiniband_PortInfo_FilterRawOutbound, {
4027 "FilterRawOutbound", "infiniband.portinfo.filterrawoutbound",
4028 FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL}
4030 { &hf_infiniband_PortInfo_M_KeyViolations, {
4031 "M_KeyViolations", "infiniband.portinfo.m_keyviolations",
4032 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4034 { &hf_infiniband_PortInfo_P_KeyViolations, {
4035 "P_KeyViolations", "infiniband.portinfo.p_keyviolations",
4036 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4038 { &hf_infiniband_PortInfo_Q_KeyViolations, {
4039 "Q_KeyViolations", "infiniband.portinfo.q_keyviolations",
4040 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4042 { &hf_infiniband_PortInfo_GUIDCap, {
4043 "GUIDCap", "infiniband.portinfo.guidcap",
4044 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4046 { &hf_infiniband_PortInfo_ClientReregister, {
4047 "ClientReregister", "infiniband.portinfo.clientreregister",
4048 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4050 { &hf_infiniband_PortInfo_SubnetTimeOut, {
4051 "SubnetTimeOut", "infiniband.portinfo.subnettimeout",
4052 FT_UINT8, BASE_HEX, NULL, 0x1F, NULL, HFILL}
4054 { &hf_infiniband_PortInfo_RespTimeValue, {
4055 "RespTimeValue", "infiniband.portinfo.resptimevalue",
4056 FT_UINT8, BASE_HEX, NULL, 0x1F, NULL, HFILL}
4058 { &hf_infiniband_PortInfo_LocalPhyErrors, {
4059 "LocalPhyErrors", "infiniband.portinfo.localphyerrors",
4060 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
4062 { &hf_infiniband_PortInfo_OverrunErrors, {
4063 "OverrunErrors", "infiniband.portinfo.overrunerrors",
4064 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
4066 { &hf_infiniband_PortInfo_MaxCreditHint, {
4067 "MaxCreditHint", "infiniband.portinfo.maxcredithint",
4068 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4070 { &hf_infiniband_PortInfo_LinkRoundTripLatency, {
4071 "LinkRoundTripLatency", "infiniband.portinfo.linkroundtriplatency",
4072 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
4076 { &hf_infiniband_P_KeyTable_P_KeyTableBlock, {
4077 "P_KeyTableBlock", "infiniband.p_keytable.p_keytableblock",
4078 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4080 { &hf_infiniband_P_KeyTable_MembershipType, {
4081 "MembershipType", "infiniband.p_keytable.membershiptype",
4082 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4084 { &hf_infiniband_P_KeyTable_P_KeyBase, {
4085 "P_KeyBase", "infiniband.p_keytable.p_keybase",
4086 FT_UINT16, BASE_HEX, NULL, 0x7FFF, NULL, HFILL}
4089 /* SLtoVLMappingTable */
4090 { &hf_infiniband_SLtoVLMappingTable_SLtoVL_HighBits, {
4091 "SL(x)toVL", "infiniband.sltovlmappingtable.sltovlhighbits",
4092 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
4094 { &hf_infiniband_SLtoVLMappingTable_SLtoVL_LowBits, {
4095 "SL(x)toVL", "infiniband.sltovlmappingtable.sltovllowbits",
4096 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
4099 /* VLArbitrationTable */
4101 { &hf_infiniband_VLArbitrationTable_VLWeightPairs, {
4102 "VLWeightPairs", "infiniband.vlarbitrationtable.vlweightpairs",
4103 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4106 { &hf_infiniband_VLArbitrationTable_VL, {
4107 "VL", "infiniband.vlarbitrationtable.vl",
4108 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
4110 { &hf_infiniband_VLArbitrationTable_Weight, {
4111 "Weight", "infiniband.vlarbitrationtable.weight",
4112 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4115 /* LinearForwardingTable */
4117 { &hf_infiniband_LinearForwardingTable_LinearForwardingTableBlock, {
4118 "LinearForwardingTableBlock", "infiniband.linearforwardingtable.linearforwardingtableblock",
4119 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4122 { &hf_infiniband_LinearForwardingTable_Port, {
4123 "Port", "infiniband.linearforwardingtable.port",
4124 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4127 /* RandomForwardingTable */
4129 { &hf_infiniband_RandomForwardingTable_RandomForwardingTableBlock, {
4130 "RandomForwardingTableBlock", "infiniband.randomforwardingtable.randomforwardingtableblock",
4131 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4134 { &hf_infiniband_RandomForwardingTable_LID, {
4135 "LID", "infiniband.randomforwardingtable.lid",
4136 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4138 { &hf_infiniband_RandomForwardingTable_Valid, {
4139 "Valid", "infiniband.randomforwardingtable.valid",
4140 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4142 { &hf_infiniband_RandomForwardingTable_LMC, {
4143 "LMC", "infiniband.randomforwardingtable.lmc",
4144 FT_UINT8, BASE_HEX, NULL, 0x70, NULL, HFILL}
4146 { &hf_infiniband_RandomForwardingTable_Port, {
4147 "Port", "infiniband.randomforwardingtable.port",
4148 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4151 /* MulticastForwardingTable */
4153 { &hf_infiniband_MulticastForwardingTable_MulticastForwardingTableBlock , {
4154 "MulticastForwardingTableBlock", "infiniband.multicastforwardingtable.multicastforwardingtableblock",
4155 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4158 { &hf_infiniband_MulticastForwardingTable_PortMask, {
4159 "PortMask", "infiniband.multicastforwardingtable.portmask",
4160 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4164 { &hf_infiniband_SMInfo_GUID, {
4165 "GUID", "infiniband.sminfo.guid",
4166 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
4168 { &hf_infiniband_SMInfo_SM_Key, {
4169 "SM_Key", "infiniband.sminfo.sm_key",
4170 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
4172 { &hf_infiniband_SMInfo_ActCount, {
4173 "ActCount", "infiniband.sminfo.actcount",
4174 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
4176 { &hf_infiniband_SMInfo_Priority, {
4177 "Priority", "infiniband.sminfo.priority",
4178 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
4180 { &hf_infiniband_SMInfo_SMState, {
4181 "SMState", "infiniband.sminfo.smstate",
4182 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
4186 { &hf_infiniband_VendorDiag_NextIndex, {
4187 "NextIndex", "infiniband.vendordiag.nextindex",
4188 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4190 { &hf_infiniband_VendorDiag_DiagData, {
4191 "DiagData", "infiniband.vendordiag.diagdata",
4192 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4196 { &hf_infiniband_LedInfo_LedMask, {
4197 "LedMask", "infiniband.ledinfo.ledmask",
4198 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4201 /* LinkSpeedWidthPairsTable */
4202 { &hf_infiniband_LinkSpeedWidthPairsTable_NumTables, {
4203 "NumTables", "infiniband.linkspeedwidthpairstable.numtables",
4204 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4206 { &hf_infiniband_LinkSpeedWidthPairsTable_PortMask, {
4207 "PortMask", "infiniband.linkspeedwidthpairstable.portmask",
4208 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4210 { &hf_infiniband_LinkSpeedWidthPairsTable_SpeedTwoFive, {
4211 "Speed 2.5 Gbps", "infiniband.linkspeedwidthpairstable.speedtwofive",
4212 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4214 { &hf_infiniband_LinkSpeedWidthPairsTable_SpeedFive, {
4215 "Speed 5 Gbps", "infiniband.linkspeedwidthpairstable.speedfive",
4216 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4218 { &hf_infiniband_LinkSpeedWidthPairsTable_SpeedTen, {
4219 "Speed 10 Gbps", "infiniband.linkspeedwidthpairstable.speedten",
4220 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4224 /* PortInfoRecord */
4225 /* SLtoVLMappingTableRecord */
4226 /* SwitchInfoRecord */
4227 /* LinearForwardingTableRecord */
4228 /* RandomForwardingTableRecord */
4229 /* MulticastForwardingTableRecord */
4230 /* VLArbitrationTableRecord */
4231 { &hf_infiniband_SA_LID, {
4232 "LID", "infiniband.sa.lid",
4233 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4235 { &hf_infiniband_SA_EndportLID, {
4236 "EndportLID", "infiniband.sa.endportlid",
4237 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4239 { &hf_infiniband_SA_PortNum, {
4240 "PortNum", "infiniband.sa.portnum",
4241 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4243 { &hf_infiniband_SA_InputPortNum , {
4244 "InputPortNum", "infiniband.sa.inputportnum",
4245 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4247 { &hf_infiniband_SA_OutputPortNum, {
4248 "OutputPortNum", "infiniband.sa.outputportnum",
4249 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4251 { &hf_infiniband_SA_BlockNum_EightBit, {
4252 "BlockNum_EightBit", "infiniband.sa.blocknum_eightbit",
4253 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4255 { &hf_infiniband_SA_BlockNum_NineBit, {
4256 "BlockNum_NineBit", "infiniband.sa.blocknum_ninebit",
4257 FT_UINT16, BASE_HEX, NULL, 0x01FF, NULL, HFILL}
4259 { &hf_infiniband_SA_BlockNum_SixteenBit, {
4260 "BlockNum_SixteenBit", "infiniband.sa.blocknum_sixteenbit",
4261 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4263 { &hf_infiniband_SA_Position, {
4264 "Position", "infiniband.sa.position",
4265 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
4268 { &hf_infiniband_SA_Index, {
4269 "Index", "infiniband.sa.index",
4270 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4274 /* InformInfoRecord */
4275 { &hf_infiniband_InformInfoRecord_SubscriberGID, {
4276 "SubscriberGID", "infiniband.informinforecord.subscribergid",
4277 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4279 { &hf_infiniband_InformInfoRecord_Enum, {
4280 "Enum", "infiniband.informinforecord.enum",
4281 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4285 { &hf_infiniband_InformInfo_GID, {
4286 "GID", "infiniband.informinfo.gid",
4287 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4289 { &hf_infiniband_InformInfo_LIDRangeBegin, {
4290 "LIDRangeBegin", "infiniband.informinfo.lidrangebegin",
4291 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4293 { &hf_infiniband_InformInfo_LIDRangeEnd, {
4294 "LIDRangeEnd", "infiniband.informinfo.lidrangeend",
4295 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4297 { &hf_infiniband_InformInfo_IsGeneric, {
4298 "IsGeneric", "infiniband.informinfo.isgeneric",
4299 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4301 { &hf_infiniband_InformInfo_Subscribe, {
4302 "Subscribe", "infiniband.informinfo.subscribe",
4303 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4305 { &hf_infiniband_InformInfo_Type, {
4306 "Type", "infiniband.informinfo.type",
4307 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4309 { &hf_infiniband_InformInfo_TrapNumberDeviceID, {
4310 "TrapNumberDeviceID", "infiniband.informinfo.trapnumberdeviceid",
4311 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4313 { &hf_infiniband_InformInfo_QPN, {
4314 "QPN", "infiniband.informinfo.qpn",
4315 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
4317 { &hf_infiniband_InformInfo_RespTimeValue, {
4318 "RespTimeValue", "infiniband.informinfo.resptimevalue",
4319 FT_UINT8, BASE_HEX, NULL, 0x1F, NULL, HFILL}
4321 { &hf_infiniband_InformInfo_ProducerTypeVendorID, {
4322 "ProducerTypeVendorID", "infiniband.informinfo.producertypevendorid",
4323 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
4327 { &hf_infiniband_LinkRecord_FromLID, {
4328 "FromLID", "infiniband.linkrecord.fromlid",
4329 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4331 { &hf_infiniband_LinkRecord_FromPort, {
4332 "FromPort", "infiniband.linkrecord.fromport",
4333 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4335 { &hf_infiniband_LinkRecord_ToPort, {
4336 "ToPort", "infiniband.linkrecord.toport",
4337 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4339 { &hf_infiniband_LinkRecord_ToLID, {
4340 "ToLID", "infiniband.linkrecord.tolid",
4341 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4345 { &hf_infiniband_ServiceRecord_ServiceID, {
4346 "ServiceID", "infiniband.linkrecord.serviceid",
4347 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
4349 { &hf_infiniband_ServiceRecord_ServiceGID, {
4350 "ServiceGID", "infiniband.linkrecord.servicegid",
4351 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4353 { &hf_infiniband_ServiceRecord_ServiceP_Key, {
4354 "ServiceP_Key", "infiniband.linkrecord.servicep_key",
4355 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4357 { &hf_infiniband_ServiceRecord_ServiceLease, {
4358 "ServiceLease", "infiniband.linkrecord.servicelease",
4359 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
4361 { &hf_infiniband_ServiceRecord_ServiceKey, {
4362 "ServiceKey", "infiniband.linkrecord.servicekey",
4363 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4365 { &hf_infiniband_ServiceRecord_ServiceName, {
4366 "ServiceName", "infiniband.linkrecord.servicename",
4367 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4369 { &hf_infiniband_ServiceRecord_ServiceData, {
4370 "ServiceData", "infiniband.linkrecord.servicedata",
4371 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4374 /* ServiceAssociationRecord */
4375 { &hf_infiniband_ServiceAssociationRecord_ServiceKey, {
4376 "ServiceKey", "infiniband.serviceassociationrecord.servicekey",
4377 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4379 { &hf_infiniband_ServiceAssociationRecord_ServiceName, {
4380 "ServiceName", "infiniband.serviceassociationrecord.servicename",
4381 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}
4385 { &hf_infiniband_PathRecord_DGID, {
4386 "DGID", "infiniband.pathrecord.dgid",
4387 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4389 { &hf_infiniband_PathRecord_SGID, {
4390 "SGID", "infiniband.pathrecord.sgid",
4391 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4393 { &hf_infiniband_PathRecord_DLID, {
4394 "DLID", "infiniband.pathrecord.dlid",
4395 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4397 { &hf_infiniband_PathRecord_SLID, {
4398 "SLID", "infiniband.pathrecord.slid",
4399 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4401 { &hf_infiniband_PathRecord_RawTraffic, {
4402 "RawTraffic", "infiniband.pathrecord.rawtraffic",
4403 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4405 { &hf_infiniband_PathRecord_FlowLabel, {
4406 "FlowLabel", "infiniband.pathrecord.flowlabel",
4407 FT_UINT24, BASE_HEX, NULL, 0x0FFFFF, NULL, HFILL}
4409 { &hf_infiniband_PathRecord_HopLimit, {
4410 "HopLimit", "infiniband.pathrecord.hoplimit",
4411 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4413 { &hf_infiniband_PathRecord_TClass, {
4414 "TClass", "infiniband.pathrecord.tclass",
4415 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4417 { &hf_infiniband_PathRecord_Reversible, {
4418 "Reversible", "infiniband.pathrecord.reversible",
4419 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4421 { &hf_infiniband_PathRecord_NumbPath, {
4422 "NumbPath", "infiniband.pathrecord.numbpath",
4423 FT_UINT8, BASE_HEX, NULL, 0x7F, NULL, HFILL}
4425 { &hf_infiniband_PathRecord_P_Key, {
4426 "P_Key", "infiniband.pathrecord.p_key",
4427 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4429 { &hf_infiniband_PathRecord_SL, {
4430 "SL", "infiniband.pathrecord.sl",
4431 FT_UINT16, BASE_HEX, NULL, 0x000F, NULL, HFILL}
4433 { &hf_infiniband_PathRecord_MTUSelector, {
4434 "MTUSelector", "infiniband.pathrecord.mtuselector",
4435 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
4437 { &hf_infiniband_PathRecord_MTU, {
4438 "MTU", "infiniband.pathrecord.mtu",
4439 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
4441 { &hf_infiniband_PathRecord_RateSelector, {
4442 "RateSelector", "infiniband.pathrecord.rateselector",
4443 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
4445 { &hf_infiniband_PathRecord_Rate, {
4446 "Rate", "infiniband.pathrecord.rate",
4447 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
4449 { &hf_infiniband_PathRecord_PacketLifeTimeSelector, {
4450 "PacketLifeTimeSelector", "infiniband.pathrecord.packetlifetimeselector",
4451 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
4453 { &hf_infiniband_PathRecord_PacketLifeTime, {
4454 "PacketLifeTime", "infiniband.pathrecord.packetlifetime",
4455 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
4457 { &hf_infiniband_PathRecord_Preference, {
4458 "Preference", "infiniband.pathrecord.preference",
4459 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4462 /* MCMemberRecord */
4463 { &hf_infiniband_MCMemberRecord_MGID, {
4464 "MGID", "infiniband.mcmemberrecord.mgid",
4465 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4467 { &hf_infiniband_MCMemberRecord_PortGID, {
4468 "PortGID", "infiniband.mcmemberrecord.portgid",
4469 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4471 { &hf_infiniband_MCMemberRecord_Q_Key, {
4472 "Q_Key", "infiniband.mcmemberrecord.q_key",
4473 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
4475 { &hf_infiniband_MCMemberRecord_MLID, {
4476 "MLID", "infiniband.mcmemberrecord.mlid",
4477 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4479 { &hf_infiniband_MCMemberRecord_MTUSelector, {
4480 "MTUSelector", "infiniband.mcmemberrecord.mtuselector",
4481 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
4483 { &hf_infiniband_MCMemberRecord_MTU, {
4484 "MTU", "infiniband.mcmemberrecord.mtu",
4485 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
4487 { &hf_infiniband_MCMemberRecord_TClass, {
4488 "TClass", "infiniband.mcmemberrecord.tclass",
4489 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4491 { &hf_infiniband_MCMemberRecord_P_Key, {
4492 "P_Key", "infiniband.mcmemberrecord.p_key",
4493 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4495 { &hf_infiniband_MCMemberRecord_RateSelector, {
4496 "RateSelector", "infiniband.mcmemberrecord.rateselector",
4497 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
4499 { &hf_infiniband_MCMemberRecord_Rate, {
4500 "Rate", "infiniband.mcmemberrecord.rate",
4501 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
4503 { &hf_infiniband_MCMemberRecord_PacketLifeTimeSelector, {
4504 "PacketLifeTimeSelector", "infiniband.mcmemberrecord.packetlifetimeselector",
4505 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
4507 { &hf_infiniband_MCMemberRecord_PacketLifeTime, {
4508 "PacketLifeTime", "infiniband.mcmemberrecord.packetlifetime",
4509 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
4511 { &hf_infiniband_MCMemberRecord_SL, {
4512 "SL", "infiniband.mcmemberrecord.sl",
4513 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
4515 { &hf_infiniband_MCMemberRecord_FlowLabel, {
4516 "FlowLabel", "infiniband.mcmemberrecord.flowlabel",
4517 FT_UINT24, BASE_HEX, NULL, 0x0FFFFF, NULL, HFILL}
4519 { &hf_infiniband_MCMemberRecord_HopLimit, {
4520 "HopLimit", "infiniband.mcmemberrecord.hoplimit",
4521 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4523 { &hf_infiniband_MCMemberRecord_Scope, {
4524 "Scope", "infiniband.mcmemberrecord.scope",
4525 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
4527 { &hf_infiniband_MCMemberRecord_JoinState, {
4528 "JoinState", "infiniband.mcmemberrecord.joinstate",
4529 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
4531 { &hf_infiniband_MCMemberRecord_ProxyJoin, {
4532 "ProxyJoin", "infiniband.mcmemberrecord.proxyjoin",
4533 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4536 /* MultiPathRecord */
4537 { &hf_infiniband_MultiPathRecord_RawTraffic, {
4538 "RawTraffic", "infiniband.multipathrecord.rawtraffic",
4539 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4541 { &hf_infiniband_MultiPathRecord_FlowLabel, {
4542 "FlowLabel", "infiniband.multipathrecord.flowlabel",
4543 FT_UINT24, BASE_HEX, NULL, 0x0FFFFF, NULL, HFILL}
4545 { &hf_infiniband_MultiPathRecord_HopLimit, {
4546 "HopLimit", "infiniband.multipathrecord.hoplimit",
4547 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4549 { &hf_infiniband_MultiPathRecord_TClass, {
4550 "TClass", "infiniband.multipathrecord.tclass",
4551 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4553 { &hf_infiniband_MultiPathRecord_Reversible, {
4554 "Reversible", "infiniband.multipathrecord.reversible",
4555 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4557 { &hf_infiniband_MultiPathRecord_NumbPath, {
4558 "NumbPath", "infiniband.multipathrecord.numbpath",
4559 FT_UINT8, BASE_HEX, NULL, 0x7F, NULL, HFILL}
4561 { &hf_infiniband_MultiPathRecord_P_Key, {
4562 "P_Key", "infiniband.multipathrecord.p_key",
4563 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4565 { &hf_infiniband_MultiPathRecord_SL, {
4566 "SL", "infiniband.multipathrecord.sl",
4567 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
4569 { &hf_infiniband_MultiPathRecord_MTUSelector, {
4570 "MTUSelector", "infiniband.multipathrecord.mtuselector",
4571 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
4573 { &hf_infiniband_MultiPathRecord_MTU, {
4574 "MTU", "infiniband.multipathrecord.mtu",
4575 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
4577 { &hf_infiniband_MultiPathRecord_RateSelector, {
4578 "RateSelector", "infiniband.multipathrecord.rateselector",
4579 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
4581 { &hf_infiniband_MultiPathRecord_Rate, {
4582 "Rate", "infiniband.multipathrecord.rate",
4583 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
4585 { &hf_infiniband_MultiPathRecord_PacketLifeTimeSelector, {
4586 "PacketLifeTimeSelector", "infiniband.multipathrecord.packetlifetimeselector",
4587 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
4589 { &hf_infiniband_MultiPathRecord_PacketLifeTime, {
4590 "PacketLifeTime", "infiniband.multipathrecord.packetlifetime",
4591 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
4593 { &hf_infiniband_MultiPathRecord_IndependenceSelector, {
4594 "IndependenceSelector", "infiniband.multipathrecord.independenceselector",
4595 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
4597 { &hf_infiniband_MultiPathRecord_GIDScope, {
4598 "GIDScope", "infiniband.multipathrecord.gidscope",
4599 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
4601 { &hf_infiniband_MultiPathRecord_SGIDCount, {
4602 "SGIDCount", "infiniband.multipathrecord.sgidcount",
4603 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4605 { &hf_infiniband_MultiPathRecord_DGIDCount, {
4606 "DGIDCount", "infiniband.multipathrecord.dgidcount",
4607 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4609 { &hf_infiniband_MultiPathRecord_SDGID, {
4610 "SDGID", "infiniband.multipathrecord.sdgid",
4611 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4615 { &hf_infiniband_Notice_IsGeneric, {
4616 "IsGeneric", "infiniband.notice.isgeneric",
4617 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4619 { &hf_infiniband_Notice_Type, {
4620 "Type", "infiniband.notice.type",
4621 FT_UINT8, BASE_HEX, NULL, 0x7F, NULL, HFILL}
4623 { &hf_infiniband_Notice_ProducerTypeVendorID, {
4624 "ProducerTypeVendorID", "infiniband.notice.producertypevendorid",
4625 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
4627 { &hf_infiniband_Notice_TrapNumberDeviceID, {
4628 "TrapNumberDeviceID", "infiniband.notice.trapnumberdeviceid",
4629 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4631 { &hf_infiniband_Notice_IssuerLID, {
4632 "IssuerLID", "infiniband.notice.issuerlid",
4633 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4635 { &hf_infiniband_Notice_NoticeToggle, {
4636 "NoticeToggle", "infiniband.notice.noticetoggle",
4637 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4639 { &hf_infiniband_Notice_NoticeCount, {
4640 "NoticeCount", "infiniband.notice.noticecount",
4641 FT_UINT16, BASE_HEX, NULL, 0x7FFF, NULL, HFILL}
4643 { &hf_infiniband_Notice_DataDetails, {
4644 "DataDetails", "infiniband.notice.datadetails",
4645 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4648 { &hf_infiniband_Notice_IssuerGID, {
4649 "IssuerGID", "infiniband.notice.issuergid",
4650 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4652 { &hf_infiniband_Notice_ClassTrapSpecificData, {
4653 "ClassTrapSpecificData", "infiniband.notice.classtrapspecificdata",
4654 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4658 /* Traps 64,65,66,67 */
4659 { &hf_infiniband_Trap_GIDADDR, {
4660 "GIDADDR", "infiniband.trap.gidaddr",
4661 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4664 { &hf_infiniband_Trap_COMP_MASK, {
4665 "COMP_MASK", "infiniband.trap.comp_mask",
4666 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
4668 { &hf_infiniband_Trap_WAIT_FOR_REPATH, {
4669 "WAIT_FOR_REPATH", "infiniband.trap.wait_for_repath",
4670 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4673 { &hf_infiniband_Trap_PATH_REC, {
4674 "PATH_REC", "infiniband.trap.path_rec",
4675 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4680 { &hf_infiniband_Trap_LIDADDR, {
4681 "LIDADDR", "infiniband.trap.lidaddr",
4682 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4685 /* Trap 129, 130, 131 */
4686 { &hf_infiniband_Trap_PORTNO, {
4687 "PORTNO", "infiniband.trap.portno",
4688 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4692 { &hf_infiniband_Trap_OtherLocalChanges, {
4693 "OtherLocalChanges", "infiniband.trap.otherlocalchanges",
4694 FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL}
4696 { &hf_infiniband_Trap_CAPABILITYMASK, {
4697 "CAPABILITYMASK", "infiniband.trap.capabilitymask",
4698 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
4700 { &hf_infiniband_Trap_LinkSpeecEnabledChange, {
4701 "LinkSpeecEnabledChange", "infiniband.trap.linkspeecenabledchange",
4702 FT_UINT8, BASE_HEX, NULL, 0x04, NULL, HFILL}
4704 { &hf_infiniband_Trap_LinkWidthEnabledChange, {
4705 "LinkWidthEnabledChange", "infiniband.trap.linkwidthenabledchange",
4706 FT_UINT8, BASE_HEX, NULL, 0x02, NULL, HFILL}
4708 { &hf_infiniband_Trap_NodeDescriptionChange, {
4709 "NodeDescriptionChange", "infiniband.trap.nodedescriptionchange",
4710 FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL}
4714 { &hf_infiniband_Trap_SYSTEMIMAGEGUID, {
4715 "SYSTEMIMAGEGUID", "infiniband.trap.systemimageguid",
4716 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
4720 { &hf_infiniband_Trap_DRSLID, {
4721 "DRSLID", "infiniband.trap.drslid",
4722 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4724 { &hf_infiniband_Trap_METHOD, {
4725 "METHOD", "infiniband.trap.method",
4726 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4728 { &hf_infiniband_Trap_ATTRIBUTEID, {
4729 "ATTRIBUTEID", "infiniband.trap.attributeid",
4730 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4732 { &hf_infiniband_Trap_ATTRIBUTEMODIFIER, {
4733 "ATTRIBUTEMODIFIER", "infiniband.trap.attributemodifier",
4734 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
4736 { &hf_infiniband_Trap_MKEY, {
4737 "MKEY", "infiniband.trap.mkey",
4738 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
4740 { &hf_infiniband_Trap_DRNotice, {
4741 "DRNotice", "infiniband.trap.drnotice",
4742 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4744 { &hf_infiniband_Trap_DRPathTruncated, {
4745 "DRPathTruncated", "infiniband.trap.drpathtruncated",
4746 FT_UINT8, BASE_HEX, NULL, 0x40, NULL, HFILL}
4748 { &hf_infiniband_Trap_DRHopCount, {
4749 "DRHopCount", "infiniband.trap.drhopcount",
4750 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
4752 { &hf_infiniband_Trap_DRNoticeReturnPath, {
4753 "DRNoticeReturnPath", "infiniband.trap.drnoticereturnpath",
4754 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4758 { &hf_infiniband_Trap_LIDADDR1, {
4759 "LIDADDR1", "infiniband.trap.lidaddr1",
4760 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4762 { &hf_infiniband_Trap_LIDADDR2, {
4763 "LIDADDR2", "infiniband.trap.lidaddr2",
4764 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4766 { &hf_infiniband_Trap_KEY, {
4767 "KEY", "infiniband.trap.key",
4768 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
4770 { &hf_infiniband_Trap_SL, {
4771 "SL", "infiniband.trap.sl",
4772 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
4774 { &hf_infiniband_Trap_QP1, {
4775 "QP1", "infiniband.trap.qp1",
4776 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
4778 { &hf_infiniband_Trap_QP2, {
4779 "QP2", "infiniband.trap.qp2",
4780 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
4782 { &hf_infiniband_Trap_GIDADDR1, {
4783 "GIDADDR1", "infiniband.trap.gidaddr1",
4784 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4786 { &hf_infiniband_Trap_GIDADDR2, {
4787 "GIDADDR2", "infiniband.trap.gidaddr2",
4788 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4792 { &hf_infiniband_Trap_DataValid, {
4793 "DataValid", "infiniband.trap.datavalid",
4794 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4796 { &hf_infiniband_Trap_PKEY, {
4797 "PKEY", "infiniband.trap.pkey",
4798 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4800 { &hf_infiniband_Trap_SWLIDADDR, {
4801 "SWLIDADDR", "infiniband.trap.swlidaddr",
4802 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4806 /* Array to hold expansion options between dissections */
4807 static gint *ett[] = {
4808 /* &ett_infiniband, */
4825 &ett_subn_lid_routed,
4826 &ett_subn_directed_route,
4830 &ett_subm_attribute,
4831 &ett_suba_attribute,
4834 /* &ett_nodedesc, */
4835 /* &ett_nodeinfo, */
4836 /* &ett_switchinfo, */
4837 /* &ett_guidinfo, */
4838 /* &ett_portinfo, */
4839 &ett_portinfo_capmask,
4842 &ett_vlarbitrationtable,
4843 &ett_linearforwardingtable,
4844 &ett_randomforwardingtable,
4845 &ett_multicastforwardingtable,
4849 &ett_linkspeedwidthpairs,
4854 &ett_mcmemberrecord,
4856 &ett_multipathrecord,
4857 &ett_serviceassocrecord
4860 proto_infiniband = proto_register_protocol("InfiniBand", "InfiniBand", "infiniband");
4861 register_dissector("infiniband", dissect_infiniband, proto_infiniband);
4863 proto_register_field_array(proto_infiniband, hf, array_length(hf));
4864 proto_register_subtree_array(ett, array_length(ett));
4868 /* Reg Handoff. Register dissectors we'll need for IPoIB */
4869 void proto_reg_handoff_infiniband(void)
4871 ipv6_handle = find_dissector("ipv6");
4872 data_handle = find_dissector("data");
4873 ethertype_dissector_table = find_dissector_table("ethertype");