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 if(check_col(pinfo->cinfo, COL_INFO))
90 col_clear(pinfo->cinfo, COL_INFO);
93 /* Get the parent tree from the ERF dissector. We don't want to nest under ERF */
94 if(tree && tree->parent)
96 /* Set the normal tree outside of ERF */
98 /* Set a global reference for nested protocols */
104 /* If no packet details are being dissected, extract some high level info for the packet view */
105 /* Assigns column values rather than full tree population */
106 dissect_general_info(tvb, offset, pinfo);
110 /* Top Level Packet */
111 infiniband_packet = proto_tree_add_item(tree, proto_infiniband, tvb, offset, -1, FALSE);
113 /* Headers Level Tree */
114 all_headers_tree = proto_item_add_subtree(infiniband_packet, ett_all_headers);
116 /* Local Route Header Subtree */
117 local_route_header_item = proto_tree_add_bytes(all_headers_tree, hf_infiniband_LRH, tvb, offset, 8, tvb->real_data);
118 proto_item_set_text(local_route_header_item, "%s", "Local Route Header");
119 local_route_header_tree = proto_item_add_subtree(local_route_header_item, ett_lrh);
121 proto_tree_add_item(local_route_header_tree, hf_infiniband_virtual_lane, tvb, offset, 1, FALSE);
124 /* Get the Virtual Lane. We'll use this to identify Subnet Management and Subnet Administration Packets. */
125 virtualLane = tvb_get_guint8(tvb, offset);
126 virtualLane = virtualLane & 0xF0;
129 proto_tree_add_item(local_route_header_tree, hf_infiniband_link_version, tvb, offset, 1, FALSE); offset+=1;
130 proto_tree_add_item(local_route_header_tree, hf_infiniband_service_level, tvb, offset, 1, FALSE);
132 proto_tree_add_item(local_route_header_tree, hf_infiniband_reserved2, tvb, offset, 1, FALSE);
133 proto_tree_add_item(local_route_header_tree, hf_infiniband_link_next_header, tvb, offset, 1, FALSE);
136 /* Save Link Next Header... This tells us what the next header is. */
137 lnh_val = tvb_get_guint8(tvb, offset);
138 lnh_val = lnh_val & 0x03;
142 proto_tree_add_item(local_route_header_tree, hf_infiniband_destination_local_id, tvb, offset, 2, FALSE);
145 /* Set destination in packet view. */
146 if (check_col(pinfo->cinfo, COL_DEF_DST))
148 col_add_fstr(pinfo->cinfo, COL_DEF_DST, "DLID: %s", tvb_bytes_to_str(tvb, offset, 2));
153 proto_tree_add_item(local_route_header_tree, hf_infiniband_reserved5, tvb, offset, 2, FALSE);
155 packetLength = tvb_get_ntohs(tvb, offset); /* Get the Packet Length. This will determine payload size later on. */
156 packetLength = packetLength & 0x07FF; /* Mask off top 5 bits, they are reserved */
157 packetLength = packetLength * 4; /* Multiply by 4 to get true byte length. This is by specification. */
158 /* PktLen is size in 4 byte words (byteSize /4). */
160 proto_tree_add_item(local_route_header_tree, hf_infiniband_packet_length, tvb, offset, 2, FALSE); offset+=2;
161 proto_tree_add_item(local_route_header_tree, hf_infiniband_source_local_id, tvb, offset, 2, FALSE);
163 /* Set Source in packet view. */
164 if (check_col(pinfo->cinfo, COL_DEF_SRC))
166 col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "SLID: %s", tvb_bytes_to_str(tvb, offset, 2));
170 packetLength -= 8; /* Shave 8 bytes for the LRH. */
172 /* Key off Link Next Header. This tells us what High Level Data Format we have */
176 global_route_header_item = proto_tree_add_item(all_headers_tree, hf_infiniband_GRH, tvb, offset, 40, FALSE);
177 proto_item_set_text(global_route_header_item, "%s", "Global Route Header");
178 global_route_header_tree = proto_item_add_subtree(global_route_header_item, ett_grh);
180 proto_tree_add_item(global_route_header_tree, hf_infiniband_ip_version, tvb, offset, 1, FALSE);
181 proto_tree_add_item(global_route_header_tree, hf_infiniband_traffic_class, tvb, offset, 2, FALSE);
182 proto_tree_add_item(global_route_header_tree, hf_infiniband_flow_label, tvb, offset, 4, FALSE); offset += 4;
184 payloadLength = tvb_get_ntohs(tvb, offset);
186 proto_tree_add_item(global_route_header_tree, hf_infiniband_payload_length, tvb, offset, 2, FALSE); offset += 2;
188 nxtHdr = tvb_get_guint8(tvb, offset);
190 proto_tree_add_item(global_route_header_tree, hf_infiniband_next_header, tvb, offset, 1, FALSE); offset +=1;
191 proto_tree_add_item(global_route_header_tree, hf_infiniband_hop_limit, tvb, offset, 1, FALSE); offset +=1;
192 proto_tree_add_item(global_route_header_tree, hf_infiniband_source_gid, tvb, offset, 16, FALSE);
194 tvb_get_ipv6(tvb, offset, &SRCgid);
195 if (check_col(pinfo->cinfo, COL_DEF_SRC))
197 col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "SGID: %s", ip6_to_str(&SRCgid));
201 proto_tree_add_item(global_route_header_tree, hf_infiniband_destination_gid, tvb, offset, 16, FALSE);
203 tvb_get_ipv6(tvb, offset, &DSTgid);
204 if (check_col(pinfo->cinfo, COL_DEF_DST))
206 col_add_fstr(pinfo->cinfo, COL_DEF_DST, "DGID: %s", ip6_to_str(&DSTgid));
209 packetLength -= 40; /* Shave 40 bytes for GRH */
213 /* Some kind of packet being transported globally with IBA, but locally it is not IBA - no BTH following. */
216 /* otherwise fall through and start parsing BTH */
219 base_transport_header_item = proto_tree_add_item(all_headers_tree, hf_infiniband_BTH, tvb, offset, 12, FALSE);
220 proto_item_set_text(base_transport_header_item, "%s", "Base Transport Header");
221 base_transport_header_tree = proto_item_add_subtree(base_transport_header_item, ett_bth);
222 proto_tree_add_item(base_transport_header_tree, hf_infiniband_opcode, tvb, offset, 1, FALSE);
224 /* Get the OpCode - this tells us what headers are following */
225 opCode = tvb_get_guint8(tvb, offset);
226 if (check_col(pinfo->cinfo, COL_INFO))
228 col_append_str(pinfo->cinfo, COL_INFO, val_to_str((guint32)opCode, OpCodeMap, "Unknown OpCode"));
232 proto_tree_add_item(base_transport_header_tree, hf_infiniband_solicited_event, tvb, offset, 1, FALSE);
233 proto_tree_add_item(base_transport_header_tree, hf_infiniband_migreq, tvb, offset, 1, FALSE);
234 proto_tree_add_item(base_transport_header_tree, hf_infiniband_pad_count, tvb, offset, 1, FALSE);
235 proto_tree_add_item(base_transport_header_tree, hf_infiniband_transport_header_version, tvb, offset, 1, FALSE); offset +=1;
236 proto_tree_add_item(base_transport_header_tree, hf_infiniband_partition_key, tvb, offset, 2, FALSE); offset +=2;
237 proto_tree_add_item(base_transport_header_tree, hf_infiniband_reserved8, tvb, offset, 1, FALSE); offset +=1;
238 proto_tree_add_item(base_transport_header_tree, hf_infiniband_destination_qp, tvb, offset, 3, FALSE); offset +=3;
239 proto_tree_add_item(base_transport_header_tree, hf_infiniband_acknowledge_request, tvb, offset, 1, FALSE);
240 proto_tree_add_item(base_transport_header_tree, hf_infiniband_reserved7, tvb, offset, 1, FALSE); offset +=1;
241 proto_tree_add_item(base_transport_header_tree, hf_infiniband_packet_sequence_number, tvb, offset, 3, FALSE); offset +=3;
244 packetLength -= 12; /* Shave 12 for Base Transport Header */
248 /* Raw IPv6 Packet */
249 if (check_col(pinfo->cinfo, COL_DEF_DST))
251 col_set_str(pinfo->cinfo, COL_DEF_DST, "IPv6 over IB Packet");
252 col_set_fence(pinfo->cinfo, COL_DEF_DST);
254 parse_IPvSix(all_headers_tree, tvb, &offset, pinfo);
257 parse_RWH(all_headers_tree, tvb, &offset, pinfo);
261 RAWDATA_header_item = proto_tree_add_item(all_headers_tree, hf_infiniband_raw_data, tvb, offset, -1, FALSE);
262 proto_item_set_text(RAWDATA_header_item, "%s", "Unknown Raw Data - IB Encapsulated");
263 RAWDATA_header_tree = proto_item_add_subtree(RAWDATA_header_item, ett_rawdata);
267 /* Base Transport header is hit quite often, however it is alone since it is the exception not the rule */
268 /* Only IBA Local packets use it */
271 /* Find our next header sequence based on the Opcode
272 * Each case decrements the packetLength by the amount of bytes consumed by each header.
273 * The find_next_header_sequence method could be used to automate this.
274 * We need to keep track of this so we know much data to mark as payload/ICRC/VCRC values. */
276 nextHeaderSequence = find_next_header_sequence((guint32) opCode);
278 /* find_next_header_sequence gives us the DEFINE value corresponding to the header order following */
279 /* Enumerations are named intuitively, e.g. RDETH DETH PAYLOAD means there is an RDETH Header, DETH Header, and a packet payload */
280 switch(nextHeaderSequence)
282 case RDETH_DETH_PAYLD:
283 parse_RDETH(all_headers_tree, tvb, &offset);
284 parse_DETH(all_headers_tree, tvb, &offset);
286 packetLength -= 4; /* RDETH */
287 packetLength -= 8; /* DETH */
289 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
291 case RDETH_DETH_RETH_PAYLD:
292 parse_RDETH(all_headers_tree, tvb, &offset);
293 parse_DETH(all_headers_tree, tvb, &offset);
294 parse_RETH(all_headers_tree, tvb, &offset);
296 packetLength -= 4; /* RDETH */
297 packetLength -= 8; /* DETH */
298 packetLength -= 16; /* RETH */
300 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
302 case RDETH_DETH_IMMDT_PAYLD:
303 parse_RDETH(all_headers_tree, tvb, &offset);
304 parse_DETH(all_headers_tree, tvb, &offset);
305 parse_IMMDT(all_headers_tree, tvb, &offset);
307 packetLength -= 4; /* RDETH */
308 packetLength -= 8; /* DETH */
309 packetLength -= 4; /* IMMDT */
311 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
313 case RDETH_DETH_RETH_IMMDT_PAYLD:
314 parse_RDETH(all_headers_tree, tvb, &offset);
315 parse_DETH(all_headers_tree, tvb, &offset);
316 parse_RETH(all_headers_tree, tvb, &offset);
317 parse_IMMDT(all_headers_tree, tvb, &offset);
319 packetLength -= 4; /* RDETH */
320 packetLength -= 8; /* DETH */
321 packetLength -= 16; /* RETH */
322 packetLength -= 4; /* IMMDT */
324 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
326 case RDETH_DETH_RETH:
327 parse_RDETH(all_headers_tree, tvb, &offset);
328 parse_DETH(all_headers_tree, tvb, &offset);
329 parse_RETH(all_headers_tree, tvb, &offset);
331 packetLength -= 4; /* RDETH */
332 packetLength -= 8; /* DETH */
333 packetLength -= 16; /* RETH */
336 case RDETH_AETH_PAYLD:
337 parse_RDETH(all_headers_tree, tvb, &offset);
338 parse_AETH(all_headers_tree, tvb, &offset);
340 packetLength -= 4; /* RDETH */
341 packetLength -= 4; /* AETH */
343 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
346 parse_RDETH(all_headers_tree, tvb, &offset);
348 packetLength -= 4; /* RDETH */
350 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
353 parse_AETH(all_headers_tree, tvb, &offset);
355 packetLength -= 4; /* RDETH */
356 packetLength -= 4; /* AETH */
360 case RDETH_AETH_ATOMICACKETH:
361 parse_RDETH(all_headers_tree, tvb, &offset);
362 parse_AETH(all_headers_tree, tvb, &offset);
363 parse_ATOMICACKETH(all_headers_tree, tvb, &offset);
365 packetLength -= 4; /* RDETH */
366 packetLength -= 4; /* AETH */
367 packetLength -= 8; /* AtomicAckETH */
371 case RDETH_DETH_ATOMICETH:
372 parse_RDETH(all_headers_tree, tvb, &offset);
373 parse_DETH(all_headers_tree, tvb, &offset);
374 parse_ATOMICETH(all_headers_tree, tvb, &offset);
376 packetLength -= 4; /* RDETH */
377 packetLength -= 8; /* DETH */
378 packetLength -= 28; /* AtomicETH */
382 parse_RDETH(all_headers_tree, tvb, &offset);
383 parse_DETH(all_headers_tree, tvb, &offset);
385 packetLength -= 4; /* RDETH */
386 packetLength -= 8; /* DETH */
390 parse_DETH(all_headers_tree, tvb, &offset);
392 packetLength -= 8; /* DETH */
394 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
398 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
401 parse_IMMDT(all_headers_tree, tvb, &offset);
403 packetLength -= 4; /* IMMDT */
405 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
408 parse_RETH(all_headers_tree, tvb, &offset);
410 packetLength -= 16; /* RETH */
412 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
415 parse_RETH(all_headers_tree, tvb, &offset);
417 packetLength -= 16; /* RETH */
421 parse_AETH(all_headers_tree, tvb, &offset);
423 packetLength -= 4; /* AETH */
425 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
428 parse_AETH(all_headers_tree, tvb, &offset);
430 packetLength -= 4; /* AETH */
433 case AETH_ATOMICACKETH:
434 parse_AETH(all_headers_tree, tvb, &offset);
435 parse_ATOMICACKETH(all_headers_tree, tvb, &offset);
437 packetLength -= 4; /* AETH */
438 packetLength -= 8; /* AtomicAckETH */
442 parse_ATOMICETH(all_headers_tree, tvb, &offset);
444 packetLength -= 28; /* AtomicETH */
448 parse_IETH(all_headers_tree, tvb, &offset);
450 packetLength -= 4; /* IETH */
452 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
454 case DETH_IMMDT_PAYLD:
455 parse_DETH(all_headers_tree, tvb, &offset);
456 parse_IMMDT(all_headers_tree, tvb, &offset);
458 packetLength -= 8; /* DETH */
459 packetLength -= 4; /* IMMDT */
461 parse_PAYLOAD(all_headers_tree, pinfo, tvb, &offset, packetLength, virtualLane);
464 parse_VENDOR(all_headers_tree, tvb, &offset);
470 /* Display the ICRC/VCRC */
471 /* Doing it this way rather than in a variety of places according to the specific packet */
472 /* If we've already displayed it crc_length comes out 0 */
473 crc_length = tvb_reported_length_remaining(tvb, offset);
476 proto_tree_add_item(all_headers_tree, hf_infiniband_invariant_crc, tvb, offset, 4, FALSE); offset +=4;
477 proto_tree_add_item(all_headers_tree, hf_infiniband_variant_crc, tvb, offset, 2, FALSE); offset+=2;
479 else if(crc_length == 4)
481 proto_tree_add_item(all_headers_tree, hf_infiniband_invariant_crc, tvb, offset, 4, FALSE); offset +=4;
483 else if(crc_length == 2)
485 proto_tree_add_item(all_headers_tree, hf_infiniband_variant_crc, tvb, offset, 2, FALSE); offset+=2;
490 /* Description: Finds the header sequence that follows the Base Transport Header.
491 * Somwhat inefficient (should be using a single key,value pair data structure)
492 * But uses pure probablity to take a stab at better efficiency.
493 * Searches largest header sequence groups first, and then finally resorts to single matches for unique header sequences
494 * IN: OpCode: The OpCode from the Base Transport Header.
495 * OUT: The Header Sequence enumeration. See Declarations for #defines from (0-22) */
497 find_next_header_sequence(guint32 OpCode)
499 if(contains(OpCode, &opCode_PAYLD[0], (gint32)sizeof(opCode_PAYLD)))
502 if(contains(OpCode, &opCode_IMMDT_PAYLD[0], (gint32)sizeof(opCode_IMMDT_PAYLD)))
505 if(contains(OpCode, &opCode_RDETH_DETH_PAYLD[0], (gint32)sizeof(opCode_RDETH_DETH_PAYLD)))
506 return RDETH_DETH_PAYLD;
508 if(contains(OpCode, &opCode_RETH_PAYLD[0], (gint32)sizeof(opCode_RETH_PAYLD)))
511 if(contains(OpCode, &opCode_RDETH_AETH_PAYLD[0], (gint32)sizeof(opCode_RDETH_AETH_PAYLD)))
512 return RDETH_AETH_PAYLD;
514 if(contains(OpCode, &opCode_AETH_PAYLD[0], (gint32)sizeof(opCode_AETH_PAYLD)))
517 if(contains(OpCode, &opCode_RDETH_DETH_IMMDT_PAYLD[0], (gint32)sizeof(opCode_RDETH_DETH_IMMDT_PAYLD)))
518 return RDETH_DETH_IMMDT_PAYLD;
520 if(contains(OpCode, &opCode_RETH_IMMDT_PAYLD[0], (gint32)sizeof(opCode_RETH_IMMDT_PAYLD)))
521 return RETH_IMMDT_PAYLD;
523 if(contains(OpCode, &opCode_RDETH_DETH_RETH_PAYLD[0], (gint32)sizeof(opCode_RDETH_DETH_RETH_PAYLD)))
524 return RDETH_DETH_RETH_PAYLD;
526 if(contains(OpCode, &opCode_ATOMICETH[0], (gint32)sizeof(opCode_ATOMICETH)))
529 if(contains(OpCode, &opCode_IETH_PAYLD[0], (gint32)sizeof(opCode_IETH_PAYLD)))
532 if(contains(OpCode, &opCode_RDETH_DETH_ATOMICETH[0], (gint32)sizeof(opCode_RDETH_DETH_ATOMICETH)))
533 return RDETH_DETH_ATOMICETH;
535 if((OpCode ^ RC_ACKNOWLEDGE) == 0)
538 if((OpCode ^ RC_RDMA_READ_REQUEST) == 0)
541 if((OpCode ^ RC_ATOMIC_ACKNOWLEDGE) == 0)
542 return AETH_ATOMICACKETH;
544 if((OpCode ^ RD_RDMA_READ_RESPONSE_MIDDLE) == 0)
547 if((OpCode ^ RD_ACKNOWLEDGE) == 0)
550 if((OpCode ^ RD_ATOMIC_ACKNOWLEDGE) == 0)
551 return RDETH_AETH_ATOMICACKETH;
553 if((OpCode ^ RD_RDMA_WRITE_ONLY_IMM) == 0)
554 return RDETH_DETH_RETH_IMMDT_PAYLD;
556 if((OpCode ^ RD_RDMA_READ_REQUEST) == 0)
557 return RDETH_DETH_RETH;
559 if((OpCode ^ RD_RESYNC) == 0)
562 if((OpCode ^ UD_SEND_ONLY) == 0)
565 if((OpCode ^ UD_SEND_ONLY_IMM) == 0)
566 return DETH_IMMDT_PAYLD;
571 /* Description: Finds if a given value is present in an array. This is probably in a standard library somewhere,
572 * But I'd rather define my own.
573 * IN: OpCode: The OpCode you are looking for
574 * IN: Codes: The organized array of OpCodes to look through
575 * IN: Array length, because we're in C++...
576 * OUT: Boolean indicating if that OpCode was found in OpCodes */
578 contains(guint32 OpCode, guint32* Codes, gint32 length)
581 for(i = 0; i < length; i++)
583 if((OpCode ^ Codes[i]) == 0)
589 /* Parse RDETH - Reliable Datagram Extended Transport Header
590 * IN: parentTree to add the dissection to - in this code the all_headers_tree
591 * IN: tvb - the data buffer from wireshark
592 * IN/OUT: The current and updated offset */
594 parse_RDETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
596 gint local_offset = *offset;
597 /* RDETH - Reliable Datagram Extended Transport Header */
598 proto_tree *RDETH_header_tree = NULL;
599 proto_item *RDETH_header_item = NULL;
601 RDETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_RDETH, tvb, local_offset, 4, FALSE);
602 proto_item_set_text(RDETH_header_item, "%s", "RDETH - Reliable Datagram Extended Transport Header");
603 RDETH_header_tree = proto_item_add_subtree(RDETH_header_item, ett_rdeth);
605 proto_tree_add_item(RDETH_header_tree, hf_infiniband_reserved8_RDETH, tvb, local_offset, 1, FALSE); local_offset+=1;
606 proto_tree_add_item(RDETH_header_tree, hf_infiniband_ee_context, tvb, local_offset, 3, FALSE); local_offset+=3;
607 *offset = local_offset;
610 /* Parse DETH - Datagram Extended Transport Header
611 * IN: parentTree to add the dissection to - in this code the all_headers_tree
612 * IN: tvb - the data buffer from wireshark
613 * IN/OUT: The current and updated offset */
615 parse_DETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
617 gint local_offset = *offset;
618 /* DETH - Datagram Extended Transport Header */
619 proto_tree *DETH_header_tree = NULL;
620 proto_item *DETH_header_item = NULL;
622 DETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_DETH, tvb, local_offset, 8, FALSE);
623 proto_item_set_text(DETH_header_item, "%s", "DETH - Datagram Extended Transport Header");
624 DETH_header_tree = proto_item_add_subtree(DETH_header_item, ett_deth);
626 proto_tree_add_item(DETH_header_tree, hf_infiniband_queue_key, tvb, local_offset, 4, FALSE); local_offset+=4;
627 proto_tree_add_item(DETH_header_tree, hf_infiniband_reserved8_DETH, tvb, local_offset, 1, FALSE); local_offset+=1;
628 proto_tree_add_item(DETH_header_tree, hf_infiniband_source_qp, tvb, local_offset, 3, FALSE); local_offset+=3;
630 *offset = local_offset;
633 /* Parse RETH - RDMA Extended Transport Header
634 * IN: parentTree to add the dissection to - in this code the all_headers_tree
635 * IN: tvb - the data buffer from wireshark
636 * IN/OUT: The current and updated offset */
638 parse_RETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
640 gint local_offset = *offset;
641 /* RETH - RDMA Extended Transport Header */
642 proto_tree *RETH_header_tree = NULL;
643 proto_item *RETH_header_item = NULL;
645 RETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_RETH, tvb, local_offset, 16, FALSE);
646 proto_item_set_text(RETH_header_item, "%s", "RETH - RDMA Extended Transport Header");
647 RETH_header_tree = proto_item_add_subtree(RETH_header_item, ett_reth);
649 proto_tree_add_item(RETH_header_tree, hf_infiniband_virtual_address, tvb, local_offset, 8, FALSE); local_offset+=8;
650 proto_tree_add_item(RETH_header_tree, hf_infiniband_remote_key, tvb, local_offset, 4, FALSE); local_offset+=4;
651 proto_tree_add_item(RETH_header_tree, hf_infiniband_dma_length, tvb, local_offset, 4, FALSE); local_offset+=4;
653 *offset = local_offset;
656 /* Parse AtomicETH - Atomic Extended Transport Header
657 * IN: parentTree to add the dissection to - in this code the all_headers_tree
658 * IN: tvb - the data buffer from wireshark
659 * IN/OUT: The current and updated offset */
661 parse_ATOMICETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
663 gint local_offset = *offset;
664 /* AtomicETH - Atomic Extended Transport Header */
665 proto_tree *ATOMICETH_header_tree = NULL;
666 proto_item *ATOMICETH_header_item = NULL;
668 ATOMICETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_AtomicETH, tvb, local_offset, 28, FALSE);
669 proto_item_set_text(ATOMICETH_header_item, "%s", "AtomicETH - Atomic Extended Transport Header");
670 ATOMICETH_header_tree = proto_item_add_subtree(ATOMICETH_header_item, ett_atomiceth);
672 proto_tree_add_item(ATOMICETH_header_tree, hf_infiniband_virtual_address, tvb, local_offset, 8, FALSE); local_offset+=8;
673 proto_tree_add_item(ATOMICETH_header_tree, hf_infiniband_remote_key, tvb, local_offset, 4, FALSE); local_offset+=4;
674 proto_tree_add_item(ATOMICETH_header_tree, hf_infiniband_swap_or_add_data, tvb, local_offset, 8, FALSE); local_offset+=8;
675 proto_tree_add_item(ATOMICETH_header_tree, hf_infiniband_compare_data, tvb, local_offset, 8, FALSE); local_offset+=8;
676 *offset = local_offset;
679 /* Parse AETH - ACK Extended Transport Header
680 * IN: parentTree to add the dissection to - in this code the all_headers_tree
681 * IN: tvb - the data buffer from wireshark
682 * IN/OUT: The current and updated offset */
684 parse_AETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
686 gint local_offset = *offset;
687 /* AETH - ACK Extended Transport Header */
688 proto_tree *AETH_header_tree = NULL;
689 proto_item *AETH_header_item = NULL;
691 AETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_AETH, tvb, local_offset, 4, FALSE);
692 proto_item_set_text(AETH_header_item, "%s", "AETH - ACK Extended Transport Header");
693 AETH_header_tree = proto_item_add_subtree(AETH_header_item, ett_aeth);
695 proto_tree_add_item(AETH_header_tree, hf_infiniband_syndrome, tvb, local_offset, 1, FALSE); local_offset+=1;
696 proto_tree_add_item(AETH_header_tree, hf_infiniband_message_sequence_number, tvb, local_offset, 3, FALSE); local_offset+=3;
698 *offset = local_offset;
701 /* Parse AtomicAckEth - Atomic ACK Extended Transport Header
702 * IN: parentTree to add the dissection to - in this code the all_headers_tree
703 * IN: tvb - the data buffer from wireshark
704 * IN/OUT: The current and updated offset */
706 parse_ATOMICACKETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
708 gint local_offset = *offset;
709 /* AtomicAckEth - Atomic ACK Extended Transport Header */
710 proto_tree *ATOMICACKETH_header_tree = NULL;
711 proto_item *ATOMICACKETH_header_item = NULL;
713 ATOMICACKETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_AtomicAckETH, tvb, local_offset, 8, FALSE);
714 proto_item_set_text(ATOMICACKETH_header_item, "%s", "ATOMICACKETH - Atomic ACK Extended Transport Header");
715 ATOMICACKETH_header_tree = proto_item_add_subtree(ATOMICACKETH_header_item, ett_atomicacketh);
716 proto_tree_add_item(ATOMICACKETH_header_tree, hf_infiniband_original_remote_data, tvb, local_offset, 8, FALSE); local_offset+=8;
717 *offset = local_offset;
720 /* Parse IMMDT - Immediate Data Extended Transport Header
721 * IN: parentTree to add the dissection to - in this code the all_headers_tree
722 * IN: tvb - the data buffer from wireshark
723 * IN/OUT: The current and updated offset */
725 parse_IMMDT(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
727 gint local_offset = *offset;
728 /* IMMDT - Immediate Data Extended Transport Header */
729 proto_tree *IMMDT_header_tree = NULL;
730 proto_item *IMMDT_header_item = NULL;
732 IMMDT_header_item = proto_tree_add_item(parentTree, hf_infiniband_IMMDT, tvb, local_offset, 4, FALSE);
733 proto_item_set_text(IMMDT_header_item, "%s", "IMMDT - Immediate Data Extended Transport Header");
734 IMMDT_header_tree = proto_item_add_subtree(IMMDT_header_item, ett_immdt);
735 proto_tree_add_item(IMMDT_header_tree, hf_infiniband_IMMDT, tvb, local_offset, 4, FALSE); local_offset+=4;
736 *offset = local_offset;
739 /* Parse IETH - Invalidate Extended Transport Header
740 * IN: parentTree to add the dissection to - in this code the all_headers_tree
741 * IN: tvb - the data buffer from wireshark
742 * IN/OUT: The current and updated offset */
744 parse_IETH(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
746 gint local_offset = *offset;
747 /* IETH - Invalidate Extended Transport Header */
748 proto_tree *IETH_header_tree = NULL;
749 proto_item *IETH_header_item = NULL;
751 IETH_header_item = proto_tree_add_item(parentTree, hf_infiniband_IETH, tvb, local_offset, 4, FALSE);
752 proto_item_set_text(IETH_header_item, "%s", "IETH - Invalidate Extended Transport Header");
753 IETH_header_tree = proto_item_add_subtree(IETH_header_item, ett_ieth);
755 proto_tree_add_item(IETH_header_tree, hf_infiniband_IETH, tvb, local_offset, 4, FALSE); local_offset+=4;
757 *offset = local_offset;
760 /* Parse Payload - Packet Payload / Invariant CRC / Variant CRC
761 * IN: parentTree to add the dissection to - in this code the all_headers_tree
762 * IN: pinfo - packet info from wireshark
763 * IN: tvb - the data buffer from wireshark
764 * IN/OUT: The current and updated offset
765 * IN: Length of Payload */
766 static void parse_PAYLOAD(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, gint *offset, gint length, guint8 virtualLane)
768 gint local_offset = *offset;
769 /* Payload - Packet Payload */
770 proto_tree *PAYLOAD_header_tree = NULL;
771 proto_item *PAYLOAD_header_item = NULL;
772 guint8 management_class;
773 tvbuff_t *volatile next_tvb;
774 gint captured_length, reported_length;
775 guint16 etype, reserved;
776 const char *saved_proto;
777 volatile gboolean dissector_found = FALSE;
779 if(!tvb_bytes_exist(tvb, *offset, length)) /* previously consumed bytes + offset was all the data - none or corrupt payload */
781 if (check_col(pinfo->cinfo, COL_INFO))
783 col_set_str(pinfo->cinfo, COL_INFO, "Invalid Packet Length from LRH! [Malformed Packet]");
784 col_set_fence(pinfo->cinfo, COL_INFO);
788 if(virtualLane == 0xF0)
790 management_class = tvb_get_guint8(tvb, (*offset) + 1);
792 if(((management_class >= (guint8)VENDOR_1_START) && (management_class <= (guint8)VENDOR_1_END))
793 || ((management_class >= (guint8)VENDOR_2_START) && (management_class <= (guint8)VENDOR_2_END)))
795 /* parse vendor specific */
796 parse_VENDOR_MANAGEMENT(parentTree, tvb, offset);
798 else if((management_class >= (guint8)APPLICATION_START) && (management_class <= (guint8)APPLICATION_END))
800 /* parse application specific */
801 parse_APPLICATION_MANAGEMENT(parentTree, tvb, offset);
803 else if(((management_class == (guint8)0x00) || (management_class == (guint8)0x02))
804 || ((management_class >= (guint8)0x50) && (management_class <= (guint8)0x80))
805 || ((management_class >= (guint8)0x82)))
807 /* parse reserved classes */
808 parse_RESERVED_MANAGEMENT(parentTree, tvb, offset);
810 else /* we have a normal management_class */
812 switch(management_class)
814 case SUBN_LID_ROUTED:
815 /* parse subn man lid routed */
816 parse_SUBN_LID_ROUTED(parentTree, pinfo, tvb, &local_offset);
818 case SUBN_DIRECTED_ROUTE:
819 /* parse subn directed route */
820 parse_SUBN_DIRECTED_ROUTE(parentTree, pinfo, tvb, &local_offset);
823 /* parse sub admin */
824 parse_SUBNADMN(parentTree, pinfo, tvb, &local_offset);
827 /* parse performance */
828 parse_PERF(parentTree, tvb, &local_offset);
831 /* parse baseboard mgmt */
832 parse_BM(parentTree, tvb, &local_offset);
835 /* parse device management */
836 parse_DEV_MGT(parentTree, tvb, &local_offset);
839 /* parse communication management */
840 parse_COM_MGT(parentTree, tvb, &local_offset);
843 /* parse snmp tunneling */
844 parse_SNMP(parentTree, tvb, &local_offset);
851 else /* Normal Data Packet - Parse as such */
854 /* Calculation for Payload:
855 * (tvb->length) Length of entire packet - (local_offset) Starting byte of Payload Data
856 * offset addition is more complex for the payload.
857 * We need the total length of the packet, - length of previous headers, + offset where payload started.
858 * We also need to reserve 6 bytes for the CRCs which are not actually part of the payload. */
860 /* IBA packet data could be anything in principle, however it is common
861 * practice to carry non-IBA data encapsulated with an EtherType header,
862 * similar to the RWH header. There is no way to identify these frames
865 * We see if the first few bytes look like an EtherType header, and if so
866 * call the appropriate dissector. If not we call the "data" dissector.
869 etype = tvb_get_ntohs(tvb, local_offset);
870 reserved = tvb_get_ntohs(tvb, local_offset + 2);
874 /* Get the captured length and reported length of the data
875 after the Ethernet type. */
876 captured_length = tvb_length_remaining(tvb, local_offset+4);
877 reported_length = tvb_reported_length_remaining(tvb,
880 next_tvb = tvb_new_subset(tvb, local_offset+4, captured_length,
883 pinfo->ethertype = etype;
885 /* Look for sub-dissector, and call it if found.
886 Catch exceptions, so that if the reported length of "next_tvb"
887 was reduced by some dissector before an exception was thrown,
888 we can still put in an item for the trailer. */
889 saved_proto = pinfo->current_proto;
891 dissector_found = dissector_try_port(ethertype_dissector_table,
892 etype, next_tvb, pinfo, top_tree);
895 /* Somebody threw BoundsError, which means that:
897 1) a dissector was found, so we don't need to
898 dissect the payload as data or update the
899 protocol or info columns;
901 2) dissecting the payload found that the packet was
902 cut off by a snapshot length before the end of
903 the payload. The trailer comes after the payload,
904 so *all* of the trailer is cut off, and we'll
905 just get another BoundsError if we add the trailer.
907 Therefore, we just rethrow the exception so it gets
908 reported; we don't dissect the trailer or do anything
912 CATCH(OutOfMemoryError) {
916 /* Somebody threw an exception other than BoundsError, which
917 means that a dissector was found, so we don't need to
918 dissect the payload as data or update the protocol or info
919 columns. We just show the exception and then drive on
920 to show the trailer, after noting that a dissector was
921 found and restoring the protocol value that was in effect
922 before we called the subdissector. */
923 show_exception(next_tvb, pinfo, top_tree, EXCEPT_CODE, GET_MESSAGE);
924 dissector_found = TRUE;
925 pinfo->current_proto = saved_proto;
929 if (dissector_found) {
930 /* now create payload entry to show Ethertype */
931 PAYLOAD_header_item = proto_tree_add_item(parentTree, hf_infiniband_payload, tvb, local_offset, tvb_reported_length_remaining(tvb, local_offset)-6, FALSE);
932 proto_item_set_text(PAYLOAD_header_item, "%s", "IBA Payload - appears to be EtherType encapsulated");
933 PAYLOAD_header_tree = proto_item_add_subtree(PAYLOAD_header_item, ett_payload);
934 proto_tree_add_uint(PAYLOAD_header_tree, hf_infiniband_etype, tvb,
935 local_offset, 2, tvb_get_ntohs(tvb, local_offset));
939 proto_tree_add_uint(PAYLOAD_header_tree, hf_infiniband_reserved16_RWH, tvb,
940 local_offset, 2, tvb_get_ntohs(tvb, local_offset));
946 if (!dissector_found) {
947 /* No sub-dissector found.
948 Label rest of packet as "Data" */
950 captured_length = tvb_length_remaining(tvb, local_offset);
951 reported_length = tvb_reported_length_remaining(tvb,
954 if (reported_length >= 6)
955 reported_length -= 6;
956 if (captured_length > reported_length)
957 captured_length = reported_length;
959 next_tvb = tvb_new_subset(tvb, local_offset,
963 call_dissector(data_handle, next_tvb, pinfo, top_tree);
968 /*parse_RWH(parentTree, tvb, &local_offset, pinfo);*/
970 /* Will contain ICRC and VCRC = 4+2 */
971 local_offset = tvb_reported_length(tvb) - 6;
974 *offset = local_offset;
977 /* Parse VENDOR - Parse a vendor specific or unknown header sequence
978 * IN: parentTree to add the dissection to - in this code the all_headers_tree
979 * IN: tvb - the data buffer from wireshark
980 * IN/OUT: The current and updated offset */
981 static void parse_VENDOR(proto_tree * parentTree, tvbuff_t *tvb, gint *offset)
983 gint local_offset = *offset;
984 proto_tree *VENDOR_header_tree = NULL;
985 proto_item *VENDOR_header_item = NULL;
987 VENDOR_header_item = proto_tree_add_item(parentTree, hf_infiniband_vendor, tvb, local_offset, 4, FALSE);
988 proto_item_set_text(VENDOR_header_item, "%s", "Vendor Specific or Unknown Header Sequence");
989 VENDOR_header_tree = proto_item_add_subtree(VENDOR_header_item, ett_vendor);
990 proto_tree_add_item(VENDOR_header_tree, hf_infiniband_vendor, tvb, local_offset, -1, FALSE);
991 *offset = local_offset;
994 /* Parse IPv6 - Parse an IPv6 Packet
995 * IN: parentTree to add the dissection to - in this code the all_headers_tree
996 * IN: tvb - the data buffer from wireshark
997 * IN/OUT: The current and updated offset
998 * IN: pinfo - packet info from wireshark */
999 static void parse_IPvSix(proto_tree *parentTree, tvbuff_t *tvb, gint *offset, packet_info *pinfo)
1003 /* (- 2) for VCRC which lives at the end of the packet */
1004 ipv6_tvb = tvb_new_subset(tvb, *offset,
1005 tvb_length_remaining(tvb, *offset) - 2,
1006 tvb_reported_length_remaining(tvb, *offset) - 2);
1007 call_dissector(ipv6_handle, ipv6_tvb, pinfo, parentTree);
1008 *offset = tvb_reported_length(tvb) - 2;
1010 /* Display the VCRC */
1011 proto_tree_add_item(parentTree, hf_infiniband_variant_crc, tvb, *offset, 2, FALSE);
1014 /* Parse EtherType - Parse a generic IP packaet with an EtherType of IP or ARP
1015 * IN: parentTree to add the dissection to - in this code the all_headers_tree
1016 * IN: tvb - the data buffer from wireshark
1017 * IN/OUT: The current and updated offset
1018 * IN: pinfo - packet info from wireshark */
1019 static void parse_RWH(proto_tree *ah_tree, tvbuff_t *tvb, gint *offset, packet_info *pinfo)
1024 /* RWH - Raw Header */
1025 proto_tree *RWH_header_tree = NULL;
1026 proto_item *RWH_header_item = NULL;
1028 gint captured_length, reported_length;
1030 RWH_header_item = proto_tree_add_item(ah_tree, hf_infiniband_RWH, tvb, *offset, 4, FALSE);
1031 proto_item_set_text(RWH_header_item, "%s", "RWH - Raw Header");
1032 RWH_header_tree = proto_item_add_subtree(RWH_header_item, ett_rwh);
1034 ether_type = tvb_get_ntohs(tvb, *offset);
1036 ether_type = ether_type & 0x0F; /* mask off reserved bits just in case. */
1038 proto_tree_add_uint(RWH_header_tree, hf_infiniband_etype, tvb, *offset, 2,
1042 proto_tree_add_item(RWH_header_tree, hf_infiniband_reserved16_RWH, tvb,
1047 /* Get the captured length and reported length of the data
1048 * after the Ethernet type. */
1049 captured_length = tvb_length_remaining(tvb, *offset);
1050 reported_length = tvb_reported_length_remaining(tvb, *offset);
1052 /* Construct a tvbuff for the payload after the Ethernet type,
1053 * not including the FCS. */
1054 if (captured_length >= 0 && reported_length >= 0) {
1055 if (reported_length >= 2)
1056 reported_length -= 2;
1057 if (captured_length > reported_length)
1058 captured_length = reported_length;
1061 next_tvb = tvb_new_subset(tvb, *offset, captured_length, reported_length);
1062 if (!dissector_try_port(ethertype_dissector_table, ether_type,
1063 next_tvb, pinfo, top_tree))
1064 call_dissector(data_handle, next_tvb, pinfo, top_tree);
1066 *offset = tvb_reported_length(tvb) - 2;
1067 /* Display the VCRC */
1068 proto_tree_add_item(ah_tree, hf_infiniband_variant_crc, tvb, *offset, 2, FALSE);
1071 /* Parse Subnet Management (LID Routed)
1072 * IN: parentTree to add the dissection to
1073 * IN: pinfo - packet info from wireshark
1074 * IN: tvb - the data buffer from wireshark
1075 * IN/OUT: The current and updated offset */
1076 static void parse_SUBN_LID_ROUTED(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, gint *offset)
1078 /* Parse the Common MAD Header */
1081 proto_tree *SUBN_LID_ROUTED_header_tree = NULL;
1082 proto_item *SUBN_LID_ROUTED_header_item = NULL;
1084 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
1086 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
1090 local_offset = *offset;
1092 /* local_offset - 24 here because when we come out of parse_MAD_Common, the offset it sitting at the data section. */
1093 SUBN_LID_ROUTED_header_item = proto_tree_add_item(parentTree, hf_infiniband_SMP_LID, tvb, local_offset - 24, 256, FALSE);
1094 proto_item_set_text(SUBN_LID_ROUTED_header_item, "%s", "SMP (LID Routed) ");
1095 SUBN_LID_ROUTED_header_tree = proto_item_add_subtree(SUBN_LID_ROUTED_header_item, ett_subn_lid_routed);
1096 proto_tree_add_item(SUBN_LID_ROUTED_header_tree, hf_infiniband_m_key, tvb, local_offset, 8, FALSE); local_offset +=8;
1097 proto_tree_add_item(SUBN_LID_ROUTED_header_tree, hf_infiniband_reserved256, tvb, local_offset, 32, FALSE); local_offset +=32;
1099 label_SUBM_Method(SUBN_LID_ROUTED_header_item, &MadData, pinfo);
1100 label_SUBM_Attribute(SUBN_LID_ROUTED_header_item, &MadData, pinfo);
1102 /* 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. */
1103 if(!parse_SUBM_Attribute(SUBN_LID_ROUTED_header_tree, tvb, &local_offset, &MadData))
1105 proto_tree_add_item(SUBN_LID_ROUTED_header_tree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE); local_offset +=64;
1108 proto_tree_add_item(SUBN_LID_ROUTED_header_tree, hf_infiniband_reserved1024, tvb, local_offset, 128, FALSE); local_offset +=128;
1109 *offset = local_offset;
1112 /* Parse Subnet Management (Directed Route)
1113 * IN: parentTree to add the dissection to
1114 * IN: tvb - the data buffer from wireshark
1115 * IN/OUT: The current and updated offset */
1116 static void parse_SUBN_DIRECTED_ROUTE(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, gint *offset)
1118 /* Parse the Common MAD Header */
1121 proto_tree *SUBN_DIRECTED_ROUTE_header_tree = NULL;
1122 proto_item *SUBN_DIRECTED_ROUTE_header_item = NULL;
1124 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
1126 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
1130 local_offset = *offset;
1132 /* local_offset - 24 here because when we come out of parse_MAD_Common, the offset it sitting at the data section.
1133 * We need to go backwards because this particular SMP uses the class specific portion of the Common MAD Header */
1134 SUBN_DIRECTED_ROUTE_header_item = proto_tree_add_item(parentTree, hf_infiniband_SMP_DIRECTED, tvb, local_offset - 24, 256, FALSE);
1135 proto_item_set_text(SUBN_DIRECTED_ROUTE_header_item, "%s", "SMP (Directed Route) ");
1136 SUBN_DIRECTED_ROUTE_header_tree = proto_item_add_subtree(SUBN_DIRECTED_ROUTE_header_item, ett_subn_directed_route);
1138 label_SUBM_Method(SUBN_DIRECTED_ROUTE_header_item, &MadData, pinfo);
1139 label_SUBM_Attribute(SUBN_DIRECTED_ROUTE_header_item, &MadData, pinfo);
1141 /* Place us at offset 4, the "D" Bit (Direction bit for Directed Route SMPs) */
1143 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_d, tvb, local_offset, 1, FALSE);
1144 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_smp_status, tvb, local_offset, 2, FALSE); local_offset +=2;
1145 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_hop_pointer, tvb, local_offset, 1, FALSE); local_offset +=1;
1146 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_hop_count, tvb, local_offset, 1, FALSE); local_offset +=1;
1147 local_offset += 16; /* Skip over the rest of the Common MAD Header... It's already dissected by parse_MAD_Common */
1148 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_m_key, tvb, local_offset, 8, FALSE); local_offset +=8;
1149 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_dr_slid, tvb, local_offset, 2, FALSE); local_offset +=2;
1150 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_dr_dlid, tvb, local_offset, 2, FALSE); local_offset +=2;
1151 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_reserved28, tvb, local_offset, 28, FALSE); local_offset +=28;
1153 /* 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. */
1154 if(!parse_SUBM_Attribute(SUBN_DIRECTED_ROUTE_header_tree, tvb, &local_offset, &MadData))
1156 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE); local_offset +=64;
1159 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_initial_path, tvb, local_offset, 64, FALSE); local_offset +=64;
1160 proto_tree_add_item(SUBN_DIRECTED_ROUTE_header_tree, hf_infiniband_return_path, tvb, local_offset, 64, FALSE); local_offset +=64;
1161 *offset = local_offset;
1164 /* Parse Subnet Administration
1165 * IN: parentTree to add the dissection to
1166 * IN: pinfo - packet info from wireshark
1167 * IN: tvb - the data buffer from wireshark
1168 * IN/OUT: The current and updated offset */
1169 static void parse_SUBNADMN(proto_tree *parentTree, packet_info *pinfo, tvbuff_t *tvb, gint *offset)
1171 /* Parse the Common MAD Header */
1174 proto_tree *SUBNADMN_header_tree = NULL;
1175 proto_item *SUBNADMN_header_item = NULL;
1177 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
1179 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
1182 if(!parse_RMPP(parentTree, tvb, offset))
1184 /* TODO: Mark Corrupt Packet */
1187 local_offset = *offset;
1189 SUBNADMN_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset - 36, 256, FALSE);
1190 proto_item_set_text(SUBNADMN_header_item, "%s", "SMA");
1191 SUBNADMN_header_tree = proto_item_add_subtree(SUBNADMN_header_item, ett_subnadmin);
1193 proto_tree_add_item(SUBNADMN_header_tree, hf_infiniband_sm_key, tvb, local_offset, 8, FALSE); local_offset+=8;
1194 proto_tree_add_item(SUBNADMN_header_tree, hf_infiniband_attribute_offset, tvb, local_offset, 2, FALSE); local_offset+=4;
1195 proto_tree_add_item(SUBNADMN_header_tree, hf_infiniband_reserved16, tvb, local_offset, 2, FALSE); local_offset+=4;
1196 proto_tree_add_item(SUBNADMN_header_tree, hf_infiniband_component_mask, tvb, local_offset, 8, FALSE); local_offset+=8;
1198 label_SUBA_Method(SUBNADMN_header_item, &MadData, pinfo);
1199 label_SUBA_Attribute(SUBNADMN_header_item, &MadData, pinfo);
1201 if(!parse_SUBA_Attribute(SUBNADMN_header_tree, tvb, &local_offset, &MadData))
1203 proto_tree_add_item(SUBNADMN_header_tree, hf_infiniband_subnet_admin_data, tvb, local_offset, 200, FALSE); local_offset+=200;
1205 *offset = local_offset;
1208 /* Parse Performance Management
1209 * IN: parentTree to add the dissection to
1210 * IN: tvb - the data buffer from wireshark
1211 * IN/OUT: The current and updated offset */
1212 static void parse_PERF(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
1214 /* Parse the Common MAD Header */
1217 proto_item *PERF_header_item = NULL;
1219 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
1221 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
1224 local_offset = *offset;
1225 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 256, FALSE); local_offset += 256;
1226 proto_item_set_text(PERF_header_item, "%s", "PERF - Performance Management MAD (Dissector Not Implemented)");
1227 *offset = local_offset;
1230 /* Parse Baseboard Management
1231 * IN: parentTree to add the dissection to
1232 * IN: tvb - the data buffer from wireshark
1233 * IN/OUT: The current and updated offset */
1234 static void parse_BM(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
1236 /* Parse the Common MAD Header */
1239 proto_item *PERF_header_item = NULL;
1241 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
1243 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
1246 local_offset = *offset;
1248 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 256, FALSE); local_offset += 256;
1249 proto_item_set_text(PERF_header_item, "%s", "BM - Baseboard Management MAD (Dissector Not Implemented)");
1250 *offset = local_offset;
1253 /* Parse Device Management
1254 * IN: parentTree to add the dissection to
1255 * IN: tvb - the data buffer from wireshark
1256 * IN/OUT: The current and updated offset */
1257 static void parse_DEV_MGT(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
1259 /* Parse the Common MAD Header */
1262 proto_item *PERF_header_item = NULL;
1264 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
1266 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
1269 local_offset = *offset;
1270 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 256, FALSE); local_offset += 256;
1271 proto_item_set_text(PERF_header_item, "%s", "DEV_MGT - Device Management MAD (Dissector Not Implemented)");
1272 *offset = local_offset;
1275 /* Parse Communications Management
1276 * IN: parentTree to add the dissection to
1277 * IN: tvb - the data buffer from wireshark
1278 * IN/OUT: The current and updated offset */
1279 static void parse_COM_MGT(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
1281 /* Parse the Common MAD Header */
1284 proto_item *PERF_header_item = NULL;
1286 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
1288 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
1291 local_offset = *offset;
1292 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 256, FALSE); local_offset += 256;
1293 proto_item_set_text(PERF_header_item, "%s", "COMM - Communication Management MAD (Dissector Not Implemented)");
1294 *offset = local_offset;
1297 /* Parse SNMP Tunneling
1298 * IN: parentTree to add the dissection to
1299 * IN: tvb - the data buffer from wireshark
1300 * IN/OUT: The current and updated offset */
1301 static void parse_SNMP(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
1303 /* Parse the Common MAD Header */
1306 proto_item *PERF_header_item = NULL;
1308 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
1310 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
1313 local_offset = *offset;
1315 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 256, FALSE); local_offset += 256;
1316 proto_item_set_text(PERF_header_item, "%s", "SNMP - SNMP Tunneling MAD (Dissector Not Implemented)");
1317 *offset = local_offset;
1320 /* Parse Vendor Specific Management Packets
1321 * IN: parentTree to add the dissection to
1322 * IN: tvb - the data buffer from wireshark
1323 * IN/OUT: The current and updated offset */
1324 static void parse_VENDOR_MANAGEMENT(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
1326 /* Parse the Common MAD Header */
1329 proto_item *PERF_header_item = NULL;
1331 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
1333 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
1336 local_offset = *offset;
1338 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 256, FALSE); local_offset += 256;
1339 proto_item_set_text(PERF_header_item, "%s", "VENDOR - Vendor Specific Management MAD (Dissector Not Implemented)");
1340 *offset = local_offset;
1343 /* Parse Application Specific Management Packets
1344 * IN: parentTree to add the dissection to
1345 * IN: tvb - the data buffer from wireshark
1346 * IN/OUT: The current and updated offset */
1347 static void parse_APPLICATION_MANAGEMENT(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
1349 /* Parse the Common MAD Header */
1352 proto_item *PERF_header_item = NULL;
1354 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
1356 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
1359 local_offset = *offset;
1360 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 256, FALSE); local_offset += 256;
1361 proto_item_set_text(PERF_header_item, "%s", "APP - Application Specific MAD (Dissector Not Implemented)");
1362 *offset = local_offset;
1365 /* Parse Reserved Management Packets.
1367 * This is an !ERROR CONDITION!
1368 * It means that the Management Class value used was defined as a reserved value for furture use.
1369 * This method is here since we will want to report this information directly to the UI without blowing up Wireshark.
1371 * IN: parentTree to add the dissection to
1372 * IN: tvb - the data buffer from wireshark
1373 * IN/OUT: The current and updated offset */
1374 static void parse_RESERVED_MANAGEMENT(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
1376 /* Parse the Common MAD Header */
1379 proto_item *PERF_header_item = NULL;
1381 if(!parse_MAD_Common(parentTree, tvb, offset, &MadData))
1383 /* TODO: Mark Corrupt Packet - Not enough bytes exist for at least the Common MAD header which is present in all MAD packets */
1386 local_offset = *offset;
1387 PERF_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 256, FALSE); local_offset += 256;
1388 proto_item_set_text(PERF_header_item, "%s", "RESERVED - Reserved MAD Type (Possible Device Error)");
1389 *offset = local_offset;
1392 /* Parse the common MAD Header
1393 * IN: parentTree to add the dissection to
1394 * IN: tvb - the data buffer from wireshark
1395 * IN/OUT: The current and updated offset
1396 * IN/OUT: MadData - the data from the MAD header */
1397 static gboolean parse_MAD_Common(proto_tree *parentTree, tvbuff_t *tvb, gint *offset, MAD_Data* MadData)
1399 gint local_offset = *offset;
1400 proto_tree *MAD_header_tree = NULL;
1401 proto_item *MAD_header_item = NULL;
1405 if(!tvb_bytes_exist(tvb, *offset, 256))
1408 /* Get the Management Class to decide between LID Routed and Direct Route */
1409 MadData->managementClass = tvb_get_guint8(tvb, local_offset + 1);
1410 MadData->classVersion = tvb_get_guint8(tvb, local_offset + 2);
1411 MadData->method = tvb_get_guint8(tvb, local_offset + 3);
1412 MadData->status = tvb_get_guint8(tvb, local_offset + 4);
1413 MadData->classSpecific = tvb_get_ntohs(tvb, local_offset + 6);
1414 MadData->transactionID = tvb_get_ntoh64(tvb, local_offset + 8);
1415 MadData->attributeID = tvb_get_ntohs(tvb, local_offset + 16);
1416 MadData->attributeModifier = tvb_get_ntohl(tvb, local_offset + 20);
1417 tvb_memcpy(tvb, MadData->data, local_offset + 24, 232);
1419 /* Populate the Dissector Tree */
1421 MAD_header_item = proto_tree_add_item(parentTree, hf_infiniband_MAD, tvb, local_offset, 256, FALSE);
1422 proto_item_set_text(MAD_header_item, "%s", "MAD Header - Common Management Datagram");
1423 MAD_header_tree = proto_item_add_subtree(MAD_header_item, ett_mad);
1425 proto_tree_add_item(MAD_header_tree, hf_infiniband_base_version, tvb, local_offset, 1, FALSE); local_offset+=1;
1426 proto_tree_add_item(MAD_header_tree, hf_infiniband_mgmt_class, tvb, local_offset, 1, FALSE); local_offset+=1;
1427 proto_tree_add_item(MAD_header_tree, hf_infiniband_class_version, tvb, local_offset, 1, FALSE); local_offset+=1;
1428 proto_tree_add_item(MAD_header_tree, hf_infiniband_method, tvb, local_offset, 1, FALSE); local_offset+=1;
1429 proto_tree_add_item(MAD_header_tree, hf_infiniband_status, tvb, local_offset, 2, FALSE); local_offset+=2;
1430 proto_tree_add_item(MAD_header_tree, hf_infiniband_class_specific, tvb, local_offset, 2, FALSE); local_offset+=2;
1431 proto_tree_add_item(MAD_header_tree, hf_infiniband_transaction_id, tvb, local_offset, 8, FALSE); local_offset+=8;
1432 proto_tree_add_item(MAD_header_tree, hf_infiniband_attribute_id, tvb, local_offset, 2, FALSE); local_offset+=2;
1433 proto_tree_add_item(MAD_header_tree, hf_infiniband_reserved16, tvb, local_offset, 2, FALSE); local_offset+=2;
1434 proto_tree_add_item(MAD_header_tree, hf_infiniband_attribute_modifier, tvb, local_offset, 4, FALSE); local_offset+=4;
1435 proto_tree_add_item(MAD_header_tree, hf_infiniband_data, tvb, local_offset, 232, FALSE); local_offset+=232;
1436 *offset = (local_offset - 232); /* Move the offset back to the start of the Data field - this will be where the other parsers start. */
1441 /* Parse the RMPP (Reliable Multi-Packet Transaction Protocol
1442 * IN: parentTree to add the dissection to
1443 * IN: tvb - the data buffer from wireshark
1444 * IN/OUT: The current and updated offset */
1445 static gboolean parse_RMPP(proto_tree *parentTree, tvbuff_t *tvb, gint *offset)
1447 gint local_offset = *offset;
1448 guint8 RMPP_Type = tvb_get_guint8(tvb, local_offset + 1);
1449 proto_tree *RMPP_header_tree = NULL;
1450 proto_item *RMPP_header_item = NULL;
1452 RMPP_header_item = proto_tree_add_item(parentTree, hf_infiniband_RMPP, tvb, local_offset, 12, FALSE);
1453 proto_item_set_text(RMPP_header_item, "%s", val_to_str(RMPP_Type, RMPP_Packet_Types, "Reserved RMPP Type! (0x%02x)"));
1454 RMPP_header_tree = proto_item_add_subtree(RMPP_header_item, ett_rmpp);
1456 proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_version, tvb, local_offset, 1, FALSE); local_offset+=1;
1457 proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_type, tvb, local_offset, 1, FALSE); local_offset+=1;
1458 proto_tree_add_item(RMPP_header_tree, hf_infiniband_r_resp_time, tvb, local_offset, 1, FALSE);
1459 proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_flags, tvb, local_offset, 1, FALSE); local_offset+=1;
1460 proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_status, tvb, local_offset, 1, FALSE); local_offset+=1;
1464 proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_data1, tvb, local_offset, 32, FALSE); local_offset+=32;
1465 proto_tree_add_item(RMPP_header_tree, hf_infiniband_rmpp_data2, tvb, local_offset, 32, FALSE); local_offset+=32;
1468 proto_tree_add_item(RMPP_header_tree, hf_infiniband_segment_number, tvb, local_offset, 4, FALSE); local_offset+=4;
1469 proto_tree_add_item(RMPP_header_tree, hf_infiniband_payload_length32, tvb, local_offset, 4, FALSE); local_offset+=4;
1470 proto_tree_add_item(RMPP_header_tree, hf_infiniband_transferred_data, tvb, local_offset, 220, FALSE);
1473 proto_tree_add_item(RMPP_header_tree, hf_infiniband_segment_number, tvb, local_offset, 4, FALSE); local_offset+=4;
1474 proto_tree_add_item(RMPP_header_tree, hf_infiniband_new_window_last, tvb, local_offset, 4, FALSE); local_offset+=4;
1475 proto_tree_add_item(RMPP_header_tree, hf_infiniband_reserved220, tvb, local_offset, 220, FALSE);
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_reserved32, tvb, local_offset, 4, FALSE); local_offset+=4;
1481 proto_tree_add_item(RMPP_header_tree, hf_infiniband_optional_extended_error_data, tvb, local_offset, 220, FALSE);
1486 *offset = local_offset;
1490 /* Parse the Method from the MAD Common Header.
1491 * Simply used to generate the identifier.
1492 * IN: SubMItem - the item to append the method label to.
1493 * IN: MadHeader - the MadData structure that contains the information from the Common MAD header.
1494 * IN: pinfo - packet info from wireshark. */
1495 static void label_SUBM_Method(proto_item *SubMItem, MAD_Data *MadHeader, packet_info *pinfo)
1497 const char *label = val_to_str(MadHeader->method, SUBM_Methods, "(Unknown SubManagement Method!)");
1499 proto_item_append_text(SubMItem, "%s", label);
1500 if (check_col(pinfo->cinfo, COL_INFO))
1501 col_append_str(pinfo->cinfo, COL_INFO, label);
1504 /* Parse the SA Method from the MAD Common Header.
1505 * Simply used to generate the identifier.
1506 * IN: SubAItem - the item to append the method label to.
1507 * IN: MadHeader - the MadData structure that contains the information from the Common MAD header.
1508 * IN: pinfo - packet info from wireshark. */
1509 static void label_SUBA_Method(proto_item *SubAItem, MAD_Data *MadHeader, packet_info *pinfo)
1511 const char *label = val_to_str(MadHeader->method, SUBA_Methods, "(Unknown SubAdministration Method!)");
1513 proto_item_append_text(SubAItem, "%s", label);
1514 if (check_col(pinfo->cinfo, COL_INFO))
1515 col_append_str(pinfo->cinfo, COL_INFO, label);
1518 /* Parse the Attribute from the MAD Common Header
1519 * Simply used to generate the identifier.
1520 * IN: SubMItem - the item to append the Attribute label to.
1521 * IN: MadHeader - the MadData structure that contains the information from the Common MAD header.
1522 * IN: pinfo - packet info from wireshark. */
1523 static void label_SUBM_Attribute(proto_item *SubMItem, MAD_Data *MadHeader, packet_info *pinfo)
1525 const char *label = val_to_str(MadHeader->attributeID, SUBM_Attributes, "(Unknown SubManagement Attribute!)");
1527 proto_item_append_text(SubMItem, "%s", &label[11]);
1528 if (check_col(pinfo->cinfo, COL_INFO))
1529 col_append_str(pinfo->cinfo, COL_INFO, &label[11]);
1532 /* Parse the SA Attribute from the MAD Common Header
1533 * Simply used to generate the identifier.
1534 * IN: SubAItem - the item to append the Attribute label to.
1535 * IN: MadHeader - the MadData structure that contains the information from the Common MAD header.
1536 * IN: pinfo - packet info from wireshark. */
1537 static void label_SUBA_Attribute(proto_item *SubAItem, MAD_Data *MadHeader, packet_info *pinfo)
1539 const char *label = val_to_str(MadHeader->attributeID, SUBA_Attributes, "(Unknown SubAdministration Attribute!)");
1541 proto_item_append_text(SubAItem, "%s", &label[11]);
1542 if (check_col(pinfo->cinfo, COL_INFO))
1543 col_append_str(pinfo->cinfo, COL_INFO, &label[11]);
1546 /* Parse the attribute from a Subnet Management Packet.
1547 * IN: Parent Tree to add the item to in the dissection tree
1548 * IN: tvbuff, offset - the data and where it is.
1549 * IN: MAD_Data the data from the Common MAD Header that provides the information we need */
1550 static gboolean parse_SUBM_Attribute(proto_tree *parentTree, tvbuff_t *tvb, gint *offset, MAD_Data *MadHeader)
1552 guint16 attributeID = MadHeader->attributeID;
1553 proto_tree *SUBM_Attribute_header_tree = NULL;
1554 proto_item *SUBM_Attribute_header_item = NULL;
1556 SUBM_Attribute_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, *offset, 64, FALSE);
1557 proto_item_set_text(SUBM_Attribute_header_item, "%s", val_to_str(attributeID, SUBM_Attributes, "Unknown Attribute Type! (0x%02x)"));
1558 SUBM_Attribute_header_tree = proto_item_add_subtree(SUBM_Attribute_header_item, ett_subm_attribute);
1564 parse_NoticesAndTraps(SUBM_Attribute_header_tree , tvb, offset);
1567 parse_NodeDescription(SUBM_Attribute_header_tree , tvb, offset);
1570 parse_NodeInfo(SUBM_Attribute_header_tree , tvb, offset);
1573 parse_SwitchInfo(SUBM_Attribute_header_tree , tvb, offset);
1576 parse_GUIDInfo(SUBM_Attribute_header_tree , tvb, offset);
1579 parse_PortInfo(SUBM_Attribute_header_tree , tvb, offset);
1582 parse_P_KeyTable(SUBM_Attribute_header_tree , tvb, offset);
1585 parse_SLtoVLMappingTable(SUBM_Attribute_header_tree , tvb, offset);
1588 parse_VLArbitrationTable(SUBM_Attribute_header_tree , tvb, offset);
1591 parse_LinearForwardingTable(SUBM_Attribute_header_tree , tvb, offset);
1594 parse_RandomForwardingTable(SUBM_Attribute_header_tree , tvb, offset);
1597 parse_MulticastForwardingTable(SUBM_Attribute_header_tree , tvb, offset);
1600 parse_SMInfo(SUBM_Attribute_header_tree , tvb, offset);
1603 parse_VendorDiag(SUBM_Attribute_header_tree , tvb, offset);
1606 parse_LedInfo(SUBM_Attribute_header_tree , tvb, offset);
1609 parse_LinkSpeedWidthPairsTable(SUBM_Attribute_header_tree , tvb, offset);
1620 /* Parse the attribute from a Subnet Administration Packet.
1621 * IN: Parent Tree to add the item to in the dissection tree
1622 * IN: tvbuff, offset - the data and where it is.
1623 * IN: MAD_Data the data from the Common MAD Header that provides the information we need */
1624 static gboolean parse_SUBA_Attribute(proto_tree *parentTree, tvbuff_t *tvb, gint *offset, MAD_Data *MadHeader)
1626 guint16 attributeID = MadHeader->attributeID;
1627 proto_tree *SUBA_Attribute_header_tree = NULL;
1628 proto_item *SUBA_Attribute_header_item = NULL;
1630 SUBA_Attribute_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, *offset, 200, FALSE);
1631 proto_item_set_text(SUBA_Attribute_header_item, "%s", val_to_str(attributeID, SUBA_Attributes, "Unknown Attribute Type! (0x%02x)"));
1632 SUBA_Attribute_header_tree = proto_item_add_subtree(SUBA_Attribute_header_item, ett_suba_attribute);
1634 /* Skim off the RID fields should they be present */
1635 parse_RID(SUBA_Attribute_header_tree, tvb, offset, MadHeader);
1637 /* Parse the rest of the attributes */
1638 switch(MadHeader->attributeID)
1640 case 0x0001: /* (ClassPortInfo) */
1641 parse_PortInfo(SUBA_Attribute_header_tree, tvb, offset);
1643 case 0x0002: /* (Notice) */
1644 parse_NoticesAndTraps(SUBA_Attribute_header_tree, tvb, offset);
1646 case 0x0003: /* (InformInfo) */
1647 parse_InformInfo(SUBA_Attribute_header_tree, tvb, offset);
1649 case 0x0011: /* (NodeRecord) */
1650 parse_NodeInfo(SUBA_Attribute_header_tree, tvb, offset);
1652 parse_NodeDescription(SUBA_Attribute_header_tree, tvb, offset);
1654 case 0x0012: /* (PortInfoRecord) */
1655 parse_PortInfo(SUBA_Attribute_header_tree, tvb, offset);
1657 case 0x0013: /* (SLtoVLMappingTableRecord) */
1658 parse_SLtoVLMappingTable(SUBA_Attribute_header_tree, tvb, offset);
1660 case 0x0014: /* (SwitchInfoRecord) */
1661 parse_SwitchInfo(SUBA_Attribute_header_tree, tvb, offset);
1663 case 0x0015: /*(LinearForwardingTableRecord) */
1664 parse_LinearForwardingTable(SUBA_Attribute_header_tree, tvb, offset);
1666 case 0x0016: /* (RandomForwardingTableRecord) */
1667 parse_RandomForwardingTable(SUBA_Attribute_header_tree, tvb, offset);
1669 case 0x0017: /* (MulticastForwardingTableRecord) */
1670 parse_MulticastForwardingTable(SUBA_Attribute_header_tree, tvb, offset);
1672 case 0x0018: /* (SMInfoRecord) */
1673 parse_SMInfo(SUBA_Attribute_header_tree, tvb, offset);
1675 case 0x0019: /* (LinkSpeedWidthPairsTableRecord) */
1676 parse_LinkSpeedWidthPairsTable(SUBA_Attribute_header_tree, tvb, offset);
1678 case 0x00F3: /*(InformInfoRecord) */
1679 parse_InformInfo(SUBA_Attribute_header_tree, tvb, offset);
1681 case 0x0020: /* (LinkRecord) */
1682 parse_LinkRecord(SUBA_Attribute_header_tree, tvb, offset);
1684 case 0x0030: /* (GuidInforecord) */
1685 parse_GUIDInfo(SUBA_Attribute_header_tree, tvb, offset);
1687 case 0x0031: /*(ServiceRecord) */
1688 parse_ServiceRecord(SUBA_Attribute_header_tree, tvb, offset);
1690 case 0x0033: /* (P_KeyTableRecord) */
1691 parse_P_KeyTable(SUBA_Attribute_header_tree, tvb, offset);
1693 case 0x0035: /* (PathRecord) */
1694 parse_PathRecord(SUBA_Attribute_header_tree, tvb, offset);
1696 case 0x0036: /* (VLArbitrationTableRecord) */
1697 parse_VLArbitrationTable(SUBA_Attribute_header_tree, tvb, offset);
1699 case 0x0038: /* (MCMemberRecord) */
1700 parse_MCMemberRecord(SUBA_Attribute_header_tree, tvb, offset);
1702 case 0x0039: /* (TraceRecord) */
1703 parse_TraceRecord(SUBA_Attribute_header_tree, tvb, offset);
1705 case 0x003A: /* (MultiPathRecord) */
1706 parse_MultiPathRecord(SUBA_Attribute_header_tree, tvb, offset);
1708 case 0x003B: /* (ServiceAssociationRecord) */
1709 parse_ServiceAssociationRecord(SUBA_Attribute_header_tree, tvb, offset);
1711 default: /* (Unknown SubAdministration Attribute!) */
1712 /* We've already labeled as unknown in item construction */
1720 /* Subnet Management Attribute Parsing Methods.
1721 * Also Parsing for Attributes common to both SM/SA.
1722 * The Subnet Admin Parsing methods will call some of these methods when an attribute is present within an SA MAD
1726 /* Parse NoticeDataDetails Attribute Field
1727 * IN: parentTree - The tree to add the dissection to
1728 * tvb - The tvbbuff of packet data
1729 * offset - The offset in TVB where the attribute begins
1730 * trapNumber - The Trap ID of the Trap Data being Dissected */
1732 static void parse_NoticeDataDetails(proto_tree* parentTree, tvbuff_t* tvb, gint *offset, guint16 trapNumber)
1734 gint local_offset = *offset;
1735 proto_tree *DataDetails_header_tree = NULL;
1736 proto_item *DataDetails_header_item = NULL;
1741 DataDetails_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 54, FALSE);
1742 DataDetails_header_tree = proto_item_add_subtree(DataDetails_header_item, ett_datadetails);
1748 proto_item_set_text(DataDetails_header_item, "%s", "Trap 64 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 65 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 66 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 67 DataDetails");
1765 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR, tvb, local_offset, 16, FALSE); local_offset+=16;
1768 proto_item_set_text(DataDetails_header_item, "%s", "Trap 68 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 69 DataDetails");
1774 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_COMP_MASK, tvb, local_offset, 8, FALSE); local_offset+=8;
1775 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_WAIT_FOR_REPATH, tvb, local_offset, 1, FALSE);
1778 proto_item_set_text(DataDetails_header_item, "%s", "Trap 128 DataDetails");
1779 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
1782 proto_item_set_text(DataDetails_header_item, "%s", "Trap 129 DataDetails");
1784 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
1785 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_PORTNO, tvb, local_offset, 1, FALSE); local_offset+=1;
1788 proto_item_set_text(DataDetails_header_item, "%s", "Trap 130 DataDetails");
1790 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
1791 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_PORTNO, tvb, local_offset, 1, FALSE); local_offset+=1;
1794 proto_item_set_text(DataDetails_header_item, "%s", "Trap 131 DataDetails");
1796 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
1797 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_PORTNO, tvb, local_offset, 1, FALSE); local_offset+=1;
1800 proto_item_set_text(DataDetails_header_item, "%s", "Trap 144 DataDetails");
1802 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
1804 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_OtherLocalChanges, tvb, local_offset, 1, FALSE); local_offset+=1;
1805 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_CAPABILITYMASK, tvb, local_offset, 4, FALSE); local_offset+=4;
1807 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LinkSpeecEnabledChange, tvb, local_offset, 1, FALSE);
1808 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LinkWidthEnabledChange, tvb, local_offset, 1, FALSE);
1809 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_NodeDescriptionChange, tvb, local_offset, 1, FALSE);
1812 proto_item_set_text(DataDetails_header_item, "%s", "Trap 145 DataDetails");
1814 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
1816 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_SYSTEMIMAGEGUID, tvb, local_offset, 8, FALSE); local_offset+=8;
1819 proto_item_set_text(DataDetails_header_item, "%s", "Trap 256 DataDetails");
1821 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
1822 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DRSLID, tvb, local_offset, 2, FALSE); local_offset+=2;
1823 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_METHOD, tvb, local_offset, 1, FALSE); local_offset+=1;
1825 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_ATTRIBUTEID, tvb, local_offset, 2, FALSE); local_offset+=2;
1826 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_ATTRIBUTEMODIFIER, tvb, local_offset, 4, FALSE); local_offset+=4;
1827 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_MKEY, tvb, local_offset, 8, FALSE); local_offset+=8;
1829 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DRNotice, tvb, local_offset, 1, FALSE);
1830 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DRPathTruncated, tvb, local_offset, 1, FALSE);
1831 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DRHopCount, tvb, local_offset, 1, FALSE); local_offset+=1;
1832 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DRNoticeReturnPath, tvb, local_offset, 30, FALSE); local_offset+=30;
1835 proto_item_set_text(DataDetails_header_item, "%s", "Trap 257 DataDetails");
1837 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR1, tvb, local_offset, 2, FALSE); local_offset+=2;
1838 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR2, tvb, local_offset, 2, FALSE); local_offset+=2;
1839 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_KEY, tvb, local_offset, 4, FALSE); local_offset+=4;
1840 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_SL, tvb, local_offset, 1, FALSE); local_offset+=1;
1841 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP1, tvb, local_offset, 3, FALSE); local_offset+=3;
1843 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP2, tvb, local_offset, 3, FALSE); local_offset+=3;
1844 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR1, tvb, local_offset, 16, FALSE); local_offset+=16;
1845 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR2, tvb, local_offset, 16, FALSE); local_offset+=16;
1848 proto_item_set_text(DataDetails_header_item, "%s", "Trap 258 DataDetails");
1850 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR1, tvb, local_offset, 2, FALSE); local_offset+=2;
1851 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR2, tvb, local_offset, 2, FALSE); local_offset+=2;
1852 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_KEY, tvb, local_offset, 4, FALSE); local_offset+=4;
1853 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_SL, tvb, local_offset, 1, FALSE); local_offset +=1;
1854 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP1, tvb, local_offset, 3, FALSE); local_offset+=3;
1856 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP2, tvb, local_offset, 3, FALSE); local_offset+=3;
1857 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR1, tvb, local_offset, 16, FALSE); local_offset+=16;
1858 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR2, tvb, local_offset, 16, FALSE); local_offset+=16;
1861 proto_item_set_text(DataDetails_header_item, "%s", "Trap 259 DataDetails");
1862 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_DataValid, tvb, local_offset, 2, FALSE); local_offset+=2;
1863 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR1, tvb, local_offset, 2, FALSE); local_offset+=2;
1864 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_LIDADDR2, tvb, local_offset, 2, FALSE); local_offset+=2;
1865 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_PKEY, tvb, local_offset, 2, FALSE); local_offset+=2;
1866 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_SL, tvb, local_offset, 1, FALSE); local_offset+=1;
1867 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP1, tvb, local_offset, 3, FALSE); local_offset+=3;
1869 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_QP2, tvb, local_offset, 3, FALSE); local_offset+=3;
1870 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR1, tvb, local_offset, 16, FALSE); local_offset+=16;
1871 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_GIDADDR2, tvb, local_offset, 16, FALSE); local_offset+=16;
1872 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_SWLIDADDR, tvb, local_offset, 2, FALSE); local_offset+=2;
1873 proto_tree_add_item(DataDetails_header_tree, hf_infiniband_Trap_PORTNO, tvb, local_offset, 1, FALSE); local_offset+=1;
1876 proto_item_set_text(DataDetails_header_item, "%s", "Vendor Specific Subnet Management Trap"); local_offset +=54;
1882 /* Parse NoticesAndTraps Attribute
1883 * IN: parentTree - The tree to add the dissection to
1884 * tvb - The tvbbuff of packet data
1885 * offset - The offset in TVB where the attribute begins
1886 * MadHeader - The common MAD header of the current SMP/SMA */
1887 static void parse_NoticesAndTraps(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
1889 gint local_offset = *offset;
1890 proto_tree *NoticesAndTraps_header_tree = NULL;
1891 proto_item *NoticesAndTraps_header_item = NULL;
1892 guint16 trapNumber = tvb_get_ntohs(tvb, local_offset + 4);
1897 NoticesAndTraps_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
1898 proto_item_set_text(NoticesAndTraps_header_item, "%s", val_to_str(trapNumber, Trap_Description, "Unknown or Vendor Specific Trap Number! (0x%02x)"));
1899 NoticesAndTraps_header_tree = proto_item_add_subtree(NoticesAndTraps_header_item, ett_noticestraps);
1901 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_IsGeneric, tvb, local_offset, 1, FALSE);
1902 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_Type, tvb, local_offset, 1, FALSE); local_offset+=1;
1903 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_ProducerTypeVendorID, tvb, local_offset, 3, FALSE); local_offset+=3;
1904 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_TrapNumberDeviceID, tvb, local_offset, 2, FALSE); local_offset+=2;
1905 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_IssuerLID, tvb, local_offset, 2, FALSE); local_offset+=2;
1906 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_NoticeToggle, tvb, local_offset, 1, FALSE);
1907 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_NoticeCount, tvb, local_offset, 2, FALSE); local_offset+=2;
1909 parse_NoticeDataDetails(NoticesAndTraps_header_tree, tvb, &local_offset, trapNumber);
1910 proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_DataDetails, tvb, local_offset, 54, FALSE); local_offset+=54;
1912 /* Only Defined For GMPs not SMPs which is not part of this dissector phase
1913 *proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_IssuerGID, tvb, local_offset, 16, FALSE); local_offset+=16;
1914 *proto_tree_add_item(NoticesAndTraps_header_tree, hf_infiniband_Notice_ClassTrapSpecificData, tvb, local_offset, 1, FALSE); local_offset+=1; */
1918 /* Parse NodeDescription Attribute
1919 * IN: parentTree - The tree to add the dissection to
1920 * tvb - The tvbbuff of packet data
1921 * offset - The offset in TVB where the attribute begins
1922 * MadHeader - The common MAD header of the current SMP/SMA */
1923 static void parse_NodeDescription(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
1925 gint local_offset = *offset;
1926 proto_tree *NodeDescription_header_tree = NULL;
1931 NodeDescription_header_tree = parentTree;
1932 proto_tree_add_item(NodeDescription_header_tree, hf_infiniband_NodeDescription_NodeString, tvb, local_offset, 64, FALSE);
1935 /* Parse NodeInfo Attribute
1936 * IN: parentTree - The tree to add the dissection to
1937 * tvb - The tvbbuff of packet data
1938 * offset - The offset in TVB where the attribute begins
1939 * MadHeader - The common MAD header of the current SMP/SMA */
1940 static void parse_NodeInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
1942 gint local_offset = *offset;
1943 proto_tree *NodeInfo_header_tree = NULL;
1948 NodeInfo_header_tree = parentTree;
1950 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_BaseVersion, tvb, local_offset, 1, FALSE); local_offset +=1;
1951 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_ClassVersion, tvb, local_offset, 1, FALSE); local_offset +=1;
1952 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_NodeType, tvb, local_offset, 1, FALSE); local_offset +=1;
1953 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_NumPorts, tvb, local_offset, 1, FALSE); local_offset +=1;
1954 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_SystemImageGUID, tvb, local_offset, 8, FALSE); local_offset +=8;
1955 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_NodeGUID, tvb, local_offset, 8, FALSE); local_offset +=8;
1956 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_PortGUID, tvb, local_offset, 8, FALSE); local_offset +=8;
1957 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_PartitionCap, tvb, local_offset, 2, FALSE); local_offset +=2;
1958 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_DeviceID, tvb, local_offset, 2, FALSE); local_offset +=2;
1959 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_Revision, tvb, local_offset, 4, FALSE); local_offset +=4;
1960 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_LocalPortNum, tvb, local_offset, 1, FALSE); local_offset +=1;
1961 proto_tree_add_item(NodeInfo_header_tree, hf_infiniband_NodeInfo_VendorID, tvb, local_offset, 3, FALSE); local_offset +=3;
1965 /* Parse SwitchInfo Attribute
1966 * IN: parentTree - The tree to add the dissection to
1967 * tvb - The tvbbuff of packet data
1968 * offset - The offset in TVB where the attribute begins
1969 * MadHeader - The common MAD header of the current SMP/SMA */
1970 static void parse_SwitchInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
1972 gint local_offset = *offset;
1973 proto_tree *SwitchInfo_header_tree = NULL;
1978 SwitchInfo_header_tree = parentTree;
1980 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_LinearFDBCap, tvb, local_offset, 2, FALSE); local_offset +=2;
1981 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_RandomFDBCap, tvb, local_offset, 2, FALSE); local_offset +=2;
1982 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_MulticastFDBCap, tvb, local_offset, 2, FALSE); local_offset +=2;
1983 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_LinearFDBTop, tvb, local_offset, 2, FALSE); local_offset +=2;
1984 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_DefaultPort, tvb, local_offset, 1, FALSE); local_offset +=1;
1985 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_DefaultMulticastPrimaryPort, tvb, local_offset, 1, FALSE); local_offset +=1;
1986 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_DefaultMulticastNotPrimaryPort, tvb, local_offset, 1, FALSE); local_offset +=1;
1987 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_LifeTimeValue, tvb, local_offset, 1, FALSE);
1988 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_PortStateChange, tvb, local_offset, 1, FALSE);
1989 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_OptimizedSLtoVLMappingProgramming, tvb, local_offset, 1, FALSE); local_offset +=1;
1990 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_LIDsPerPort, tvb, local_offset, 2, FALSE); local_offset +=2;
1991 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_PartitionEnforcementCap, tvb, local_offset, 2, FALSE); local_offset +=2;
1992 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_InboundEnforcementCap, tvb, local_offset, 1, FALSE);
1993 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_OutboundEnforcementCap, tvb, local_offset, 1, FALSE);
1994 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_FilterRawInboundCap, tvb, local_offset, 1, FALSE);
1995 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_FilterRawOutboundCap, tvb, local_offset, 1, FALSE);
1996 proto_tree_add_item(SwitchInfo_header_tree, hf_infiniband_SwitchInfo_EnhancedPortZero, tvb, local_offset, 1, FALSE); local_offset +=1;
1999 /* Parse GUIDInfo Attribute
2000 * IN: parentTree - The tree to add the dissection to
2001 * tvb - The tvbbuff of packet data
2002 * offset - The offset in TVB where the attribute begins
2003 * MadHeader - The common MAD header of the current SMP/SMA */
2004 static void parse_GUIDInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2006 gint local_offset = *offset;
2007 proto_tree *GUIDInfo_header_tree = NULL;
2008 proto_item *tempItemLow = NULL;
2014 GUIDInfo_header_tree = parentTree;
2016 for(i = 0; i < 8; i++)
2018 proto_tree_add_item(GUIDInfo_header_tree, hf_infiniband_GUIDInfo_GUID, tvb, local_offset, 8, FALSE); local_offset +=8;
2019 proto_item_append_text(tempItemLow, "(%u)", i);
2024 /* Parse PortInfo Attribute
2025 * IN: parentTree - The tree to add the dissection to
2026 * tvb - The tvbbuff of packet data
2027 * offset - The offset in TVB where the attribute begins
2028 * MadHeader - The common MAD header of the current SMP/SMA */
2029 static void parse_PortInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2031 gint local_offset = *offset;
2032 proto_tree *PortInfo_header_tree = NULL;
2033 proto_tree *PortInfo_CapabilityMask_tree = NULL;
2034 proto_item *PortInfo_CapabilityMask_item = NULL;
2035 proto_item *temp_item = NULL;
2036 guint16 temp_val = 0;
2041 PortInfo_header_tree = parentTree;
2043 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_M_Key, tvb, local_offset, 8, FALSE); local_offset +=8;
2044 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_GidPrefix, tvb, local_offset, 8, FALSE); local_offset +=8;
2045 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LID, tvb, local_offset, 2, FALSE); local_offset +=2;
2046 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_MasterSMLID, tvb, local_offset, 2, FALSE); local_offset +=2;
2048 /* Capability Mask Flags */
2049 PortInfo_CapabilityMask_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_CapabilityMask, tvb, local_offset, 4, FALSE);
2050 PortInfo_CapabilityMask_tree = proto_item_add_subtree(PortInfo_CapabilityMask_item, ett_portinfo_capmask);
2052 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_SM, tvb, local_offset, 4, FALSE);
2053 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_NoticeSupported, tvb, local_offset, 4, FALSE);
2054 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_TrapSupported, tvb, local_offset, 4, FALSE);
2055 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_OptionalPDSupported, tvb, local_offset, 4, FALSE);
2056 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_AutomaticMigrationSupported, tvb, local_offset, 4, FALSE);
2057 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_SLMappingSupported, tvb, local_offset, 4, FALSE);
2058 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_MKeyNVRAM, tvb, local_offset, 4, FALSE);
2059 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_PKeyNVRAM, tvb, local_offset, 4, FALSE);
2060 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_LEDInfoSupported, tvb, local_offset, 4, FALSE);
2061 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_SMdisabled, tvb, local_offset, 4, FALSE);
2062 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_SystemImageGUIDSupported, tvb, local_offset, 4, FALSE);
2063 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_PKeySwitchExternalPortTrapSupported, tvb, local_offset, 4, FALSE);
2064 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_CommunicationsManagementSupported, tvb, local_offset, 4, FALSE);
2065 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_SNMPTunnelingSupported, tvb, local_offset, 4, FALSE);
2066 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_ReinitSupported, tvb, local_offset, 4, FALSE);
2067 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_DeviceManagementSupported, tvb, local_offset, 4, FALSE);
2068 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_VendorClassSupported, tvb, local_offset, 4, FALSE);
2069 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_DRNoticeSupported, tvb, local_offset, 4, FALSE);
2070 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_CapabilityMaskNoticeSupported, tvb, local_offset, 4, FALSE);
2071 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_BootManagementSupported, tvb, local_offset, 4, FALSE);
2072 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_LinkRoundTripLatencySupported, tvb, local_offset, 4, FALSE);
2073 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_ClientRegistrationSupported, tvb, local_offset, 4, FALSE);
2074 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_OtherLocalChangesNoticeSupported, tvb, local_offset, 4, FALSE);
2075 proto_tree_add_item(PortInfo_CapabilityMask_tree, hf_infiniband_PortInfo_CapabilityMask_LinkSpeedWIdthPairsTableSupported, tvb, local_offset, 4, FALSE);
2077 /* End Capability Mask Flags */
2080 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_DiagCode, tvb, local_offset, 2, FALSE);
2081 temp_val = tvb_get_ntohs(tvb, local_offset);
2083 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, DiagCode, "Reserved DiagCode! Possible Error"));
2087 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_M_KeyLeasePeriod, tvb, local_offset, 2, FALSE); local_offset +=2;
2088 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LocalPortNum, tvb, local_offset, 1, FALSE); local_offset +=1;
2090 /* LinkWidthEnabled */
2091 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkWidthEnabled, tvb, local_offset, 1, FALSE);
2092 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2094 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, LinkWidthEnabled, "Reserved LinkWidthEnabled Value! Possible Error"));
2096 /* End LinkWidthEnabled */
2098 /* LinkWidthSupported */
2099 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkWidthSupported, tvb, local_offset, 1, FALSE);
2100 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2102 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, LinkWidthSupported, "Reserved LinkWidthSupported Value! Possible Error"));
2104 /* End LinkWidthSupported */
2106 /* LinkWidthActive */
2107 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkWidthActive, tvb, local_offset, 1, FALSE);
2108 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2110 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, LinkWidthActive, "Reserved LinkWidthActive Value! Possible Error"));
2112 /* End LinkWidthActive */
2114 /* LinkSpeedSupported */
2115 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkSpeedSupported, tvb, local_offset, 1, FALSE);
2116 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2118 /* 4 bit values = mask and shift */
2119 temp_val = temp_val & 0x00F0;
2120 temp_val = temp_val >> 4;
2122 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, LinkSpeedSupported, "Reserved LinkWidthSupported Value! Possible Error"));
2123 /* End LinkSpeedSupported */
2126 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_PortState, tvb, local_offset, 1, FALSE);
2127 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2129 /* 4 bit values = mask and shift */
2130 temp_val = temp_val & 0x000F;
2131 /*temp_val = temp_val >> 4 */
2133 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, PortState, "Reserved PortState Value! Possible Error"));
2137 /* PortPhysicalState */
2138 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_PortPhysicalState, tvb, local_offset, 1, FALSE);
2139 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2141 /* 4 bit values = mask and shift */
2142 temp_val = temp_val & 0x00F0;
2143 temp_val = temp_val >> 4;
2145 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, PortPhysicalState, "Reserved PortPhysicalState Value! Possible Error"));
2146 /* End PortPhysicalState */
2148 /* LinkDownDefaultState */
2149 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkDownDefaultState, tvb, local_offset, 1, FALSE);
2150 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2152 /* 4 bit values = mask and shift */
2153 temp_val = temp_val & 0x000F;
2154 /*temp_val = temp_val >> 4 */
2156 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, LinkDownDefaultState, "Reserved LinkDownDefaultState Value! Possible Error"));
2158 /* End LinkDownDefaultState */
2160 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_M_KeyProtectBits, tvb, local_offset, 1, FALSE);
2161 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LMC, tvb, local_offset, 1, FALSE); local_offset +=1;
2163 /* LinkSpeedActive */
2164 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkSpeedActive, tvb, local_offset, 1, FALSE);
2165 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2167 /* 4 bit values = mask and shift */
2168 temp_val = temp_val & 0x00F0;
2169 temp_val = temp_val >> 4;
2171 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, LinkSpeedActive, "Reserved LinkSpeedActive Value! Possible Error"));
2172 /* End LinkSpeedActive */
2174 /* LinkSpeedEnabled */
2175 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkSpeedEnabled, tvb, local_offset, 1, FALSE);
2176 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2178 /* 4 bit values = mask and shift */
2179 temp_val = temp_val & 0x000F;
2180 /*temp_val = temp_val >> 4 */
2182 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, LinkSpeedEnabled, "Reserved LinkSpeedEnabled Value! Possible Error"));
2184 /* End LinkSpeedEnabled */
2187 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_NeighborMTU, tvb, local_offset, 1, FALSE);
2188 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2190 /* 4 bit values = mask and shift */
2191 temp_val = temp_val & 0x00F0;
2192 temp_val = temp_val >> 4;
2194 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, NeighborMTU, "Reserved NeighborMTU Value! Possible Error"));
2196 /* End NeighborMTU */
2198 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_MasterSMSL, tvb, local_offset, 1, FALSE); local_offset +=1;
2201 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_VLCap, tvb, local_offset, 1, FALSE);
2202 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2204 /* 4 bit values = mask and shift */
2205 temp_val = temp_val & 0x00F0;
2206 temp_val = temp_val >> 4;
2208 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, VLCap, "Reserved VLCap Value! Possible Error"));
2212 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_InitType, tvb, local_offset, 1, FALSE); local_offset +=1;
2213 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_VLHighLimit, tvb, local_offset, 1, FALSE); local_offset +=1;
2214 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_VLArbitrationHighCap, tvb, local_offset, 1, FALSE); local_offset +=1;
2215 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_VLArbitrationLowCap, tvb, local_offset, 1, FALSE); local_offset +=1;
2216 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_InitTypeReply, tvb, local_offset, 1, FALSE);
2219 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_MTUCap, tvb, local_offset, 1, FALSE);
2220 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2222 /* 4 bit values = mask and shift */
2223 temp_val = temp_val & 0x000F;
2224 /*temp_val = temp_val >> 4 */
2226 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, MTUCap, "Reserved MTUCap Value! Possible Error"));
2230 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_VLStallCount, tvb, local_offset, 1, FALSE);
2231 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_HOQLife, tvb, local_offset, 1, FALSE); local_offset +=1;
2233 /* OperationalVLs */
2234 temp_item = proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_OperationalVLs, tvb, local_offset, 1, FALSE);
2235 temp_val = (guint16)tvb_get_guint8(tvb, local_offset);
2237 /* 4 bit values = mask and shift */
2238 temp_val = temp_val & 0x00F0;
2239 temp_val = temp_val >> 4;
2241 proto_item_append_text(temp_item, ", %s", val_to_str(temp_val, OperationalVLs, "Reserved OperationalVLs Value! Possible Error"));
2242 /* End OperationalVLs */
2244 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_PartitionEnforcementInbound, tvb, local_offset, 1, FALSE);
2245 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_PartitionEnforcementOutbound, tvb, local_offset, 1, FALSE);
2246 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_FilterRawInbound, tvb, local_offset, 1, FALSE);
2247 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_FilterRawOutbound, tvb, local_offset, 1, FALSE); local_offset +=1;
2248 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_M_KeyViolations, tvb, local_offset, 2, FALSE); local_offset +=2;
2249 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_P_KeyViolations, tvb, local_offset, 2, FALSE); local_offset +=2;
2250 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_Q_KeyViolations, tvb, local_offset, 2, FALSE); local_offset +=2;
2251 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_GUIDCap, tvb, local_offset, 1, FALSE); local_offset +=1;
2252 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_ClientReregister, tvb, local_offset, 1, FALSE);
2253 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_SubnetTimeOut, tvb, local_offset, 1, FALSE); local_offset +=1;
2254 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_RespTimeValue, tvb, local_offset, 1, FALSE); local_offset +=1;
2255 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LocalPhyErrors, tvb, local_offset, 1, FALSE);
2256 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_OverrunErrors, tvb, local_offset, 1, FALSE); local_offset +=1;
2257 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_MaxCreditHint, tvb, local_offset, 2, FALSE); local_offset +=3; /* 2 + 1 Reserved */
2258 proto_tree_add_item(PortInfo_header_tree, hf_infiniband_PortInfo_LinkRoundTripLatency, tvb, local_offset, 3, FALSE); local_offset +=3;
2261 /* Parse P_KeyTable Attribute
2262 * IN: parentTree - The tree to add the dissection to
2263 * tvb - The tvbbuff of packet data
2264 * offset - The offset in TVB where the attribute begins
2265 * MadHeader - The common MAD header of the current SMP/SMA */
2266 static void parse_P_KeyTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2268 gint local_offset = *offset;
2270 proto_tree *P_KeyTable_header_tree = NULL;
2271 proto_item *P_KeyTable_header_item = NULL;
2272 proto_item *tempItemLow = NULL;
2273 proto_item *tempItemHigh = NULL;
2278 P_KeyTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_P_KeyTable_P_KeyTableBlock, tvb, local_offset, 64, FALSE);
2279 proto_item_set_text(P_KeyTable_header_item, "%s", "P_KeyTable");
2280 P_KeyTable_header_tree = proto_item_add_subtree(P_KeyTable_header_item, ett_pkeytable);
2282 for(i = 0; i < 32; i++)
2284 tempItemLow = proto_tree_add_item(P_KeyTable_header_tree, hf_infiniband_P_KeyTable_MembershipType, tvb, local_offset, 1, FALSE);
2285 tempItemHigh = proto_tree_add_item(P_KeyTable_header_tree, hf_infiniband_P_KeyTable_P_KeyBase, tvb, local_offset, 2, FALSE); local_offset +=2;
2286 proto_item_append_text(tempItemLow, "(%u)", i);
2287 proto_item_append_text(tempItemHigh,"(%u)", i+1);
2291 /* Parse SLtoVLMappingTable Attribute
2292 * IN: parentTree - The tree to add the dissection to
2293 * tvb - The tvbbuff of packet data
2294 * offset - The offset in TVB where the attribute begins
2295 * MadHeader - The common MAD header of the current SMP/SMA */
2296 static void parse_SLtoVLMappingTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2298 gint local_offset = *offset;
2299 proto_tree *SLtoVLMappingTable_header_tree = NULL;
2300 proto_item *SLtoVLMappingTable_header_item = NULL;
2301 proto_item *tempItemLow = NULL;
2302 proto_item *tempItemHigh = NULL;
2308 SLtoVLMappingTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
2309 proto_item_set_text(SLtoVLMappingTable_header_item, "%s", "SLtoVLMappingTable");
2310 SLtoVLMappingTable_header_tree = proto_item_add_subtree(SLtoVLMappingTable_header_item, ett_sltovlmapping);
2312 for(i = 0; i < 8; i++)
2314 tempItemLow = proto_tree_add_item(SLtoVLMappingTable_header_tree, hf_infiniband_SLtoVLMappingTable_SLtoVL_HighBits, tvb, local_offset, 1, FALSE);
2315 tempItemHigh = proto_tree_add_item(SLtoVLMappingTable_header_tree, hf_infiniband_SLtoVLMappingTable_SLtoVL_LowBits, tvb, local_offset, 1, FALSE); local_offset +=1;
2316 proto_item_append_text(tempItemLow, "(%u)", i);
2317 proto_item_append_text(tempItemHigh,"(%u)", i+1);
2321 /* Parse VLArbitrationTable Attribute
2322 * IN: parentTree - The tree to add the dissection to
2323 * tvb - The tvbbuff of packet data
2324 * offset - The offset in TVB where the attribute begins
2325 * MadHeader - The common MAD header of the current SMP/SMA */
2326 static void parse_VLArbitrationTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2328 gint local_offset = *offset;
2330 proto_tree *VLArbitrationTable_header_tree = NULL;
2331 proto_item *VLArbitrationTable_header_item = NULL;
2332 proto_item *tempItemLow = NULL;
2333 proto_item *tempItemHigh = NULL;
2338 VLArbitrationTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
2339 proto_item_set_text(VLArbitrationTable_header_item, "%s", "VLArbitrationTable");
2340 VLArbitrationTable_header_tree = proto_item_add_subtree(VLArbitrationTable_header_item, ett_vlarbitrationtable);
2342 for(i = 0; i < 32; i++)
2344 tempItemLow = proto_tree_add_item(VLArbitrationTable_header_tree, hf_infiniband_VLArbitrationTable_VL, tvb, local_offset, 1, FALSE); local_offset +=1;
2345 tempItemHigh = proto_tree_add_item(VLArbitrationTable_header_tree, hf_infiniband_VLArbitrationTable_Weight, tvb, local_offset, 1, FALSE); local_offset +=1;
2346 proto_item_append_text(tempItemLow, "(%u)", i);
2347 proto_item_append_text(tempItemHigh,"(%u)", i);
2351 /* Parse LinearForwardingTable Attribute
2352 * IN: parentTree - The tree to add the dissection to
2353 * tvb - The tvbbuff of packet data
2354 * offset - The offset in TVB where the attribute begins
2355 * MadHeader - The common MAD header of the current SMP/SMA */
2356 static void parse_LinearForwardingTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2359 gint local_offset = *offset;
2360 proto_tree *LinearForwardingTable_header_tree = NULL;
2361 proto_item *LinearForwardingTable_header_item = NULL;
2362 proto_item *tempItemLow = NULL;
2367 LinearForwardingTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
2368 proto_item_set_text(LinearForwardingTable_header_item, "%s", "LinearForwardingTable");
2369 LinearForwardingTable_header_tree = proto_item_add_subtree(LinearForwardingTable_header_item, ett_linearforwardingtable);
2371 for(i = 0; i < 64; i++)
2373 tempItemLow = proto_tree_add_item(LinearForwardingTable_header_tree, hf_infiniband_LinearForwardingTable_Port, tvb, local_offset, 1, FALSE); local_offset +=1;
2374 proto_item_append_text(tempItemLow, "(%u)", i);
2378 /* Parse RandomForwardingTable Attribute
2379 * IN: parentTree - The tree to add the dissection to
2380 * tvb - The tvbbuff of packet data
2381 * offset - The offset in TVB where the attribute begins
2382 * MadHeader - The common MAD header of the current SMP/SMA */
2383 static void parse_RandomForwardingTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2386 gint local_offset = *offset;
2387 proto_tree *RandomForwardingTable_header_tree = NULL;
2388 proto_item *RandomForwardingTable_header_item = NULL;
2389 proto_item *tempItemLow = NULL;
2394 RandomForwardingTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
2395 proto_item_set_text(RandomForwardingTable_header_item, "%s", "RandomForwardingTable");
2396 RandomForwardingTable_header_tree = proto_item_add_subtree(RandomForwardingTable_header_item, ett_randomforwardingtable);
2398 for(i = 0; i < 16; i++)
2400 tempItemLow = proto_tree_add_item(RandomForwardingTable_header_tree, hf_infiniband_RandomForwardingTable_LID, tvb, local_offset, 2, FALSE); local_offset +=2;
2401 proto_item_append_text(tempItemLow, "(%u)", i);
2402 tempItemLow = proto_tree_add_item(RandomForwardingTable_header_tree, hf_infiniband_RandomForwardingTable_Valid, tvb, local_offset, 1, FALSE);
2403 proto_item_append_text(tempItemLow, "(%u)", i);
2404 tempItemLow = proto_tree_add_item(RandomForwardingTable_header_tree, hf_infiniband_RandomForwardingTable_LMC, tvb, local_offset, 1, FALSE); local_offset +=1;
2405 proto_item_append_text(tempItemLow, "(%u)", i);
2406 tempItemLow = proto_tree_add_item(RandomForwardingTable_header_tree, hf_infiniband_RandomForwardingTable_Port, tvb, local_offset, 1, FALSE); local_offset +=1;
2407 proto_item_append_text(tempItemLow, "(%u)", i);
2411 /* Parse NoticesAndTraps Attribute
2412 * IN: parentTree - The tree to add the dissection to
2413 * tvb - The tvbbuff of packet data
2414 * offset - The offset in TVB where the attribute begins
2415 * MadHeader - The common MAD header of the current SMP/SMA */
2416 static void parse_MulticastForwardingTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2419 gint local_offset = *offset;
2420 proto_tree *MulticastForwardingTable_header_tree = NULL;
2421 proto_item *MulticastForwardingTable_header_item = NULL;
2422 proto_item *tempItemLow = NULL;
2427 MulticastForwardingTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
2428 proto_item_set_text(MulticastForwardingTable_header_item, "%s", "MulticastForwardingTable");
2429 MulticastForwardingTable_header_tree = proto_item_add_subtree(MulticastForwardingTable_header_item, ett_multicastforwardingtable);
2431 for(i = 0; i < 16; i++)
2433 tempItemLow = proto_tree_add_item(MulticastForwardingTable_header_tree, hf_infiniband_MulticastForwardingTable_PortMask, tvb, local_offset, 2, FALSE); local_offset +=2;
2434 proto_item_append_text(tempItemLow, "(%u)", i);
2439 /* Parse SMInfo Attribute
2440 * IN: parentTree - The tree to add the dissection to
2441 * tvb - The tvbbuff of packet data
2442 * offset - The offset in TVB where the attribute begins
2443 * MadHeader - The common MAD header of the current SMP/SMA */
2444 static void parse_SMInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2446 gint local_offset = *offset;
2447 proto_tree *SMInfo_header_tree = NULL;
2448 proto_item *SMInfo_header_item = NULL;
2453 SMInfo_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
2454 proto_item_set_text(SMInfo_header_item, "%s", "SMInfo");
2455 SMInfo_header_tree = proto_item_add_subtree(SMInfo_header_item, ett_sminfo);
2457 proto_tree_add_item(SMInfo_header_tree, hf_infiniband_SMInfo_GUID, tvb, local_offset, 8, FALSE); local_offset +=8;
2458 proto_tree_add_item(SMInfo_header_tree, hf_infiniband_SMInfo_SM_Key, tvb, local_offset, 8, FALSE); local_offset +=8;
2459 proto_tree_add_item(SMInfo_header_tree, hf_infiniband_SMInfo_ActCount, tvb, local_offset, 4, FALSE); local_offset +=4;
2460 proto_tree_add_item(SMInfo_header_tree, hf_infiniband_SMInfo_Priority, tvb, local_offset, 1, FALSE);
2461 proto_tree_add_item(SMInfo_header_tree, hf_infiniband_SMInfo_SMState, tvb, local_offset, 1, FALSE); local_offset +=1;
2464 /* Parse VendorDiag Attribute
2465 * IN: parentTree - The tree to add the dissection to
2466 * tvb - The tvbbuff of packet data
2467 * offset - The offset in TVB where the attribute begins
2468 * MadHeader - The common MAD header of the current SMP/SMA */
2469 static void parse_VendorDiag(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2471 gint local_offset = *offset;
2472 proto_tree *VendorDiag_header_tree = NULL;
2473 proto_item *VendorDiag_header_item = NULL;
2478 VendorDiag_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
2479 proto_item_set_text(VendorDiag_header_item, "%s", "VendorDiag");
2480 VendorDiag_header_tree = proto_item_add_subtree(VendorDiag_header_item, ett_vendordiag);
2482 proto_tree_add_item(VendorDiag_header_tree, hf_infiniband_VendorDiag_NextIndex, tvb, local_offset, 2, FALSE); local_offset +=2;
2483 proto_tree_add_item(VendorDiag_header_tree, hf_infiniband_VendorDiag_DiagData, tvb, local_offset, 62, FALSE); local_offset +=62;
2486 /* Parse LedInfo Attribute
2487 * IN: parentTree - The tree to add the dissection to
2488 * tvb - The tvbbuff of packet data
2489 * offset - The offset in TVB where the attribute begins
2490 * MadHeader - The common MAD header of the current SMP/SMA */
2491 static void parse_LedInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2493 gint local_offset = *offset;
2494 proto_tree *LedInfo_header_tree = NULL;
2495 proto_item *LedInfo_header_item = NULL;
2500 LedInfo_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
2501 proto_item_set_text(LedInfo_header_item, "%s", "LedInfo");
2502 LedInfo_header_tree = proto_item_add_subtree(LedInfo_header_item, ett_ledinfo);
2504 proto_tree_add_item(LedInfo_header_tree, hf_infiniband_LedInfo_LedMask, tvb, local_offset, 1, FALSE);
2507 /* Parse LinkSpeedWidthPairsTable Attribute
2508 * IN: parentTree - The tree to add the dissection to
2509 * tvb - The tvbbuff of packet data
2510 * offset - The offset in TVB where the attribute begins
2511 * MadHeader - The common MAD header of the current SMP/SMA */
2512 static void parse_LinkSpeedWidthPairsTable(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2514 gint local_offset = *offset;
2515 proto_tree *LinkSpeedWidthPairsTable_header_tree = NULL;
2516 proto_item *LinkSpeedWidthPairsTable_header_item = NULL;
2521 LinkSpeedWidthPairsTable_header_item = proto_tree_add_item(parentTree, hf_infiniband_smp_data, tvb, local_offset, 64, FALSE);
2522 proto_item_set_text(LinkSpeedWidthPairsTable_header_item, "%s", "LinkSpeedWidthPairsTable");
2523 LinkSpeedWidthPairsTable_header_tree = proto_item_add_subtree(LinkSpeedWidthPairsTable_header_item, ett_linkspeedwidthpairs);
2525 proto_tree_add_item(LinkSpeedWidthPairsTable_header_tree, hf_infiniband_LinkSpeedWidthPairsTable_NumTables, tvb, local_offset, 1, FALSE); local_offset +=1;
2526 proto_tree_add_item(LinkSpeedWidthPairsTable_header_tree, hf_infiniband_LinkSpeedWidthPairsTable_PortMask, tvb, local_offset, 32, FALSE); local_offset +=32;
2527 proto_tree_add_item(LinkSpeedWidthPairsTable_header_tree, hf_infiniband_LinkSpeedWidthPairsTable_SpeedTwoFive, tvb, local_offset, 1, FALSE); local_offset +=1;
2528 proto_tree_add_item(LinkSpeedWidthPairsTable_header_tree, hf_infiniband_LinkSpeedWidthPairsTable_SpeedFive, tvb, local_offset, 1, FALSE); local_offset +=1;
2529 proto_tree_add_item(LinkSpeedWidthPairsTable_header_tree, hf_infiniband_LinkSpeedWidthPairsTable_SpeedTen, tvb, local_offset, 1, FALSE); local_offset +=1;
2532 /* Parse RID Field from Subnet Administraiton Packets.
2533 * IN: SA_header_tree - the dissection tree of the subnet admin attribute.
2534 * tvb - the packet buffer
2535 * MadHeader - the Common MAD header from this packet.
2536 * IN/OUT: offset - the current and updated offset in the packet buffer */
2537 static void parse_RID(proto_tree* SA_header_tree, tvbuff_t* tvb, gint *offset, MAD_Data* MadHeader)
2539 gint local_offset = *offset;
2544 switch(MadHeader->attributeID)
2548 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
2549 local_offset+=2; /* Reserved bits */
2552 /* PortInfoRecord */
2553 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_EndportLID, tvb, local_offset, 2, FALSE); local_offset+=2;
2554 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_PortNum, tvb, local_offset, 1, FALSE); local_offset+=1;
2555 local_offset+=1; /* Reserved bits */
2558 /* SLtoVLMappingTableRecord */
2559 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
2560 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_InputPortNum, tvb, local_offset, 1, FALSE); local_offset+=1;
2561 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_OutputPortNum, tvb, local_offset, 1, FALSE); local_offset+=1;
2562 local_offset+=4; /* Reserved bits */
2565 /* SwitchInfoRecord */
2566 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
2567 local_offset+=2; /* Reserved bits */
2570 /* LinearForwardingTableRecord */
2571 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
2572 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_SixteenBit, tvb, local_offset, 2, FALSE); local_offset+=2;
2573 local_offset+=4; /* Reserved bits */
2576 /* RandomForwardingTableRecord */
2577 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
2578 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_SixteenBit, tvb, local_offset, 2, FALSE); local_offset+=2;
2579 local_offset+=4; /* Reserved bits */
2582 /* MulticastForwardingTableRecord */
2583 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
2584 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_Position, tvb, local_offset, 1, FALSE);
2585 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_NineBit, tvb, local_offset, 2, FALSE); local_offset+=2;
2586 local_offset+=4; /* Reserved bits */
2589 /*VLArbitrationTableRecord */
2590 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
2591 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_OutputPortNum, tvb, local_offset, 1, FALSE); local_offset+=1;
2592 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_EightBit, tvb, local_offset, 1, FALSE); local_offset+=1;
2593 local_offset+=4; /* Reserved bits */
2597 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
2598 local_offset+=2; /* Reserved bits */
2601 /* P_KeyTableRecord */
2602 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
2603 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_SixteenBit, tvb, local_offset, 2, FALSE); local_offset+=2;
2604 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_PortNum, tvb, local_offset, 1, FALSE); local_offset+=1;
2605 local_offset+=3; /* Reserved bits */
2608 /* InformInfoRecord */
2609 proto_tree_add_item(SA_header_tree, hf_infiniband_InformInfoRecord_SubscriberGID, tvb, local_offset, 16, FALSE); local_offset+=16;
2610 proto_tree_add_item(SA_header_tree, hf_infiniband_InformInfoRecord_Enum, tvb, local_offset, 2, FALSE); local_offset+=2;
2611 local_offset+=6; /* Reserved bits */
2615 proto_tree_add_item(SA_header_tree, hf_infiniband_LinkRecord_FromLID, tvb, local_offset, 2, FALSE); local_offset+=2;
2616 proto_tree_add_item(SA_header_tree, hf_infiniband_LinkRecord_FromPort, tvb, local_offset, 1, FALSE); local_offset+=1;
2620 proto_tree_add_item(SA_header_tree, hf_infiniband_ServiceRecord_ServiceID, tvb, local_offset, 8, FALSE); local_offset+=8;
2621 proto_tree_add_item(SA_header_tree, hf_infiniband_ServiceRecord_ServiceGID, tvb, local_offset, 16, FALSE); local_offset+=16;
2622 proto_tree_add_item(SA_header_tree, hf_infiniband_ServiceRecord_ServiceP_Key, tvb, local_offset, 2, FALSE); local_offset+=2;
2626 /* MCMemberRecord */
2627 proto_tree_add_item(SA_header_tree, hf_infiniband_MCMemberRecord_MGID, tvb, local_offset, 16, FALSE); local_offset+=16;
2628 proto_tree_add_item(SA_header_tree, hf_infiniband_MCMemberRecord_PortGID, tvb, local_offset, 16, FALSE); local_offset+=16;
2631 /* GuidInfoRecord */
2632 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_LID, tvb, local_offset, 2, FALSE); local_offset+=2;
2633 proto_tree_add_item(SA_header_tree, hf_infiniband_SA_BlockNum_EightBit, tvb, local_offset, 1, FALSE); local_offset+=2;
2640 *offset = local_offset;
2643 /* Parse InformInfo Attribute
2644 * IN: parentTree - The tree to add the dissection to
2645 * tvb - The tvbbuff of packet data
2646 * offset - The offset in TVB where the attribute begins
2647 * MadHeader - The common MAD header of the current SMP/SMA */
2648 static void parse_InformInfo(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2650 gint local_offset = *offset;
2651 proto_tree *InformInfo_header_tree = NULL;
2652 proto_item *InformInfo_header_item = NULL;
2657 InformInfo_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 36, FALSE);
2658 proto_item_set_text(InformInfo_header_item, "%s", "InformInfo");
2659 InformInfo_header_tree = proto_item_add_subtree(InformInfo_header_item, ett_informinfo);
2661 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_GID, tvb, local_offset, 16, FALSE); local_offset+=16;
2662 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_LIDRangeBegin, tvb, local_offset, 2, FALSE); local_offset+=2;
2663 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_LIDRangeEnd, tvb, local_offset, 2, FALSE); local_offset+=2;
2664 local_offset+=2; /* Reserved Bits */
2665 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_IsGeneric, tvb, local_offset, 1, FALSE); local_offset+=1;
2666 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_Subscribe, tvb, local_offset, 1, FALSE); local_offset+=1;
2667 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_Type, tvb, local_offset, 2, FALSE); local_offset+=2;
2668 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_TrapNumberDeviceID, tvb, local_offset, 2, FALSE); local_offset+=2;
2669 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_QPN, tvb, local_offset, 3, FALSE); local_offset+=3;
2670 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_RespTimeValue, tvb, local_offset, 1, FALSE); local_offset+=1;
2672 proto_tree_add_item(InformInfo_header_tree, hf_infiniband_InformInfo_ProducerTypeVendorID, tvb, local_offset, 3, FALSE); local_offset+=3;
2675 /* Parse LinkRecord Attribute
2676 * IN: parentTree - The tree to add the dissection to
2677 * tvb - The tvbbuff of packet data
2678 * offset - The offset in TVB where the attribute begins
2679 * MadHeader - The common MAD header of the current SMP/SMA */
2680 static void parse_LinkRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2682 gint local_offset = *offset;
2683 proto_tree *LinkRecord_header_tree = NULL;
2684 proto_item *LinkRecord_header_item = NULL;
2691 LinkRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 3, FALSE);
2692 proto_item_set_text(LinkRecord_header_item, "%s", "LinkRecord");
2693 LinkRecord_header_tree = proto_item_add_subtree(LinkRecord_header_item, ett_linkrecord);
2695 proto_tree_add_item(LinkRecord_header_tree, hf_infiniband_LinkRecord_ToPort, tvb, local_offset, 1, FALSE); local_offset+=1;
2696 proto_tree_add_item(LinkRecord_header_tree, hf_infiniband_LinkRecord_ToLID, tvb, local_offset, 2, FALSE); local_offset +=2;
2699 /* Parse ServiceRecord Attribute
2700 * IN: parentTree - The tree to add the dissection to
2701 * tvb - The tvbbuff of packet data
2702 * offset - The offset in TVB where the attribute begins
2703 * MadHeader - The common MAD header of the current SMP/SMA */
2704 static void parse_ServiceRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2706 gint local_offset = *offset;
2707 proto_tree *ServiceRecord_header_tree = NULL;
2708 proto_item *ServiceRecord_header_item = NULL;
2709 proto_item *tempData = NULL;
2716 ServiceRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 176, FALSE);
2717 proto_item_set_text(ServiceRecord_header_item, "%s", "ServiceRecord");
2718 ServiceRecord_header_tree = proto_item_add_subtree(ServiceRecord_header_item, ett_servicerecord);
2720 proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceLease, tvb, local_offset, 4, FALSE); local_offset+=4;
2721 proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceKey, tvb, local_offset, 16, FALSE); local_offset+=16;
2722 proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceName, tvb, local_offset, 64, FALSE); local_offset+=64;
2724 tempData = proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceData, tvb, local_offset, 16, FALSE); local_offset+=16;
2725 proto_item_append_text(tempData, "%s", "(ServiceData 8.1, 8.16)");
2726 tempData = proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceData, tvb, local_offset, 16, FALSE); local_offset+=16;
2727 proto_item_append_text(tempData, "%s", "(ServiceData 16.1, 16.8)");
2728 tempData = proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceData, tvb, local_offset, 16, FALSE); local_offset+=16;
2729 proto_item_append_text(tempData, "%s", "(ServiceData 32.1, 32.4)");
2730 tempData = proto_tree_add_item(ServiceRecord_header_tree, hf_infiniband_ServiceRecord_ServiceData, tvb, local_offset, 16, FALSE); local_offset+=16;
2731 proto_item_append_text(tempData, "%s", "(ServiceData 64.1, 64.2)");
2734 /* Parse PathRecord Attribute
2735 * IN: parentTree - The tree to add the dissection to
2736 * tvb - The tvbbuff of packet data
2737 * offset - The offset in TVB where the attribute begins
2738 * MadHeader - The common MAD header of the current SMP/SMA */
2739 static void parse_PathRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2741 gint local_offset = *offset;
2742 proto_tree *PathRecord_header_tree = NULL;
2743 proto_item *PathRecord_header_item = NULL;
2750 PathRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 64, FALSE);
2751 proto_item_set_text(PathRecord_header_item, "%s", "PathRecord");
2752 PathRecord_header_tree = proto_item_add_subtree(PathRecord_header_item, ett_pathrecord);
2753 local_offset += 8; /* Reserved Bits */
2755 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_DGID, tvb, local_offset, 16, FALSE); local_offset+=16;
2756 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_SGID, tvb, local_offset, 16, FALSE); local_offset+=16;
2757 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_DLID, tvb, local_offset, 2, FALSE); local_offset+=2;
2758 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_SLID, tvb, local_offset, 2, FALSE); local_offset+=2;
2759 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_RawTraffic, tvb, local_offset, 1, FALSE);
2760 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_FlowLabel, tvb, local_offset, 3, FALSE); local_offset+=3;
2761 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_HopLimit, tvb, local_offset, 1, FALSE); local_offset+=1;
2762 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_TClass, tvb, local_offset, 1, FALSE); local_offset+=1;
2763 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_Reversible, tvb, local_offset, 1, FALSE);
2764 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_NumbPath, tvb, local_offset, 1, FALSE); local_offset+=1;
2765 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_P_Key, tvb, local_offset, 2, FALSE); local_offset+=2;
2766 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_SL, tvb, local_offset, 2, FALSE); local_offset+=2;
2767 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_MTUSelector, tvb, local_offset, 1, FALSE);
2768 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_MTU, tvb, local_offset, 1, FALSE); local_offset+=1;
2769 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_RateSelector, tvb, local_offset, 1, FALSE);
2770 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_Rate, tvb, local_offset, 1, FALSE); local_offset+=1;
2771 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_PacketLifeTimeSelector, tvb, local_offset, 1, FALSE);
2772 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_PacketLifeTime, tvb, local_offset, 1, FALSE); local_offset+=1;
2773 proto_tree_add_item(PathRecord_header_tree, hf_infiniband_PathRecord_Preference, tvb, local_offset, 1, FALSE); local_offset+=1;
2775 /* Parse MCMemberRecord Attribute
2776 * IN: parentTree - The tree to add the dissection to
2777 * tvb - The tvbbuff of packet data
2778 * offset - The offset in TVB where the attribute begins
2779 * MadHeader - The common MAD header of the current SMP/SMA */
2780 static void parse_MCMemberRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2782 gint local_offset = *offset;
2783 proto_tree *MCMemberRecord_header_tree = NULL;
2784 proto_item *MCMemberRecord_header_item = NULL;
2791 MCMemberRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 64, FALSE);
2792 proto_item_set_text(MCMemberRecord_header_item, "%s", "MCMemberRecord");
2793 MCMemberRecord_header_tree = proto_item_add_subtree(MCMemberRecord_header_item, ett_mcmemberrecord);
2795 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_Q_Key, tvb, local_offset, 4, FALSE); local_offset+=4;
2796 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_MLID, tvb, local_offset, 2, FALSE); local_offset+=2;
2797 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_MTUSelector, tvb, local_offset, 1, FALSE);
2798 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_MTU, tvb, local_offset, 1, FALSE); local_offset+=1;
2799 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_TClass, tvb, local_offset, 1, FALSE); local_offset+=1;
2800 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_P_Key, tvb, local_offset, 2, FALSE); local_offset+=2;
2801 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_RateSelector, tvb, local_offset, 1, FALSE);
2802 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_Rate, tvb, local_offset, 1, FALSE); local_offset+=1;
2803 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_PacketLifeTimeSelector, tvb, local_offset, 1, FALSE);
2804 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_PacketLifeTime, tvb, local_offset, 1, FALSE); local_offset+=1;
2805 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_SL, tvb, local_offset, 1, FALSE);
2806 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_FlowLabel, tvb, local_offset, 3, FALSE); local_offset+=3;
2807 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_HopLimit, tvb, local_offset, 1, FALSE); local_offset+=1;
2808 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_Scope, tvb, local_offset, 1, FALSE);
2809 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_JoinState, tvb, local_offset, 1, FALSE); local_offset+=1;
2810 proto_tree_add_item(MCMemberRecord_header_tree, hf_infiniband_MCMemberRecord_ProxyJoin, tvb, local_offset, 1, FALSE); local_offset+=3;
2813 /* Parse TraceRecord Attribute
2814 * IN: parentTree - The tree to add the dissection to
2815 * tvb - The tvbbuff of packet data
2816 * offset - The offset in TVB where the attribute begins
2817 * MadHeader - The common MAD header of the current SMP/SMA */
2818 static void parse_TraceRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2820 gint local_offset = *offset;
2821 proto_tree *TraceRecord_header_tree = NULL;
2822 proto_item *TraceRecord_header_item = NULL;
2829 TraceRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 46, FALSE);
2830 proto_item_set_text(TraceRecord_header_item, "%s", "TraceRecord");
2831 TraceRecord_header_tree = proto_item_add_subtree(TraceRecord_header_item, ett_tracerecord);
2833 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_GIDPrefix, tvb, local_offset, 8, FALSE); local_offset+=8;
2834 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_IDGeneration, tvb, local_offset, 2, FALSE); local_offset+=2;
2835 local_offset+=1; /* Reserved Bits */
2836 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_NodeType, tvb, local_offset, 1, FALSE); local_offset+=1;
2837 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_NodeID, tvb, local_offset, 8, FALSE); local_offset+=8;
2838 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_ChassisID, tvb, local_offset, 8, FALSE); local_offset+=8;
2839 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_EntryPortID, tvb, local_offset, 8, FALSE); local_offset+=8;
2840 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_ExitPortID, tvb, local_offset, 8, FALSE); local_offset+=8;
2841 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_EntryPort, tvb, local_offset, 1, FALSE); local_offset+=1;
2842 proto_tree_add_item(TraceRecord_header_tree, hf_infiniband_TraceRecord_ExitPort, tvb, local_offset, 1, FALSE); local_offset+=1;
2844 /* Parse MultiPathRecord Attribute
2845 * IN: parentTree - The tree to add the dissection to
2846 * tvb - The tvbbuff of packet data
2847 * offset - The offset in TVB where the attribute begins
2848 * MadHeader - The common MAD header of the current SMP/SMA */
2849 static void parse_MultiPathRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2851 gint local_offset = *offset;
2852 proto_tree *MultiPathRecord_header_tree = NULL;
2853 proto_item *MultiPathRecord_header_item = NULL;
2854 proto_item *SDGID = NULL;
2855 guint8 SDGIDCount = 0;
2856 guint8 DGIDCount = 0;
2864 MultiPathRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 200, FALSE);
2865 proto_item_set_text(MultiPathRecord_header_item, "%s", "MultiPathRecord");
2866 MultiPathRecord_header_tree = proto_item_add_subtree(MultiPathRecord_header_item, ett_multipathrecord);
2868 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_RawTraffic, tvb, local_offset, 1, FALSE);
2869 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_FlowLabel, tvb, local_offset, 3, FALSE); local_offset+=3;
2870 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_HopLimit, tvb, local_offset, 1, FALSE); local_offset+=1;
2871 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_TClass, tvb, local_offset, 1, FALSE); local_offset+=1;
2872 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_Reversible, tvb, local_offset, 1, FALSE);
2873 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_NumbPath, tvb, local_offset, 1, FALSE); local_offset+=1;
2874 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_P_Key, tvb, local_offset, 2, FALSE); local_offset+=2;
2875 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_SL, tvb, local_offset, 2, FALSE); local_offset+=2;
2876 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_MTUSelector, tvb, local_offset, 1, FALSE);
2877 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_MTU, tvb, local_offset, 1, FALSE); local_offset+=1;
2878 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_RateSelector, tvb, local_offset, 1, FALSE);
2879 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_Rate, tvb, local_offset, 1, FALSE); local_offset+=1;
2880 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_PacketLifeTimeSelector, tvb, local_offset, 1, FALSE);
2881 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_PacketLifeTime, tvb, local_offset, 1, FALSE); local_offset+=1;
2882 local_offset+=1; /* Reserved Bits */
2883 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_IndependenceSelector, tvb, local_offset, 1, FALSE);
2884 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_GIDScope, tvb, local_offset, 1, FALSE); local_offset+=1;
2886 SDGIDCount = tvb_get_guint8(tvb, local_offset);
2887 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_SGIDCount, tvb, local_offset, 1, FALSE); local_offset+=1;
2888 DGIDCount = tvb_get_guint8(tvb, local_offset);
2889 proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_DGIDCount, tvb, local_offset, 1, FALSE); local_offset+=1;
2890 local_offset+=7; /*Reserved Bits */
2892 for(i = 0; i < SDGIDCount; 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)","SGID", i);
2897 for(i = 0; i < DGIDCount; i++)
2899 SDGID = proto_tree_add_item(MultiPathRecord_header_tree, hf_infiniband_MultiPathRecord_SDGID, tvb, local_offset, 16, FALSE); local_offset+=16;
2900 proto_item_set_text(SDGID, "(%s%u)","DGID", i);
2903 /* Parse ServiceAssociationRecord Attribute
2904 * IN: parentTree - The tree to add the dissection to
2905 * tvb - The tvbbuff of packet data
2906 * offset - The offset in TVB where the attribute begins
2907 * MadHeader - The common MAD header of the current SMP/SMA */
2908 static void parse_ServiceAssociationRecord(proto_tree* parentTree, tvbuff_t* tvb, gint *offset)
2910 gint local_offset = *offset;
2911 proto_tree *ServiceAssociationRecord_header_tree = NULL;
2912 proto_item *ServiceAssociationRecord_header_item = NULL;
2919 ServiceAssociationRecord_header_item = proto_tree_add_item(parentTree, hf_infiniband_SA, tvb, local_offset, 80, FALSE);
2920 proto_item_set_text(ServiceAssociationRecord_header_item, "%s", "ServiceAssociationRecord");
2921 ServiceAssociationRecord_header_tree = proto_item_add_subtree(ServiceAssociationRecord_header_item, ett_serviceassocrecord);
2923 proto_tree_add_item(ServiceAssociationRecord_header_tree, hf_infiniband_ServiceAssociationRecord_ServiceKey, tvb, local_offset, 16, FALSE); local_offset +=16;
2924 proto_tree_add_item(ServiceAssociationRecord_header_tree, hf_infiniband_ServiceAssociationRecord_ServiceName, tvb, local_offset, 64, FALSE); local_offset +=64;
2927 /* dissect_general_info
2928 * Used to extract very few values from the packet in the case that full dissection is disabled by the user.
2930 * tvb - The tvbbuff of packet data
2931 * offset - The offset in TVB where the attribute begins
2932 * pinfo - The packet info structure with column information */
2933 static void dissect_general_info(tvbuff_t *tvb, gint offset, packet_info *pinfo)
2935 guint8 lnh_val = 0; /* The Link Next Header Value. Tells us which headers are coming */
2936 gboolean bthFollows = 0; /* Tracks if we are parsing a BTH. This is a significant decision point */
2937 guint8 virtualLane = 0; /* The Virtual Lane of the current Packet */
2938 guint8 opCode = 0; /* OpCode from BTH header. */
2939 gint32 nextHeaderSequence = -1; /* defined by this dissector. #define which indicates the upcoming header sequence from OpCode */
2940 guint8 nxtHdr = 0; /* that must be available for that header. */
2941 struct e_in6_addr SRCgid; /* Struct to display ipv6 Address */
2942 struct e_in6_addr DSTgid; /* Struct to display ipv6 Address */
2943 guint8 management_class = 0;
2947 virtualLane = tvb_get_guint8(tvb, offset);
2948 virtualLane = virtualLane & 0xF0;
2951 /* Save Link Next Header... This tells us what the next header is. */
2952 lnh_val = tvb_get_guint8(tvb, offset);
2953 lnh_val = lnh_val & 0x03;
2956 /* Set destination in packet view. */
2957 if (check_col(pinfo->cinfo, COL_DEF_DST))
2959 col_add_fstr(pinfo->cinfo, COL_DEF_DST, "DLID: %s", tvb_bytes_to_str(tvb, offset, 2));
2963 /* Set Source in packet view. */
2964 if (check_col(pinfo->cinfo, COL_DEF_SRC))
2966 col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "SLID: %s", tvb_bytes_to_str(tvb, offset, 2));
2974 nxtHdr = tvb_get_guint8(tvb, offset);
2977 tvb_get_ipv6(tvb, offset, &SRCgid);
2978 if (check_col(pinfo->cinfo, COL_DEF_SRC))
2980 col_add_fstr(pinfo->cinfo, COL_DEF_SRC, "SGID: %s", ip6_to_str(&SRCgid));
2984 tvb_get_ipv6(tvb, offset, &DSTgid);
2985 if (check_col(pinfo->cinfo, COL_DEF_DST))
2987 col_add_fstr(pinfo->cinfo, COL_DEF_DST, "DGID: %s", ip6_to_str(&DSTgid));
2993 /* Some kind of packet being transported globally with IBA, but locally it is not IBA - no BTH following. */
2998 * Fall through switch and start parsing Local Headers and BTH
3004 /* Get the OpCode - this tells us what headers are following */
3005 opCode = tvb_get_guint8(tvb, offset);
3006 if (check_col(pinfo->cinfo, COL_INFO))
3008 col_append_str(pinfo->cinfo, COL_INFO, val_to_str((guint32)opCode, OpCodeMap, "Unknown OpCode"));
3013 /* Raw IPv6 Packet */
3014 if (check_col(pinfo->cinfo, COL_DEF_DST))
3016 col_set_str(pinfo->cinfo, COL_DEF_DST, "IPv6 over IB Packet");
3017 col_set_fence(pinfo->cinfo, COL_DEF_DST);
3028 /* Find our next header sequence based on the Opcode
3029 * Since we're not doing dissection here, we just need the proper offsets to get our labels in packet view */
3031 nextHeaderSequence = find_next_header_sequence((guint32) opCode);
3032 switch(nextHeaderSequence)
3034 case RDETH_DETH_PAYLD:
3035 offset += 4; /* RDETH */
3036 offset += 8; /* DETH */
3038 case RDETH_DETH_RETH_PAYLD:
3039 offset += 4; /* RDETH */
3040 offset += 8; /* DETH */
3041 offset += 16; /* RETH */
3043 case RDETH_DETH_IMMDT_PAYLD:
3044 offset += 4; /* RDETH */
3045 offset += 8; /* DETH */
3046 offset += 4; /* IMMDT */
3048 case RDETH_DETH_RETH_IMMDT_PAYLD:
3049 offset += 4; /* RDETH */
3050 offset += 8; /* DETH */
3051 offset += 16; /* RETH */
3052 offset += 4; /* IMMDT */
3054 case RDETH_DETH_RETH:
3055 offset += 4; /* RDETH */
3056 offset += 8; /* DETH */
3057 offset += 16; /* RETH */
3059 case RDETH_AETH_PAYLD:
3060 offset += 4; /* RDETH */
3061 offset += 4; /* AETH */
3064 offset += 4; /* RDETH */
3067 offset += 4; /* RDETH */
3068 offset += 4; /* AETH */
3070 case RDETH_AETH_ATOMICACKETH:
3071 offset += 4; /* RDETH */
3072 offset += 4; /* AETH */
3073 offset += 8; /* AtomicAckETH */
3075 case RDETH_DETH_ATOMICETH:
3076 offset += 4; /* RDETH */
3077 offset += 8; /* DETH */
3078 offset += 28; /* AtomicETH */
3081 offset += 4; /* RDETH */
3082 offset += 8; /* DETH */
3085 offset += 8; /* DETH */
3090 offset += 4; /* IMMDT */
3093 offset += 16; /* RETH */
3096 offset += 16; /* RETH */
3099 offset += 4; /* AETH */
3102 offset += 4; /* AETH */
3104 case AETH_ATOMICACKETH:
3105 offset += 4; /* AETH */
3106 offset += 8; /* AtomicAckETH */
3109 offset += 28; /* AtomicETH */
3112 offset += 4; /* IETH */
3114 case DETH_IMMDT_PAYLD:
3115 offset += 8; /* DETH */
3116 offset += 4; /* IMMDT */
3122 if(virtualLane == 0xF0)
3124 management_class = tvb_get_guint8(tvb, offset + 1);
3125 if(((management_class >= (guint8)VENDOR_1_START) && (management_class <= (guint8)VENDOR_1_END))
3126 || ((management_class >= (guint8)VENDOR_2_START) && (management_class <= (guint8)VENDOR_2_END)))
3130 else if((management_class >= (guint8)APPLICATION_START) && (management_class <= (guint8)APPLICATION_END))
3134 else if(((management_class == (guint8)0x00) || (management_class == (guint8)0x02))
3135 || ((management_class >= (guint8)0x50) && (management_class <= (guint8)0x80))
3136 || ((management_class >= (guint8)0x82)))
3140 else /* we have a normal management_class */
3142 parse_MAD_Common(NULL, tvb, &offset, &MadData);
3143 label_SUBM_Method(NULL, &MadData, pinfo);
3144 label_SUBM_Attribute(NULL, &MadData, pinfo);
3151 /* Protocol Registration */
3152 void proto_register_infiniband(void)
3154 /* Field dissector structures.
3155 * For reserved fields, reservedX denotes the reserved field is X bits in length.
3156 * e.g. reserved2 is a reserved field 2 bits in length.
3157 * The third parameter is a filter string associated for this field.
3158 * So for instance, to filter packets for a given virtual lane,
3159 * The filter (infiniband.LRH.vl == 3) or something similar would be used. */
3161 /* XXX: ToDo: Verify against Infiniband 1.2.1 Specification */
3162 /* Fields verified/corrected: Those after comment "XX: All following ..." */
3164 static hf_register_info hf[] = {
3165 /* Local Route Header (LRH) */
3166 { &hf_infiniband_LRH, {
3167 "Local Route Header", "infiniband.lrh",
3168 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3170 { &hf_infiniband_virtual_lane, {
3171 "Virtual Lane", "infiniband.lrh.vl",
3172 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
3174 { &hf_infiniband_link_version, {
3175 "Link Version", "infiniband.lrh.lver",
3176 FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL}
3178 { &hf_infiniband_service_level, {
3179 "Service Level", "infiniband.lrh.sl",
3180 FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL}
3182 { &hf_infiniband_reserved2, {
3183 "Reserved (2 bits)", "infiniband.lrh.reserved2",
3184 FT_UINT8, BASE_DEC, NULL, 0x0C, NULL, HFILL}
3186 { &hf_infiniband_link_next_header, {
3187 "Link Next Header", "infiniband.lrh.lnh",
3188 FT_UINT8, BASE_HEX, NULL, 0x03, NULL, HFILL}
3190 { &hf_infiniband_destination_local_id, {
3191 "Destination Local ID", "infiniband.lrh.dlid",
3192 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
3194 { &hf_infiniband_reserved5, {
3195 "Reserved (5 bits)", "infiniband.lrh.reserved5",
3196 FT_UINT16, BASE_DEC, NULL, 0xF800, NULL, HFILL}
3198 { &hf_infiniband_packet_length, {
3199 "Packet Length", "infiniband.lrh.pktlen",
3200 FT_UINT16, BASE_DEC, NULL, 0x07FF, NULL, HFILL}
3202 { &hf_infiniband_source_local_id, {
3203 "Source Local ID", "infiniband.lrh.slid",
3204 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
3207 /* Global Route Header (GRH) */
3208 { &hf_infiniband_GRH, {
3209 "Global Route Header", "infiniband.grh",
3210 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3212 { &hf_infiniband_ip_version, {
3213 "IP Version", "infiniband.grh.ipver",
3214 FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL}
3216 { &hf_infiniband_traffic_class, {
3217 "Traffic Class", "infiniband.grh.tclass",
3218 FT_UINT16, BASE_DEC, NULL, 0x0FF0, NULL, HFILL}
3220 { &hf_infiniband_flow_label, {
3221 "Flow Label", "infiniband.grh.flowlabel",
3222 FT_UINT32, BASE_DEC, NULL, 0x000FFFFF, NULL, HFILL}
3224 { &hf_infiniband_payload_length, {
3225 "Payload Length", "infiniband.grh.paylen",
3226 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
3228 { &hf_infiniband_next_header, {
3229 "Next Header", "infiniband.grh.nxthdr",
3230 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
3232 { &hf_infiniband_hop_limit, {
3233 "Hop Limit", "infiniband.grh.hoplmt",
3234 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
3236 { &hf_infiniband_source_gid, {
3237 "Source GID", "infiniband.grh.sgid",
3238 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
3240 { &hf_infiniband_destination_gid, {
3241 "Destination GID", "infiniband.grh.dgid",
3242 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
3245 /* Base Transport Header (BTH) */
3246 { &hf_infiniband_BTH, {
3247 "Base Transport Header", "infiniband.bth",
3248 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3250 { &hf_infiniband_opcode, {
3251 "Opcode", "infiniband.bth.opcode",
3252 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
3254 { &hf_infiniband_solicited_event, {
3255 "Solicited Event", "infiniband.bth.se",
3256 FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL}
3258 { &hf_infiniband_migreq, {
3259 "MigReq", "infiniband.bth.m",
3260 FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL}
3262 { &hf_infiniband_pad_count, {
3263 "Pad Count", "infiniband.bth.padcnt",
3264 FT_UINT8, BASE_DEC, NULL, 0x30, NULL, HFILL}
3266 { &hf_infiniband_transport_header_version, {
3267 "Header Version", "infiniband.bth.tver",
3268 FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL}
3270 { &hf_infiniband_partition_key, {
3271 "Partition Key", "infiniband.bth.p_key",
3272 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
3274 { &hf_infiniband_reserved8, {
3275 "Reserved (8 bits)", "infiniband.bth.reserved8",
3276 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
3278 { &hf_infiniband_destination_qp, {
3279 "Destination Queue Pair", "infiniband.bth.destqp",
3280 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
3282 { &hf_infiniband_acknowledge_request, {
3283 "Acknowledge Request", "infiniband.bth.a",
3284 FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL}
3286 { &hf_infiniband_reserved7, {
3287 "Reserved (7 bits)", "infiniband.bth.reserved7",
3288 FT_UINT8, BASE_DEC, NULL, 0x7F, NULL, HFILL}
3290 { &hf_infiniband_packet_sequence_number, {
3291 "Packet Sequence Number", "infiniband.bth.psn",
3292 FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL}
3295 /* Raw Header (RWH) */
3296 { &hf_infiniband_RWH, {
3297 "Raw Header", "infiniband.rwh",
3298 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3300 { &hf_infiniband_reserved16_RWH, {
3301 "Reserved (16 bits)", "infiniband.rwh.reserved",
3302 FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}
3304 { &hf_infiniband_etype, {
3305 "Ethertype", "infiniband.rwh.etype",
3306 FT_UINT16, BASE_HEX, NULL /*VALS(etype_vals)*/, 0x0, "Type", HFILL }
3309 /* Reliable Datagram Extended Transport Header (RDETH) */
3310 { &hf_infiniband_RDETH, {
3311 "Reliable Datagram Extended Transport Header", "infiniband.rdeth",
3312 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3314 { &hf_infiniband_reserved8_RDETH, {
3315 "Reserved (8 bits)", "infiniband.rdeth.reserved8",
3316 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
3318 { &hf_infiniband_ee_context, {
3319 "E2E Context", "infiniband.rdeth.eecnxt",
3320 FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL}
3323 /* Datagram Extended Transport Header (DETH) */
3324 { &hf_infiniband_DETH, {
3325 "Datagram Extended Transport Header", "infiniband.deth",
3326 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3328 { &hf_infiniband_queue_key, {
3329 "Queue Key", "infiniband.deth.q_key",
3330 FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL}
3332 { &hf_infiniband_reserved8_DETH, {
3333 "Reserved (8 bits)", "infiniband.deth.reserved8",
3334 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
3336 { &hf_infiniband_source_qp, {
3337 "Source Queue Pair", "infiniband.deth.srcqp",
3338 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
3341 /* RDMA Extended Transport Header (RETH) */
3342 { &hf_infiniband_RETH, {
3343 "RDMA Extended Transport Header", "infiniband.reth",
3344 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3346 { &hf_infiniband_virtual_address, {
3347 "Virtual Address", "infiniband.reth.va",
3348 FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL}
3350 { &hf_infiniband_remote_key, {
3351 "Remote Key", "infiniband.reth.r_key",
3352 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
3354 { &hf_infiniband_dma_length, {
3355 "DMA Length", "infiniband.reth.dmalen",
3356 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
3359 /* Atomic Extended Transport Header (AtomicETH) */
3360 { &hf_infiniband_AtomicETH, {
3361 "Atomic Extended Transport Header", "infiniband.atomiceth",
3362 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3365 { &hf_infiniband_virtual_address_AtomicETH, {
3366 "Virtual Address", "infiniband.atomiceth.va",
3367 FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL}
3369 { &hf_infiniband_remote_key_AtomicETH, {
3370 "Remote Key", "infiniband.atomiceth.r_key",
3371 FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}
3374 { &hf_infiniband_swap_or_add_data, {
3375 "Swap (Or Add) Data", "infiniband.atomiceth.swapdt",
3376 FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL}
3378 { &hf_infiniband_compare_data, {
3379 "Compare Data", "infiniband.atomiceth.cmpdt",
3380 FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL}
3383 /* ACK Extended Transport Header (AETH) */
3384 { &hf_infiniband_AETH, {
3385 "ACK Extended Transport Header", "infiniband.aeth",
3386 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3388 { &hf_infiniband_syndrome, {
3389 "Syndrome", "infiniband.aeth.syndrome",
3390 FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL}
3392 { &hf_infiniband_message_sequence_number, {
3393 "Message Sequence Number", "infiniband.aeth.msn",
3394 FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL}
3397 /* Atomic ACK Extended Transport Header (AtomicAckETH) */
3398 { &hf_infiniband_AtomicAckETH, {
3399 "Atomic ACK Extended Transport Header", "infiniband.atomicacketh",
3400 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3402 { &hf_infiniband_original_remote_data, {
3403 "Original Remote Data", "infiniband.atomicacketh.origremdt",
3404 FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL}
3407 /* Immediate Extended Transport Header (ImmDT) */
3408 { &hf_infiniband_IMMDT, {
3409 "Immediate Data", "infiniband.immdt",
3410 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3413 /* Invalidate Extended Transport Header (IETH) */
3414 { &hf_infiniband_IETH, {
3415 "RKey", "infiniband.ieth",
3416 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3420 { &hf_infiniband_payload, {
3421 "Payload", "infiniband.payload",
3422 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3424 { &hf_infiniband_invariant_crc, {
3425 "Invariant CRC", "infiniband.invariant.crc",
3426 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
3428 { &hf_infiniband_variant_crc, {
3429 "Variant CRC", "infiniband.variant.crc",
3430 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3432 { &hf_infiniband_raw_data, {
3433 "Raw Data", "infiniband.rawdata",
3434 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3436 /* Unknown or Vendor Specific */
3437 { &hf_infiniband_vendor, {
3438 "Unknown/Vendor Specific Data", "infiniband.vendor",
3439 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3442 /* MAD Base Header */
3443 { &hf_infiniband_MAD, {
3444 "MAD (Management Datagram) Common Header", "infiniband.mad",
3445 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3447 { &hf_infiniband_base_version, {
3448 "Base Version", "infiniband.mad.baseversion",
3449 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3451 { &hf_infiniband_mgmt_class, {
3452 "Management Class", "infiniband.mad.mgmtclass",
3453 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3455 { &hf_infiniband_class_version, {
3456 "Class Version", "infiniband.mad.classversion",
3457 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3460 { &hf_infiniband_reserved1, {
3461 "Reserved", "infiniband.mad.reserved1",
3462 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
3465 { &hf_infiniband_method, {
3466 "Method", "infiniband.mad.method",
3467 FT_UINT8, BASE_HEX, NULL, 0x7F, NULL, HFILL}
3469 { &hf_infiniband_status, {
3470 "Status", "infiniband.mad.status",
3471 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3473 { &hf_infiniband_class_specific, {
3474 "Class Specific", "infiniband.mad.classspecific",
3475 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3477 { &hf_infiniband_transaction_id, {
3478 "Transaction ID", "infiniband.mad.transactionid",
3479 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
3481 { &hf_infiniband_attribute_id, {
3482 "Attribute ID", "infiniband.mad.attributeid",
3483 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3485 { &hf_infiniband_reserved16, {
3486 "Reserved", "infiniband.mad.reserved16",
3487 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3489 { &hf_infiniband_attribute_modifier, {
3490 "Attribute Modifier", "infiniband.mad.attributemodifier",
3491 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
3493 { &hf_infiniband_data, {
3494 "MAD Data Payload", "infiniband.mad.data",
3495 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3499 { &hf_infiniband_RMPP, {
3500 "RMPP (Reliable Multi-Packet Transaction Protocol)", "infiniband.rmpp",
3501 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3503 { &hf_infiniband_rmpp_version, {
3504 "RMPP Type", "infiniband.rmpp.rmppversion",
3505 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3507 { &hf_infiniband_rmpp_type, {
3508 "RMPP Type", "infiniband.rmpp.rmpptype",
3509 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3511 { &hf_infiniband_r_resp_time, {
3512 "R Resp Time", "infiniband.rmpp.rresptime",
3513 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
3515 { &hf_infiniband_rmpp_flags, {
3516 "RMPP Flags", "infiniband.rmpp.rmppflags",
3517 FT_UINT8, BASE_HEX, VALS(RMPP_Flags), 0x0F, NULL, HFILL}
3519 { &hf_infiniband_rmpp_status, {
3520 "RMPP Status", "infiniband.rmpp.rmppstatus",
3521 FT_UINT8, BASE_HEX, VALS(RMPP_Status), 0x0, NULL, HFILL}
3523 { &hf_infiniband_rmpp_data1, {
3524 "RMPP Data 1", "infiniband.rmpp.data1",
3525 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
3527 { &hf_infiniband_rmpp_data2, {
3528 "RMPP Data 2", "infiniband.rmpp.data2",
3529 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
3534 { &hf_infiniband_RMPP_DATA, {
3535 "RMPP Data (Reliable Multi-Packet Transaction Protocol)", "infiniband.rmpp.data",
3536 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3539 { &hf_infiniband_segment_number, {
3540 "Segment Number", "infiniband.rmpp.segmentnumber",
3541 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
3543 { &hf_infiniband_payload_length32, {
3544 "Payload Length", "infiniband.rmpp.payloadlength",
3545 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
3547 { &hf_infiniband_transferred_data, {
3548 "Transferred Data", "infiniband.rmpp.transferreddata",
3549 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3553 { &hf_infiniband_new_window_last, {
3554 "New Window Last", "infiniband.rmpp.newwindowlast",
3555 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
3557 { &hf_infiniband_reserved220, {
3558 "Segment Number", "infiniband.rmpp.reserved220",
3559 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3562 /* RMPP ABORT/STOP */
3563 { &hf_infiniband_optional_extended_error_data, {
3564 "Optional Extended Error Data", "infiniband.rmpp.extendederrordata",
3565 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3568 /* SMP Data (LID Routed) */
3569 { &hf_infiniband_SMP_LID, {
3570 "Subnet Management Packet (LID Routed)", "infiniband.smplid",
3571 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3573 { &hf_infiniband_m_key, {
3574 "M_Key", "infiniband.smplid.mkey",
3575 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
3577 { &hf_infiniband_smp_data, {
3578 "SMP Data", "infiniband.smplid.smpdata",
3579 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3581 { &hf_infiniband_reserved1024, {
3582 "Reserved (1024 bits)", "infiniband.smplid.reserved1024",
3583 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3585 { &hf_infiniband_reserved256, {
3586 "Reserved (256 bits)", "infiniband.smplid.reserved256",
3587 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3590 /* XX: All following verified/corrected against Infiniband 1.2.1 Specification */
3591 /* SMP Data Directed Route */
3592 { &hf_infiniband_SMP_DIRECTED, {
3593 "Subnet Management Packet (Directed Route)", "infiniband.smpdirected",
3594 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3596 { &hf_infiniband_smp_status, {
3597 "Status", "infiniband.smpdirected.smpstatus",
3598 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3600 { &hf_infiniband_hop_pointer, {
3601 "Hop Pointer", "infiniband.smpdirected.hoppointer",
3602 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3604 { &hf_infiniband_hop_count, {
3605 "Hop Count", "infiniband.smpdirected.hopcount",
3606 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3608 { &hf_infiniband_dr_slid, {
3609 "DrSLID", "infiniband.smpdirected.drslid",
3610 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3612 { &hf_infiniband_dr_dlid, {
3613 "DrDLID", "infiniband.smpdirected.drdlid",
3614 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3616 { &hf_infiniband_reserved28, {
3617 "Reserved (224 bits)", "infiniband.smpdirected.reserved28",
3618 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3620 { &hf_infiniband_d, {
3621 "D (Direction Bit)", "infiniband.smpdirected.d",
3622 FT_UINT64, BASE_HEX, NULL, 0x8000, NULL, HFILL}
3624 { &hf_infiniband_initial_path, {
3625 "Initial Path", "infiniband.smpdirected.initialpath",
3626 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3628 { &hf_infiniband_return_path, {
3629 "Return Path", "infiniband.smpdirected.returnpath",
3630 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3634 { &hf_infiniband_SA, {
3635 "SA Packet (Subnet Administration)", "infiniband.sa.drdlid",
3636 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3638 { &hf_infiniband_sm_key, {
3639 "SM_Key (Verification Key)", "infiniband.sa.smkey",
3640 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
3642 { &hf_infiniband_attribute_offset, {
3643 "Attribute Offset", "infiniband.sa.attributeoffset",
3644 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3646 { &hf_infiniband_component_mask, {
3647 "Component Mask", "infiniband.sa.componentmask",
3648 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
3650 { &hf_infiniband_subnet_admin_data, {
3651 "Subnet Admin Data", "infiniband.sa.subnetadmindata",
3652 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3655 /* NodeDescription */
3656 { &hf_infiniband_NodeDescription_NodeString, {
3657 "NodeString", "infiniband.nodedescription.nodestring",
3658 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}
3662 { &hf_infiniband_NodeInfo_BaseVersion, {
3663 "BaseVersion", "infiniband.nodeinfo.baseversion",
3664 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3666 { &hf_infiniband_NodeInfo_ClassVersion, {
3667 "ClassVersion", "infiniband.nodeinfo.classversion",
3668 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3670 { &hf_infiniband_NodeInfo_NodeType, {
3671 "NodeType", "infiniband.nodeinfo.nodetype",
3672 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3674 { &hf_infiniband_NodeInfo_NumPorts, {
3675 "NumPorts", "infiniband.nodeinfo.numports",
3676 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3678 { &hf_infiniband_NodeInfo_SystemImageGUID, {
3679 "SystemImageGUID", "infiniband.nodeinfo.systemimageguid",
3680 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
3682 { &hf_infiniband_NodeInfo_NodeGUID, {
3683 "NodeGUID", "infiniband.nodeinfo.nodeguid",
3684 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
3686 { &hf_infiniband_NodeInfo_PortGUID, {
3687 "PortGUID", "infiniband.nodeinfo.portguid",
3688 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
3690 { &hf_infiniband_NodeInfo_PartitionCap, {
3691 "PartitionCap", "infiniband.nodeinfo.partitioncap",
3692 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3694 { &hf_infiniband_NodeInfo_DeviceID, {
3695 "DeviceID", "infiniband.nodeinfo.deviceid",
3696 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3698 { &hf_infiniband_NodeInfo_Revision, {
3699 "Revision", "infiniband.nodeinfo.revision",
3700 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
3702 { &hf_infiniband_NodeInfo_LocalPortNum, {
3703 "LocalPortNum", "infiniband.nodeinfo.localportnum",
3704 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3706 { &hf_infiniband_NodeInfo_VendorID, {
3707 "VendorID", "infiniband.nodeinfo.vendorid",
3708 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
3712 { &hf_infiniband_SwitchInfo_LinearFDBCap, {
3713 "LinearFDBCap", "infiniband.switchinfo.linearfdbcap",
3714 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3716 { &hf_infiniband_SwitchInfo_RandomFDBCap, {
3717 "RandomFDBCap", "infiniband.switchinfo.randomfdbcap",
3718 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3720 { &hf_infiniband_SwitchInfo_MulticastFDBCap, {
3721 "MulticastFDBCap", "infiniband.switchinfo.multicastfdbcap",
3722 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3724 { &hf_infiniband_SwitchInfo_LinearFDBTop, {
3725 "LinearFDBTop", "infiniband.switchinfo.linearfdbtop",
3726 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3728 { &hf_infiniband_SwitchInfo_DefaultPort, {
3729 "DefaultPort", "infiniband.switchinfo.defaultport",
3730 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3732 { &hf_infiniband_SwitchInfo_DefaultMulticastPrimaryPort, {
3733 "DefaultMulticastPrimaryPort", "infiniband.switchinfo.defaultmulticastprimaryport",
3734 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3736 { &hf_infiniband_SwitchInfo_DefaultMulticastNotPrimaryPort, {
3737 "DefaultMulticastNotPrimaryPort", "infiniband.switchinfo.defaultmulticastnotprimaryport",
3738 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3740 { &hf_infiniband_SwitchInfo_LifeTimeValue, {
3741 "LifeTimeValue", "infiniband.switchinfo.lifetimevalue",
3742 FT_UINT8, BASE_HEX, NULL, 0xF8, NULL, HFILL}
3744 { &hf_infiniband_SwitchInfo_PortStateChange, {
3745 "PortStateChange", "infiniband.switchinfo.portstatechange",
3746 FT_UINT8, BASE_HEX, NULL, 0x04, NULL, HFILL}
3748 { &hf_infiniband_SwitchInfo_OptimizedSLtoVLMappingProgramming, {
3749 "OptimizedSLtoVLMappingProgramming", "infiniband.switchinfo.optimizedsltovlmappingprogramming",
3750 FT_UINT8, BASE_HEX, NULL, 0x03, NULL, HFILL}
3752 { &hf_infiniband_SwitchInfo_LIDsPerPort, {
3753 "LIDsPerPort", "infiniband.switchinfo.lidsperport",
3754 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3756 { &hf_infiniband_SwitchInfo_PartitionEnforcementCap, {
3757 "PartitionEnforcementCap", "infiniband.switchinfo.partitionenforcementcap",
3758 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3760 { &hf_infiniband_SwitchInfo_InboundEnforcementCap, {
3761 "InboundEnforcementCap", "infiniband.switchinfo.inboundenforcementcap",
3762 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
3764 { &hf_infiniband_SwitchInfo_OutboundEnforcementCap, {
3765 "OutboundEnforcementCap", "infiniband.switchinfo.outboundenforcementcap",
3766 FT_UINT8, BASE_HEX, NULL, 0x40, NULL, HFILL}
3768 { &hf_infiniband_SwitchInfo_FilterRawInboundCap, {
3769 "FilterRawInboundCap", "infiniband.switchinfo.filterrawinboundcap",
3770 FT_UINT8, BASE_HEX, NULL, 0x20, NULL, HFILL}
3772 { &hf_infiniband_SwitchInfo_FilterRawOutboundCap, {
3773 "FilterRawOutboundCap", "infiniband.switchinfo.filterrawoutboundcap",
3774 FT_UINT8, BASE_HEX, NULL, 0x10, NULL, HFILL}
3776 { &hf_infiniband_SwitchInfo_EnhancedPortZero, {
3777 "EnhancedPortZero", "infiniband.switchinfo.enhancedportzero",
3778 FT_UINT8, BASE_HEX, NULL, 0x08, NULL, HFILL}
3783 { &hf_infiniband_GUIDInfo_GUIDBlock, {
3784 "GUIDBlock", "infiniband.switchinfo.guidblock",
3785 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
3788 { &hf_infiniband_GUIDInfo_GUID, {
3789 "GUID", "infiniband.switchinfo.guid",
3790 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
3794 { &hf_infiniband_PortInfo_M_Key, {
3795 "M_Key", "infiniband.portinfo.m_key",
3796 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
3798 { &hf_infiniband_PortInfo_GidPrefix, {
3799 "GidPrefix", "infiniband.portinfo.guid",
3800 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
3802 { &hf_infiniband_PortInfo_LID, {
3803 "LID", "infiniband.portinfo.lid",
3804 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3806 { &hf_infiniband_PortInfo_MasterSMLID, {
3807 "MasterSMLID", "infiniband.portinfo.mastersmlid",
3808 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3810 { &hf_infiniband_PortInfo_CapabilityMask, {
3811 "CapabilityMask", "infiniband.portinfo.capabilitymask",
3812 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
3815 /* Capability Mask Flags */
3816 { &hf_infiniband_PortInfo_CapabilityMask_SM, {
3817 "SM", "infiniband.portinfo.capabilitymask.issm",
3818 FT_UINT32, BASE_HEX, NULL, 0x00000002, NULL, HFILL}
3820 { &hf_infiniband_PortInfo_CapabilityMask_NoticeSupported, {
3821 "NoticeSupported", "infiniband.portinfo.capabilitymask.noticesupported",
3822 FT_UINT32, BASE_HEX, NULL, 0x00000004, NULL, HFILL}
3824 { &hf_infiniband_PortInfo_CapabilityMask_TrapSupported, {
3825 "TrapSupported", "infiniband.portinfo.capabilitymask.trapsupported",
3826 FT_UINT32, BASE_HEX, NULL, 0x00000008, NULL, HFILL}
3828 { &hf_infiniband_PortInfo_CapabilityMask_OptionalPDSupported, {
3829 "OptionalPDSupported", "infiniband.portinfo.capabilitymask.optionalpdsupported",
3830 FT_UINT32, BASE_HEX, NULL, 0x00000010, NULL, HFILL}
3832 { &hf_infiniband_PortInfo_CapabilityMask_AutomaticMigrationSupported, {
3833 "AutomaticMigrationSupported", "infiniband.portinfo.capabilitymask.automaticmigrationsupported",
3834 FT_UINT32, BASE_HEX, NULL, 0x00000020, NULL, HFILL}
3836 { &hf_infiniband_PortInfo_CapabilityMask_SLMappingSupported, {
3837 "SLMappingSupported", "infiniband.portinfo.capabilitymask.slmappingsupported",
3838 FT_UINT32, BASE_HEX, NULL, 0x00000040, NULL, HFILL}
3840 { &hf_infiniband_PortInfo_CapabilityMask_MKeyNVRAM, {
3841 "MKeyNVRAM", "infiniband.portinfo.capabilitymask.mkeynvram",
3842 FT_UINT32, BASE_HEX, NULL, 0x00000080, NULL, HFILL}
3844 { &hf_infiniband_PortInfo_CapabilityMask_PKeyNVRAM, {
3845 "PKeyNVRAM", "infiniband.portinfo.capabilitymask.pkeynvram",
3846 FT_UINT32, BASE_HEX, NULL, 0x00000100, NULL, HFILL}
3848 { &hf_infiniband_PortInfo_CapabilityMask_LEDInfoSupported, {
3849 "LEDInfoSupported", "infiniband.portinfo.capabilitymask.ledinfosupported",
3850 FT_UINT32, BASE_HEX, NULL, 0x00000200, NULL, HFILL}
3852 { &hf_infiniband_PortInfo_CapabilityMask_SMdisabled, {
3853 "SMdisabled", "infiniband.portinfo.capabilitymask.smdisabled",
3854 FT_UINT32, BASE_HEX, NULL, 0x00000400, NULL, HFILL}
3856 { &hf_infiniband_PortInfo_CapabilityMask_SystemImageGUIDSupported, {
3857 "SystemImageGUIDSupported", "infiniband.portinfo.capabilitymask.systemimageguidsupported",
3858 FT_UINT32, BASE_HEX, NULL, 0x00000800, NULL, HFILL}
3860 { &hf_infiniband_PortInfo_CapabilityMask_PKeySwitchExternalPortTrapSupported, {
3861 "PKeySwitchExternalPortTrapSupported", "infiniband.portinfo.capabilitymask.pkeyswitchexternalporttrapsupported",
3862 FT_UINT32, BASE_HEX, NULL, 0x00001000, NULL, HFILL}
3864 { &hf_infiniband_PortInfo_CapabilityMask_CommunicationsManagementSupported, {
3865 "CommunicationsManagementSupported", "infiniband.portinfo.capabilitymask.communicationsmanagementsupported",
3866 FT_UINT32, BASE_HEX, NULL, 0x00010000, NULL, HFILL}
3868 { &hf_infiniband_PortInfo_CapabilityMask_SNMPTunnelingSupported, {
3869 "SNMPTunnelingSupported", "infiniband.portinfo.capabilitymask.snmptunnelingsupported",
3870 FT_UINT32, BASE_HEX, NULL, 0x00020000, NULL, HFILL}
3872 { &hf_infiniband_PortInfo_CapabilityMask_ReinitSupported, {
3873 "ReinitSupported", "infiniband.portinfo.capabilitymask.reinitsupported",
3874 FT_UINT32, BASE_HEX, NULL, 0x00040000, NULL, HFILL}
3876 { &hf_infiniband_PortInfo_CapabilityMask_DeviceManagementSupported, {
3877 "DeviceManagementSupported", "infiniband.portinfo.capabilitymask.devicemanagementsupported",
3878 FT_UINT32, BASE_HEX, NULL, 0x00080000, NULL, HFILL}
3880 { &hf_infiniband_PortInfo_CapabilityMask_VendorClassSupported, {
3881 "VendorClassSupported", "infiniband.portinfo.capabilitymask.vendorclasssupported",
3882 FT_UINT32, BASE_HEX, NULL, 0x00100000, NULL, HFILL}
3884 { &hf_infiniband_PortInfo_CapabilityMask_DRNoticeSupported, {
3885 "DRNoticeSupported", "infiniband.portinfo.capabilitymask.drnoticesupported",
3886 FT_UINT32, BASE_HEX, NULL, 0x00200000, NULL, HFILL}
3888 { &hf_infiniband_PortInfo_CapabilityMask_CapabilityMaskNoticeSupported, {
3889 "CapabilityMaskNoticeSupported", "infiniband.portinfo.capabilitymask.capabilitymasknoticesupported",
3890 FT_UINT32, BASE_HEX, NULL, 0x00400000, NULL, HFILL}
3892 { &hf_infiniband_PortInfo_CapabilityMask_BootManagementSupported, {
3893 "BootManagementSupported", "infiniband.portinfo.capabilitymask.bootmanagementsupported",
3894 FT_UINT32, BASE_HEX, NULL, 0x00800000, NULL, HFILL}
3896 { &hf_infiniband_PortInfo_CapabilityMask_LinkRoundTripLatencySupported, {
3897 "LinkRoundTripLatencySupported", "infiniband.portinfo.capabilitymask.linkroundtriplatencysupported",
3898 FT_UINT32, BASE_HEX, NULL, 0x01000000, NULL, HFILL}
3900 { &hf_infiniband_PortInfo_CapabilityMask_ClientRegistrationSupported, {
3901 "ClientRegistrationSupported", "infiniband.portinfo.capabilitymask.clientregistrationsupported",
3902 FT_UINT32, BASE_HEX, NULL, 0x02000000, NULL, HFILL}
3904 { &hf_infiniband_PortInfo_CapabilityMask_OtherLocalChangesNoticeSupported, {
3905 "OtherLocalChangesNoticeSupported", "infiniband.portinfo.capabilitymask.otherlocalchangesnoticesupported",
3906 FT_UINT32, BASE_HEX, NULL, 0x04000000, NULL, HFILL}
3908 { &hf_infiniband_PortInfo_CapabilityMask_LinkSpeedWIdthPairsTableSupported, {
3909 "LinkSpeedWIdthPairsTableSupported", "infiniband.portinfo.capabilitymask.linkspeedwidthpairstablesupported",
3910 FT_UINT32, BASE_HEX, NULL, 0x08000000, NULL, HFILL}
3912 /* End Capability Mask Flags */
3915 { &hf_infiniband_PortInfo_DiagCode, {
3916 "DiagCode", "infiniband.portinfo.diagcode",
3917 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3919 { &hf_infiniband_PortInfo_M_KeyLeasePeriod, {
3920 "M_KeyLeasePeriod", "infiniband.portinfo.m_keyleaseperiod",
3921 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
3923 { &hf_infiniband_PortInfo_LocalPortNum, {
3924 "LocalPortNum", "infiniband.portinfo.localportnum",
3925 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3927 { &hf_infiniband_PortInfo_LinkWidthEnabled, {
3928 "LinkWidthEnabled", "infiniband.portinfo.linkwidthenabled",
3929 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3931 { &hf_infiniband_PortInfo_LinkWidthSupported, {
3932 "LinkWidthSupported", "infiniband.portinfo.linkwidthsupported",
3933 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3935 { &hf_infiniband_PortInfo_LinkWidthActive, {
3936 "LinkWidthActive", "infiniband.portinfo.linkwidthactive",
3937 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3939 { &hf_infiniband_PortInfo_LinkSpeedSupported, {
3940 "LinkSpeedSupported", "infiniband.portinfo.linkspeedsupported",
3941 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
3943 { &hf_infiniband_PortInfo_PortState, {
3944 "PortState", "infiniband.portinfo.portstate",
3945 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
3947 { &hf_infiniband_PortInfo_PortPhysicalState, {
3948 "PortPhysicalState", "infiniband.portinfo.portphysicalstate",
3949 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
3951 { &hf_infiniband_PortInfo_LinkDownDefaultState, {
3952 "LinkDownDefaultState", "infiniband.portinfo.linkdowndefaultstate",
3953 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
3955 { &hf_infiniband_PortInfo_M_KeyProtectBits, {
3956 "M_KeyProtectBits", "infiniband.portinfo.m_keyprotectbits",
3957 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
3959 { &hf_infiniband_PortInfo_LMC, {
3960 "LMC", "infiniband.portinfo.lmc",
3961 FT_UINT8, BASE_HEX, NULL, 0x07, NULL, HFILL}
3963 { &hf_infiniband_PortInfo_LinkSpeedActive, {
3964 "LinkSpeedActive", "infiniband.portinfo.linkspeedactive",
3965 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
3967 { &hf_infiniband_PortInfo_LinkSpeedEnabled, {
3968 "LinkSpeedEnabled", "infiniband.portinfo.linkspeedenabled",
3969 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
3971 { &hf_infiniband_PortInfo_NeighborMTU, {
3972 "NeighborMTU", "infiniband.portinfo.neighbormtu",
3973 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
3975 { &hf_infiniband_PortInfo_MasterSMSL, {
3976 "MasterSMSL", "infiniband.portinfo.mastersmsl",
3977 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
3979 { &hf_infiniband_PortInfo_VLCap, {
3980 "VLCap", "infiniband.portinfo.vlcap",
3981 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
3983 { &hf_infiniband_PortInfo_InitType, {
3984 "InitType", "infiniband.portinfo.inittype",
3985 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
3987 { &hf_infiniband_PortInfo_VLHighLimit, {
3988 "VLHighLimit", "infiniband.portinfo.vlhighlimit",
3989 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3991 { &hf_infiniband_PortInfo_VLArbitrationHighCap, {
3992 "VLArbitrationHighCap", "infiniband.portinfo.vlarbitrationhighcap",
3993 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3995 { &hf_infiniband_PortInfo_VLArbitrationLowCap, {
3996 "VLArbitrationLowCap", "infiniband.portinfo.vlarbitrationlowcap",
3997 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
3999 { &hf_infiniband_PortInfo_InitTypeReply, {
4000 "InitTypeReply", "infiniband.portinfo.inittypereply",
4001 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
4003 { &hf_infiniband_PortInfo_MTUCap, {
4004 "MTUCap", "infiniband.portinfo.mtucap",
4005 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
4007 { &hf_infiniband_PortInfo_VLStallCount, {
4008 "VLStallCount", "infiniband.portinfo.vlstallcount",
4009 FT_UINT8, BASE_HEX, NULL, 0xE0, NULL, HFILL}
4011 { &hf_infiniband_PortInfo_HOQLife, {
4012 "HOQLife", "infiniband.portinfo.hoqlife",
4013 FT_UINT8, BASE_HEX, NULL, 0x1F, NULL, HFILL}
4015 { &hf_infiniband_PortInfo_OperationalVLs, {
4016 "OperationalVLs", "infiniband.portinfo.operationalvls",
4017 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
4019 { &hf_infiniband_PortInfo_PartitionEnforcementInbound, {
4020 "PartitionEnforcementInbound", "infiniband.portinfo.partitionenforcementinbound",
4021 FT_UINT8, BASE_HEX, NULL, 0x08, NULL, HFILL}
4023 { &hf_infiniband_PortInfo_PartitionEnforcementOutbound, {
4024 "PartitionEnforcementOutbound", "infiniband.portinfo.partitionenforcementoutbound",
4025 FT_UINT8, BASE_HEX, NULL, 0x04, NULL, HFILL}
4027 { &hf_infiniband_PortInfo_FilterRawInbound, {
4028 "FilterRawInbound", "infiniband.portinfo.filterrawinbound",
4029 FT_UINT8, BASE_HEX, NULL, 0x02, NULL, HFILL}
4031 { &hf_infiniband_PortInfo_FilterRawOutbound, {
4032 "FilterRawOutbound", "infiniband.portinfo.filterrawoutbound",
4033 FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL}
4035 { &hf_infiniband_PortInfo_M_KeyViolations, {
4036 "M_KeyViolations", "infiniband.portinfo.m_keyviolations",
4037 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4039 { &hf_infiniband_PortInfo_P_KeyViolations, {
4040 "P_KeyViolations", "infiniband.portinfo.p_keyviolations",
4041 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4043 { &hf_infiniband_PortInfo_Q_KeyViolations, {
4044 "Q_KeyViolations", "infiniband.portinfo.q_keyviolations",
4045 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4047 { &hf_infiniband_PortInfo_GUIDCap, {
4048 "GUIDCap", "infiniband.portinfo.guidcap",
4049 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4051 { &hf_infiniband_PortInfo_ClientReregister, {
4052 "ClientReregister", "infiniband.portinfo.clientreregister",
4053 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4055 { &hf_infiniband_PortInfo_SubnetTimeOut, {
4056 "SubnetTimeOut", "infiniband.portinfo.subnettimeout",
4057 FT_UINT8, BASE_HEX, NULL, 0x1F, NULL, HFILL}
4059 { &hf_infiniband_PortInfo_RespTimeValue, {
4060 "RespTimeValue", "infiniband.portinfo.resptimevalue",
4061 FT_UINT8, BASE_HEX, NULL, 0x1F, NULL, HFILL}
4063 { &hf_infiniband_PortInfo_LocalPhyErrors, {
4064 "LocalPhyErrors", "infiniband.portinfo.localphyerrors",
4065 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
4067 { &hf_infiniband_PortInfo_OverrunErrors, {
4068 "OverrunErrors", "infiniband.portinfo.overrunerrors",
4069 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
4071 { &hf_infiniband_PortInfo_MaxCreditHint, {
4072 "MaxCreditHint", "infiniband.portinfo.maxcredithint",
4073 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4075 { &hf_infiniband_PortInfo_LinkRoundTripLatency, {
4076 "LinkRoundTripLatency", "infiniband.portinfo.linkroundtriplatency",
4077 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
4081 { &hf_infiniband_P_KeyTable_P_KeyTableBlock, {
4082 "P_KeyTableBlock", "infiniband.p_keytable.p_keytableblock",
4083 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4085 { &hf_infiniband_P_KeyTable_MembershipType, {
4086 "MembershipType", "infiniband.p_keytable.membershiptype",
4087 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4089 { &hf_infiniband_P_KeyTable_P_KeyBase, {
4090 "P_KeyBase", "infiniband.p_keytable.p_keybase",
4091 FT_UINT16, BASE_HEX, NULL, 0x7FFF, NULL, HFILL}
4094 /* SLtoVLMappingTable */
4095 { &hf_infiniband_SLtoVLMappingTable_SLtoVL_HighBits, {
4096 "SL(x)toVL", "infiniband.sltovlmappingtable.sltovlhighbits",
4097 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
4099 { &hf_infiniband_SLtoVLMappingTable_SLtoVL_LowBits, {
4100 "SL(x)toVL", "infiniband.sltovlmappingtable.sltovllowbits",
4101 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
4104 /* VLArbitrationTable */
4106 { &hf_infiniband_VLArbitrationTable_VLWeightPairs, {
4107 "VLWeightPairs", "infiniband.vlarbitrationtable.vlweightpairs",
4108 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4111 { &hf_infiniband_VLArbitrationTable_VL, {
4112 "VL", "infiniband.vlarbitrationtable.vl",
4113 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
4115 { &hf_infiniband_VLArbitrationTable_Weight, {
4116 "Weight", "infiniband.vlarbitrationtable.weight",
4117 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4120 /* LinearForwardingTable */
4122 { &hf_infiniband_LinearForwardingTable_LinearForwardingTableBlock, {
4123 "LinearForwardingTableBlock", "infiniband.linearforwardingtable.linearforwardingtableblock",
4124 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4127 { &hf_infiniband_LinearForwardingTable_Port, {
4128 "Port", "infiniband.linearforwardingtable.port",
4129 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4132 /* RandomForwardingTable */
4134 { &hf_infiniband_RandomForwardingTable_RandomForwardingTableBlock, {
4135 "RandomForwardingTableBlock", "infiniband.randomforwardingtable.randomforwardingtableblock",
4136 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4139 { &hf_infiniband_RandomForwardingTable_LID, {
4140 "LID", "infiniband.randomforwardingtable.lid",
4141 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4143 { &hf_infiniband_RandomForwardingTable_Valid, {
4144 "Valid", "infiniband.randomforwardingtable.valid",
4145 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4147 { &hf_infiniband_RandomForwardingTable_LMC, {
4148 "LMC", "infiniband.randomforwardingtable.lmc",
4149 FT_UINT8, BASE_HEX, NULL, 0x70, NULL, HFILL}
4151 { &hf_infiniband_RandomForwardingTable_Port, {
4152 "Port", "infiniband.randomforwardingtable.port",
4153 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4156 /* MulticastForwardingTable */
4158 { &hf_infiniband_MulticastForwardingTable_MulticastForwardingTableBlock , {
4159 "MulticastForwardingTableBlock", "infiniband.multicastforwardingtable.multicastforwardingtableblock",
4160 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4163 { &hf_infiniband_MulticastForwardingTable_PortMask, {
4164 "PortMask", "infiniband.multicastforwardingtable.portmask",
4165 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4169 { &hf_infiniband_SMInfo_GUID, {
4170 "GUID", "infiniband.sminfo.guid",
4171 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
4173 { &hf_infiniband_SMInfo_SM_Key, {
4174 "SM_Key", "infiniband.sminfo.sm_key",
4175 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
4177 { &hf_infiniband_SMInfo_ActCount, {
4178 "ActCount", "infiniband.sminfo.actcount",
4179 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
4181 { &hf_infiniband_SMInfo_Priority, {
4182 "Priority", "infiniband.sminfo.priority",
4183 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
4185 { &hf_infiniband_SMInfo_SMState, {
4186 "SMState", "infiniband.sminfo.smstate",
4187 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
4191 { &hf_infiniband_VendorDiag_NextIndex, {
4192 "NextIndex", "infiniband.vendordiag.nextindex",
4193 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4195 { &hf_infiniband_VendorDiag_DiagData, {
4196 "DiagData", "infiniband.vendordiag.diagdata",
4197 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4201 { &hf_infiniband_LedInfo_LedMask, {
4202 "LedMask", "infiniband.ledinfo.ledmask",
4203 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4206 /* LinkSpeedWidthPairsTable */
4207 { &hf_infiniband_LinkSpeedWidthPairsTable_NumTables, {
4208 "NumTables", "infiniband.linkspeedwidthpairstable.numtables",
4209 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4211 { &hf_infiniband_LinkSpeedWidthPairsTable_PortMask, {
4212 "PortMask", "infiniband.linkspeedwidthpairstable.portmask",
4213 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4215 { &hf_infiniband_LinkSpeedWidthPairsTable_SpeedTwoFive, {
4216 "Speed 2.5 Gbps", "infiniband.linkspeedwidthpairstable.speedtwofive",
4217 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4219 { &hf_infiniband_LinkSpeedWidthPairsTable_SpeedFive, {
4220 "Speed 5 Gbps", "infiniband.linkspeedwidthpairstable.speedfive",
4221 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4223 { &hf_infiniband_LinkSpeedWidthPairsTable_SpeedTen, {
4224 "Speed 10 Gbps", "infiniband.linkspeedwidthpairstable.speedten",
4225 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4229 /* PortInfoRecord */
4230 /* SLtoVLMappingTableRecord */
4231 /* SwitchInfoRecord */
4232 /* LinearForwardingTableRecord */
4233 /* RandomForwardingTableRecord */
4234 /* MulticastForwardingTableRecord */
4235 /* VLArbitrationTableRecord */
4236 { &hf_infiniband_SA_LID, {
4237 "LID", "infiniband.sa.lid",
4238 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4240 { &hf_infiniband_SA_EndportLID, {
4241 "EndportLID", "infiniband.sa.endportlid",
4242 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4244 { &hf_infiniband_SA_PortNum, {
4245 "PortNum", "infiniband.sa.portnum",
4246 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4248 { &hf_infiniband_SA_InputPortNum , {
4249 "InputPortNum", "infiniband.sa.inputportnum",
4250 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4252 { &hf_infiniband_SA_OutputPortNum, {
4253 "OutputPortNum", "infiniband.sa.outputportnum",
4254 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4256 { &hf_infiniband_SA_BlockNum_EightBit, {
4257 "BlockNum_EightBit", "infiniband.sa.blocknum_eightbit",
4258 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4260 { &hf_infiniband_SA_BlockNum_NineBit, {
4261 "BlockNum_NineBit", "infiniband.sa.blocknum_ninebit",
4262 FT_UINT16, BASE_HEX, NULL, 0x01FF, NULL, HFILL}
4264 { &hf_infiniband_SA_BlockNum_SixteenBit, {
4265 "BlockNum_SixteenBit", "infiniband.sa.blocknum_sixteenbit",
4266 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4268 { &hf_infiniband_SA_Position, {
4269 "Position", "infiniband.sa.position",
4270 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
4273 { &hf_infiniband_SA_Index, {
4274 "Index", "infiniband.sa.index",
4275 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4279 /* InformInfoRecord */
4280 { &hf_infiniband_InformInfoRecord_SubscriberGID, {
4281 "SubscriberGID", "infiniband.informinforecord.subscribergid",
4282 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4284 { &hf_infiniband_InformInfoRecord_Enum, {
4285 "Enum", "infiniband.informinforecord.enum",
4286 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4290 { &hf_infiniband_InformInfo_GID, {
4291 "GID", "infiniband.informinfo.gid",
4292 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4294 { &hf_infiniband_InformInfo_LIDRangeBegin, {
4295 "LIDRangeBegin", "infiniband.informinfo.lidrangebegin",
4296 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4298 { &hf_infiniband_InformInfo_LIDRangeEnd, {
4299 "LIDRangeEnd", "infiniband.informinfo.lidrangeend",
4300 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4302 { &hf_infiniband_InformInfo_IsGeneric, {
4303 "IsGeneric", "infiniband.informinfo.isgeneric",
4304 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4306 { &hf_infiniband_InformInfo_Subscribe, {
4307 "Subscribe", "infiniband.informinfo.subscribe",
4308 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4310 { &hf_infiniband_InformInfo_Type, {
4311 "Type", "infiniband.informinfo.type",
4312 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4314 { &hf_infiniband_InformInfo_TrapNumberDeviceID, {
4315 "TrapNumberDeviceID", "infiniband.informinfo.trapnumberdeviceid",
4316 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4318 { &hf_infiniband_InformInfo_QPN, {
4319 "QPN", "infiniband.informinfo.qpn",
4320 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
4322 { &hf_infiniband_InformInfo_RespTimeValue, {
4323 "RespTimeValue", "infiniband.informinfo.resptimevalue",
4324 FT_UINT8, BASE_HEX, NULL, 0x1F, NULL, HFILL}
4326 { &hf_infiniband_InformInfo_ProducerTypeVendorID, {
4327 "ProducerTypeVendorID", "infiniband.informinfo.producertypevendorid",
4328 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
4332 { &hf_infiniband_LinkRecord_FromLID, {
4333 "FromLID", "infiniband.linkrecord.fromlid",
4334 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4336 { &hf_infiniband_LinkRecord_FromPort, {
4337 "FromPort", "infiniband.linkrecord.fromport",
4338 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4340 { &hf_infiniband_LinkRecord_ToPort, {
4341 "ToPort", "infiniband.linkrecord.toport",
4342 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4344 { &hf_infiniband_LinkRecord_ToLID, {
4345 "ToLID", "infiniband.linkrecord.tolid",
4346 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4350 { &hf_infiniband_ServiceRecord_ServiceID, {
4351 "ServiceID", "infiniband.linkrecord.serviceid",
4352 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
4354 { &hf_infiniband_ServiceRecord_ServiceGID, {
4355 "ServiceGID", "infiniband.linkrecord.servicegid",
4356 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4358 { &hf_infiniband_ServiceRecord_ServiceP_Key, {
4359 "ServiceP_Key", "infiniband.linkrecord.servicep_key",
4360 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4362 { &hf_infiniband_ServiceRecord_ServiceLease, {
4363 "ServiceLease", "infiniband.linkrecord.servicelease",
4364 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
4366 { &hf_infiniband_ServiceRecord_ServiceKey, {
4367 "ServiceKey", "infiniband.linkrecord.servicekey",
4368 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4370 { &hf_infiniband_ServiceRecord_ServiceName, {
4371 "ServiceName", "infiniband.linkrecord.servicename",
4372 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4374 { &hf_infiniband_ServiceRecord_ServiceData, {
4375 "ServiceData", "infiniband.linkrecord.servicedata",
4376 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4379 /* ServiceAssociationRecord */
4380 { &hf_infiniband_ServiceAssociationRecord_ServiceKey, {
4381 "ServiceKey", "infiniband.serviceassociationrecord.servicekey",
4382 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4384 { &hf_infiniband_ServiceAssociationRecord_ServiceName, {
4385 "ServiceName", "infiniband.serviceassociationrecord.servicename",
4386 FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL}
4390 { &hf_infiniband_PathRecord_DGID, {
4391 "DGID", "infiniband.pathrecord.dgid",
4392 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4394 { &hf_infiniband_PathRecord_SGID, {
4395 "SGID", "infiniband.pathrecord.sgid",
4396 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4398 { &hf_infiniband_PathRecord_DLID, {
4399 "DLID", "infiniband.pathrecord.dlid",
4400 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4402 { &hf_infiniband_PathRecord_SLID, {
4403 "SLID", "infiniband.pathrecord.slid",
4404 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4406 { &hf_infiniband_PathRecord_RawTraffic, {
4407 "RawTraffic", "infiniband.pathrecord.rawtraffic",
4408 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4410 { &hf_infiniband_PathRecord_FlowLabel, {
4411 "FlowLabel", "infiniband.pathrecord.flowlabel",
4412 FT_UINT24, BASE_HEX, NULL, 0x0FFFFF, NULL, HFILL}
4414 { &hf_infiniband_PathRecord_HopLimit, {
4415 "HopLimit", "infiniband.pathrecord.hoplimit",
4416 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4418 { &hf_infiniband_PathRecord_TClass, {
4419 "TClass", "infiniband.pathrecord.tclass",
4420 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4422 { &hf_infiniband_PathRecord_Reversible, {
4423 "Reversible", "infiniband.pathrecord.reversible",
4424 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4426 { &hf_infiniband_PathRecord_NumbPath, {
4427 "NumbPath", "infiniband.pathrecord.numbpath",
4428 FT_UINT8, BASE_HEX, NULL, 0x7F, NULL, HFILL}
4430 { &hf_infiniband_PathRecord_P_Key, {
4431 "P_Key", "infiniband.pathrecord.p_key",
4432 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4434 { &hf_infiniband_PathRecord_SL, {
4435 "SL", "infiniband.pathrecord.sl",
4436 FT_UINT16, BASE_HEX, NULL, 0x000F, NULL, HFILL}
4438 { &hf_infiniband_PathRecord_MTUSelector, {
4439 "MTUSelector", "infiniband.pathrecord.mtuselector",
4440 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
4442 { &hf_infiniband_PathRecord_MTU, {
4443 "MTU", "infiniband.pathrecord.mtu",
4444 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
4446 { &hf_infiniband_PathRecord_RateSelector, {
4447 "RateSelector", "infiniband.pathrecord.rateselector",
4448 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
4450 { &hf_infiniband_PathRecord_Rate, {
4451 "Rate", "infiniband.pathrecord.rate",
4452 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
4454 { &hf_infiniband_PathRecord_PacketLifeTimeSelector, {
4455 "PacketLifeTimeSelector", "infiniband.pathrecord.packetlifetimeselector",
4456 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
4458 { &hf_infiniband_PathRecord_PacketLifeTime, {
4459 "PacketLifeTime", "infiniband.pathrecord.packetlifetime",
4460 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
4462 { &hf_infiniband_PathRecord_Preference, {
4463 "Preference", "infiniband.pathrecord.preference",
4464 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4467 /* MCMemberRecord */
4468 { &hf_infiniband_MCMemberRecord_MGID, {
4469 "MGID", "infiniband.mcmemberrecord.mgid",
4470 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4472 { &hf_infiniband_MCMemberRecord_PortGID, {
4473 "PortGID", "infiniband.mcmemberrecord.portgid",
4474 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4476 { &hf_infiniband_MCMemberRecord_Q_Key, {
4477 "Q_Key", "infiniband.mcmemberrecord.q_key",
4478 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
4480 { &hf_infiniband_MCMemberRecord_MLID, {
4481 "MLID", "infiniband.mcmemberrecord.mlid",
4482 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4484 { &hf_infiniband_MCMemberRecord_MTUSelector, {
4485 "MTUSelector", "infiniband.mcmemberrecord.mtuselector",
4486 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
4488 { &hf_infiniband_MCMemberRecord_MTU, {
4489 "MTU", "infiniband.mcmemberrecord.mtu",
4490 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
4492 { &hf_infiniband_MCMemberRecord_TClass, {
4493 "TClass", "infiniband.mcmemberrecord.tclass",
4494 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4496 { &hf_infiniband_MCMemberRecord_P_Key, {
4497 "P_Key", "infiniband.mcmemberrecord.p_key",
4498 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4500 { &hf_infiniband_MCMemberRecord_RateSelector, {
4501 "RateSelector", "infiniband.mcmemberrecord.rateselector",
4502 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
4504 { &hf_infiniband_MCMemberRecord_Rate, {
4505 "Rate", "infiniband.mcmemberrecord.rate",
4506 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
4508 { &hf_infiniband_MCMemberRecord_PacketLifeTimeSelector, {
4509 "PacketLifeTimeSelector", "infiniband.mcmemberrecord.packetlifetimeselector",
4510 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
4512 { &hf_infiniband_MCMemberRecord_PacketLifeTime, {
4513 "PacketLifeTime", "infiniband.mcmemberrecord.packetlifetime",
4514 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
4516 { &hf_infiniband_MCMemberRecord_SL, {
4517 "SL", "infiniband.mcmemberrecord.sl",
4518 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
4520 { &hf_infiniband_MCMemberRecord_FlowLabel, {
4521 "FlowLabel", "infiniband.mcmemberrecord.flowlabel",
4522 FT_UINT24, BASE_HEX, NULL, 0x0FFFFF, NULL, HFILL}
4524 { &hf_infiniband_MCMemberRecord_HopLimit, {
4525 "HopLimit", "infiniband.mcmemberrecord.hoplimit",
4526 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4528 { &hf_infiniband_MCMemberRecord_Scope, {
4529 "Scope", "infiniband.mcmemberrecord.scope",
4530 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
4532 { &hf_infiniband_MCMemberRecord_JoinState, {
4533 "JoinState", "infiniband.mcmemberrecord.joinstate",
4534 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
4536 { &hf_infiniband_MCMemberRecord_ProxyJoin, {
4537 "ProxyJoin", "infiniband.mcmemberrecord.proxyjoin",
4538 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4541 /* MultiPathRecord */
4542 { &hf_infiniband_MultiPathRecord_RawTraffic, {
4543 "RawTraffic", "infiniband.multipathrecord.rawtraffic",
4544 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4546 { &hf_infiniband_MultiPathRecord_FlowLabel, {
4547 "FlowLabel", "infiniband.multipathrecord.flowlabel",
4548 FT_UINT24, BASE_HEX, NULL, 0x0FFFFF, NULL, HFILL}
4550 { &hf_infiniband_MultiPathRecord_HopLimit, {
4551 "HopLimit", "infiniband.multipathrecord.hoplimit",
4552 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4554 { &hf_infiniband_MultiPathRecord_TClass, {
4555 "TClass", "infiniband.multipathrecord.tclass",
4556 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4558 { &hf_infiniband_MultiPathRecord_Reversible, {
4559 "Reversible", "infiniband.multipathrecord.reversible",
4560 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4562 { &hf_infiniband_MultiPathRecord_NumbPath, {
4563 "NumbPath", "infiniband.multipathrecord.numbpath",
4564 FT_UINT8, BASE_HEX, NULL, 0x7F, NULL, HFILL}
4566 { &hf_infiniband_MultiPathRecord_P_Key, {
4567 "P_Key", "infiniband.multipathrecord.p_key",
4568 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4570 { &hf_infiniband_MultiPathRecord_SL, {
4571 "SL", "infiniband.multipathrecord.sl",
4572 FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL}
4574 { &hf_infiniband_MultiPathRecord_MTUSelector, {
4575 "MTUSelector", "infiniband.multipathrecord.mtuselector",
4576 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
4578 { &hf_infiniband_MultiPathRecord_MTU, {
4579 "MTU", "infiniband.multipathrecord.mtu",
4580 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
4582 { &hf_infiniband_MultiPathRecord_RateSelector, {
4583 "RateSelector", "infiniband.multipathrecord.rateselector",
4584 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
4586 { &hf_infiniband_MultiPathRecord_Rate, {
4587 "Rate", "infiniband.multipathrecord.rate",
4588 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
4590 { &hf_infiniband_MultiPathRecord_PacketLifeTimeSelector, {
4591 "PacketLifeTimeSelector", "infiniband.multipathrecord.packetlifetimeselector",
4592 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
4594 { &hf_infiniband_MultiPathRecord_PacketLifeTime, {
4595 "PacketLifeTime", "infiniband.multipathrecord.packetlifetime",
4596 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
4598 { &hf_infiniband_MultiPathRecord_IndependenceSelector, {
4599 "IndependenceSelector", "infiniband.multipathrecord.independenceselector",
4600 FT_UINT8, BASE_HEX, NULL, 0xC0, NULL, HFILL}
4602 { &hf_infiniband_MultiPathRecord_GIDScope, {
4603 "GIDScope", "infiniband.multipathrecord.gidscope",
4604 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
4606 { &hf_infiniband_MultiPathRecord_SGIDCount, {
4607 "SGIDCount", "infiniband.multipathrecord.sgidcount",
4608 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4610 { &hf_infiniband_MultiPathRecord_DGIDCount, {
4611 "DGIDCount", "infiniband.multipathrecord.dgidcount",
4612 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4614 { &hf_infiniband_MultiPathRecord_SDGID, {
4615 "SDGID", "infiniband.multipathrecord.sdgid",
4616 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4620 { &hf_infiniband_Notice_IsGeneric, {
4621 "IsGeneric", "infiniband.notice.isgeneric",
4622 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4624 { &hf_infiniband_Notice_Type, {
4625 "Type", "infiniband.notice.type",
4626 FT_UINT8, BASE_HEX, NULL, 0x7F, NULL, HFILL}
4628 { &hf_infiniband_Notice_ProducerTypeVendorID, {
4629 "ProducerTypeVendorID", "infiniband.notice.producertypevendorid",
4630 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
4632 { &hf_infiniband_Notice_TrapNumberDeviceID, {
4633 "TrapNumberDeviceID", "infiniband.notice.trapnumberdeviceid",
4634 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4636 { &hf_infiniband_Notice_IssuerLID, {
4637 "IssuerLID", "infiniband.notice.issuerlid",
4638 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4640 { &hf_infiniband_Notice_NoticeToggle, {
4641 "NoticeToggle", "infiniband.notice.noticetoggle",
4642 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4644 { &hf_infiniband_Notice_NoticeCount, {
4645 "NoticeCount", "infiniband.notice.noticecount",
4646 FT_UINT16, BASE_HEX, NULL, 0x7FFF, NULL, HFILL}
4648 { &hf_infiniband_Notice_DataDetails, {
4649 "DataDetails", "infiniband.notice.datadetails",
4650 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4653 { &hf_infiniband_Notice_IssuerGID, {
4654 "IssuerGID", "infiniband.notice.issuergid",
4655 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4657 { &hf_infiniband_Notice_ClassTrapSpecificData, {
4658 "ClassTrapSpecificData", "infiniband.notice.classtrapspecificdata",
4659 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4663 /* Traps 64,65,66,67 */
4664 { &hf_infiniband_Trap_GIDADDR, {
4665 "GIDADDR", "infiniband.trap.gidaddr",
4666 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4669 { &hf_infiniband_Trap_COMP_MASK, {
4670 "COMP_MASK", "infiniband.trap.comp_mask",
4671 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
4673 { &hf_infiniband_Trap_WAIT_FOR_REPATH, {
4674 "WAIT_FOR_REPATH", "infiniband.trap.wait_for_repath",
4675 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4678 { &hf_infiniband_Trap_PATH_REC, {
4679 "PATH_REC", "infiniband.trap.path_rec",
4680 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4685 { &hf_infiniband_Trap_LIDADDR, {
4686 "LIDADDR", "infiniband.trap.lidaddr",
4687 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4690 /* Trap 129, 130, 131 */
4691 { &hf_infiniband_Trap_PORTNO, {
4692 "PORTNO", "infiniband.trap.portno",
4693 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4697 { &hf_infiniband_Trap_OtherLocalChanges, {
4698 "OtherLocalChanges", "infiniband.trap.otherlocalchanges",
4699 FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL}
4701 { &hf_infiniband_Trap_CAPABILITYMASK, {
4702 "CAPABILITYMASK", "infiniband.trap.capabilitymask",
4703 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
4705 { &hf_infiniband_Trap_LinkSpeecEnabledChange, {
4706 "LinkSpeecEnabledChange", "infiniband.trap.linkspeecenabledchange",
4707 FT_UINT8, BASE_HEX, NULL, 0x04, NULL, HFILL}
4709 { &hf_infiniband_Trap_LinkWidthEnabledChange, {
4710 "LinkWidthEnabledChange", "infiniband.trap.linkwidthenabledchange",
4711 FT_UINT8, BASE_HEX, NULL, 0x02, NULL, HFILL}
4713 { &hf_infiniband_Trap_NodeDescriptionChange, {
4714 "NodeDescriptionChange", "infiniband.trap.nodedescriptionchange",
4715 FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL}
4719 { &hf_infiniband_Trap_SYSTEMIMAGEGUID, {
4720 "SYSTEMIMAGEGUID", "infiniband.trap.systemimageguid",
4721 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
4725 { &hf_infiniband_Trap_DRSLID, {
4726 "DRSLID", "infiniband.trap.drslid",
4727 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4729 { &hf_infiniband_Trap_METHOD, {
4730 "METHOD", "infiniband.trap.method",
4731 FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL}
4733 { &hf_infiniband_Trap_ATTRIBUTEID, {
4734 "ATTRIBUTEID", "infiniband.trap.attributeid",
4735 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4737 { &hf_infiniband_Trap_ATTRIBUTEMODIFIER, {
4738 "ATTRIBUTEMODIFIER", "infiniband.trap.attributemodifier",
4739 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
4741 { &hf_infiniband_Trap_MKEY, {
4742 "MKEY", "infiniband.trap.mkey",
4743 FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL}
4745 { &hf_infiniband_Trap_DRNotice, {
4746 "DRNotice", "infiniband.trap.drnotice",
4747 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL}
4749 { &hf_infiniband_Trap_DRPathTruncated, {
4750 "DRPathTruncated", "infiniband.trap.drpathtruncated",
4751 FT_UINT8, BASE_HEX, NULL, 0x40, NULL, HFILL}
4753 { &hf_infiniband_Trap_DRHopCount, {
4754 "DRHopCount", "infiniband.trap.drhopcount",
4755 FT_UINT8, BASE_HEX, NULL, 0x3F, NULL, HFILL}
4757 { &hf_infiniband_Trap_DRNoticeReturnPath, {
4758 "DRNoticeReturnPath", "infiniband.trap.drnoticereturnpath",
4759 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL}
4763 { &hf_infiniband_Trap_LIDADDR1, {
4764 "LIDADDR1", "infiniband.trap.lidaddr1",
4765 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4767 { &hf_infiniband_Trap_LIDADDR2, {
4768 "LIDADDR2", "infiniband.trap.lidaddr2",
4769 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4771 { &hf_infiniband_Trap_KEY, {
4772 "KEY", "infiniband.trap.key",
4773 FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL}
4775 { &hf_infiniband_Trap_SL, {
4776 "SL", "infiniband.trap.sl",
4777 FT_UINT8, BASE_HEX, NULL, 0xF0, NULL, HFILL}
4779 { &hf_infiniband_Trap_QP1, {
4780 "QP1", "infiniband.trap.qp1",
4781 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
4783 { &hf_infiniband_Trap_QP2, {
4784 "QP2", "infiniband.trap.qp2",
4785 FT_UINT24, BASE_HEX, NULL, 0x0, NULL, HFILL}
4787 { &hf_infiniband_Trap_GIDADDR1, {
4788 "GIDADDR1", "infiniband.trap.gidaddr1",
4789 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4791 { &hf_infiniband_Trap_GIDADDR2, {
4792 "GIDADDR2", "infiniband.trap.gidaddr2",
4793 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4797 { &hf_infiniband_Trap_DataValid, {
4798 "DataValid", "infiniband.trap.datavalid",
4799 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4801 { &hf_infiniband_Trap_PKEY, {
4802 "PKEY", "infiniband.trap.pkey",
4803 FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}
4805 { &hf_infiniband_Trap_SWLIDADDR, {
4806 "SWLIDADDR", "infiniband.trap.swlidaddr",
4807 FT_IPv6, BASE_NONE, NULL, 0x0, NULL, HFILL}
4811 /* Array to hold expansion options between dissections */
4812 static gint *ett[] = {
4813 /* &ett_infiniband, */
4830 &ett_subn_lid_routed,
4831 &ett_subn_directed_route,
4835 &ett_subm_attribute,
4836 &ett_suba_attribute,
4839 /* &ett_nodedesc, */
4840 /* &ett_nodeinfo, */
4841 /* &ett_switchinfo, */
4842 /* &ett_guidinfo, */
4843 /* &ett_portinfo, */
4844 &ett_portinfo_capmask,
4847 &ett_vlarbitrationtable,
4848 &ett_linearforwardingtable,
4849 &ett_randomforwardingtable,
4850 &ett_multicastforwardingtable,
4854 &ett_linkspeedwidthpairs,
4859 &ett_mcmemberrecord,
4861 &ett_multipathrecord,
4862 &ett_serviceassocrecord
4865 proto_infiniband = proto_register_protocol("InfiniBand", "InfiniBand", "infiniband");
4866 register_dissector("infiniband", dissect_infiniband, proto_infiniband);
4868 proto_register_field_array(proto_infiniband, hf, array_length(hf));
4869 proto_register_subtree_array(ett, array_length(ett));
4873 /* Reg Handoff. Register dissectors we'll need for IPoIB */
4874 void proto_reg_handoff_infiniband(void)
4876 ipv6_handle = find_dissector("ipv6");
4877 data_handle = find_dissector("data");
4878 ethertype_dissector_table = find_dissector_table("ethertype");