[OpenSM] patches for saquery porting - 6 of 6:
authortzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 4 Feb 2009 15:26:22 +0000 (15:26 +0000)
committertzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 4 Feb 2009 15:26:22 +0000 (15:26 +0000)
change osm_helper.c
Signed off by: stan.smith@intel.com

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1930 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/opensm/user/libopensm/osm_helper.c

index 55c01c9..d16b8fd 100644 (file)
-/*
- * Copyright (c) 2004-2006 Voltaire, Inc. All rights reserved.
- * Copyright (c) 2002-2006 Mellanox Technologies LTD. All rights reserved.
- * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.
- *
- * This software is available to you under the OpenIB.org BSD license
- * below:
- *
- *     Redistribution and use in source and binary forms, with or
- *     without modification, are permitted provided that the following
- *     conditions are met:
- *
- *      - Redistributions of source code must retain the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer.
- *
- *      - Redistributions in binary form must reproduce the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer in the documentation and/or other materials
- *        provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * $Id$
- */
-
-
-
-/*
- * Abstract:
- *    Implementation of opensm helper functions.
- *
- * Environment:
- *    Linux User Mode
- *
- * $Revision: 1.19 $
- */
-
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <complib/cl_debug.h>
-#include <iba/ib_types.h>
-#include <opensm/osm_helper.h>
-#include <opensm/osm_log.h>
-
-#define LINE_LENGTH 256
-
-/* we use two tables - one for queries and one for responses */
-const char* const __ib_sa_method_str[] =
-{
-  "RESERVED",                 /* 0 */
-  "SubnAdmGet",             /* 1 */
-  "SubnAdmSet",             /* 2 */
-  "RESERVED",                  /* 3 */
-  "RESERVED",                  /* 4 */
-  "RESERVED",                  /* 5 */
-  "SubnAdmReport",          /* 6 */
-  "RESERVED",                  /* 7 */
-  "RESERVED",                  /* 8 */
-  "RESERVED",                  /* 9 */
-  "RESERVED",                  /* A */
-  "RESERVED",                  /* B */
-  "RESERVED",                  /* C */
-  "RESERVED",                  /* D */
-  "RESERVED",                  /* E */
-  "RESERVED",                  /* F */
-  "RESERVED",                  /* 10 */
-  "RESERVED",                  /* 11 */
-  "SubnAdmGetTable",           /* 12 */
-  "SubnAdmGetTraceTable",      /* 13 */
-  "SubnAdmGetMulti",           /* 14 */
-  "SubnAdmDelete",          /* 15 */
-  "UNKNOWN"                   /* 16 */
-};
-
-const char* const __ib_sa_resp_method_str[] =
-{
-  "RESERVED",                 /* 80 */
-  "SubnAdmGetResp",            /* 81 */
-  "RESERVED (SetResp?)",    /* 82 */
-  "RESERVED",                  /* 83 */
-  "RESERVED",                  /* 84 */
-  "RESERVED",                  /* 85 */
-  "SubnAdmReportResp",         /* 86 */
-  "RESERVED",                  /* 87 */
-  "RESERVED",                  /* 88 */
-  "RESERVED",                  /* 89 */
-  "RESERVED",                  /* 8A */
-  "RESERVED",                  /* 8B */
-  "RESERVED",                  /* 8C */
-  "RESERVED",                  /* 8D */
-  "RESERVED",                  /* 8E */
-  "RESERVED",                  /* 8F */
-  "RESERVED",                  /* 90 */
-  "RESERVED",                  /* 91 */
-  "SubnAdmGetTableResp",       /* 92 */
-  "RESERVED",                  /* 93 */
-  "SubnAdmGetMultiResp",    /* 94 */
-  "SubnAdmDeleteResp",         /* 95 */
-  "UNKNOWN"
-};
-
-#define OSM_SA_METHOD_STR_UNKNOWN_VAL 0x16
-
-const char* const __ib_sm_method_str[] =
-{
-  "RESERVED0",              /* 0 */
-  "SubnGet",              /* 1 */
-  "SubnSet",              /* 2 */
-  "RESERVED3",               /* 3 */
-  "RESERVED4",               /* 4 */
-  "SubnTrap",                /* 5 */
-  "RESERVED6",               /* 6 */
-  "SubnTrapRepress",         /* 7 */
-  "RESERVED8",               /* 8 */
-  "RESERVED9",               /* 9 */
-  "RESERVEDA",               /* A */
-  "RESERVEDB",               /* B */
-  "RESERVEDC",               /* C */
-  "RESERVEDD",               /* D */
-  "RESERVEDE",               /* E */
-  "RESERVEDF",               /* F */
-  "RESERVED10",              /* 10 */
-  "SubnGetResp",             /* 11 */
-  "RESERVED12",           /* 12 */
-  "RESERVED13",           /* 13 */
-  "RESERVED14",           /* 14 */
-  "RESERVED15",           /* 15 */
-  "RESERVED16",              /* 16 */
-  "RESERVED17",           /* 17 */
-  "RESERVED18",           /* 18 */
-  "RESERVED19",           /* 19 */
-  "RESERVED1A",           /* 1A */
-  "RESERVED1B",           /* 1B */
-  "RESERVED1C",           /* 1C */
-  "RESERVED1D",           /* 1D */
-  "RESERVED1E",             /* 1E */
-  "RESERVED1F",             /* 1F */
-  "UNKNOWN"                  /* 20 */
-};
-
-#define OSM_SM_METHOD_STR_UNKNOWN_VAL 0x21
-
-const char* const __ib_sm_attr_str[] =
-{
-  "RESERVED",                  /* 0 */
-  "ClassPortInfo",             /* 1 */
-  "Notice",                    /* 2 */
-  "InformInfo",                /* 3 */
-  "RESERVED",                  /* 4 */
-  "RESERVED",                  /* 5 */
-  "RESERVED",                  /* 6 */
-  "RESERVED",                  /* 7 */
-  "RESERVED",                  /* 8 */
-  "RESERVED",                  /* 9 */
-  "RESERVED",                  /* A */
-  "RESERVED",                  /* B */
-  "RESERVED",                  /* C */
-  "RESERVED",                  /* D */
-  "RESERVED",                  /* E */
-  "RESERVED",                  /* F */
-  "NodeDescription",           /* 10 */
-  "NodeInfo",                  /* 11 */
-  "SwitchInfo",                /* 12 */
-  "UNKNOWN",                   /* 13 */
-  "GUIDInfo",                  /* 14 */
-  "PortInfo",                  /* 15 */
-  "P_KeyTable",                /* 16 */
-  "SLtoVLMappingTable",        /* 17 */
-  "VLArbitrationTable",        /* 18 */
-  "LinearForwardingTable",     /* 19 */
-  "RandomForwardingTable",     /* 1A */
-  "MulticastForwardingTable",  /* 1B */
-  "UNKNOWN",                   /* 1C */
-  "UNKNOWN",                   /* 1D */
-  "UNKNOWN",                   /* 1E */
-  "UNKNOWN",                   /* 1F */
-  "SMInfo",                    /* 20 */
-  "UNKNOWN"                    /* 21 - always highest value */
-};
-
-#define OSM_SM_ATTR_STR_UNKNOWN_VAL 0x21
-
-const char* const __ib_sa_attr_str[] =
-{
-  "RESERVED",                  /* 0 */
-  "ClassPortInfo",             /* 1 */
-  "Notice",                    /* 2 */
-  "InformInfo",                /* 3 */
-  "RESERVED",                  /* 4 */
-  "RESERVED",                  /* 5 */
-  "RESERVED",                  /* 6 */
-  "RESERVED",                  /* 7 */
-  "RESERVED",                  /* 8 */
-  "RESERVED",                  /* 9 */
-  "RESERVED",                  /* A */
-  "RESERVED",                  /* B */
-  "RESERVED",                  /* C */
-  "RESERVED",                  /* D */
-  "RESERVED",                  /* E */
-  "RESERVED",                  /* F */
-  "RESERVED",                  /* 10 */
-  "NodeRecord",                /* 11 */
-  "PortInfoRecord",            /* 12 */
-  "SLtoVLMappingTableRecord",  /* 13 */
-  "SwitchInfoRecord",          /* 14 */
-  "LinearForwardingTableRecord", /* 15 */
-  "RandomForwardingTableRecord", /* 16 */
-  "MulticastForwardingTableRecord",  /* 17 */
-  "SMInfoRecord",              /* 18 */
-  "RESERVED",                  /* 19 */
-  "RandomForwardingTable",     /* 1A */
-  "MulticastForwardingTable",  /* 1B */
-  "UNKNOWN",                   /* 1C */
-  "UNKNOWN",                   /* 1D */
-  "UNKNOWN",                   /* 1E */
-  "UNKNOWN",                   /* 1F */
-  "LinkRecord",                /* 20 */
-  "UNKNOWN",                   /* 21 */
-  "UNKNOWN",                   /* 22 */
-  "UNKNOWN",                   /* 23 */
-  "UNKNOWN",                   /* 24 */
-  "UNKNOWN",                   /* 25 */
-  "UNKNOWN",                   /* 26 */
-  "UNKNOWN",                   /* 27 */
-  "UNKNOWN",                   /* 28 */
-  "UNKNOWN",                   /* 29 */
-  "UNKNOWN",                   /* 2A */
-  "UNKNOWN",                   /* 2B */
-  "UNKNOWN",                   /* 2C */
-  "UNKNOWN",                   /* 2D */
-  "UNKNOWN",                   /* 2E */
-  "UNKNOWN",                   /* 2F */
-  "GuidInfoRecord",            /* 30 */
-  "ServiceRecord",             /* 31 */
-  "UNKNOWN",                   /* 32 */
-  "P_KeyTableRecord",          /* 33 */
-  "UNKNOWN",                   /* 34 */
-  "PathRecord",                /* 35 */
-  "VLArbitrationTableRecord",  /* 36 */
-  "UNKNOWN",                   /* 37 */
-  "MCMemberRecord",            /* 38 */
-  "TraceRecord",               /* 39 */
-  "MultiPathRecord",           /* 3A */
-  "ServiceAssociationRecord",  /* 3B */
-  "UNKNOWN",                   /* 3C */
-  "UNKNOWN",                   /* 3D */
-  "UNKNOWN",                   /* 3E */
-  "UNKNOWN",                   /* 3F */
-  "UNKNOWN",                   /* 40 */
-  "UNKNOWN",                   /* 41 */
-  "UNKNOWN",                   /* 42 */
-  "UNKNOWN",                   /* 43 */
-  "UNKNOWN",                   /* 44 */
-  "UNKNOWN",                   /* 45 */
-  "UNKNOWN",                   /* 46 */
-  "UNKNOWN",                   /* 47 */
-  "UNKNOWN",                   /* 48 */
-  "UNKNOWN",                   /* 49 */
-  "UNKNOWN",                   /* 4A */
-  "UNKNOWN",                   /* 4B */
-  "UNKNOWN",                   /* 4C */
-  "UNKNOWN",                   /* 4D */
-  "UNKNOWN",                   /* 4E */
-  "UNKNOWN",                   /* 4F */
-  "UNKNOWN",                   /* 50 */
-  "UNKNOWN",                   /* 51 */
-  "UNKNOWN",                   /* 52 */
-  "UNKNOWN",                   /* 53 */
-  "UNKNOWN",                   /* 54 */
-  "UNKNOWN",                   /* 55 */
-  "UNKNOWN",                   /* 56 */
-  "UNKNOWN",                   /* 57 */
-  "UNKNOWN",                   /* 58 */
-  "UNKNOWN",                   /* 59 */
-  "UNKNOWN",                   /* 5A */
-  "UNKNOWN",                   /* 5B */
-  "UNKNOWN",                   /* 5C */
-  "UNKNOWN",                   /* 5D */
-  "UNKNOWN",                   /* 5E */
-  "UNKNOWN",                   /* 5F */
-  "UNKNOWN",                   /* 60 */
-  "UNKNOWN",                   /* 61 */
-  "UNKNOWN",                   /* 62 */
-  "UNKNOWN",                   /* 63 */
-  "UNKNOWN",                   /* 64 */
-  "UNKNOWN",                   /* 65 */
-  "UNKNOWN",                   /* 66 */
-  "UNKNOWN",                   /* 67 */
-  "UNKNOWN",                   /* 68 */
-  "UNKNOWN",                   /* 69 */
-  "UNKNOWN",                   /* 6A */
-  "UNKNOWN",                   /* 6B */
-  "UNKNOWN",                   /* 6C */
-  "UNKNOWN",                   /* 6D */
-  "UNKNOWN",                   /* 6E */
-  "UNKNOWN",                   /* 6F */
-  "UNKNOWN",                   /* 70 */
-  "UNKNOWN",                   /* 71 */
-  "UNKNOWN",                   /* 72 */
-  "UNKNOWN",                   /* 73 */
-  "UNKNOWN",                   /* 74 */
-  "UNKNOWN",                   /* 75 */
-  "UNKNOWN",                   /* 76 */
-  "UNKNOWN",                   /* 77 */
-  "UNKNOWN",                   /* 78 */
-  "UNKNOWN",                   /* 79 */
-  "UNKNOWN",                   /* 7A */
-  "UNKNOWN",                   /* 7B */
-  "UNKNOWN",                   /* 7C */
-  "UNKNOWN",                   /* 7D */
-  "UNKNOWN",                   /* 7E */
-  "UNKNOWN",                   /* 7F */
-  "UNKNOWN",                   /* 80 */
-  "UNKNOWN",                   /* 81 */
-  "UNKNOWN",                   /* 82 */
-  "UNKNOWN",                   /* 83 */
-  "UNKNOWN",                   /* 84 */
-  "UNKNOWN",                   /* 85 */
-  "UNKNOWN",                   /* 86 */
-  "UNKNOWN",                   /* 87 */
-  "UNKNOWN",                   /* 88 */
-  "UNKNOWN",                   /* 89 */
-  "UNKNOWN",                   /* 8A */
-  "UNKNOWN",                   /* 8B */
-  "UNKNOWN",                   /* 8C */
-  "UNKNOWN",                   /* 8D */
-  "UNKNOWN",                   /* 8E */
-  "UNKNOWN",                   /* 8F */
-  "UNKNOWN",                   /* 90 */
-  "UNKNOWN",                   /* 91 */
-  "UNKNOWN",                   /* 92 */
-  "UNKNOWN",                   /* 93 */
-  "UNKNOWN",                   /* 94 */
-  "UNKNOWN",                   /* 95 */
-  "UNKNOWN",                   /* 96 */
-  "UNKNOWN",                   /* 97 */
-  "UNKNOWN",                   /* 98 */
-  "UNKNOWN",                   /* 99 */
-  "UNKNOWN",                   /* 9A */
-  "UNKNOWN",                   /* 9B */
-  "UNKNOWN",                   /* 9C */
-  "UNKNOWN",                   /* 9D */
-  "UNKNOWN",                   /* 9E */
-  "UNKNOWN",                   /* 9F */
-  "UNKNOWN",                   /* A0 */
-  "UNKNOWN",                   /* A1 */
-  "UNKNOWN",                   /* A2 */
-  "UNKNOWN",                   /* A3 */
-  "UNKNOWN",                   /* A4 */
-  "UNKNOWN",                   /* A5 */
-  "UNKNOWN",                   /* A6 */
-  "UNKNOWN",                   /* A7 */
-  "UNKNOWN",                   /* A8 */
-  "UNKNOWN",                   /* A9 */
-  "UNKNOWN",                   /* AA */
-  "UNKNOWN",                   /* AB */
-  "UNKNOWN",                   /* AC */
-  "UNKNOWN",                   /* AD */
-  "UNKNOWN",                   /* AE */
-  "UNKNOWN",                   /* AF */
-  "UNKNOWN",                   /* B0 */
-  "UNKNOWN",                   /* B1 */
-  "UNKNOWN",                   /* B2 */
-  "UNKNOWN",                   /* B3 */
-  "UNKNOWN",                   /* B4 */
-  "UNKNOWN",                   /* B5 */
-  "UNKNOWN",                   /* B6 */
-  "UNKNOWN",                   /* B7 */
-  "UNKNOWN",                   /* B8 */
-  "UNKNOWN",                   /* B9 */
-  "UNKNOWN",                   /* BA */
-  "UNKNOWN",                   /* BB */
-  "UNKNOWN",                   /* BC */
-  "UNKNOWN",                   /* BD */
-  "UNKNOWN",                   /* BE */
-  "UNKNOWN",                   /* BF */
-  "UNKNOWN",                   /* C0 */
-  "UNKNOWN",                   /* C1 */
-  "UNKNOWN",                   /* C2 */
-  "UNKNOWN",                   /* C3 */
-  "UNKNOWN",                   /* C4 */
-  "UNKNOWN",                   /* C5 */
-  "UNKNOWN",                   /* C6 */
-  "UNKNOWN",                   /* C7 */
-  "UNKNOWN",                   /* C8 */
-  "UNKNOWN",                   /* C9 */
-  "UNKNOWN",                   /* CA */
-  "UNKNOWN",                   /* CB */
-  "UNKNOWN",                   /* CC */
-  "UNKNOWN",                   /* CD */
-  "UNKNOWN",                   /* CE */
-  "UNKNOWN",                   /* CF */
-  "UNKNOWN",                   /* D0 */
-  "UNKNOWN",                   /* D1 */
-  "UNKNOWN",                   /* D2 */
-  "UNKNOWN",                   /* D3 */
-  "UNKNOWN",                   /* D4 */
-  "UNKNOWN",                   /* D5 */
-  "UNKNOWN",                   /* D6 */
-  "UNKNOWN",                   /* D7 */
-  "UNKNOWN",                   /* D8 */
-  "UNKNOWN",                   /* D9 */
-  "UNKNOWN",                   /* DA */
-  "UNKNOWN",                   /* DB */
-  "UNKNOWN",                   /* DC */
-  "UNKNOWN",                   /* DD */
-  "UNKNOWN",                   /* DE */
-  "UNKNOWN",                   /* DF */
-  "UNKNOWN",                   /* E0 */
-  "UNKNOWN",                   /* E1 */
-  "UNKNOWN",                   /* E2 */
-  "UNKNOWN",                   /* E3 */
-  "UNKNOWN",                   /* E4 */
-  "UNKNOWN",                   /* E5 */
-  "UNKNOWN",                   /* E6 */
-  "UNKNOWN",                   /* E7 */
-  "UNKNOWN",                   /* E8 */
-  "UNKNOWN",                   /* E9 */
-  "UNKNOWN",                   /* EA */
-  "UNKNOWN",                   /* EB */
-  "UNKNOWN",                   /* EC */
-  "UNKNOWN",                   /* ED */
-  "UNKNOWN",                   /* EE */
-  "UNKNOWN",                   /* EF */
-  "UNKNOWN",                   /* F0 */
-  "UNKNOWN",                   /* F1 */
-  "UNKNOWN",                   /* F2 */
-  "InformInfoRecord",          /* F3 */
-  "UNKNOWN"                    /* F4 - always highest value */
-};
-
-#define OSM_SA_ATTR_STR_UNKNOWN_VAL 0xF4
-
-
-/**********************************************************************
- **********************************************************************/
-const char*
-ib_get_sa_method_str(
-  IN uint8_t method )
-{
-  if (method & 0x80)
-  {
-    method = method & 0x7f;
-    if( method >= OSM_SA_METHOD_STR_UNKNOWN_VAL  )
-      method = OSM_SA_METHOD_STR_UNKNOWN_VAL;
-    /* it is a response - use the response table */
-    return( __ib_sa_resp_method_str[method] );
-  }
-  else
-  {
-    if( method >= OSM_SA_METHOD_STR_UNKNOWN_VAL  )
-      method = OSM_SA_METHOD_STR_UNKNOWN_VAL;
-    return( __ib_sa_method_str[method] );
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-const char*
-ib_get_sm_method_str(
-  IN uint8_t method )
-{
-  if (method & 0x80) method = (method & 0x0F) | 0x10;
-  if( method >= OSM_SM_METHOD_STR_UNKNOWN_VAL  )
-    method = OSM_SM_METHOD_STR_UNKNOWN_VAL;
-  return( __ib_sm_method_str[method] );
-}
-
-/**********************************************************************
- **********************************************************************/
-const char*
-ib_get_sm_attr_str(
-  IN ib_net16_t attr )
-{
-  uint16_t host_attr;
-  host_attr = cl_ntoh16( attr );
-
-  if( host_attr >= OSM_SM_ATTR_STR_UNKNOWN_VAL  )
-    host_attr = OSM_SM_ATTR_STR_UNKNOWN_VAL;
-
-  return( __ib_sm_attr_str[host_attr] );
-}
-
-/**********************************************************************
- **********************************************************************/
-const char*
-ib_get_sa_attr_str(
-  IN ib_net16_t attr )
-{
-  uint16_t host_attr;
-  host_attr = cl_ntoh16( attr );
-
-  if( host_attr >= OSM_SA_ATTR_STR_UNKNOWN_VAL  )
-    host_attr = OSM_SA_ATTR_STR_UNKNOWN_VAL;
-
-  return( __ib_sa_attr_str[host_attr] );
-}
-
-/**********************************************************************
- **********************************************************************/
-ib_api_status_t
-osm_dbg_do_line(
-  IN char** pp_local,
-  IN const uint32_t buf_size,
-  IN const char* const p_prefix_str,
-  IN const char* const p_new_str,
-  IN uint32_t* const p_total_len )
-{
-  char line[LINE_LENGTH];
-  uint32_t len;
-
-  sprintf( line, "%s%s", p_prefix_str, p_new_str );
-  len = (uint32_t) strlen( line );
-  *p_total_len += len;
-  if( *p_total_len + sizeof('\0') > buf_size )
-    return( IB_INSUFFICIENT_MEMORY );
-
-  strcpy( *pp_local, line );
-  *pp_local += len;
-  return( IB_SUCCESS );
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dbg_get_capabilities_str(
-  IN char* p_buf,
-  IN const uint32_t buf_size,
-  IN const char* const p_prefix_str,
-  IN const ib_port_info_t* const p_pi )
-{
-  uint32_t total_len = 0;
-  char *p_local = p_buf;
-
-  strcpy( p_local, "Capability Mask:\n" );
-  p_local += strlen( p_local );
-
-  if( p_pi->capability_mask & IB_PORT_CAP_RESV0 )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_RESV0\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_IS_SM )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_IS_SM\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_HAS_NOTICE )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_HAS_NOTICE\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_HAS_TRAP )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_HAS_TRAP\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_HAS_IPD )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_HAS_IPD\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_HAS_AUTO_MIG )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_HAS_AUTO_MIG\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_HAS_SL_MAP )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_HAS_SL_MAP\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_HAS_NV_MKEY )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_HAS_NV_MKEY\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_HAS_NV_PKEY )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_HAS_NV_PKEY\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_HAS_LED_INFO )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_HAS_LED_INFO\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_SM_DISAB )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_SM_DISAB\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_HAS_SYS_IMG_GUID )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_HAS_SYS_IMG_GUID\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_HAS_PKEY_SW_EXT_PORT_TRAP )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_PKEY_SW_EXT_PORT_TRAP\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_RESV13 )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_RESV13\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_RESV14 )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_RESV14\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_RESV15 )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_RESV15\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_HAS_COM_MGT )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_HAS_COM_MGT\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_HAS_SNMP )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_HAS_SNMP\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_REINIT )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_REINIT\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_HAS_DEV_MGT )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_HAS_DEV_MGT\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_HAS_VEND_CLS )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_HAS_VEND_CLS\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_HAS_DR_NTC )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_HAS_DR_NTC\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_HAS_CAP_NTC )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_HAS_CAP_NTC\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_HAS_BM )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_HAS_BM\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_HAS_LINK_RT_LATENCY )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_HAS_LINK_RT_LATENCY\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_HAS_CLIENT_REREG )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_HAS_CLIENT_REREG\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_RESV26 )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_RESV26\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_RESV27 )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_RESV27\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_RESV28)
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_RESV28\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_RESV29 )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_RESV29\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_RESV30 )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_RESV30\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-  if( p_pi->capability_mask & IB_PORT_CAP_RESV31 )
-  {
-    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,
-                         "IB_PORT_CAP_RESV31\n", &total_len ) != IB_SUCCESS )
-      return;
-  }
-
-  return;
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_port_info(
-  IN osm_log_t* const p_log,
-  IN const ib_net64_t node_guid,
-  IN const ib_net64_t port_guid,
-  IN const uint8_t port_num,
-  IN const ib_port_info_t* const p_pi,
-  IN const osm_log_level_t log_level )
-{
-  char buf[BUF_SIZE];
-
-  if( osm_log_is_active( p_log, log_level ) )
-  {
-    osm_log( p_log, log_level,
-             "PortInfo dump:\n"
-             "\t\t\t\tport number.............0x%X\n"
-             "\t\t\t\tnode_guid...............0x%016" PRIx64 "\n"
-             "\t\t\t\tport_guid...............0x%016" PRIx64 "\n"
-             "\t\t\t\tm_key...................0x%016" PRIx64 "\n"
-             "\t\t\t\tsubnet_prefix...........0x%016" PRIx64 "\n"
-             "\t\t\t\tbase_lid................0x%X\n"
-             "\t\t\t\tmaster_sm_base_lid......0x%X\n"
-             "\t\t\t\tcapability_mask.........0x%X\n"
-             "\t\t\t\tdiag_code...............0x%X\n"
-             "\t\t\t\tm_key_lease_period......0x%X\n"
-             "\t\t\t\tlocal_port_num..........0x%X\n"
-             "\t\t\t\tlink_width_enabled......0x%X\n"
-             "\t\t\t\tlink_width_supported....0x%X\n"
-             "\t\t\t\tlink_width_active.......0x%X\n"
-             "\t\t\t\tlink_speed_supported....0x%X\n"
-             "\t\t\t\tport_state..............%s\n"
-             "\t\t\t\tstate_info2.............0x%X\n"
-             "\t\t\t\tm_key_protect_bits......0x%X\n"
-             "\t\t\t\tlmc.....................0x%X\n"
-             "\t\t\t\tlink_speed..............0x%X\n"
-             "\t\t\t\tmtu_smsl................0x%X\n"
-             "\t\t\t\tvl_cap_init_type........0x%X\n"
-             "\t\t\t\tvl_high_limit...........0x%X\n"
-             "\t\t\t\tvl_arb_high_cap.........0x%X\n"
-             "\t\t\t\tvl_arb_low_cap..........0x%X\n"
-             "\t\t\t\tinit_rep_mtu_cap........0x%X\n"
-             "\t\t\t\tvl_stall_life...........0x%X\n"
-             "\t\t\t\tvl_enforce..............0x%X\n"
-             "\t\t\t\tm_key_violations........0x%X\n"
-             "\t\t\t\tp_key_violations........0x%X\n"
-             "\t\t\t\tq_key_violations........0x%X\n"
-             "\t\t\t\tguid_cap................0x%X\n"
-             "\t\t\t\tclient_reregister.......0x%X\n"
-             "\t\t\t\tsubnet_timeout..........0x%X\n"
-             "\t\t\t\tresp_time_value.........0x%X\n"
-             "\t\t\t\terror_threshold.........0x%X\n"
-             "",
-             port_num,
-             cl_ntoh64( node_guid ),
-             cl_ntoh64( port_guid ),
-             cl_ntoh64( p_pi->m_key ),
-             cl_ntoh64( p_pi->subnet_prefix ),
-             cl_ntoh16( p_pi->base_lid ),
-             cl_ntoh16( p_pi->master_sm_base_lid ),
-             cl_ntoh32( p_pi->capability_mask ),
-             cl_ntoh16( p_pi->diag_code ),
-             cl_ntoh16( p_pi->m_key_lease_period ),
-             p_pi->local_port_num,
-             p_pi->link_width_enabled,
-             p_pi->link_width_supported,
-             p_pi->link_width_active,
-             ib_port_info_get_link_speed_sup( p_pi ),
-             ib_get_port_state_str( ib_port_info_get_port_state( p_pi ) ),
-             p_pi->state_info2,
-             ib_port_info_get_mpb( p_pi ),
-             ib_port_info_get_lmc( p_pi ),
-             p_pi->link_speed,
-             p_pi->mtu_smsl,
-             p_pi->vl_cap,
-             p_pi->vl_high_limit,
-             p_pi->vl_arb_high_cap,
-             p_pi->vl_arb_low_cap,
-             p_pi->mtu_cap,
-             p_pi->vl_stall_life,
-             p_pi->vl_enforce,
-             cl_ntoh16( p_pi->m_key_violations ),
-             cl_ntoh16( p_pi->p_key_violations ),
-             cl_ntoh16( p_pi->q_key_violations ),
-             p_pi->guid_cap,
-             ib_port_info_get_client_rereg( p_pi ),
-             ib_port_info_get_timeout( p_pi ),
-             p_pi->resp_time_value,
-             p_pi->error_threshold
-             );
-
-    /*  show the capabilities mask */
-    osm_dbg_get_capabilities_str( buf, BUF_SIZE, "\t\t\t\t", p_pi );
-
-    osm_log( p_log, log_level, "%s", buf );
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_portinfo_record(
-  IN osm_log_t* const p_log,
-  IN const ib_portinfo_record_t* const p_pir,
-  IN const osm_log_level_t log_level )
-{
-  char buf[BUF_SIZE];
-  const ib_port_info_t * const p_pi = &p_pir->port_info;
-
-  if( osm_log_is_active( p_log, log_level ) )
-  {
-    osm_log( p_log, log_level,
-             "PortInfo Record dump:\n"
-             "\t\t\t\tRID\n"
-             "\t\t\t\tEndPortLid..............0x%X\n"
-             "\t\t\t\tPortNum.................0x%X\n"
-             "\t\t\t\tReserved................0x%X\n"
-             "\t\t\t\tPortInfo dump:\n"
-             "\t\t\t\tm_key...................0x%016" PRIx64 "\n"
-             "\t\t\t\tsubnet_prefix...........0x%016" PRIx64 "\n"
-             "\t\t\t\tbase_lid................0x%X\n"
-             "\t\t\t\tmaster_sm_base_lid......0x%X\n"
-             "\t\t\t\tcapability_mask.........0x%X\n"
-             "\t\t\t\tdiag_code...............0x%X\n"
-             "\t\t\t\tm_key_lease_period......0x%X\n"
-             "\t\t\t\tlocal_port_num..........0x%X\n"
-             "\t\t\t\tlink_width_enabled......0x%X\n"
-             "\t\t\t\tlink_width_supported....0x%X\n"
-             "\t\t\t\tlink_width_active.......0x%X\n"
-             "\t\t\t\tlink_speed_supported....0x%X\n"
-             "\t\t\t\tport_state..............%s\n"
-             "\t\t\t\tstate_info2.............0x%X\n"
-             "\t\t\t\tm_key_protect_bits......0x%X\n"
-             "\t\t\t\tlmc.....................0x%X\n"
-             "\t\t\t\tlink_speed..............0x%X\n"
-             "\t\t\t\tmtu_smsl................0x%X\n"
-             "\t\t\t\tvl_cap_init_type........0x%X\n"
-             "\t\t\t\tvl_high_limit...........0x%X\n"
-             "\t\t\t\tvl_arb_high_cap.........0x%X\n"
-             "\t\t\t\tvl_arb_low_cap..........0x%X\n"
-             "\t\t\t\tinit_rep_mtu_cap........0x%X\n"
-             "\t\t\t\tvl_stall_life...........0x%X\n"
-             "\t\t\t\tvl_enforce..............0x%X\n"
-             "\t\t\t\tm_key_violations........0x%X\n"
-             "\t\t\t\tp_key_violations........0x%X\n"
-             "\t\t\t\tq_key_violations........0x%X\n"
-             "\t\t\t\tguid_cap................0x%X\n"
-             "\t\t\t\tsubnet_timeout..........0x%X\n"
-             "\t\t\t\tresp_time_value.........0x%X\n"
-             "\t\t\t\terror_threshold.........0x%X\n"
-             "",
-             cl_ntoh16(p_pir->lid),
-             p_pir->port_num,
-             p_pir->resv,
-             cl_ntoh64( p_pi->m_key ),
-             cl_ntoh64( p_pi->subnet_prefix ),
-             cl_ntoh16( p_pi->base_lid ),
-             cl_ntoh16( p_pi->master_sm_base_lid ),
-             cl_ntoh32( p_pi->capability_mask ),
-             cl_ntoh16( p_pi->diag_code ),
-             cl_ntoh16( p_pi->m_key_lease_period ),
-             p_pi->local_port_num,
-             p_pi->link_width_enabled,
-             p_pi->link_width_supported,
-             p_pi->link_width_active,
-             ib_port_info_get_link_speed_sup( p_pi ),
-             ib_get_port_state_str( ib_port_info_get_port_state( p_pi ) ),
-             p_pi->state_info2,
-             ib_port_info_get_mpb( p_pi ),
-             ib_port_info_get_lmc( p_pi ),
-             p_pi->link_speed,
-             p_pi->mtu_smsl,
-             p_pi->vl_cap,
-             p_pi->vl_high_limit,
-             p_pi->vl_arb_high_cap,
-             p_pi->vl_arb_low_cap,
-             p_pi->mtu_cap,
-             p_pi->vl_stall_life,
-             p_pi->vl_enforce,
-             cl_ntoh16( p_pi->m_key_violations ),
-             cl_ntoh16( p_pi->p_key_violations ),
-             cl_ntoh16( p_pi->q_key_violations ),
-             p_pi->guid_cap,
-             ib_port_info_get_timeout( p_pi ),
-             p_pi->resp_time_value,
-             p_pi->error_threshold
-             );
-
-    /*  show the capabilities mask */
-    osm_dbg_get_capabilities_str( buf, BUF_SIZE, "\t\t\t\t", p_pi );
-
-    osm_log( p_log, log_level, "%s", buf );
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_guidinfo_record(
-  IN osm_log_t* const p_log,
-  IN const ib_guidinfo_record_t* const p_gir,
-  IN const osm_log_level_t log_level )
-{
-  const ib_guid_info_t * const p_gi = &p_gir->guid_info;
-
-  if( osm_log_is_active( p_log, log_level ) )
-  {
-    osm_log( p_log, log_level,
-             "GUIDInfo Record dump:\n"
-             "\t\t\t\tRID\n"
-             "\t\t\t\tLid.....................0x%X\n"
-             "\t\t\t\tBlockNum................0x%X\n"
-             "\t\t\t\tReserved................0x%X\n"
-             "\t\t\t\tGUIDInfo dump:\n"
-             "\t\t\t\tReserved................0x%X\n"
-             "\t\t\t\tGUID 0..................0x%016" PRIx64 "\n"
-             "\t\t\t\tGUID 1..................0x%016" PRIx64 "\n"
-             "\t\t\t\tGUID 2..................0x%016" PRIx64 "\n"
-             "\t\t\t\tGUID 3..................0x%016" PRIx64 "\n"
-             "\t\t\t\tGUID 4..................0x%016" PRIx64 "\n"
-             "\t\t\t\tGUID 5..................0x%016" PRIx64 "\n"
-             "\t\t\t\tGUID 6..................0x%016" PRIx64 "\n"
-             "\t\t\t\tGUID 7..................0x%016" PRIx64 "\n",
-             cl_ntoh16(p_gir->lid),
-             p_gir->block_num,
-             p_gir->resv,
-             cl_ntoh32(p_gir->reserved),
-             cl_ntoh64(p_gi->guid[0]),
-             cl_ntoh64(p_gi->guid[1]),
-             cl_ntoh64(p_gi->guid[2]),
-             cl_ntoh64(p_gi->guid[3]),
-             cl_ntoh64(p_gi->guid[4]),
-             cl_ntoh64(p_gi->guid[5]),
-             cl_ntoh64(p_gi->guid[6]),
-             cl_ntoh64(p_gi->guid[7])
-           );
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_node_info(
-  IN osm_log_t* const p_log,
-  IN const ib_node_info_t* const p_ni,
-  IN const osm_log_level_t log_level )
-{
-  if( osm_log_is_active( p_log, log_level ) )
-  {
-    osm_log( p_log, log_level,
-             "NodeInfo dump:\n"
-             "\t\t\t\tbase_version............0x%X\n"
-             "\t\t\t\tclass_version...........0x%X\n"
-             "\t\t\t\tnode_type...............%s\n"
-             "\t\t\t\tnum_ports...............0x%X\n"
-             "\t\t\t\tsys_guid................0x%016" PRIx64 "\n"
-             "\t\t\t\tnode_guid...............0x%016" PRIx64 "\n"
-             "\t\t\t\tport_guid...............0x%016" PRIx64 "\n"
-             "\t\t\t\tpartition_cap...........0x%X\n"
-             "\t\t\t\tdevice_id...............0x%X\n"
-             "\t\t\t\trevision................0x%X\n"
-             "\t\t\t\tport_num................0x%X\n"
-             "\t\t\t\tvendor_id...............0x%X\n"
-             "",
-             p_ni->base_version,
-             p_ni->class_version,
-             ib_get_node_type_str( p_ni->node_type ),
-             p_ni->num_ports,
-             cl_ntoh64( p_ni->sys_guid ),
-             cl_ntoh64( p_ni->node_guid ),
-             cl_ntoh64( p_ni->port_guid ),
-             cl_ntoh16( p_ni->partition_cap ),
-             cl_ntoh16( p_ni->device_id ),
-             cl_ntoh32( p_ni->revision ),
-             ib_node_info_get_local_port_num( p_ni ),
-             cl_ntoh32( ib_node_info_get_vendor_id( p_ni ) )
-             );
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_node_record(
-  IN osm_log_t* const p_log,
-  IN const ib_node_record_t* const p_nr,
-  IN const osm_log_level_t log_level )
-{
-  const ib_node_info_t * const p_ni = &p_nr->node_info;
-
-  if( osm_log_is_active( p_log, log_level ) )
-  {
-    char desc[sizeof(p_nr->node_desc.description) + 1];
-
-    memcpy(desc, p_nr->node_desc.description,
-           sizeof(p_nr->node_desc.description));
-    desc[sizeof(desc) - 1] = '\0';
-    osm_log( p_log, log_level,
-             "Node Record dump:\n"
-             "\t\t\t\tRID\n"
-             "\t\t\t\tLid.....................0x%X\n"
-             "\t\t\t\tReserved................0x%X\n"
-             "\t\t\t\tNodeInfo dump:\n"
-             "\t\t\t\tbase_version............0x%X\n"
-             "\t\t\t\tclass_version...........0x%X\n"
-             "\t\t\t\tnode_type...............%s\n"
-             "\t\t\t\tnum_ports...............0x%X\n"
-             "\t\t\t\tsys_guid................0x%016" PRIx64 "\n"
-             "\t\t\t\tnode_guid...............0x%016" PRIx64 "\n"
-             "\t\t\t\tport_guid...............0x%016" PRIx64 "\n"
-             "\t\t\t\tpartition_cap...........0x%X\n"
-             "\t\t\t\tdevice_id...............0x%X\n"
-             "\t\t\t\trevision................0x%X\n"
-             "\t\t\t\tport_num................0x%X\n"
-             "\t\t\t\tvendor_id...............0x%X\n"
-             "\t\t\t\tNodeDescription\n"
-             "\t\t\t\t%s\n"
-             "",
-             cl_ntoh16(p_nr->lid),
-             cl_ntoh16(p_nr->resv),
-             p_ni->base_version,
-             p_ni->class_version,
-             ib_get_node_type_str( p_ni->node_type ),
-             p_ni->num_ports,
-             cl_ntoh64( p_ni->sys_guid ),
-             cl_ntoh64( p_ni->node_guid ),
-             cl_ntoh64( p_ni->port_guid ),
-             cl_ntoh16( p_ni->partition_cap ),
-             cl_ntoh16( p_ni->device_id ),
-             cl_ntoh32( p_ni->revision ),
-             ib_node_info_get_local_port_num( p_ni ),
-             cl_ntoh32( ib_node_info_get_vendor_id( p_ni )),
-             desc
-             );
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_path_record(
-  IN osm_log_t* const p_log,
-  IN const ib_path_rec_t* const p_pr,
-  IN const osm_log_level_t log_level )
-{
-  if( osm_log_is_active( p_log, log_level ) )
-  {
-    osm_log( p_log, log_level,
-             "PathRecord dump:\n"
-             "\t\t\t\tresv0...................0x%016" PRIx64 "\n"
-             "\t\t\t\tdgid....................0x%016" PRIx64 " : "
-             "0x%016" PRIx64 "\n"
-             "\t\t\t\tsgid....................0x%016" PRIx64 " : "
-             "0x%016" PRIx64 "\n"
-             "\t\t\t\tdlid....................0x%X\n"
-             "\t\t\t\tslid....................0x%X\n"
-             "\t\t\t\thop_flow_raw............0x%X\n"
-             "\t\t\t\ttclass..................0x%X\n"
-             "\t\t\t\tnum_path_revers.........0x%X\n"
-             "\t\t\t\tpkey....................0x%X\n"
-             "\t\t\t\tsl......................0x%X\n"
-             "\t\t\t\tmtu.....................0x%X\n"
-             "\t\t\t\trate....................0x%X\n"
-             "\t\t\t\tpkt_life................0x%X\n"
-             "\t\t\t\tpreference..............0x%X\n"
-             "\t\t\t\tresv2...................0x%X\n"
-             "\t\t\t\tresv3...................0x%X\n"
-             "",
-             *(uint64_t*)p_pr->resv0,
-             cl_ntoh64( p_pr->dgid.unicast.prefix ),
-             cl_ntoh64( p_pr->dgid.unicast.interface_id ),
-             cl_ntoh64( p_pr->sgid.unicast.prefix ),
-             cl_ntoh64( p_pr->sgid.unicast.interface_id ),
-             cl_ntoh16( p_pr->dlid ),
-             cl_ntoh16( p_pr->slid ),
-             cl_ntoh32( p_pr->hop_flow_raw ),
-             p_pr->tclass,
-             p_pr->num_path,
-             cl_ntoh16( p_pr->pkey ),
-             cl_ntoh16( p_pr->sl ),
-             p_pr->mtu,
-             p_pr->rate,
-             p_pr->pkt_life,
-             p_pr->preference,
-             *(uint32_t*)&p_pr->resv2,
-             *((uint16_t*)&p_pr->resv2 + 2)
-             );
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_multipath_record(
-  IN osm_log_t* const p_log,
-  IN const ib_multipath_rec_t* const p_mpr,
-  IN const osm_log_level_t log_level )
-{
-  int i;
-  char buf_line[1024];
-  ib_gid_t const *p_gid;
-
-  if( osm_log_is_active( p_log, log_level ) )
-  {
-    memset(buf_line, 0, sizeof(buf_line));
-    p_gid = p_mpr->gids;
-    if ( p_mpr->sgid_count )
-    {
-      for (i = 0; i < p_mpr->sgid_count; i++)
-      {
-        sprintf( buf_line, "%s\t\t\t\tsgid%02d.................."
-                 "0x%016" PRIx64 " : 0x%016" PRIx64 "\n",
-                 buf_line, i + 1, cl_ntoh64( p_gid->unicast.prefix ),
-                 cl_ntoh64( p_gid->unicast.interface_id ) );
-        p_gid++;
-      }
-    }
-    if ( p_mpr->dgid_count )
-    {
-      for (i = 0; i < p_mpr->dgid_count; i++)
-      {
-        sprintf( buf_line, "%s\t\t\t\tdgid%02d.................."
-                 "0x%016" PRIx64 " : 0x%016" PRIx64 "\n",
-                 buf_line, i + 1, cl_ntoh64( p_gid->unicast.prefix ),
-                 cl_ntoh64( p_gid->unicast.interface_id ) );
-        p_gid++;
-      }
-    }
-    osm_log( p_log, log_level,
-             "MultiPath Record dump:\n"
-             "\t\t\t\thop_flow_raw............0x%X\n"
-             "\t\t\t\ttclass..................0x%X\n"
-             "\t\t\t\tnum_path_revers.........0x%X\n"
-             "\t\t\t\tpkey....................0x%X\n"
-             "\t\t\t\tresv0...................0x%X\n"
-             "\t\t\t\tsl......................0x%X\n"
-             "\t\t\t\tmtu.....................0x%X\n"
-             "\t\t\t\trate....................0x%X\n"
-             "\t\t\t\tpkt_life................0x%X\n"
-             "\t\t\t\tresv1...................0x%X\n"
-             "\t\t\t\tindependence............0x%X\n"
-             "\t\t\t\tsgid_count..............0x%X\n"
-             "\t\t\t\tdgid_count..............0x%X\n"
-             "%s\n"
-             "",
-             cl_ntoh32( p_mpr->hop_flow_raw ),
-             p_mpr->tclass,
-             p_mpr->num_path,
-             cl_ntoh16( p_mpr->pkey ),
-             p_mpr->resv0,
-             cl_ntoh16( p_mpr->sl ),
-             p_mpr->mtu,
-             p_mpr->rate,
-             p_mpr->pkt_life,
-             p_mpr->resv1,
-             p_mpr->independence,
-             p_mpr->sgid_count,
-             p_mpr->dgid_count,
-             buf_line
-             );
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_mc_record(
-  IN osm_log_t* const p_log,
-  IN const ib_member_rec_t* const p_mcmr,
-  IN const osm_log_level_t log_level )
-{
-
-  if( osm_log_is_active( p_log, log_level ) )
-  {
-    osm_log( p_log, log_level,
-             "MCMember Record dump:\n"
-             "\t\t\t\tMGID....................0x%016" PRIx64 " : "
-             "0x%016" PRIx64 "\n"
-             "\t\t\t\tPortGid.................0x%016" PRIx64 " : "
-             "0x%016" PRIx64 "\n"
-             "\t\t\t\tqkey....................0x%X\n"
-             "\t\t\t\tmlid....................0x%X\n"
-             "\t\t\t\tmtu.....................0x%X\n"
-             "\t\t\t\tTClass..................0x%X\n"
-             "\t\t\t\tpkey....................0x%X\n"
-             "\t\t\t\trate....................0x%X\n"
-             "\t\t\t\tpkt_life................0x%X\n"
-             "\t\t\t\tSLFlowLabelHopLimit.....0x%X\n"
-             "\t\t\t\tScopeState..............0x%X\n"
-             "\t\t\t\tProxyJoin...............0x%X\n"
-             "",
-             cl_ntoh64( p_mcmr->mgid.unicast.prefix ),
-             cl_ntoh64( p_mcmr->mgid.unicast.interface_id ),
-             cl_ntoh64( p_mcmr->port_gid.unicast.prefix ),
-             cl_ntoh64( p_mcmr->port_gid.unicast.interface_id ),
-             cl_ntoh32( p_mcmr->qkey ),
-             cl_ntoh16( p_mcmr->mlid ),
-             p_mcmr->mtu,
-             p_mcmr->tclass,
-             cl_ntoh16( p_mcmr->pkey ),
-             p_mcmr->rate,
-             p_mcmr->pkt_life,
-             cl_ntoh32( p_mcmr->sl_flow_hop ),
-             p_mcmr->scope_state,
-             p_mcmr->proxy_join
-             );
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_service_record(
-  IN osm_log_t* const p_log,
-  IN const ib_service_record_t* const p_sr,
-  IN const osm_log_level_t log_level )
-{
-  char buf_service_key[35];
-  char buf_service_name[65];
-
-  if( osm_log_is_active( p_log, log_level ) )
-  {
-    sprintf(buf_service_key,
-            "0x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
-            p_sr->service_key[0],
-            p_sr->service_key[1],
-            p_sr->service_key[2],
-            p_sr->service_key[3],
-            p_sr->service_key[4],
-            p_sr->service_key[5],
-            p_sr->service_key[6],
-            p_sr->service_key[7],
-            p_sr->service_key[8],
-            p_sr->service_key[9],
-            p_sr->service_key[10],
-            p_sr->service_key[11],
-            p_sr->service_key[12],
-            p_sr->service_key[13],
-            p_sr->service_key[14],
-            p_sr->service_key[15]);
-    strncpy(buf_service_name, (char *)p_sr->service_name, 64);
-    buf_service_name[64] = '\0';
-
-    osm_log( p_log, log_level,
-             "Service Record dump:\n"
-             "\t\t\t\tServiceID...............0x%016" PRIx64 "\n"
-             "\t\t\t\tServiceGID..............0x%016" PRIx64 " : "
-             "0x%016" PRIx64 "\n"
-             "\t\t\t\tServiceP_Key............0x%X\n"
-             "\t\t\t\tServiceLease............0x%X\n"
-             "\t\t\t\tServiceKey..............%s\n"
-             "\t\t\t\tServiceName.............%s\n"
-             "\t\t\t\tServiceData8.1..........0x%X\n"
-             "\t\t\t\tServiceData8.2..........0x%X\n"
-             "\t\t\t\tServiceData8.3..........0x%X\n"
-             "\t\t\t\tServiceData8.4..........0x%X\n"
-             "\t\t\t\tServiceData8.5..........0x%X\n"
-             "\t\t\t\tServiceData8.6..........0x%X\n"
-             "\t\t\t\tServiceData8.7..........0x%X\n"
-             "\t\t\t\tServiceData8.8..........0x%X\n"
-             "\t\t\t\tServiceData8.9..........0x%X\n"
-             "\t\t\t\tServiceData8.10.........0x%X\n"
-             "\t\t\t\tServiceData8.11.........0x%X\n"
-             "\t\t\t\tServiceData8.12.........0x%X\n"
-             "\t\t\t\tServiceData8.13.........0x%X\n"
-             "\t\t\t\tServiceData8.14.........0x%X\n"
-             "\t\t\t\tServiceData8.15.........0x%X\n"
-             "\t\t\t\tServiceData8.16.........0x%X\n"
-             "\t\t\t\tServiceData16.1.........0x%X\n"
-             "\t\t\t\tServiceData16.2.........0x%X\n"
-             "\t\t\t\tServiceData16.3.........0x%X\n"
-             "\t\t\t\tServiceData16.4.........0x%X\n"
-             "\t\t\t\tServiceData16.5.........0x%X\n"
-             "\t\t\t\tServiceData16.6.........0x%X\n"
-             "\t\t\t\tServiceData16.7.........0x%X\n"
-             "\t\t\t\tServiceData16.8.........0x%X\n"
-             "\t\t\t\tServiceData32.1.........0x%X\n"
-             "\t\t\t\tServiceData32.2.........0x%X\n"
-             "\t\t\t\tServiceData32.3.........0x%X\n"
-             "\t\t\t\tServiceData32.4.........0x%X\n"
-             "\t\t\t\tServiceData64.1.........0x%016" PRIx64 "\n"
-             "\t\t\t\tServiceData64.2.........0x%016" PRIx64 "\n"
-             "",
-             cl_ntoh64( p_sr->service_id ),
-             cl_ntoh64( p_sr->service_gid.unicast.prefix ),
-             cl_ntoh64( p_sr->service_gid.unicast.interface_id ),
-             cl_ntoh16( p_sr->service_pkey ),
-             cl_ntoh32( p_sr->service_lease ),
-             buf_service_key,
-             buf_service_name,
-             p_sr->service_data8[0], p_sr->service_data8[1],
-             p_sr->service_data8[2], p_sr->service_data8[3],
-             p_sr->service_data8[4], p_sr->service_data8[5],
-             p_sr->service_data8[6], p_sr->service_data8[7],
-             p_sr->service_data8[8], p_sr->service_data8[9],
-             p_sr->service_data8[10], p_sr->service_data8[11],
-             p_sr->service_data8[12], p_sr->service_data8[13],
-             p_sr->service_data8[14], p_sr->service_data8[15],
-             cl_ntoh16(p_sr->service_data16[0]),
-             cl_ntoh16(p_sr->service_data16[1]),
-             cl_ntoh16(p_sr->service_data16[2]),
-             cl_ntoh16(p_sr->service_data16[3]),
-             cl_ntoh16(p_sr->service_data16[4]),
-             cl_ntoh16(p_sr->service_data16[5]),
-             cl_ntoh16(p_sr->service_data16[6]),
-             cl_ntoh16(p_sr->service_data16[7]),
-             cl_ntoh32(p_sr->service_data32[0]),
-             cl_ntoh32(p_sr->service_data32[1]),
-             cl_ntoh32(p_sr->service_data32[2]),
-             cl_ntoh32(p_sr->service_data32[3]),
-             cl_ntoh64(p_sr->service_data64[0]),
-             cl_ntoh64(p_sr->service_data64[1])
-             );
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_inform_info(
-  IN osm_log_t* const p_log,
-  IN const ib_inform_info_t* const p_ii,
-  IN const osm_log_level_t log_level )
-{
-  uint32_t qpn;
-  uint8_t  resp_time_val;
-
-  if( osm_log_is_active( p_log, log_level ) )
-  {
-
-   ib_inform_info_get_qpn_resp_time(p_ii->g_or_v.generic.qpn_resp_time_val,
-                                    &qpn, &resp_time_val);
-
-   if (p_ii->is_generic)
-    {
-      osm_log( p_log, log_level,
-               "InformInfo dump:\n"
-               "\t\t\t\tgid.....................0x%016" PRIx64 " : 0x%016" PRIx64 "\n"
-               "\t\t\t\tlid_range_begin.........0x%X\n"
-               "\t\t\t\tlid_range_end...........0x%X\n"
-               "\t\t\t\tis_generic..............0x%X\n"
-               "\t\t\t\tsubscribe...............0x%X\n"
-               "\t\t\t\ttrap_type...............0x%X\n"
-               "\t\t\t\ttrap_num................%u\n"
-               "\t\t\t\tqpn.....................0x%06X\n"
-               "\t\t\t\tresp_time_val...........0x%X\n"
-               "\t\t\t\tnode_type...............0x%06X\n"
-               "",
-               cl_ntoh64( p_ii->gid.unicast.prefix ),
-               cl_ntoh64( p_ii->gid.unicast.interface_id ),
-               cl_ntoh16( p_ii->lid_range_begin ),
-               cl_ntoh16( p_ii->lid_range_end ),
-               p_ii->is_generic,
-               p_ii->subscribe,
-               cl_ntoh16( p_ii->trap_type ),
-               cl_ntoh16( p_ii->g_or_v.generic.trap_num ),
-               cl_ntoh32(qpn),
-               resp_time_val,
-               cl_ntoh32(ib_inform_info_get_node_type( p_ii ))
-               );
-    }
-    else
-    {
-      osm_log( p_log, log_level,
-               "InformInfo dump:\n"
-               "\t\t\t\tgid.....................0x%016" PRIx64 " : 0x%016" PRIx64 "\n"
-               "\t\t\t\tlid_range_begin.........0x%X\n"
-               "\t\t\t\tlid_range_end...........0x%X\n"
-               "\t\t\t\tis_generic..............0x%X\n"
-               "\t\t\t\tsubscribe...............0x%X\n"
-               "\t\t\t\ttrap_type...............0x%X\n"
-               "\t\t\t\tdev_id..................0x%X\n"
-               "\t\t\t\tqpn.....................0x%06X\n"
-               "\t\t\t\tresp_time_val...........0x%X\n"
-               "\t\t\t\tvendor_id...............0x%06X\n"
-               "",
-               cl_ntoh64( p_ii->gid.unicast.prefix ),
-               cl_ntoh64( p_ii->gid.unicast.interface_id ),
-               cl_ntoh16( p_ii->lid_range_begin ),
-               cl_ntoh16( p_ii->lid_range_end ),
-               p_ii->is_generic,
-               p_ii->subscribe,
-               cl_ntoh16( p_ii->trap_type ),
-               cl_ntoh16( p_ii->g_or_v.vend.dev_id ),
-               cl_ntoh32(qpn),
-               resp_time_val,
-               cl_ntoh32(ib_inform_info_get_node_type( p_ii ))
-               );
-    }
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_inform_info_record(
-  IN osm_log_t* const p_log,
-  IN const ib_inform_info_record_t* const p_iir,
-  IN const osm_log_level_t log_level )
-{
-  uint32_t qpn;
-  uint8_t  resp_time_val;
-
-  ib_inform_info_get_qpn_resp_time(p_iir->inform_info.g_or_v.generic.qpn_resp_time_val,
-                                   &qpn, &resp_time_val);
-
-  if( osm_log_is_active( p_log, log_level ) )
-  {
-
-    ib_inform_info_get_qpn_resp_time(p_iir->inform_info.g_or_v.generic.qpn_resp_time_val,
-                                     &qpn, &resp_time_val);
-
-    if (p_iir->inform_info.is_generic)
-    {
-      osm_log( p_log, log_level,
-               "InformInfo Record dump:\n"
-               "\t\t\t\tRID\n"
-               "\t\t\t\tSubscriberGID...........0x%016" PRIx64 " : "
-               "0x%016" PRIx64 "\n"
-               "\t\t\t\tSubscriberEnum..........0x%X\n"
-               "\t\t\t\tInformInfo dump:\n"
-               "\t\t\t\tgid.....................0x%016" PRIx64 " : 0x%016" PRIx64 "\n"
-               "\t\t\t\tlid_range_begin.........0x%X\n"
-               "\t\t\t\tlid_range_end...........0x%X\n"
-               "\t\t\t\tis_generic..............0x%X\n"
-               "\t\t\t\tsubscribe...............0x%X\n"
-               "\t\t\t\ttrap_type...............0x%X\n"
-               "\t\t\t\ttrap_num................%u\n"
-               "\t\t\t\tqpn.....................0x%06X\n"
-               "\t\t\t\tresp_time_val...........0x%X\n"
-               "\t\t\t\tnode_type...............0x%06X\n"
-               "",
-               cl_ntoh64( p_iir->subscriber_gid.unicast.prefix ),
-               cl_ntoh64( p_iir->subscriber_gid.unicast.interface_id ),
-               cl_ntoh16( p_iir->subscriber_enum ),
-               cl_ntoh64( p_iir->inform_info.gid.unicast.prefix ),
-               cl_ntoh64( p_iir->inform_info.gid.unicast.interface_id ),
-               cl_ntoh16( p_iir->inform_info.lid_range_begin ),
-               cl_ntoh16( p_iir->inform_info.lid_range_end ),
-               p_iir->inform_info.is_generic,
-               p_iir->inform_info.subscribe,
-               cl_ntoh16( p_iir->inform_info.trap_type ),
-               cl_ntoh16( p_iir->inform_info.g_or_v.generic.trap_num ),
-               cl_ntoh32(qpn),
-               resp_time_val,
-               cl_ntoh32(ib_inform_info_get_node_type( &p_iir->inform_info ))
-               );
-    }
-    else
-    {
-      osm_log( p_log, log_level,
-               "InformInfo Record dump:\n"
-               "\t\t\t\tRID\n"
-               "\t\t\t\tSubscriberGID...........0x%016" PRIx64 " : "
-               "0x%016" PRIx64 "\n"
-               "\t\t\t\tSubscriberEnum..........0x%X\n"
-               "\t\t\t\tInformInfo dump:\n"
-               "\t\t\t\tgid.....................0x%016" PRIx64 " : 0x%016" PRIx64 "\n"
-               "\t\t\t\tlid_range_begin.........0x%X\n"
-               "\t\t\t\tlid_range_end...........0x%X\n"
-               "\t\t\t\tis_generic..............0x%X\n"
-               "\t\t\t\tsubscribe...............0x%X\n"
-               "\t\t\t\ttrap_type...............0x%X\n"
-               "\t\t\t\tdev_id..................0x%X\n"
-               "\t\t\t\tqpn.....................0x%06X\n"
-               "\t\t\t\tresp_time_val...........0x%X\n"
-               "\t\t\t\tvendor_id...............0x%06X\n"
-               "",
-               cl_ntoh64( p_iir->subscriber_gid.unicast.prefix ),
-               cl_ntoh64( p_iir->subscriber_gid.unicast.interface_id ),
-               cl_ntoh16( p_iir->subscriber_enum ),
-               cl_ntoh64( p_iir->inform_info.gid.unicast.prefix ),
-               cl_ntoh64( p_iir->inform_info.gid.unicast.interface_id ),
-               cl_ntoh16( p_iir->inform_info.lid_range_begin ),
-               cl_ntoh16( p_iir->inform_info.lid_range_end ),
-               p_iir->inform_info.is_generic,
-               p_iir->inform_info.subscribe,
-               cl_ntoh16( p_iir->inform_info.trap_type ),
-               cl_ntoh16( p_iir->inform_info.g_or_v.vend.dev_id ),
-               cl_ntoh32(qpn),
-               resp_time_val,
-               cl_ntoh32(ib_inform_info_get_node_type( &p_iir->inform_info ))
-               );
-    }
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_link_record(
-  IN osm_log_t*            const p_log,
-  IN const ib_link_record_t*  const p_lr,
-  IN const osm_log_level_t log_level )
-{
-  if( osm_log_is_active( p_log, log_level ) )
-  {
-    osm_log( p_log, log_level,
-             "Link Record dump:\n"
-             "\t\t\t\tfrom_lid................0x%X\n"
-             "\t\t\t\tfrom_port_num...........0x%X\n"
-             "\t\t\t\tto_port_num.............0x%X\n"
-             "\t\t\t\tto_lid..................0x%X\n"
-             "",
-             cl_ntoh16( p_lr->from_lid ),
-             p_lr->from_port_num,
-             p_lr->to_port_num,
-             cl_ntoh16( p_lr->to_lid )
-             );
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_switch_info(
-  IN osm_log_t* const p_log,
-  IN const ib_switch_info_t* const p_si,
-  IN const osm_log_level_t log_level )
-{
-  if( osm_log_is_active( p_log, log_level ) )
-  {
-    osm_log( p_log, OSM_LOG_VERBOSE,
-             "SwitchInfo dump:\n"
-             "\t\t\t\tlin_cap.................0x%X\n"
-             "\t\t\t\trand_cap................0x%X\n"
-             "\t\t\t\tmcast_cap...............0x%X\n"
-             "\t\t\t\tlin_top.................0x%X\n"
-             "\t\t\t\tdef_port................0x%X\n"
-             "\t\t\t\tdef_mcast_pri_port......0x%X\n"
-             "\t\t\t\tdef_mcast_not_port......0x%X\n"
-             "\t\t\t\tlife_state..............0x%X\n"
-             "\t\t\t\tlids_per_port...........0x%X\n"
-             "\t\t\t\tpartition_enf_cap.......0x%X\n"
-             "\t\t\t\tflags...................0x%X\n"
-             "",
-             cl_ntoh16( p_si->lin_cap ),
-             cl_ntoh16( p_si->rand_cap ),
-             cl_ntoh16( p_si->mcast_cap ),
-             cl_ntoh16( p_si->lin_top ),
-             p_si->def_port,
-             p_si->def_mcast_pri_port,
-             p_si->def_mcast_not_port,
-             p_si->life_state,
-             cl_ntoh16( p_si->lids_per_port ),
-             cl_ntoh16( p_si->enforce_cap ),
-             p_si->flags
-             );
-  }
-}
-
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_switch_info_record(
-  IN osm_log_t* const p_log,
-  IN const ib_switch_info_record_t* const p_sir,
-  IN const osm_log_level_t log_level )
-{
-  if( osm_log_is_active( p_log, log_level ) )
-  {
-    osm_log( p_log, log_level,
-             "SwitchInfo Record dump:\n"
-             "\t\t\t\tRID\n"
-             "\t\t\t\tlid.....................0x%X\n"
-             "\t\t\t\tSwitchInfo dump:\n"
-             "\t\t\t\tlin_cap.................0x%X\n"
-             "\t\t\t\trand_cap................0x%X\n"
-             "\t\t\t\tmcast_cap...............0x%X\n"
-             "\t\t\t\tlin_top.................0x%X\n"
-             "\t\t\t\tdef_port................0x%X\n"
-             "\t\t\t\tdef_mcast_pri_port......0x%X\n"
-             "\t\t\t\tdef_mcast_not_port......0x%X\n"
-             "\t\t\t\tlife_state..............0x%X\n"
-             "\t\t\t\tlids_per_port...........0x%X\n"
-             "\t\t\t\tpartition_enf_cap.......0x%X\n"
-             "\t\t\t\tflags...................0x%X\n"
-             "",
-             cl_ntoh16( p_sir->lid ),
-             cl_ntoh16( p_sir->switch_info.lin_cap ),
-             cl_ntoh16( p_sir->switch_info.rand_cap ),
-             cl_ntoh16( p_sir->switch_info.mcast_cap ),
-             cl_ntoh16( p_sir->switch_info.lin_top ),
-             p_sir->switch_info.def_port,
-             p_sir->switch_info.def_mcast_pri_port,
-             p_sir->switch_info.def_mcast_not_port,
-             p_sir->switch_info.life_state,
-             cl_ntoh16( p_sir->switch_info.lids_per_port ),
-             cl_ntoh16( p_sir->switch_info.enforce_cap ),
-             p_sir->switch_info.flags
-           );
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_pkey_block(
-  IN osm_log_t* const p_log,
-  IN uint64_t port_guid,
-  IN uint16_t block_num,
-  IN uint8_t port_num,
-  IN const ib_pkey_table_t* const p_pkey_tbl,
-  IN const osm_log_level_t log_level )
-{
-  int i;
-  char buf_line[1024];
-
-  if( osm_log_is_active( p_log, log_level ) )
-  {
-    buf_line[0] = '\0';
-    for (i = 0; i < 32; i++)
-      sprintf( buf_line,"%s 0x%04x |",
-               buf_line, cl_ntoh16(p_pkey_tbl->pkey_entry[i]));
-
-    osm_log( p_log, log_level,
-             "P_Key table dump:\n"
-             "\t\t\tport_guid...........0x%016" PRIx64 "\n"
-             "\t\t\tblock_num...........0x%X\n"
-             "\t\t\tport_num............0x%X\n\tP_Key Table: %s\n",
-             cl_ntoh64( port_guid ),
-             block_num,
-             port_num,
-             buf_line
-             );
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_slvl_map_table(
-  IN osm_log_t* const p_log,
-  IN uint64_t port_guid,
-  IN uint8_t in_port_num,
-  IN uint8_t out_port_num,
-  IN const ib_slvl_table_t* const p_slvl_tbl,
-  IN const osm_log_level_t log_level )
-{
-  uint8_t i;
-  char buf_line1[1024];
-  char buf_line2[1024];
-
-  if( osm_log_is_active( p_log, log_level ) )
-  {
-    buf_line1[0] = '\0';
-    buf_line2[0] = '\0';
-    for (i = 0; i < 16; i++)
-      sprintf( buf_line1,"%s %-2u |", buf_line1, i);
-    for (i = 0; i < 16; i++)
-      sprintf( buf_line2,"%s0x%01X |",
-               buf_line2, ib_slvl_table_get(p_slvl_tbl, i));
-    osm_log( p_log, log_level,
-             "SLtoVL dump:\n"
-             "\t\t\tport_guid............0x%016" PRIx64 "\n"
-             "\t\t\tin_port_num..........0x%X\n"
-             "\t\t\tout_port_num.........0x%X\n\tSL: | %s\n\tVL: | %s\n",
-             cl_ntoh64( port_guid ),
-             in_port_num,
-             out_port_num,
-             buf_line1, buf_line2
-             );
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_vl_arb_table(
-  IN osm_log_t* const p_log,
-  IN uint64_t port_guid,
-  IN uint8_t block_num,
-  IN uint8_t port_num,
-  IN const ib_vl_arb_table_t* const p_vla_tbl,
-  IN const osm_log_level_t log_level )
-{
-  int i;
-  char buf_line1[1024];
-  char buf_line2[1024];
-
-  if( osm_log_is_active( p_log, log_level ) )
-  {
-    buf_line1[0] = '\0';
-    buf_line2[0] = '\0';
-    for (i = 0; i < 32; i++)
-      sprintf( buf_line1,"%s 0x%01X |",
-               buf_line1, p_vla_tbl->vl_entry[i].vl);
-    for (i = 0; i < 32; i++)
-      sprintf( buf_line2,"%s 0x%01X |",
-               buf_line2, p_vla_tbl->vl_entry[i].weight);
-    osm_log( p_log, log_level,
-             "VlArb dump:\n"
-             "\t\t\tport_guid...........0x%016" PRIx64 "\n"
-             "\t\t\tblock_num...........0x%X\n"
-             "\t\t\tport_num............0x%X\n\tVL    : | %s\n\tWEIGHT:| %s\n",
-             cl_ntoh64( port_guid ),
-             block_num,
-             port_num,
-             buf_line1, buf_line2
-             );
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_sm_info(
-  IN osm_log_t* const p_log,
-  IN const ib_sm_info_t* const p_smi,
-  IN const osm_log_level_t log_level )
-{
-  if( osm_log_is_active( p_log, log_level ) )
-  {
-    osm_log( p_log, OSM_LOG_DEBUG,
-             "SMInfo dump:\n"
-             "\t\t\t\tguid....................0x%016" PRIx64 "\n"
-             "\t\t\t\tsm_key..................0x%016" PRIx64 "\n"
-             "\t\t\t\tact_count...............%u\n"
-             "\t\t\t\tpriority................%u\n"
-             "\t\t\t\tsm_state................%u\n"
-             "",
-             cl_ntoh64( p_smi->guid ),
-             cl_ntoh64( p_smi->sm_key ),
-             cl_ntoh32( p_smi->act_count ),
-             ib_sminfo_get_priority( p_smi ),
-             ib_sminfo_get_state( p_smi )
-             );
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_sm_info_record(
-  IN osm_log_t* const p_log,
-  IN const ib_sminfo_record_t* const p_smir,
-  IN const osm_log_level_t log_level )
-{
-  if( osm_log_is_active( p_log, log_level ) )
-  {
-    osm_log( p_log, OSM_LOG_DEBUG,
-             "SMInfo Record dump:\n"
-             "\t\t\t\tRID\n"
-             "\t\t\t\tLid.....................0x%X\n"
-             "\t\t\t\tReserved................0x%X\n"
-             "\t\t\t\tSMInfo dump:\n"
-             "\t\t\t\tguid....................0x%016" PRIx64 "\n"
-             "\t\t\t\tsm_key..................0x%016" PRIx64 "\n"
-             "\t\t\t\tact_count...............%u\n"
-             "\t\t\t\tpriority................%u\n"
-             "\t\t\t\tsm_state................%u\n"
-             "",
-             cl_ntoh16( p_smir->lid ),
-             cl_ntoh16( p_smir->resv0 ),
-             cl_ntoh64( p_smir->sm_info.guid ),
-             cl_ntoh64( p_smir->sm_info.sm_key ),
-             cl_ntoh32( p_smir->sm_info.act_count ),
-             ib_sminfo_get_priority( &p_smir->sm_info ),
-             ib_sminfo_get_state( &p_smir->sm_info )
-             );
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_notice(
-  IN osm_log_t* const p_log,
-  IN const ib_mad_notice_attr_t *p_ntci,
-  IN const osm_log_level_t log_level )
-{
-  char buff[1024];
-  buff[0] = '\0';
-
-  if( osm_log_is_active( p_log, log_level ) )
-  {
-    if (ib_notice_is_generic(p_ntci))
-    {
-      /* immediate data based on the trap */
-      switch (cl_ntoh16(p_ntci->g_or_v.generic.trap_num)) {
-      case 64:
-      case 65:
-      case 66:
-      case 67:
-        sprintf(buff,
-                "\t\t\t\tsrc_gid..................0x%016" PRIx64
-                ":0x%016" PRIx64 "\n",
-                cl_ntoh64(p_ntci->data_details.ntc_64_67.gid.unicast.prefix),
-                cl_ntoh64(p_ntci->data_details.ntc_64_67.gid.unicast.interface_id));
-        break;
-      case 128:
-        sprintf(buff,
-                "\t\t\t\tsw_lid...................0x%04X\n",
-                cl_ntoh16(p_ntci->data_details.ntc_128.sw_lid));
-        break;
-      case 129:
-      case 130:
-      case 131:
-        sprintf(buff,
-                "\t\t\t\tlid......................0x%04X\n"
-                "\t\t\t\tport_num.................%u\n",
-                cl_ntoh16(p_ntci->data_details.ntc_129_131.lid),
-                p_ntci->data_details.ntc_129_131.port_num);
-        break;
-      case 144:
-        sprintf(buff,
-                "\t\t\t\tlid......................0x%04x\n"
-                "\t\t\t\tnew_cap_mask.............0x%08x\n",
-                cl_ntoh16(p_ntci->data_details.ntc_144.lid),
-                cl_ntoh32(p_ntci->data_details.ntc_144.new_cap_mask));
-        break;
-      case 145:
-        sprintf(buff,
-                "\t\t\t\tlid......................0x%04X\n"
-                "\t\t\t\tnew_sys_guid.............0x%016" PRIx64 "\n",
-                cl_ntoh16(p_ntci->data_details.ntc_145.lid),
-                cl_ntoh64(p_ntci->data_details.ntc_145.new_sys_guid));
-        break;
-      }
-
-      osm_log( p_log, log_level,
-               "Generic Notice dump:\n"
-               "\t\t\t\ttype.....................0x%02X\n"
-               "\t\t\t\tprod_type................%u\n"
-               "\t\t\t\ttrap_num.................%u\n%s"
-               "",
-               ib_notice_get_type(p_ntci),
-               cl_ntoh32(ib_notice_get_prod_type(p_ntci)),
-               cl_ntoh16(p_ntci->g_or_v.generic.trap_num),
-               buff
-               );
-    }
-    else
-    {
-      osm_log( p_log, log_level,
-               "Vendor Notice dump:\n"
-               "\t\t\t\ttype.....................0x%04x\n"
-               "\t\t\t\tvendor...................%u\n"
-               "\t\t\t\tdevice_id................%u\n"
-               "",
-               cl_ntoh16(ib_notice_get_type(p_ntci)),
-               cl_ntoh32(ib_notice_get_vend_id(p_ntci)),
-               cl_ntoh16(p_ntci->g_or_v.vend.dev_id)
-               );
-    }
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_dr_smp(
-  IN osm_log_t* const p_log,
-  IN const ib_smp_t* const p_smp,
-  IN const osm_log_level_t log_level )
-{
-  uint32_t i;
-  char buf[BUF_SIZE];
-  char line[BUF_SIZE];
-
-  if( osm_log_is_active( p_log, log_level ) )
-  {
-    sprintf( buf,
-             "SMP dump:\n"
-             "\t\t\t\tbase_ver................0x%X\n"
-             "\t\t\t\tmgmt_class..............0x%X\n"
-             "\t\t\t\tclass_ver...............0x%X\n"
-             "\t\t\t\tmethod..................0x%X (%s)\n",
-             p_smp->base_ver,
-             p_smp->mgmt_class,
-             p_smp->class_ver,
-             p_smp->method, ib_get_sm_method_str(p_smp->method));
-
-    if (p_smp->mgmt_class == IB_MCLASS_SUBN_DIR)
-    {
-      sprintf( line,
-               "\t\t\t\tD bit...................0x%X\n"
-               "\t\t\t\tstatus..................0x%X\n",
-               ib_smp_is_d(p_smp),
-               ib_smp_get_status(p_smp));
-    }
-    else
-    {
-      sprintf( line,
-               "\t\t\t\tstatus..................0x%X\n",
-               cl_ntoh16(p_smp->status));
-    }
-    strcat( buf, line );
-
-    sprintf( line,
-             "\t\t\t\thop_ptr.................0x%X\n"
-             "\t\t\t\thop_count...............0x%X\n"
-             "\t\t\t\ttrans_id................0x%" PRIx64 "\n"
-             "\t\t\t\tattr_id.................0x%X (%s)\n"
-             "\t\t\t\tresv....................0x%X\n"
-             "\t\t\t\tattr_mod................0x%X\n"
-             "\t\t\t\tm_key...................0x%016" PRIx64 "\n",
-             p_smp->hop_ptr,
-             p_smp->hop_count,
-             cl_ntoh64(p_smp->trans_id),
-             cl_ntoh16(p_smp->attr_id),
-             ib_get_sm_attr_str( p_smp->attr_id ),
-             cl_ntoh16(p_smp->resv),
-             cl_ntoh32(p_smp->attr_mod),
-             cl_ntoh64(p_smp->m_key)
-             );
-    strcat( buf, line );
-
-    if (p_smp->mgmt_class == IB_MCLASS_SUBN_DIR)
-    {
-      sprintf( line,
-               "\t\t\t\tdr_slid.................0x%X\n"
-               "\t\t\t\tdr_dlid.................0x%X\n",
-               cl_ntoh16(p_smp->dr_slid),
-               cl_ntoh16(p_smp->dr_dlid)
-               );
-      strcat( buf, line );
-
-      strcat( buf, "\n\t\t\t\tInitial path: " );
-
-      for( i = 0; i <= p_smp->hop_count; i++ )
-      {
-        sprintf( line, "[%X]", p_smp->initial_path[i] );
-        strcat( buf, line );
-      }
-
-      strcat( buf, "\n\t\t\t\tReturn path:  " );
-
-      for( i = 0; i <= p_smp->hop_count; i++ )
-      {
-        sprintf( line, "[%X]", p_smp->return_path[i] );
-        strcat( buf, line );
-      }
-
-      strcat( buf, "\n\t\t\t\tReserved:     " );
-
-      for( i = 0; i < 7; i++ )
-      {
-        sprintf( line, "[%0X]", p_smp->resv1[i] );
-        strcat( buf, line );
-      }
-
-      strcat( buf, "\n" );
-
-      for( i = 0; i < 64; i += 16 )
-      {
-        sprintf( line, "\n\t\t\t\t%02X %02X %02X %02X "
-                 "%02X %02X %02X %02X"
-                 "   %02X %02X %02X %02X %02X %02X %02X %02X\n",
-                 p_smp->data[i],
-                 p_smp->data[i+1],
-                 p_smp->data[i+2],
-                 p_smp->data[i+3],
-                 p_smp->data[i+4],
-                 p_smp->data[i+5],
-                 p_smp->data[i+6],
-                 p_smp->data[i+7],
-                 p_smp->data[i+8],
-                 p_smp->data[i+9],
-                 p_smp->data[i+10],
-                 p_smp->data[i+11],
-                 p_smp->data[i+12],
-                 p_smp->data[i+13],
-                 p_smp->data[i+14],
-                 p_smp->data[i+15] );
-
-        strcat( buf, line );
-      }
-    }
-    else
-    {
-      /* not a Direct Route so provide source and destination lids */
-      strcat(buf, "\t\t\t\tMAD IS LID ROUTED\n");
-    }
-
-    osm_log( p_log, log_level,
-             "%s\n", buf );
-
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_sa_mad(
-  IN osm_log_t* const p_log,
-  IN const ib_sa_mad_t* const p_mad,
-  IN const osm_log_level_t log_level )
-{
-  char buf[BUF_SIZE];
-
-  /* make sure the mad is valid */
-  if (p_mad == NULL)
-  {
-    osm_log( p_log, log_level,
-             "NULL MAD POINTER\n");
-    return;
-  }
-
-  if( osm_log_is_active( p_log, log_level ) )
-  {
-    sprintf( buf,
-             "SA MAD dump:\n"
-             "\t\t\t\tbase_ver................0x%X\n"
-             "\t\t\t\tmgmt_class..............0x%X\n"
-             "\t\t\t\tclass_ver...............0x%X\n"
-             "\t\t\t\tmethod..................0x%X (%s)\n"
-             "\t\t\t\tstatus..................0x%X\n"
-             "\t\t\t\tresv....................0x%X\n"
-             "\t\t\t\ttrans_id................0x%" PRIx64 "\n"
-             "\t\t\t\tattr_id.................0x%X (%s)\n"
-             "\t\t\t\tresv1...................0x%X\n"
-             "\t\t\t\tattr_mod................0x%X\n"
-             "\t\t\t\trmpp_version............0x%X\n"
-             "\t\t\t\trmpp_type...............0x%X\n"
-             "\t\t\t\trmpp_flags..............0x%X\n"
-             "\t\t\t\trmpp_status.............0x%X\n"
-             "\t\t\t\tseg_num.................0x%X\n"
-             "\t\t\t\tpayload_len/new_win.....0x%X\n"
-             "\t\t\t\tsm_key..................0x%016" PRIx64 "\n"
-             "\t\t\t\tattr_offset.............0x%X\n"
-             "\t\t\t\tresv2...................0x%X\n"
-             "\t\t\t\tcomp_mask...............0x%016" PRIx64 "\n",
-             p_mad->base_ver,
-             p_mad->mgmt_class,
-             p_mad->class_ver,
-             p_mad->method, ib_get_sa_method_str(p_mad->method),
-             cl_ntoh16(p_mad->status),
-             cl_ntoh16(p_mad->resv),
-             cl_ntoh64(p_mad->trans_id),
-             cl_ntoh16(p_mad->attr_id),
-             ib_get_sa_attr_str( p_mad->attr_id ),
-             cl_ntoh16(p_mad->resv1),
-             cl_ntoh32(p_mad->attr_mod),
-             p_mad->rmpp_version,
-             p_mad->rmpp_type,
-             p_mad->rmpp_flags,
-             p_mad->rmpp_status,
-             cl_ntoh32(p_mad->seg_num),
-             cl_ntoh32(p_mad->paylen_newwin),
-             cl_ntoh64(p_mad->sm_key),
-             cl_ntoh16(p_mad->attr_offset),
-             cl_ntoh16(p_mad->resv3),
-             cl_ntoh64(p_mad->comp_mask)
-             );
-
-    strcat( buf, "\n" );
-
-    osm_log( p_log, log_level,
-             "%s\n", buf );
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_dr_path(
-  IN osm_log_t* const p_log,
-  IN const osm_dr_path_t* const p_path,
-  IN const osm_log_level_t log_level)
-{
-  uint32_t i;
-  char buf[BUF_SIZE];
-  char line[BUF_SIZE];
-
-  if( osm_log_is_active( p_log, log_level) )
-  {
-    sprintf( buf, "Directed Path Dump of %u hop path:"
-             "\n\t\t\t\tPath = ", p_path->hop_count );
-
-    for( i = 0; i <= p_path->hop_count; i++ )
-    {
-      sprintf( line, "[%X]", p_path->path[i] );
-      strcat( buf, line );
-    }
-    osm_log( p_log, log_level,
-             "%s\n", buf );
-  }
-}
-
-/**********************************************************************
- **********************************************************************/
-void
-osm_dump_smp_dr_path(
-  IN osm_log_t* const p_log,
-  IN const ib_smp_t* const p_smp,
-  IN const osm_log_level_t log_level
-  )
-{
-  uint32_t i;
-  char buf[BUF_SIZE];
-  char line[BUF_SIZE];
-
-  if( osm_log_is_active( p_log, log_level) )
-  {
-    sprintf( buf, "Received SMP on a %u hop path:"
-             "\n\t\t\t\tInitial path = ", p_smp->hop_count );
-
-    for( i = 0; i <= p_smp->hop_count; i++ )
-    {
-      sprintf( line, "[%X]", p_smp->initial_path[i] );
-      strcat( buf, line );
-    }
-
-    strcat( buf, "\n\t\t\t\tReturn path  = " );
-
-    for( i = 0; i <= p_smp->hop_count; i++ )
-    {
-      sprintf( line, "[%X]", p_smp->return_path[i] );
-      strcat( buf, line );
-    }
-
-    osm_log( p_log, log_level,
-             "%s\n", buf );
-  }
-}
-
-const char* const __osm_sm_state_str[] =
-{
-  "OSM_SM_STATE_NO_STATE",                 /* 0 */
-  "OSM_SM_STATE_INIT",                     /* 1 */
-  "OSM_SM_STATE_IDLE",                     /* 2 */
-  "OSM_SM_STATE_SWEEP_LIGHT",                 /* 3 */
-  "OSM_SM_STATE_SWEEP_LIGHT_WAIT",            /* 4 */
-  "OSM_SM_STATE_SWEEP_HEAVY_SELF",            /* 5 */
-  "OSM_SM_STATE_SWEEP_HEAVY_SUBNET",          /* 6 */
-  "OSM_SM_STATE_SET_SM_UCAST_LID",            /* 7 */
-  "OSM_SM_STATE_SET_SM_UCAST_LID_WAIT",       /* 8 */
-  "OSM_SM_STATE_SET_SM_UCAST_LID_DONE",       /* 9 */
-  "OSM_SM_STATE_SET_SUBNET_UCAST_LIDS",       /* 10 */
-  "OSM_SM_STATE_SET_SUBNET_UCAST_LIDS_WAIT",     /* 11 */
-  "OSM_SM_STATE_SET_SUBNET_UCAST_LIDS_DONE",     /* 12 */
-  "OSM_SM_STATE_SET_UCAST_TABLES",            /* 13 */
-  "OSM_SM_STATE_SET_UCAST_TABLES_WAIT",       /* 14 */
-  "OSM_SM_STATE_SET_UCAST_TABLES_DONE",       /* 15 */
-  "OSM_SM_STATE_SET_MCAST_TABLES",            /* 16 */
-  "OSM_SM_STATE_SET_MCAST_TABLES_WAIT",       /* 17 */
-  "OSM_SM_STATE_SET_MCAST_TABLES_DONE",       /* 18 */
-  "OSM_SM_STATE_SET_LINK_PORTS",                 /* 19 */
-  "OSM_SM_STATE_SET_LINK_PORTS_WAIT",               /* 20 */
-  "OSM_SM_STATE_SET_LINK_PORTS_DONE",               /* 21 */
-  "OSM_SM_STATE_SET_ARMED",                   /* 22 */
-  "OSM_SM_STATE_SET_ARMED_WAIT",              /* 23 */
-  "OSM_SM_STATE_SET_ARMED_DONE",              /* 24 */
-  "OSM_SM_STATE_SET_ACTIVE",                  /* 25 */
-  "OSM_SM_STATE_SET_ACTIVE_WAIT",             /* 26 */
-  "OSM_SM_STATE_LOST_NEGOTIATION",            /* 27 */
-  "OSM_SM_STATE_STANDBY",                     /* 28 */
-  "OSM_SM_STATE_SUBNET_UP",                   /* 29 */
-  "OSM_SM_STATE_PROCESS_REQUEST",             /* 30 */
-  "OSM_SM_STATE_PROCESS_REQUEST_WAIT",        /* 31 */
-  "OSM_SM_STATE_PROCESS_REQUEST_DONE",        /* 32 */
-  "OSM_SM_STATE_MASTER_OR_HIGHER_SM_DETECTED",/* 33 */
-  "OSM_SM_STATE_SET_PKEY",                    /* 34 */
-  "OSM_SM_STATE_SET_PKEY_WAIT",               /* 35 */
-  "OSM_SM_STATE_SET_PKEY_DONE",               /* 36 */
-  "UNKNOWN STATE!!"                           /* 37 */
-};
-
-const char* const __osm_sm_signal_str[] =
-{
-  "OSM_SIGNAL_NONE",                       /* 0 */
-  "OSM_SIGNAL_SWEEP",                      /* 1 */
-  "OSM_SIGNAL_CHANGE_DETECTED",               /* 2 */
-  "OSM_SIGNAL_NO_PENDING_TRANSACTIONS",       /* 3 */
-  "OSM_SIGNAL_DONE",                       /* 4 */
-  "OSM_SIGNAL_DONE_PENDING",                  /* 5 */
-  "OSM_SIGNAL_LOST_SM_NEGOTIATION",           /* 6 */
-  "OSM_SIGNAL_LIGHT_SWEEP_FAIL",              /* 7 */
-  "OSM_SIGNAL_IDLE_TIME_PROCESS",             /* 8 */
-  "OSM_SIGNAL_IDLE_TIME_PROCESS_REQUEST",        /* 9 */
-  "OSM_SIGNAL_MASTER_OR_HIGHER_SM_DETECTED",  /* 10 */
-  "OSM_SIGNAL_EXIT_STBY",                /* 11 */
-  "UNKNOWN SIGNAL!!"                       /* 12 */
-};
-
-/**********************************************************************
- **********************************************************************/
-const char*
-osm_get_sm_state_str(
-  IN osm_sm_state_t state )
-{
-  if( state > OSM_SM_STATE_MAX )
-    state = OSM_SM_STATE_MAX;
-  return( __osm_sm_state_str[state] );
-}
-
-/**********************************************************************
- **********************************************************************/
-const char*
-osm_get_sm_signal_str(
-  IN osm_signal_t signal )
-{
-  if( signal > OSM_SIGNAL_MAX )
-    signal = OSM_SIGNAL_MAX;
-  return( __osm_sm_signal_str[signal] );
-}
-
-/**********************************************************************
- **********************************************************************/
-
-static const char* const __osm_disp_msg_str[] =
-{
-  "OSM_MSG_REQ",
-  "OSM_MSG_MAD_NODE_INFO",
-  "OSM_MSG_MAD_PORT_INFO,",
-  "OSM_MSG_MAD_SWITCH_INFO",
-  "OSM_MSG_MAD_NODE_DESC",
-  "OSM_MSG_NO_SMPS_OUTSTANDING",
-  "OSM_MSG_MAD_NODE_RECORD",
-  "OSM_MSG_MAD_PORTINFO_RECORD",
-  "OSM_MSG_MAD_SERVICE_RECORD",
-  "OSM_MSG_MAD_PATH_RECORD",
-  "OSM_MSG_MAD_MCMEMBER_RECORD",
-  "OSM_MSG_MAD_LINK_RECORD",
-  "OSM_MSG_MAD_SMINFO_RECORD",
-  "OSM_MSG_MAD_CLASS_PORT_INFO",
-  "OSM_MSG_MAD_INFORM_INFO",
-  "OSM_MSG_MAD_LFT_RECORD",
-  "OSM_MSG_MAD_LFT",
-  "OSM_MSG_MAD_SM_INFO",
-  "OSM_MSG_MAD_NOTICE",
-  "OSM_MSG_LIGHT_SWEEP_FAIL",
-  "OSM_MSG_MAD_MFT",
-  "OSM_MSG_MAD_PKEY_TBL_RECORD",
-  "OSM_MSG_MAD_VL_ARB_RECORD",
-  "OSM_MSG_MAD_SLVL_TBL_RECORD",
-  "OSM_MSG_MAD_PKEY",
-  "OSM_MSG_MAD_VL_ARB",
-  "OSM_MSG_MAD_SLVL",
-  "OSM_MSG_MAD_GUIDINFO_RECORD",
-  "OSM_MSG_MAD_INFORM_INFO_RECORD",
-#if defined (VENDOR_RMPP_SUPPORT) && defined (DUAL_SIDED_RMPP)
-  "OSM_MSG_MAD_MULTIPATH_RECORD",
-#endif
-  "UNKNOWN!!"
-};
-
-/**********************************************************************
- **********************************************************************/
-const char*
-osm_get_disp_msg_str(
-  IN cl_disp_msgid_t msg )
-{
-  if( msg > OSM_MSG_MAX )
-    msg = OSM_MSG_MAX;
-  return( __osm_disp_msg_str[msg] );
-}
-
-static const char* const __osm_port_state_str_fixed_width[] =
-{
-  "NOC",
-  "DWN",
-  "INI",
-  "ARM",
-  "ACT",
-  "???"
-};
-
-/**********************************************************************
- **********************************************************************/
-const char*
-osm_get_port_state_str_fixed_width(
-  IN uint8_t port_state )
-{
-  if( port_state > IB_LINK_ACTIVE )
-    port_state = IB_LINK_ACTIVE + 1;
-  return( __osm_port_state_str_fixed_width[port_state] );
-}
-
-static const char* const __osm_node_type_str_fixed_width[] =
-{
-  "??",
-  "CA",
-  "SW",
-  "RT",
-};
-
-/**********************************************************************
- **********************************************************************/
-const char*
-osm_get_node_type_str_fixed_width(
-  IN uint32_t node_type )
-{
-  if( node_type >= IB_NOTICE_NODE_TYPE_ROUTER )
-    node_type = 0;
-  return( __osm_node_type_str_fixed_width[node_type] );
-}
-
-/**********************************************************************
- **********************************************************************/
-const char*
-osm_get_manufacturer_str(
-  IN uint64_t              const guid_ho )
-{
-  static const char* intel_str         = "Intel      ";
-  static const char* mellanox_str      = "Mellanox   ";
-  static const char* redswitch_str     = "Redswitch  ";
-  static const char* silverstorm_str   = "SilverStorm";
-  static const char* topspin_str       = "Topspin    ";
-  static const char* fujitsu_str       = "Fujitsu    ";
-  static const char* voltaire_str      = "Voltaire   ";
-  static const char* yotta_str         = "YottaYotta ";
-  static const char* pathscale_str     = "PathScale  ";
-  static const char* ibm_str           = "IBM        ";
-  static const char* divergenet_str    = "DivergeNet ";
-  static const char* flextronics_str   = "Flextronics";
-  static const char* agilent_str       = "Agilent    ";
-  static const char* obsidian_str      = "Obsidian   ";
-  static const char* baymicro_str      = "BayMicro   ";
-  static const char* lsilogic_str      = "LSILogic   ";
-  static const char* ddn_str           = "DataDirect ";
-  static const char* panta_str         = "Panta      ";
-  static const char* hp_str            = "HP         ";
-  static const char* rioworks_str      = "Rioworks   ";
-  static const char* unknown_str       = "Unknown    ";
-
-  switch( (uint32_t)(guid_ho >> (5 * 8)) )
-  {
-  case OSM_VENDOR_ID_INTEL:
-    return( intel_str );
-  case OSM_VENDOR_ID_MELLANOX:
-    return( mellanox_str );
-  case OSM_VENDOR_ID_REDSWITCH:
-    return( redswitch_str );
-  case OSM_VENDOR_ID_SILVERSTORM:
-    return( silverstorm_str );
-  case OSM_VENDOR_ID_TOPSPIN:
-    return( topspin_str );
-  case OSM_VENDOR_ID_FUJITSU:
-  case OSM_VENDOR_ID_FUJITSU2:
-    return( fujitsu_str );
-  case OSM_VENDOR_ID_VOLTAIRE:
-    return( voltaire_str );
-  case OSM_VENDOR_ID_YOTTAYOTTA:
-    return( yotta_str );
-  case OSM_VENDOR_ID_PATHSCALE:
-    return( pathscale_str );
-  case OSM_VENDOR_ID_IBM:
-    return( ibm_str );
-  case OSM_VENDOR_ID_DIVERGENET:
-    return( divergenet_str );
-  case OSM_VENDOR_ID_FLEXTRONICS:
-    return( flextronics_str );
-  case OSM_VENDOR_ID_AGILENT:
-    return( agilent_str );
-  case OSM_VENDOR_ID_OBSIDIAN:
-    return( obsidian_str );
-  case OSM_VENDOR_ID_BAYMICRO:
-    return( baymicro_str );
-  case OSM_VENDOR_ID_LSILOGIC:
-    return( lsilogic_str );
-  case OSM_VENDOR_ID_DDN:
-    return( ddn_str );
-  case OSM_VENDOR_ID_PANTA:
-    return( panta_str );
-  case OSM_VENDOR_ID_HP:
-    return( hp_str );
-  case OSM_VENDOR_ID_RIOWORKS:
-    return( rioworks_str );
-  default:
-    return( unknown_str );
-  }
-}
-
-static const char* const __osm_mtu_str_fixed_width[] =
-{
-  "??? ",
-  "256 ",
-  "512 ",
-  "1024",
-  "2048",
-  "4096"
-};
-
-/**********************************************************************
- **********************************************************************/
-const char*
-osm_get_mtu_str(
-  IN uint8_t               const mtu )
-{
-  if( mtu > IB_MTU_LEN_4096 )
-    return( __osm_mtu_str_fixed_width[0] );
-  else
-    return( __osm_mtu_str_fixed_width[mtu] );
-}
-
-static const char* const __osm_lwa_str_fixed_width[] =
-{
-  "???",
-  "1x ",
-  "4x ",
-  "???",
-  "???",
-  "???",
-  "???",
-  "???",
-  "12x"
-};
-
-/**********************************************************************
- **********************************************************************/
-const char*
-osm_get_lwa_str(
-  IN uint8_t               const lwa )
-{
-  if( lwa > 8 )
-    return( __osm_lwa_str_fixed_width[0] );
-  else
-    return( __osm_lwa_str_fixed_width[lwa] );
-}
-
-/**********************************************************************
- **********************************************************************/
-static const char* const __osm_lsa_str_fixed_width[] =
-{
-  "???",
-  "2.5",
-  "5  ",
-  "???",
-  "10 "
-};
-
-const char*
-osm_get_lsa_str(
-  IN uint8_t               const lsa )
-{
-  if( lsa > 4 )
-    return( __osm_lsa_str_fixed_width[0] );
-  else
-    return( __osm_lsa_str_fixed_width[lsa] );
-}
-
-/**********************************************************************
- **********************************************************************/
-
-const char* const __osm_sm_mgr_signal_str[] =
-{
-  "OSM_SM_SIGNAL_INIT",                 /* 0 */
-  "OSM_SM_SIGNAL_DISCOVERY_COMPLETED",   /* 2 */
-  "OSM_SM_SIGNAL_POLLING_TIMEOUT",       /* 3 */
-  "OSM_SM_SIGNAL_DISCOVER",              /* 4 */
-  "OSM_SM_SIGNAL_DISABLE",               /* 5 */
-  "OSM_SM_SIGNAL_HANDOVER",              /* 6 */
-  "OSM_SM_SIGNAL_HANDOVER_SENT",         /* 7 */
-  "OSM_SM_SIGNAL_ACKNOWLEDGE",           /* 8 */
-  "OSM_SM_SIGNAL_STANDBY",               /* 9 */
-  "OSM_SM_SIGNAL_MASTER_OR_HIGHER_SM_DETECTED",        /* 10 */
-  "OSM_SM_SIGNAL_MASTER_OR_HIGHER_SM_DETECTED_DONE",    /* 11 */
-  "OSM_SM_SIGNAL_WAIT_FOR_HANDOVER",     /* 12 */
-  "UNKNOWN STATE!!"                      /* 13 */
-
-};
-
-/**********************************************************************
- **********************************************************************/
-const char*
-osm_get_sm_mgr_signal_str(
-  IN osm_sm_signal_t signal )
-{
-  if( signal > OSM_SM_SIGNAL_MAX )
-    signal = OSM_SM_SIGNAL_MAX;
-  return( __osm_sm_mgr_signal_str[signal] );
-}
-
-const char* const __osm_sm_mgr_state_str[] =
-{
-  "IB_SMINFO_STATE_NOTACTIVE",                /* 0 */
-  "IB_SMINFO_STATE_DISCOVERING",              /* 1 */
-  "IB_SMINFO_STATE_STANDBY",                     /* 2 */
-  "IB_SMINFO_STATE_MASTER",                   /* 3 */
-  "IB_SMINFO_STATE_INIT",                     /* 4 */
-  "UNKNOWN STATE!!"                              /* 5 */
-
-};
-
-const char*
-osm_get_sm_mgr_state_str(
-  IN uint16_t state )
-{
-  if( state > IB_SMINFO_STATE_INIT )
-    state = IB_SMINFO_STATE_INIT + 1;
-  return( __osm_sm_mgr_state_str[state] );
-}
-
-
+/*\r
+ * Copyright (c) 2004-2006 Voltaire, Inc. All rights reserved.\r
+ * Copyright (c) 2002-2006 Mellanox Technologies LTD. All rights reserved.\r
+ * Copyright (c) 1996-2003 Intel Corporation. All rights reserved.\r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id$\r
+ */\r
+\r
+\r
+\r
+/*\r
+ * Abstract:\r
+ *    Implementation of opensm helper functions.\r
+ *\r
+ * Environment:\r
+ *    Linux User Mode\r
+ *\r
+ * $Revision: 1.19 $\r
+ */\r
+\r
+#if HAVE_CONFIG_H\r
+#  include <config.h>\r
+#endif /* HAVE_CONFIG_H */\r
+\r
+#include <stdlib.h>\r
+#include <stdio.h>\r
+#include <string.h>\r
+#include <complib/cl_debug.h>\r
+#include <iba/ib_types.h>\r
+#include <opensm/osm_helper.h>\r
+#include <opensm/osm_log.h>\r
+\r
+#define LINE_LENGTH 256\r
+\r
+/* we use two tables - one for queries and one for responses */\r
+const char* const __ib_sa_method_str[] =\r
+{\r
+  "RESERVED",                 /* 0 */\r
+  "SubnAdmGet",             /* 1 */\r
+  "SubnAdmSet",             /* 2 */\r
+  "RESERVED",                  /* 3 */\r
+  "RESERVED",                  /* 4 */\r
+  "RESERVED",                  /* 5 */\r
+  "SubnAdmReport",          /* 6 */\r
+  "RESERVED",                  /* 7 */\r
+  "RESERVED",                  /* 8 */\r
+  "RESERVED",                  /* 9 */\r
+  "RESERVED",                  /* A */\r
+  "RESERVED",                  /* B */\r
+  "RESERVED",                  /* C */\r
+  "RESERVED",                  /* D */\r
+  "RESERVED",                  /* E */\r
+  "RESERVED",                  /* F */\r
+  "RESERVED",                  /* 10 */\r
+  "RESERVED",                  /* 11 */\r
+  "SubnAdmGetTable",           /* 12 */\r
+  "SubnAdmGetTraceTable",      /* 13 */\r
+  "SubnAdmGetMulti",           /* 14 */\r
+  "SubnAdmDelete",          /* 15 */\r
+  "UNKNOWN"                   /* 16 */\r
+};\r
+\r
+const char* const __ib_sa_resp_method_str[] =\r
+{\r
+  "RESERVED",                 /* 80 */\r
+  "SubnAdmGetResp",            /* 81 */\r
+  "RESERVED (SetResp?)",    /* 82 */\r
+  "RESERVED",                  /* 83 */\r
+  "RESERVED",                  /* 84 */\r
+  "RESERVED",                  /* 85 */\r
+  "SubnAdmReportResp",         /* 86 */\r
+  "RESERVED",                  /* 87 */\r
+  "RESERVED",                  /* 88 */\r
+  "RESERVED",                  /* 89 */\r
+  "RESERVED",                  /* 8A */\r
+  "RESERVED",                  /* 8B */\r
+  "RESERVED",                  /* 8C */\r
+  "RESERVED",                  /* 8D */\r
+  "RESERVED",                  /* 8E */\r
+  "RESERVED",                  /* 8F */\r
+  "RESERVED",                  /* 90 */\r
+  "RESERVED",                  /* 91 */\r
+  "SubnAdmGetTableResp",       /* 92 */\r
+  "RESERVED",                  /* 93 */\r
+  "SubnAdmGetMultiResp",    /* 94 */\r
+  "SubnAdmDeleteResp",         /* 95 */\r
+  "UNKNOWN"\r
+};\r
+\r
+#define OSM_SA_METHOD_STR_UNKNOWN_VAL 0x16\r
+\r
+const char* const __ib_sm_method_str[] =\r
+{\r
+  "RESERVED0",              /* 0 */\r
+  "SubnGet",              /* 1 */\r
+  "SubnSet",              /* 2 */\r
+  "RESERVED3",               /* 3 */\r
+  "RESERVED4",               /* 4 */\r
+  "SubnTrap",                /* 5 */\r
+  "RESERVED6",               /* 6 */\r
+  "SubnTrapRepress",         /* 7 */\r
+  "RESERVED8",               /* 8 */\r
+  "RESERVED9",               /* 9 */\r
+  "RESERVEDA",               /* A */\r
+  "RESERVEDB",               /* B */\r
+  "RESERVEDC",               /* C */\r
+  "RESERVEDD",               /* D */\r
+  "RESERVEDE",               /* E */\r
+  "RESERVEDF",               /* F */\r
+  "RESERVED10",              /* 10 */\r
+  "SubnGetResp",             /* 11 */\r
+  "RESERVED12",           /* 12 */\r
+  "RESERVED13",           /* 13 */\r
+  "RESERVED14",           /* 14 */\r
+  "RESERVED15",           /* 15 */\r
+  "RESERVED16",              /* 16 */\r
+  "RESERVED17",           /* 17 */\r
+  "RESERVED18",           /* 18 */\r
+  "RESERVED19",           /* 19 */\r
+  "RESERVED1A",           /* 1A */\r
+  "RESERVED1B",           /* 1B */\r
+  "RESERVED1C",           /* 1C */\r
+  "RESERVED1D",           /* 1D */\r
+  "RESERVED1E",             /* 1E */\r
+  "RESERVED1F",             /* 1F */\r
+  "UNKNOWN"                  /* 20 */\r
+};\r
+\r
+#define OSM_SM_METHOD_STR_UNKNOWN_VAL 0x21\r
+\r
+const char* const __ib_sm_attr_str[] =\r
+{\r
+  "RESERVED",                  /* 0 */\r
+  "ClassPortInfo",             /* 1 */\r
+  "Notice",                    /* 2 */\r
+  "InformInfo",                /* 3 */\r
+  "RESERVED",                  /* 4 */\r
+  "RESERVED",                  /* 5 */\r
+  "RESERVED",                  /* 6 */\r
+  "RESERVED",                  /* 7 */\r
+  "RESERVED",                  /* 8 */\r
+  "RESERVED",                  /* 9 */\r
+  "RESERVED",                  /* A */\r
+  "RESERVED",                  /* B */\r
+  "RESERVED",                  /* C */\r
+  "RESERVED",                  /* D */\r
+  "RESERVED",                  /* E */\r
+  "RESERVED",                  /* F */\r
+  "NodeDescription",           /* 10 */\r
+  "NodeInfo",                  /* 11 */\r
+  "SwitchInfo",                /* 12 */\r
+  "UNKNOWN",                   /* 13 */\r
+  "GUIDInfo",                  /* 14 */\r
+  "PortInfo",                  /* 15 */\r
+  "P_KeyTable",                /* 16 */\r
+  "SLtoVLMappingTable",        /* 17 */\r
+  "VLArbitrationTable",        /* 18 */\r
+  "LinearForwardingTable",     /* 19 */\r
+  "RandomForwardingTable",     /* 1A */\r
+  "MulticastForwardingTable",  /* 1B */\r
+  "UNKNOWN",                   /* 1C */\r
+  "UNKNOWN",                   /* 1D */\r
+  "UNKNOWN",                   /* 1E */\r
+  "UNKNOWN",                   /* 1F */\r
+  "SMInfo",                    /* 20 */\r
+  "UNKNOWN"                    /* 21 - always highest value */\r
+};\r
+\r
+#define OSM_SM_ATTR_STR_UNKNOWN_VAL 0x21\r
+\r
+const char* const __ib_sa_attr_str[] =\r
+{\r
+  "RESERVED",                  /* 0 */\r
+  "ClassPortInfo",             /* 1 */\r
+  "Notice",                    /* 2 */\r
+  "InformInfo",                /* 3 */\r
+  "RESERVED",                  /* 4 */\r
+  "RESERVED",                  /* 5 */\r
+  "RESERVED",                  /* 6 */\r
+  "RESERVED",                  /* 7 */\r
+  "RESERVED",                  /* 8 */\r
+  "RESERVED",                  /* 9 */\r
+  "RESERVED",                  /* A */\r
+  "RESERVED",                  /* B */\r
+  "RESERVED",                  /* C */\r
+  "RESERVED",                  /* D */\r
+  "RESERVED",                  /* E */\r
+  "RESERVED",                  /* F */\r
+  "RESERVED",                  /* 10 */\r
+  "NodeRecord",                /* 11 */\r
+  "PortInfoRecord",            /* 12 */\r
+  "SLtoVLMappingTableRecord",  /* 13 */\r
+  "SwitchInfoRecord",          /* 14 */\r
+  "LinearForwardingTableRecord", /* 15 */\r
+  "RandomForwardingTableRecord", /* 16 */\r
+  "MulticastForwardingTableRecord",  /* 17 */\r
+  "SMInfoRecord",              /* 18 */\r
+  "RESERVED",                  /* 19 */\r
+  "RandomForwardingTable",     /* 1A */\r
+  "MulticastForwardingTable",  /* 1B */\r
+  "UNKNOWN",                   /* 1C */\r
+  "UNKNOWN",                   /* 1D */\r
+  "UNKNOWN",                   /* 1E */\r
+  "UNKNOWN",                   /* 1F */\r
+  "LinkRecord",                /* 20 */\r
+  "UNKNOWN",                   /* 21 */\r
+  "UNKNOWN",                   /* 22 */\r
+  "UNKNOWN",                   /* 23 */\r
+  "UNKNOWN",                   /* 24 */\r
+  "UNKNOWN",                   /* 25 */\r
+  "UNKNOWN",                   /* 26 */\r
+  "UNKNOWN",                   /* 27 */\r
+  "UNKNOWN",                   /* 28 */\r
+  "UNKNOWN",                   /* 29 */\r
+  "UNKNOWN",                   /* 2A */\r
+  "UNKNOWN",                   /* 2B */\r
+  "UNKNOWN",                   /* 2C */\r
+  "UNKNOWN",                   /* 2D */\r
+  "UNKNOWN",                   /* 2E */\r
+  "UNKNOWN",                   /* 2F */\r
+  "GuidInfoRecord",            /* 30 */\r
+  "ServiceRecord",             /* 31 */\r
+  "UNKNOWN",                   /* 32 */\r
+  "P_KeyTableRecord",          /* 33 */\r
+  "UNKNOWN",                   /* 34 */\r
+  "PathRecord",                /* 35 */\r
+  "VLArbitrationTableRecord",  /* 36 */\r
+  "UNKNOWN",                   /* 37 */\r
+  "MCMemberRecord",            /* 38 */\r
+  "TraceRecord",               /* 39 */\r
+  "MultiPathRecord",           /* 3A */\r
+  "ServiceAssociationRecord",  /* 3B */\r
+  "UNKNOWN",                   /* 3C */\r
+  "UNKNOWN",                   /* 3D */\r
+  "UNKNOWN",                   /* 3E */\r
+  "UNKNOWN",                   /* 3F */\r
+  "UNKNOWN",                   /* 40 */\r
+  "UNKNOWN",                   /* 41 */\r
+  "UNKNOWN",                   /* 42 */\r
+  "UNKNOWN",                   /* 43 */\r
+  "UNKNOWN",                   /* 44 */\r
+  "UNKNOWN",                   /* 45 */\r
+  "UNKNOWN",                   /* 46 */\r
+  "UNKNOWN",                   /* 47 */\r
+  "UNKNOWN",                   /* 48 */\r
+  "UNKNOWN",                   /* 49 */\r
+  "UNKNOWN",                   /* 4A */\r
+  "UNKNOWN",                   /* 4B */\r
+  "UNKNOWN",                   /* 4C */\r
+  "UNKNOWN",                   /* 4D */\r
+  "UNKNOWN",                   /* 4E */\r
+  "UNKNOWN",                   /* 4F */\r
+  "UNKNOWN",                   /* 50 */\r
+  "UNKNOWN",                   /* 51 */\r
+  "UNKNOWN",                   /* 52 */\r
+  "UNKNOWN",                   /* 53 */\r
+  "UNKNOWN",                   /* 54 */\r
+  "UNKNOWN",                   /* 55 */\r
+  "UNKNOWN",                   /* 56 */\r
+  "UNKNOWN",                   /* 57 */\r
+  "UNKNOWN",                   /* 58 */\r
+  "UNKNOWN",                   /* 59 */\r
+  "UNKNOWN",                   /* 5A */\r
+  "UNKNOWN",                   /* 5B */\r
+  "UNKNOWN",                   /* 5C */\r
+  "UNKNOWN",                   /* 5D */\r
+  "UNKNOWN",                   /* 5E */\r
+  "UNKNOWN",                   /* 5F */\r
+  "UNKNOWN",                   /* 60 */\r
+  "UNKNOWN",                   /* 61 */\r
+  "UNKNOWN",                   /* 62 */\r
+  "UNKNOWN",                   /* 63 */\r
+  "UNKNOWN",                   /* 64 */\r
+  "UNKNOWN",                   /* 65 */\r
+  "UNKNOWN",                   /* 66 */\r
+  "UNKNOWN",                   /* 67 */\r
+  "UNKNOWN",                   /* 68 */\r
+  "UNKNOWN",                   /* 69 */\r
+  "UNKNOWN",                   /* 6A */\r
+  "UNKNOWN",                   /* 6B */\r
+  "UNKNOWN",                   /* 6C */\r
+  "UNKNOWN",                   /* 6D */\r
+  "UNKNOWN",                   /* 6E */\r
+  "UNKNOWN",                   /* 6F */\r
+  "UNKNOWN",                   /* 70 */\r
+  "UNKNOWN",                   /* 71 */\r
+  "UNKNOWN",                   /* 72 */\r
+  "UNKNOWN",                   /* 73 */\r
+  "UNKNOWN",                   /* 74 */\r
+  "UNKNOWN",                   /* 75 */\r
+  "UNKNOWN",                   /* 76 */\r
+  "UNKNOWN",                   /* 77 */\r
+  "UNKNOWN",                   /* 78 */\r
+  "UNKNOWN",                   /* 79 */\r
+  "UNKNOWN",                   /* 7A */\r
+  "UNKNOWN",                   /* 7B */\r
+  "UNKNOWN",                   /* 7C */\r
+  "UNKNOWN",                   /* 7D */\r
+  "UNKNOWN",                   /* 7E */\r
+  "UNKNOWN",                   /* 7F */\r
+  "UNKNOWN",                   /* 80 */\r
+  "UNKNOWN",                   /* 81 */\r
+  "UNKNOWN",                   /* 82 */\r
+  "UNKNOWN",                   /* 83 */\r
+  "UNKNOWN",                   /* 84 */\r
+  "UNKNOWN",                   /* 85 */\r
+  "UNKNOWN",                   /* 86 */\r
+  "UNKNOWN",                   /* 87 */\r
+  "UNKNOWN",                   /* 88 */\r
+  "UNKNOWN",                   /* 89 */\r
+  "UNKNOWN",                   /* 8A */\r
+  "UNKNOWN",                   /* 8B */\r
+  "UNKNOWN",                   /* 8C */\r
+  "UNKNOWN",                   /* 8D */\r
+  "UNKNOWN",                   /* 8E */\r
+  "UNKNOWN",                   /* 8F */\r
+  "UNKNOWN",                   /* 90 */\r
+  "UNKNOWN",                   /* 91 */\r
+  "UNKNOWN",                   /* 92 */\r
+  "UNKNOWN",                   /* 93 */\r
+  "UNKNOWN",                   /* 94 */\r
+  "UNKNOWN",                   /* 95 */\r
+  "UNKNOWN",                   /* 96 */\r
+  "UNKNOWN",                   /* 97 */\r
+  "UNKNOWN",                   /* 98 */\r
+  "UNKNOWN",                   /* 99 */\r
+  "UNKNOWN",                   /* 9A */\r
+  "UNKNOWN",                   /* 9B */\r
+  "UNKNOWN",                   /* 9C */\r
+  "UNKNOWN",                   /* 9D */\r
+  "UNKNOWN",                   /* 9E */\r
+  "UNKNOWN",                   /* 9F */\r
+  "UNKNOWN",                   /* A0 */\r
+  "UNKNOWN",                   /* A1 */\r
+  "UNKNOWN",                   /* A2 */\r
+  "UNKNOWN",                   /* A3 */\r
+  "UNKNOWN",                   /* A4 */\r
+  "UNKNOWN",                   /* A5 */\r
+  "UNKNOWN",                   /* A6 */\r
+  "UNKNOWN",                   /* A7 */\r
+  "UNKNOWN",                   /* A8 */\r
+  "UNKNOWN",                   /* A9 */\r
+  "UNKNOWN",                   /* AA */\r
+  "UNKNOWN",                   /* AB */\r
+  "UNKNOWN",                   /* AC */\r
+  "UNKNOWN",                   /* AD */\r
+  "UNKNOWN",                   /* AE */\r
+  "UNKNOWN",                   /* AF */\r
+  "UNKNOWN",                   /* B0 */\r
+  "UNKNOWN",                   /* B1 */\r
+  "UNKNOWN",                   /* B2 */\r
+  "UNKNOWN",                   /* B3 */\r
+  "UNKNOWN",                   /* B4 */\r
+  "UNKNOWN",                   /* B5 */\r
+  "UNKNOWN",                   /* B6 */\r
+  "UNKNOWN",                   /* B7 */\r
+  "UNKNOWN",                   /* B8 */\r
+  "UNKNOWN",                   /* B9 */\r
+  "UNKNOWN",                   /* BA */\r
+  "UNKNOWN",                   /* BB */\r
+  "UNKNOWN",                   /* BC */\r
+  "UNKNOWN",                   /* BD */\r
+  "UNKNOWN",                   /* BE */\r
+  "UNKNOWN",                   /* BF */\r
+  "UNKNOWN",                   /* C0 */\r
+  "UNKNOWN",                   /* C1 */\r
+  "UNKNOWN",                   /* C2 */\r
+  "UNKNOWN",                   /* C3 */\r
+  "UNKNOWN",                   /* C4 */\r
+  "UNKNOWN",                   /* C5 */\r
+  "UNKNOWN",                   /* C6 */\r
+  "UNKNOWN",                   /* C7 */\r
+  "UNKNOWN",                   /* C8 */\r
+  "UNKNOWN",                   /* C9 */\r
+  "UNKNOWN",                   /* CA */\r
+  "UNKNOWN",                   /* CB */\r
+  "UNKNOWN",                   /* CC */\r
+  "UNKNOWN",                   /* CD */\r
+  "UNKNOWN",                   /* CE */\r
+  "UNKNOWN",                   /* CF */\r
+  "UNKNOWN",                   /* D0 */\r
+  "UNKNOWN",                   /* D1 */\r
+  "UNKNOWN",                   /* D2 */\r
+  "UNKNOWN",                   /* D3 */\r
+  "UNKNOWN",                   /* D4 */\r
+  "UNKNOWN",                   /* D5 */\r
+  "UNKNOWN",                   /* D6 */\r
+  "UNKNOWN",                   /* D7 */\r
+  "UNKNOWN",                   /* D8 */\r
+  "UNKNOWN",                   /* D9 */\r
+  "UNKNOWN",                   /* DA */\r
+  "UNKNOWN",                   /* DB */\r
+  "UNKNOWN",                   /* DC */\r
+  "UNKNOWN",                   /* DD */\r
+  "UNKNOWN",                   /* DE */\r
+  "UNKNOWN",                   /* DF */\r
+  "UNKNOWN",                   /* E0 */\r
+  "UNKNOWN",                   /* E1 */\r
+  "UNKNOWN",                   /* E2 */\r
+  "UNKNOWN",                   /* E3 */\r
+  "UNKNOWN",                   /* E4 */\r
+  "UNKNOWN",                   /* E5 */\r
+  "UNKNOWN",                   /* E6 */\r
+  "UNKNOWN",                   /* E7 */\r
+  "UNKNOWN",                   /* E8 */\r
+  "UNKNOWN",                   /* E9 */\r
+  "UNKNOWN",                   /* EA */\r
+  "UNKNOWN",                   /* EB */\r
+  "UNKNOWN",                   /* EC */\r
+  "UNKNOWN",                   /* ED */\r
+  "UNKNOWN",                   /* EE */\r
+  "UNKNOWN",                   /* EF */\r
+  "UNKNOWN",                   /* F0 */\r
+  "UNKNOWN",                   /* F1 */\r
+  "UNKNOWN",                   /* F2 */\r
+  "InformInfoRecord",          /* F3 */\r
+  "UNKNOWN"                    /* F4 - always highest value */\r
+};\r
+\r
+#define OSM_SA_ATTR_STR_UNKNOWN_VAL 0xF4\r
+\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+const char*\r
+ib_get_sa_method_str(\r
+  IN uint8_t method )\r
+{\r
+  if (method & 0x80)\r
+  {\r
+    method = method & 0x7f;\r
+    if( method >= OSM_SA_METHOD_STR_UNKNOWN_VAL  )\r
+      method = OSM_SA_METHOD_STR_UNKNOWN_VAL;\r
+    /* it is a response - use the response table */\r
+    return( __ib_sa_resp_method_str[method] );\r
+  }\r
+  else\r
+  {\r
+    if( method >= OSM_SA_METHOD_STR_UNKNOWN_VAL  )\r
+      method = OSM_SA_METHOD_STR_UNKNOWN_VAL;\r
+    return( __ib_sa_method_str[method] );\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+const char*\r
+ib_get_sm_method_str(\r
+  IN uint8_t method )\r
+{\r
+  if (method & 0x80) method = (method & 0x0F) | 0x10;\r
+  if( method >= OSM_SM_METHOD_STR_UNKNOWN_VAL  )\r
+    method = OSM_SM_METHOD_STR_UNKNOWN_VAL;\r
+  return( __ib_sm_method_str[method] );\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+const char*\r
+ib_get_sm_attr_str(\r
+  IN ib_net16_t attr )\r
+{\r
+  uint16_t host_attr;\r
+  host_attr = cl_ntoh16( attr );\r
+\r
+  if( host_attr >= OSM_SM_ATTR_STR_UNKNOWN_VAL  )\r
+    host_attr = OSM_SM_ATTR_STR_UNKNOWN_VAL;\r
+\r
+  return( __ib_sm_attr_str[host_attr] );\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+const char*\r
+ib_get_sa_attr_str(\r
+  IN ib_net16_t attr )\r
+{\r
+  uint16_t host_attr;\r
+  host_attr = cl_ntoh16( attr );\r
+\r
+  if( host_attr >= OSM_SA_ATTR_STR_UNKNOWN_VAL  )\r
+    host_attr = OSM_SA_ATTR_STR_UNKNOWN_VAL;\r
+\r
+  return( __ib_sa_attr_str[host_attr] );\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+ib_api_status_t\r
+osm_dbg_do_line(\r
+  IN char** pp_local,\r
+  IN const uint32_t buf_size,\r
+  IN const char* const p_prefix_str,\r
+  IN const char* const p_new_str,\r
+  IN uint32_t* const p_total_len )\r
+{\r
+  char line[LINE_LENGTH];\r
+  uint32_t len;\r
+\r
+  sprintf( line, "%s%s", p_prefix_str, p_new_str );\r
+  len = (uint32_t) strlen( line );\r
+  *p_total_len += len;\r
+  if( *p_total_len + sizeof('\0') > buf_size )\r
+    return( IB_INSUFFICIENT_MEMORY );\r
+\r
+  strcpy( *pp_local, line );\r
+  *pp_local += len;\r
+  return( IB_SUCCESS );\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dbg_get_capabilities_str(\r
+  IN char* p_buf,\r
+  IN const uint32_t buf_size,\r
+  IN const char* const p_prefix_str,\r
+  IN const ib_port_info_t* const p_pi )\r
+{\r
+  uint32_t total_len = 0;\r
+  char *p_local = p_buf;\r
+\r
+  strcpy( p_local, "Capability Mask:\n" );\r
+  p_local += strlen( p_local );\r
+\r
+  if( p_pi->capability_mask & IB_PORT_CAP_RESV0 )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_RESV0\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_IS_SM )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_IS_SM\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_HAS_NOTICE )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_HAS_NOTICE\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_HAS_TRAP )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_HAS_TRAP\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_HAS_IPD )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_HAS_IPD\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_HAS_AUTO_MIG )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_HAS_AUTO_MIG\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_HAS_SL_MAP )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_HAS_SL_MAP\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_HAS_NV_MKEY )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_HAS_NV_MKEY\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_HAS_NV_PKEY )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_HAS_NV_PKEY\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_HAS_LED_INFO )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_HAS_LED_INFO\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_SM_DISAB )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_SM_DISAB\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_HAS_SYS_IMG_GUID )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_HAS_SYS_IMG_GUID\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_HAS_PKEY_SW_EXT_PORT_TRAP )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_PKEY_SW_EXT_PORT_TRAP\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_RESV13 )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_RESV13\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_RESV14 )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_RESV14\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_RESV15 )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_RESV15\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_HAS_COM_MGT )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_HAS_COM_MGT\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_HAS_SNMP )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_HAS_SNMP\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_REINIT )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_REINIT\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_HAS_DEV_MGT )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_HAS_DEV_MGT\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_HAS_VEND_CLS )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_HAS_VEND_CLS\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_HAS_DR_NTC )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_HAS_DR_NTC\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_HAS_CAP_NTC )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_HAS_CAP_NTC\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_HAS_BM )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_HAS_BM\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_HAS_LINK_RT_LATENCY )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_HAS_LINK_RT_LATENCY\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_HAS_CLIENT_REREG )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_HAS_CLIENT_REREG\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_RESV26 )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_RESV26\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_RESV27 )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_RESV27\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_RESV28)\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_RESV28\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_RESV29 )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_RESV29\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_RESV30 )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_RESV30\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+  if( p_pi->capability_mask & IB_PORT_CAP_RESV31 )\r
+  {\r
+    if( osm_dbg_do_line( &p_local, buf_size, p_prefix_str,\r
+                         "IB_PORT_CAP_RESV31\n", &total_len ) != IB_SUCCESS )\r
+      return;\r
+  }\r
+\r
+  return;\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_port_info(\r
+  IN osm_log_t* const p_log,\r
+  IN const ib_net64_t node_guid,\r
+  IN const ib_net64_t port_guid,\r
+  IN const uint8_t port_num,\r
+  IN const ib_port_info_t* const p_pi,\r
+  IN const osm_log_level_t log_level )\r
+{\r
+  char buf[BUF_SIZE];\r
+\r
+  if( osm_log_is_active( p_log, log_level ) )\r
+  {\r
+    osm_log( p_log, log_level,\r
+             "PortInfo dump:\n"\r
+             "\t\t\t\tport number.............0x%X\n"\r
+             "\t\t\t\tnode_guid...............0x%016" PRIx64 "\n"\r
+             "\t\t\t\tport_guid...............0x%016" PRIx64 "\n"\r
+             "\t\t\t\tm_key...................0x%016" PRIx64 "\n"\r
+             "\t\t\t\tsubnet_prefix...........0x%016" PRIx64 "\n"\r
+             "\t\t\t\tbase_lid................0x%X\n"\r
+             "\t\t\t\tmaster_sm_base_lid......0x%X\n"\r
+             "\t\t\t\tcapability_mask.........0x%X\n"\r
+             "\t\t\t\tdiag_code...............0x%X\n"\r
+             "\t\t\t\tm_key_lease_period......0x%X\n"\r
+             "\t\t\t\tlocal_port_num..........0x%X\n"\r
+             "\t\t\t\tlink_width_enabled......0x%X\n"\r
+             "\t\t\t\tlink_width_supported....0x%X\n"\r
+             "\t\t\t\tlink_width_active.......0x%X\n"\r
+             "\t\t\t\tlink_speed_supported....0x%X\n"\r
+             "\t\t\t\tport_state..............%s\n"\r
+             "\t\t\t\tstate_info2.............0x%X\n"\r
+             "\t\t\t\tm_key_protect_bits......0x%X\n"\r
+             "\t\t\t\tlmc.....................0x%X\n"\r
+             "\t\t\t\tlink_speed..............0x%X\n"\r
+             "\t\t\t\tmtu_smsl................0x%X\n"\r
+             "\t\t\t\tvl_cap_init_type........0x%X\n"\r
+             "\t\t\t\tvl_high_limit...........0x%X\n"\r
+             "\t\t\t\tvl_arb_high_cap.........0x%X\n"\r
+             "\t\t\t\tvl_arb_low_cap..........0x%X\n"\r
+             "\t\t\t\tinit_rep_mtu_cap........0x%X\n"\r
+             "\t\t\t\tvl_stall_life...........0x%X\n"\r
+             "\t\t\t\tvl_enforce..............0x%X\n"\r
+             "\t\t\t\tm_key_violations........0x%X\n"\r
+             "\t\t\t\tp_key_violations........0x%X\n"\r
+             "\t\t\t\tq_key_violations........0x%X\n"\r
+             "\t\t\t\tguid_cap................0x%X\n"\r
+             "\t\t\t\tclient_reregister.......0x%X\n"\r
+             "\t\t\t\tsubnet_timeout..........0x%X\n"\r
+             "\t\t\t\tresp_time_value.........0x%X\n"\r
+             "\t\t\t\terror_threshold.........0x%X\n"\r
+             "",\r
+             port_num,\r
+             cl_ntoh64( node_guid ),\r
+             cl_ntoh64( port_guid ),\r
+             cl_ntoh64( p_pi->m_key ),\r
+             cl_ntoh64( p_pi->subnet_prefix ),\r
+             cl_ntoh16( p_pi->base_lid ),\r
+             cl_ntoh16( p_pi->master_sm_base_lid ),\r
+             cl_ntoh32( p_pi->capability_mask ),\r
+             cl_ntoh16( p_pi->diag_code ),\r
+             cl_ntoh16( p_pi->m_key_lease_period ),\r
+             p_pi->local_port_num,\r
+             p_pi->link_width_enabled,\r
+             p_pi->link_width_supported,\r
+             p_pi->link_width_active,\r
+             ib_port_info_get_link_speed_sup( p_pi ),\r
+             ib_get_port_state_str( ib_port_info_get_port_state( p_pi ) ),\r
+             p_pi->state_info2,\r
+             ib_port_info_get_mpb( p_pi ),\r
+             ib_port_info_get_lmc( p_pi ),\r
+             p_pi->link_speed,\r
+             p_pi->mtu_smsl,\r
+             p_pi->vl_cap,\r
+             p_pi->vl_high_limit,\r
+             p_pi->vl_arb_high_cap,\r
+             p_pi->vl_arb_low_cap,\r
+             p_pi->mtu_cap,\r
+             p_pi->vl_stall_life,\r
+             p_pi->vl_enforce,\r
+             cl_ntoh16( p_pi->m_key_violations ),\r
+             cl_ntoh16( p_pi->p_key_violations ),\r
+             cl_ntoh16( p_pi->q_key_violations ),\r
+             p_pi->guid_cap,\r
+             ib_port_info_get_client_rereg( p_pi ),\r
+             ib_port_info_get_timeout( p_pi ),\r
+             p_pi->resp_time_value,\r
+             p_pi->error_threshold\r
+             );\r
+\r
+    /*  show the capabilities mask */\r
+    osm_dbg_get_capabilities_str( buf, BUF_SIZE, "\t\t\t\t", p_pi );\r
+\r
+    osm_log( p_log, log_level, "%s", buf );\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_portinfo_record(\r
+  IN osm_log_t* const p_log,\r
+  IN const ib_portinfo_record_t* const p_pir,\r
+  IN const osm_log_level_t log_level )\r
+{\r
+  char buf[BUF_SIZE];\r
+  const ib_port_info_t * const p_pi = &p_pir->port_info;\r
+\r
+  if( osm_log_is_active( p_log, log_level ) )\r
+  {\r
+    osm_log( p_log, log_level,\r
+             "PortInfo Record dump:\n"\r
+             "\t\t\t\tRID\n"\r
+             "\t\t\t\tEndPortLid..............0x%X\n"\r
+             "\t\t\t\tPortNum.................0x%X\n"\r
+             "\t\t\t\tReserved................0x%X\n"\r
+             "\t\t\t\tPortInfo dump:\n"\r
+             "\t\t\t\tm_key...................0x%016" PRIx64 "\n"\r
+             "\t\t\t\tsubnet_prefix...........0x%016" PRIx64 "\n"\r
+             "\t\t\t\tbase_lid................0x%X\n"\r
+             "\t\t\t\tmaster_sm_base_lid......0x%X\n"\r
+             "\t\t\t\tcapability_mask.........0x%X\n"\r
+             "\t\t\t\tdiag_code...............0x%X\n"\r
+             "\t\t\t\tm_key_lease_period......0x%X\n"\r
+             "\t\t\t\tlocal_port_num..........0x%X\n"\r
+             "\t\t\t\tlink_width_enabled......0x%X\n"\r
+             "\t\t\t\tlink_width_supported....0x%X\n"\r
+             "\t\t\t\tlink_width_active.......0x%X\n"\r
+             "\t\t\t\tlink_speed_supported....0x%X\n"\r
+             "\t\t\t\tport_state..............%s\n"\r
+             "\t\t\t\tstate_info2.............0x%X\n"\r
+             "\t\t\t\tm_key_protect_bits......0x%X\n"\r
+             "\t\t\t\tlmc.....................0x%X\n"\r
+             "\t\t\t\tlink_speed..............0x%X\n"\r
+             "\t\t\t\tmtu_smsl................0x%X\n"\r
+             "\t\t\t\tvl_cap_init_type........0x%X\n"\r
+             "\t\t\t\tvl_high_limit...........0x%X\n"\r
+             "\t\t\t\tvl_arb_high_cap.........0x%X\n"\r
+             "\t\t\t\tvl_arb_low_cap..........0x%X\n"\r
+             "\t\t\t\tinit_rep_mtu_cap........0x%X\n"\r
+             "\t\t\t\tvl_stall_life...........0x%X\n"\r
+             "\t\t\t\tvl_enforce..............0x%X\n"\r
+             "\t\t\t\tm_key_violations........0x%X\n"\r
+             "\t\t\t\tp_key_violations........0x%X\n"\r
+             "\t\t\t\tq_key_violations........0x%X\n"\r
+             "\t\t\t\tguid_cap................0x%X\n"\r
+             "\t\t\t\tsubnet_timeout..........0x%X\n"\r
+             "\t\t\t\tresp_time_value.........0x%X\n"\r
+             "\t\t\t\terror_threshold.........0x%X\n"\r
+             "",\r
+             cl_ntoh16(p_pir->lid),\r
+             p_pir->port_num,\r
+             p_pir->resv,\r
+             cl_ntoh64( p_pi->m_key ),\r
+             cl_ntoh64( p_pi->subnet_prefix ),\r
+             cl_ntoh16( p_pi->base_lid ),\r
+             cl_ntoh16( p_pi->master_sm_base_lid ),\r
+             cl_ntoh32( p_pi->capability_mask ),\r
+             cl_ntoh16( p_pi->diag_code ),\r
+             cl_ntoh16( p_pi->m_key_lease_period ),\r
+             p_pi->local_port_num,\r
+             p_pi->link_width_enabled,\r
+             p_pi->link_width_supported,\r
+             p_pi->link_width_active,\r
+             ib_port_info_get_link_speed_sup( p_pi ),\r
+             ib_get_port_state_str( ib_port_info_get_port_state( p_pi ) ),\r
+             p_pi->state_info2,\r
+             ib_port_info_get_mpb( p_pi ),\r
+             ib_port_info_get_lmc( p_pi ),\r
+             p_pi->link_speed,\r
+             p_pi->mtu_smsl,\r
+             p_pi->vl_cap,\r
+             p_pi->vl_high_limit,\r
+             p_pi->vl_arb_high_cap,\r
+             p_pi->vl_arb_low_cap,\r
+             p_pi->mtu_cap,\r
+             p_pi->vl_stall_life,\r
+             p_pi->vl_enforce,\r
+             cl_ntoh16( p_pi->m_key_violations ),\r
+             cl_ntoh16( p_pi->p_key_violations ),\r
+             cl_ntoh16( p_pi->q_key_violations ),\r
+             p_pi->guid_cap,\r
+             ib_port_info_get_timeout( p_pi ),\r
+             p_pi->resp_time_value,\r
+             p_pi->error_threshold\r
+             );\r
+\r
+    /*  show the capabilities mask */\r
+    osm_dbg_get_capabilities_str( buf, BUF_SIZE, "\t\t\t\t", p_pi );\r
+\r
+    osm_log( p_log, log_level, "%s", buf );\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_guidinfo_record(\r
+  IN osm_log_t* const p_log,\r
+  IN const ib_guidinfo_record_t* const p_gir,\r
+  IN const osm_log_level_t log_level )\r
+{\r
+  const ib_guid_info_t * const p_gi = &p_gir->guid_info;\r
+\r
+  if( osm_log_is_active( p_log, log_level ) )\r
+  {\r
+    osm_log( p_log, log_level,\r
+             "GUIDInfo Record dump:\n"\r
+             "\t\t\t\tRID\n"\r
+             "\t\t\t\tLid.....................0x%X\n"\r
+             "\t\t\t\tBlockNum................0x%X\n"\r
+             "\t\t\t\tReserved................0x%X\n"\r
+             "\t\t\t\tGUIDInfo dump:\n"\r
+             "\t\t\t\tReserved................0x%X\n"\r
+             "\t\t\t\tGUID 0..................0x%016" PRIx64 "\n"\r
+             "\t\t\t\tGUID 1..................0x%016" PRIx64 "\n"\r
+             "\t\t\t\tGUID 2..................0x%016" PRIx64 "\n"\r
+             "\t\t\t\tGUID 3..................0x%016" PRIx64 "\n"\r
+             "\t\t\t\tGUID 4..................0x%016" PRIx64 "\n"\r
+             "\t\t\t\tGUID 5..................0x%016" PRIx64 "\n"\r
+             "\t\t\t\tGUID 6..................0x%016" PRIx64 "\n"\r
+             "\t\t\t\tGUID 7..................0x%016" PRIx64 "\n",\r
+             cl_ntoh16(p_gir->lid),\r
+             p_gir->block_num,\r
+             p_gir->resv,\r
+             cl_ntoh32(p_gir->reserved),\r
+             cl_ntoh64(p_gi->guid[0]),\r
+             cl_ntoh64(p_gi->guid[1]),\r
+             cl_ntoh64(p_gi->guid[2]),\r
+             cl_ntoh64(p_gi->guid[3]),\r
+             cl_ntoh64(p_gi->guid[4]),\r
+             cl_ntoh64(p_gi->guid[5]),\r
+             cl_ntoh64(p_gi->guid[6]),\r
+             cl_ntoh64(p_gi->guid[7])\r
+           );\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_node_info(\r
+  IN osm_log_t* const p_log,\r
+  IN const ib_node_info_t* const p_ni,\r
+  IN const osm_log_level_t log_level )\r
+{\r
+  if( osm_log_is_active( p_log, log_level ) )\r
+  {\r
+    osm_log( p_log, log_level,\r
+             "NodeInfo dump:\n"\r
+             "\t\t\t\tbase_version............0x%X\n"\r
+             "\t\t\t\tclass_version...........0x%X\n"\r
+             "\t\t\t\tnode_type...............%s\n"\r
+             "\t\t\t\tnum_ports...............0x%X\n"\r
+             "\t\t\t\tsys_guid................0x%016" PRIx64 "\n"\r
+             "\t\t\t\tnode_guid...............0x%016" PRIx64 "\n"\r
+             "\t\t\t\tport_guid...............0x%016" PRIx64 "\n"\r
+             "\t\t\t\tpartition_cap...........0x%X\n"\r
+             "\t\t\t\tdevice_id...............0x%X\n"\r
+             "\t\t\t\trevision................0x%X\n"\r
+             "\t\t\t\tport_num................0x%X\n"\r
+             "\t\t\t\tvendor_id...............0x%X\n"\r
+             "",\r
+             p_ni->base_version,\r
+             p_ni->class_version,\r
+             ib_get_node_type_str( p_ni->node_type ),\r
+             p_ni->num_ports,\r
+             cl_ntoh64( p_ni->sys_guid ),\r
+             cl_ntoh64( p_ni->node_guid ),\r
+             cl_ntoh64( p_ni->port_guid ),\r
+             cl_ntoh16( p_ni->partition_cap ),\r
+             cl_ntoh16( p_ni->device_id ),\r
+             cl_ntoh32( p_ni->revision ),\r
+             ib_node_info_get_local_port_num( p_ni ),\r
+             cl_ntoh32( ib_node_info_get_vendor_id( p_ni ) )\r
+             );\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_node_record(\r
+  IN osm_log_t* const p_log,\r
+  IN const ib_node_record_t* const p_nr,\r
+  IN const osm_log_level_t log_level )\r
+{\r
+  const ib_node_info_t * const p_ni = &p_nr->node_info;\r
+\r
+  if( osm_log_is_active( p_log, log_level ) )\r
+  {\r
+    char desc[sizeof(p_nr->node_desc.description) + 1];\r
+\r
+    memcpy(desc, p_nr->node_desc.description,\r
+           sizeof(p_nr->node_desc.description));\r
+    desc[sizeof(desc) - 1] = '\0';\r
+    osm_log( p_log, log_level,\r
+             "Node Record dump:\n"\r
+             "\t\t\t\tRID\n"\r
+             "\t\t\t\tLid.....................0x%X\n"\r
+             "\t\t\t\tReserved................0x%X\n"\r
+             "\t\t\t\tNodeInfo dump:\n"\r
+             "\t\t\t\tbase_version............0x%X\n"\r
+             "\t\t\t\tclass_version...........0x%X\n"\r
+             "\t\t\t\tnode_type...............%s\n"\r
+             "\t\t\t\tnum_ports...............0x%X\n"\r
+             "\t\t\t\tsys_guid................0x%016" PRIx64 "\n"\r
+             "\t\t\t\tnode_guid...............0x%016" PRIx64 "\n"\r
+             "\t\t\t\tport_guid...............0x%016" PRIx64 "\n"\r
+             "\t\t\t\tpartition_cap...........0x%X\n"\r
+             "\t\t\t\tdevice_id...............0x%X\n"\r
+             "\t\t\t\trevision................0x%X\n"\r
+             "\t\t\t\tport_num................0x%X\n"\r
+             "\t\t\t\tvendor_id...............0x%X\n"\r
+             "\t\t\t\tNodeDescription\n"\r
+             "\t\t\t\t%s\n"\r
+             "",\r
+             cl_ntoh16(p_nr->lid),\r
+             cl_ntoh16(p_nr->resv),\r
+             p_ni->base_version,\r
+             p_ni->class_version,\r
+             ib_get_node_type_str( p_ni->node_type ),\r
+             p_ni->num_ports,\r
+             cl_ntoh64( p_ni->sys_guid ),\r
+             cl_ntoh64( p_ni->node_guid ),\r
+             cl_ntoh64( p_ni->port_guid ),\r
+             cl_ntoh16( p_ni->partition_cap ),\r
+             cl_ntoh16( p_ni->device_id ),\r
+             cl_ntoh32( p_ni->revision ),\r
+             ib_node_info_get_local_port_num( p_ni ),\r
+             cl_ntoh32( ib_node_info_get_vendor_id( p_ni )),\r
+             desc\r
+             );\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_path_record(\r
+  IN osm_log_t* const p_log,\r
+  IN const ib_path_rec_t* const p_pr,\r
+  IN const osm_log_level_t log_level )\r
+{\r
+  if( osm_log_is_active( p_log, log_level ) )\r
+  {\r
+    osm_log( p_log, log_level,\r
+             "PathRecord dump:\n"\r
+             "\t\t\t\tservice_id..............0x%016" PRIx64 "\n"\r
+             "\t\t\t\tdgid....................0x%016" PRIx64 " : "\r
+             "0x%016" PRIx64 "\n"\r
+             "\t\t\t\tsgid....................0x%016" PRIx64 " : "\r
+             "0x%016" PRIx64 "\n"\r
+             "\t\t\t\tdlid....................0x%X\n"\r
+             "\t\t\t\tslid....................0x%X\n"\r
+             "\t\t\t\thop_flow_raw............0x%X\n"\r
+             "\t\t\t\ttclass..................0x%X\n"\r
+             "\t\t\t\tnum_path_revers.........0x%X\n"\r
+             "\t\t\t\tpkey....................0x%X\n"\r
+             "\t\t\t\tsl......................0x%X\n"\r
+             "\t\t\t\tmtu.....................0x%X\n"\r
+             "\t\t\t\trate....................0x%X\n"\r
+             "\t\t\t\tpkt_life................0x%X\n"\r
+             "\t\t\t\tpreference..............0x%X\n"\r
+             "\t\t\t\tresv2...................0x%X\n"\r
+             "\t\t\t\tresv3...................0x%X\n"\r
+             "",\r
+             *(uint64_t*)p_pr->service_id,\r
+             cl_ntoh64( p_pr->dgid.unicast.prefix ),\r
+             cl_ntoh64( p_pr->dgid.unicast.interface_id ),\r
+             cl_ntoh64( p_pr->sgid.unicast.prefix ),\r
+             cl_ntoh64( p_pr->sgid.unicast.interface_id ),\r
+             cl_ntoh16( p_pr->dlid ),\r
+             cl_ntoh16( p_pr->slid ),\r
+             cl_ntoh32( p_pr->hop_flow_raw ),\r
+             p_pr->tclass,\r
+             p_pr->num_path,\r
+             cl_ntoh16( p_pr->pkey ),\r
+             cl_ntoh16( p_pr->qos_class_sl ),\r
+             p_pr->mtu,\r
+             p_pr->rate,\r
+             p_pr->pkt_life,\r
+             p_pr->preference,\r
+             *(uint32_t*)&p_pr->resv2,\r
+             *((uint16_t*)&p_pr->resv2 + 2)\r
+             );\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_multipath_record(\r
+  IN osm_log_t* const p_log,\r
+  IN const ib_multipath_rec_t* const p_mpr,\r
+  IN const osm_log_level_t log_level )\r
+{\r
+  int i;\r
+  char buf_line[1024];\r
+  ib_gid_t const *p_gid;\r
+\r
+  if( osm_log_is_active( p_log, log_level ) )\r
+  {\r
+    memset(buf_line, 0, sizeof(buf_line));\r
+    p_gid = p_mpr->gids;\r
+    if ( p_mpr->sgid_count )\r
+    {\r
+      for (i = 0; i < p_mpr->sgid_count; i++)\r
+      {\r
+        sprintf( buf_line, "%s\t\t\t\tsgid%02d.................."\r
+                 "0x%016" PRIx64 " : 0x%016" PRIx64 "\n",\r
+                 buf_line, i + 1, cl_ntoh64( p_gid->unicast.prefix ),\r
+                 cl_ntoh64( p_gid->unicast.interface_id ) );\r
+        p_gid++;\r
+      }\r
+    }\r
+    if ( p_mpr->dgid_count )\r
+    {\r
+      for (i = 0; i < p_mpr->dgid_count; i++)\r
+      {\r
+        sprintf( buf_line, "%s\t\t\t\tdgid%02d.................."\r
+                 "0x%016" PRIx64 " : 0x%016" PRIx64 "\n",\r
+                 buf_line, i + 1, cl_ntoh64( p_gid->unicast.prefix ),\r
+                 cl_ntoh64( p_gid->unicast.interface_id ) );\r
+        p_gid++;\r
+      }\r
+    }\r
+    osm_log( p_log, log_level,\r
+             "MultiPath Record dump:\n"\r
+             "\t\t\t\thop_flow_raw............0x%X\n"\r
+             "\t\t\t\ttclass..................0x%X\n"\r
+             "\t\t\t\tnum_path_revers.........0x%X\n"\r
+             "\t\t\t\tpkey....................0x%X\n"\r
+             "\t\t\t\tresv0...................0x%X\n"\r
+             "\t\t\t\tsl......................0x%X\n"\r
+             "\t\t\t\tmtu.....................0x%X\n"\r
+             "\t\t\t\trate....................0x%X\n"\r
+             "\t\t\t\tpkt_life................0x%X\n"\r
+             "\t\t\t\tresv1...................0x%X\n"\r
+             "\t\t\t\tindependence............0x%X\n"\r
+             "\t\t\t\tsgid_count..............0x%X\n"\r
+             "\t\t\t\tdgid_count..............0x%X\n"\r
+             "%s\n"\r
+             "",\r
+             cl_ntoh32( p_mpr->hop_flow_raw ),\r
+             p_mpr->tclass,\r
+             p_mpr->num_path,\r
+             cl_ntoh16( p_mpr->pkey ),\r
+             p_mpr->resv0,\r
+             cl_ntoh16( p_mpr->sl ),\r
+             p_mpr->mtu,\r
+             p_mpr->rate,\r
+             p_mpr->pkt_life,\r
+             p_mpr->resv1,\r
+             p_mpr->independence,\r
+             p_mpr->sgid_count,\r
+             p_mpr->dgid_count,\r
+             buf_line\r
+             );\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_mc_record(\r
+  IN osm_log_t* const p_log,\r
+  IN const ib_member_rec_t* const p_mcmr,\r
+  IN const osm_log_level_t log_level )\r
+{\r
+\r
+  if( osm_log_is_active( p_log, log_level ) )\r
+  {\r
+    osm_log( p_log, log_level,\r
+             "MCMember Record dump:\n"\r
+             "\t\t\t\tMGID....................0x%016" PRIx64 " : "\r
+             "0x%016" PRIx64 "\n"\r
+             "\t\t\t\tPortGid.................0x%016" PRIx64 " : "\r
+             "0x%016" PRIx64 "\n"\r
+             "\t\t\t\tqkey....................0x%X\n"\r
+             "\t\t\t\tmlid....................0x%X\n"\r
+             "\t\t\t\tmtu.....................0x%X\n"\r
+             "\t\t\t\tTClass..................0x%X\n"\r
+             "\t\t\t\tpkey....................0x%X\n"\r
+             "\t\t\t\trate....................0x%X\n"\r
+             "\t\t\t\tpkt_life................0x%X\n"\r
+             "\t\t\t\tSLFlowLabelHopLimit.....0x%X\n"\r
+             "\t\t\t\tScopeState..............0x%X\n"\r
+             "\t\t\t\tProxyJoin...............0x%X\n"\r
+             "",\r
+             cl_ntoh64( p_mcmr->mgid.unicast.prefix ),\r
+             cl_ntoh64( p_mcmr->mgid.unicast.interface_id ),\r
+             cl_ntoh64( p_mcmr->port_gid.unicast.prefix ),\r
+             cl_ntoh64( p_mcmr->port_gid.unicast.interface_id ),\r
+             cl_ntoh32( p_mcmr->qkey ),\r
+             cl_ntoh16( p_mcmr->mlid ),\r
+             p_mcmr->mtu,\r
+             p_mcmr->tclass,\r
+             cl_ntoh16( p_mcmr->pkey ),\r
+             p_mcmr->rate,\r
+             p_mcmr->pkt_life,\r
+             cl_ntoh32( p_mcmr->sl_flow_hop ),\r
+             p_mcmr->scope_state,\r
+             p_mcmr->proxy_join\r
+             );\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_service_record(\r
+  IN osm_log_t* const p_log,\r
+  IN const ib_service_record_t* const p_sr,\r
+  IN const osm_log_level_t log_level )\r
+{\r
+  char buf_service_key[35];\r
+  char buf_service_name[65];\r
+\r
+  if( osm_log_is_active( p_log, log_level ) )\r
+  {\r
+    sprintf(buf_service_key,\r
+            "0x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",\r
+            p_sr->service_key[0],\r
+            p_sr->service_key[1],\r
+            p_sr->service_key[2],\r
+            p_sr->service_key[3],\r
+            p_sr->service_key[4],\r
+            p_sr->service_key[5],\r
+            p_sr->service_key[6],\r
+            p_sr->service_key[7],\r
+            p_sr->service_key[8],\r
+            p_sr->service_key[9],\r
+            p_sr->service_key[10],\r
+            p_sr->service_key[11],\r
+            p_sr->service_key[12],\r
+            p_sr->service_key[13],\r
+            p_sr->service_key[14],\r
+            p_sr->service_key[15]);\r
+    strncpy(buf_service_name, (char *)p_sr->service_name, 64);\r
+    buf_service_name[64] = '\0';\r
+\r
+    osm_log( p_log, log_level,\r
+             "Service Record dump:\n"\r
+             "\t\t\t\tServiceID...............0x%016" PRIx64 "\n"\r
+             "\t\t\t\tServiceGID..............0x%016" PRIx64 " : "\r
+             "0x%016" PRIx64 "\n"\r
+             "\t\t\t\tServiceP_Key............0x%X\n"\r
+             "\t\t\t\tServiceLease............0x%X\n"\r
+             "\t\t\t\tServiceKey..............%s\n"\r
+             "\t\t\t\tServiceName.............%s\n"\r
+             "\t\t\t\tServiceData8.1..........0x%X\n"\r
+             "\t\t\t\tServiceData8.2..........0x%X\n"\r
+             "\t\t\t\tServiceData8.3..........0x%X\n"\r
+             "\t\t\t\tServiceData8.4..........0x%X\n"\r
+             "\t\t\t\tServiceData8.5..........0x%X\n"\r
+             "\t\t\t\tServiceData8.6..........0x%X\n"\r
+             "\t\t\t\tServiceData8.7..........0x%X\n"\r
+             "\t\t\t\tServiceData8.8..........0x%X\n"\r
+             "\t\t\t\tServiceData8.9..........0x%X\n"\r
+             "\t\t\t\tServiceData8.10.........0x%X\n"\r
+             "\t\t\t\tServiceData8.11.........0x%X\n"\r
+             "\t\t\t\tServiceData8.12.........0x%X\n"\r
+             "\t\t\t\tServiceData8.13.........0x%X\n"\r
+             "\t\t\t\tServiceData8.14.........0x%X\n"\r
+             "\t\t\t\tServiceData8.15.........0x%X\n"\r
+             "\t\t\t\tServiceData8.16.........0x%X\n"\r
+             "\t\t\t\tServiceData16.1.........0x%X\n"\r
+             "\t\t\t\tServiceData16.2.........0x%X\n"\r
+             "\t\t\t\tServiceData16.3.........0x%X\n"\r
+             "\t\t\t\tServiceData16.4.........0x%X\n"\r
+             "\t\t\t\tServiceData16.5.........0x%X\n"\r
+             "\t\t\t\tServiceData16.6.........0x%X\n"\r
+             "\t\t\t\tServiceData16.7.........0x%X\n"\r
+             "\t\t\t\tServiceData16.8.........0x%X\n"\r
+             "\t\t\t\tServiceData32.1.........0x%X\n"\r
+             "\t\t\t\tServiceData32.2.........0x%X\n"\r
+             "\t\t\t\tServiceData32.3.........0x%X\n"\r
+             "\t\t\t\tServiceData32.4.........0x%X\n"\r
+             "\t\t\t\tServiceData64.1.........0x%016" PRIx64 "\n"\r
+             "\t\t\t\tServiceData64.2.........0x%016" PRIx64 "\n"\r
+             "",\r
+             cl_ntoh64( p_sr->service_id ),\r
+             cl_ntoh64( p_sr->service_gid.unicast.prefix ),\r
+             cl_ntoh64( p_sr->service_gid.unicast.interface_id ),\r
+             cl_ntoh16( p_sr->service_pkey ),\r
+             cl_ntoh32( p_sr->service_lease ),\r
+             buf_service_key,\r
+             buf_service_name,\r
+             p_sr->service_data8[0], p_sr->service_data8[1],\r
+             p_sr->service_data8[2], p_sr->service_data8[3],\r
+             p_sr->service_data8[4], p_sr->service_data8[5],\r
+             p_sr->service_data8[6], p_sr->service_data8[7],\r
+             p_sr->service_data8[8], p_sr->service_data8[9],\r
+             p_sr->service_data8[10], p_sr->service_data8[11],\r
+             p_sr->service_data8[12], p_sr->service_data8[13],\r
+             p_sr->service_data8[14], p_sr->service_data8[15],\r
+             cl_ntoh16(p_sr->service_data16[0]),\r
+             cl_ntoh16(p_sr->service_data16[1]),\r
+             cl_ntoh16(p_sr->service_data16[2]),\r
+             cl_ntoh16(p_sr->service_data16[3]),\r
+             cl_ntoh16(p_sr->service_data16[4]),\r
+             cl_ntoh16(p_sr->service_data16[5]),\r
+             cl_ntoh16(p_sr->service_data16[6]),\r
+             cl_ntoh16(p_sr->service_data16[7]),\r
+             cl_ntoh32(p_sr->service_data32[0]),\r
+             cl_ntoh32(p_sr->service_data32[1]),\r
+             cl_ntoh32(p_sr->service_data32[2]),\r
+             cl_ntoh32(p_sr->service_data32[3]),\r
+             cl_ntoh64(p_sr->service_data64[0]),\r
+             cl_ntoh64(p_sr->service_data64[1])\r
+             );\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_inform_info(\r
+  IN osm_log_t* const p_log,\r
+  IN const ib_inform_info_t* const p_ii,\r
+  IN const osm_log_level_t log_level )\r
+{\r
+  uint32_t qpn;\r
+  uint8_t  resp_time_val;\r
+\r
+  if( osm_log_is_active( p_log, log_level ) )\r
+  {\r
+\r
+   ib_inform_info_get_qpn_resp_time(p_ii->g_or_v.generic.qpn_resp_time_val,\r
+                                    &qpn, &resp_time_val);\r
+\r
+   if (p_ii->is_generic)\r
+    {\r
+      osm_log( p_log, log_level,\r
+               "InformInfo dump:\n"\r
+               "\t\t\t\tgid.....................0x%016" PRIx64 " : 0x%016" PRIx64 "\n"\r
+               "\t\t\t\tlid_range_begin.........0x%X\n"\r
+               "\t\t\t\tlid_range_end...........0x%X\n"\r
+               "\t\t\t\tis_generic..............0x%X\n"\r
+               "\t\t\t\tsubscribe...............0x%X\n"\r
+               "\t\t\t\ttrap_type...............0x%X\n"\r
+               "\t\t\t\ttrap_num................%u\n"\r
+               "\t\t\t\tqpn.....................0x%06X\n"\r
+               "\t\t\t\tresp_time_val...........0x%X\n"\r
+               "\t\t\t\tnode_type...............0x%06X\n"\r
+               "",\r
+               cl_ntoh64( p_ii->gid.unicast.prefix ),\r
+               cl_ntoh64( p_ii->gid.unicast.interface_id ),\r
+               cl_ntoh16( p_ii->lid_range_begin ),\r
+               cl_ntoh16( p_ii->lid_range_end ),\r
+               p_ii->is_generic,\r
+               p_ii->subscribe,\r
+               cl_ntoh16( p_ii->trap_type ),\r
+               cl_ntoh16( p_ii->g_or_v.generic.trap_num ),\r
+               cl_ntoh32(qpn),\r
+               resp_time_val,\r
+               cl_ntoh32(ib_inform_info_get_node_type( p_ii ))\r
+               );\r
+    }\r
+    else\r
+    {\r
+      osm_log( p_log, log_level,\r
+               "InformInfo dump:\n"\r
+               "\t\t\t\tgid.....................0x%016" PRIx64 " : 0x%016" PRIx64 "\n"\r
+               "\t\t\t\tlid_range_begin.........0x%X\n"\r
+               "\t\t\t\tlid_range_end...........0x%X\n"\r
+               "\t\t\t\tis_generic..............0x%X\n"\r
+               "\t\t\t\tsubscribe...............0x%X\n"\r
+               "\t\t\t\ttrap_type...............0x%X\n"\r
+               "\t\t\t\tdev_id..................0x%X\n"\r
+               "\t\t\t\tqpn.....................0x%06X\n"\r
+               "\t\t\t\tresp_time_val...........0x%X\n"\r
+               "\t\t\t\tvendor_id...............0x%06X\n"\r
+               "",\r
+               cl_ntoh64( p_ii->gid.unicast.prefix ),\r
+               cl_ntoh64( p_ii->gid.unicast.interface_id ),\r
+               cl_ntoh16( p_ii->lid_range_begin ),\r
+               cl_ntoh16( p_ii->lid_range_end ),\r
+               p_ii->is_generic,\r
+               p_ii->subscribe,\r
+               cl_ntoh16( p_ii->trap_type ),\r
+               cl_ntoh16( p_ii->g_or_v.vend.dev_id ),\r
+               cl_ntoh32(qpn),\r
+               resp_time_val,\r
+               cl_ntoh32(ib_inform_info_get_node_type( p_ii ))\r
+               );\r
+    }\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_inform_info_record(\r
+  IN osm_log_t* const p_log,\r
+  IN const ib_inform_info_record_t* const p_iir,\r
+  IN const osm_log_level_t log_level )\r
+{\r
+  uint32_t qpn;\r
+  uint8_t  resp_time_val;\r
+\r
+  ib_inform_info_get_qpn_resp_time(p_iir->inform_info.g_or_v.generic.qpn_resp_time_val,\r
+                                   &qpn, &resp_time_val);\r
+\r
+  if( osm_log_is_active( p_log, log_level ) )\r
+  {\r
+\r
+    ib_inform_info_get_qpn_resp_time(p_iir->inform_info.g_or_v.generic.qpn_resp_time_val,\r
+                                     &qpn, &resp_time_val);\r
+\r
+    if (p_iir->inform_info.is_generic)\r
+    {\r
+      osm_log( p_log, log_level,\r
+               "InformInfo Record dump:\n"\r
+               "\t\t\t\tRID\n"\r
+               "\t\t\t\tSubscriberGID...........0x%016" PRIx64 " : "\r
+               "0x%016" PRIx64 "\n"\r
+               "\t\t\t\tSubscriberEnum..........0x%X\n"\r
+               "\t\t\t\tInformInfo dump:\n"\r
+               "\t\t\t\tgid.....................0x%016" PRIx64 " : 0x%016" PRIx64 "\n"\r
+               "\t\t\t\tlid_range_begin.........0x%X\n"\r
+               "\t\t\t\tlid_range_end...........0x%X\n"\r
+               "\t\t\t\tis_generic..............0x%X\n"\r
+               "\t\t\t\tsubscribe...............0x%X\n"\r
+               "\t\t\t\ttrap_type...............0x%X\n"\r
+               "\t\t\t\ttrap_num................%u\n"\r
+               "\t\t\t\tqpn.....................0x%06X\n"\r
+               "\t\t\t\tresp_time_val...........0x%X\n"\r
+               "\t\t\t\tnode_type...............0x%06X\n"\r
+               "",\r
+               cl_ntoh64( p_iir->subscriber_gid.unicast.prefix ),\r
+               cl_ntoh64( p_iir->subscriber_gid.unicast.interface_id ),\r
+               cl_ntoh16( p_iir->subscriber_enum ),\r
+               cl_ntoh64( p_iir->inform_info.gid.unicast.prefix ),\r
+               cl_ntoh64( p_iir->inform_info.gid.unicast.interface_id ),\r
+               cl_ntoh16( p_iir->inform_info.lid_range_begin ),\r
+               cl_ntoh16( p_iir->inform_info.lid_range_end ),\r
+               p_iir->inform_info.is_generic,\r
+               p_iir->inform_info.subscribe,\r
+               cl_ntoh16( p_iir->inform_info.trap_type ),\r
+               cl_ntoh16( p_iir->inform_info.g_or_v.generic.trap_num ),\r
+               cl_ntoh32(qpn),\r
+               resp_time_val,\r
+               cl_ntoh32(ib_inform_info_get_node_type( &p_iir->inform_info ))\r
+               );\r
+    }\r
+    else\r
+    {\r
+      osm_log( p_log, log_level,\r
+               "InformInfo Record dump:\n"\r
+               "\t\t\t\tRID\n"\r
+               "\t\t\t\tSubscriberGID...........0x%016" PRIx64 " : "\r
+               "0x%016" PRIx64 "\n"\r
+               "\t\t\t\tSubscriberEnum..........0x%X\n"\r
+               "\t\t\t\tInformInfo dump:\n"\r
+               "\t\t\t\tgid.....................0x%016" PRIx64 " : 0x%016" PRIx64 "\n"\r
+               "\t\t\t\tlid_range_begin.........0x%X\n"\r
+               "\t\t\t\tlid_range_end...........0x%X\n"\r
+               "\t\t\t\tis_generic..............0x%X\n"\r
+               "\t\t\t\tsubscribe...............0x%X\n"\r
+               "\t\t\t\ttrap_type...............0x%X\n"\r
+               "\t\t\t\tdev_id..................0x%X\n"\r
+               "\t\t\t\tqpn.....................0x%06X\n"\r
+               "\t\t\t\tresp_time_val...........0x%X\n"\r
+               "\t\t\t\tvendor_id...............0x%06X\n"\r
+               "",\r
+               cl_ntoh64( p_iir->subscriber_gid.unicast.prefix ),\r
+               cl_ntoh64( p_iir->subscriber_gid.unicast.interface_id ),\r
+               cl_ntoh16( p_iir->subscriber_enum ),\r
+               cl_ntoh64( p_iir->inform_info.gid.unicast.prefix ),\r
+               cl_ntoh64( p_iir->inform_info.gid.unicast.interface_id ),\r
+               cl_ntoh16( p_iir->inform_info.lid_range_begin ),\r
+               cl_ntoh16( p_iir->inform_info.lid_range_end ),\r
+               p_iir->inform_info.is_generic,\r
+               p_iir->inform_info.subscribe,\r
+               cl_ntoh16( p_iir->inform_info.trap_type ),\r
+               cl_ntoh16( p_iir->inform_info.g_or_v.vend.dev_id ),\r
+               cl_ntoh32(qpn),\r
+               resp_time_val,\r
+               cl_ntoh32(ib_inform_info_get_node_type( &p_iir->inform_info ))\r
+               );\r
+    }\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_link_record(\r
+  IN osm_log_t*            const p_log,\r
+  IN const ib_link_record_t*  const p_lr,\r
+  IN const osm_log_level_t log_level )\r
+{\r
+  if( osm_log_is_active( p_log, log_level ) )\r
+  {\r
+    osm_log( p_log, log_level,\r
+             "Link Record dump:\n"\r
+             "\t\t\t\tfrom_lid................0x%X\n"\r
+             "\t\t\t\tfrom_port_num...........0x%X\n"\r
+             "\t\t\t\tto_port_num.............0x%X\n"\r
+             "\t\t\t\tto_lid..................0x%X\n"\r
+             "",\r
+             cl_ntoh16( p_lr->from_lid ),\r
+             p_lr->from_port_num,\r
+             p_lr->to_port_num,\r
+             cl_ntoh16( p_lr->to_lid )\r
+             );\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_switch_info(\r
+  IN osm_log_t* const p_log,\r
+  IN const ib_switch_info_t* const p_si,\r
+  IN const osm_log_level_t log_level )\r
+{\r
+  if( osm_log_is_active( p_log, log_level ) )\r
+  {\r
+    osm_log( p_log, OSM_LOG_VERBOSE,\r
+             "SwitchInfo dump:\n"\r
+             "\t\t\t\tlin_cap.................0x%X\n"\r
+             "\t\t\t\trand_cap................0x%X\n"\r
+             "\t\t\t\tmcast_cap...............0x%X\n"\r
+             "\t\t\t\tlin_top.................0x%X\n"\r
+             "\t\t\t\tdef_port................0x%X\n"\r
+             "\t\t\t\tdef_mcast_pri_port......0x%X\n"\r
+             "\t\t\t\tdef_mcast_not_port......0x%X\n"\r
+             "\t\t\t\tlife_state..............0x%X\n"\r
+             "\t\t\t\tlids_per_port...........0x%X\n"\r
+             "\t\t\t\tpartition_enf_cap.......0x%X\n"\r
+             "\t\t\t\tflags...................0x%X\n"\r
+             "",\r
+             cl_ntoh16( p_si->lin_cap ),\r
+             cl_ntoh16( p_si->rand_cap ),\r
+             cl_ntoh16( p_si->mcast_cap ),\r
+             cl_ntoh16( p_si->lin_top ),\r
+             p_si->def_port,\r
+             p_si->def_mcast_pri_port,\r
+             p_si->def_mcast_not_port,\r
+             p_si->life_state,\r
+             cl_ntoh16( p_si->lids_per_port ),\r
+             cl_ntoh16( p_si->enforce_cap ),\r
+             p_si->flags\r
+             );\r
+  }\r
+}\r
+\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_switch_info_record(\r
+  IN osm_log_t* const p_log,\r
+  IN const ib_switch_info_record_t* const p_sir,\r
+  IN const osm_log_level_t log_level )\r
+{\r
+  if( osm_log_is_active( p_log, log_level ) )\r
+  {\r
+    osm_log( p_log, log_level,\r
+             "SwitchInfo Record dump:\n"\r
+             "\t\t\t\tRID\n"\r
+             "\t\t\t\tlid.....................0x%X\n"\r
+             "\t\t\t\tSwitchInfo dump:\n"\r
+             "\t\t\t\tlin_cap.................0x%X\n"\r
+             "\t\t\t\trand_cap................0x%X\n"\r
+             "\t\t\t\tmcast_cap...............0x%X\n"\r
+             "\t\t\t\tlin_top.................0x%X\n"\r
+             "\t\t\t\tdef_port................0x%X\n"\r
+             "\t\t\t\tdef_mcast_pri_port......0x%X\n"\r
+             "\t\t\t\tdef_mcast_not_port......0x%X\n"\r
+             "\t\t\t\tlife_state..............0x%X\n"\r
+             "\t\t\t\tlids_per_port...........0x%X\n"\r
+             "\t\t\t\tpartition_enf_cap.......0x%X\n"\r
+             "\t\t\t\tflags...................0x%X\n"\r
+             "",\r
+             cl_ntoh16( p_sir->lid ),\r
+             cl_ntoh16( p_sir->switch_info.lin_cap ),\r
+             cl_ntoh16( p_sir->switch_info.rand_cap ),\r
+             cl_ntoh16( p_sir->switch_info.mcast_cap ),\r
+             cl_ntoh16( p_sir->switch_info.lin_top ),\r
+             p_sir->switch_info.def_port,\r
+             p_sir->switch_info.def_mcast_pri_port,\r
+             p_sir->switch_info.def_mcast_not_port,\r
+             p_sir->switch_info.life_state,\r
+             cl_ntoh16( p_sir->switch_info.lids_per_port ),\r
+             cl_ntoh16( p_sir->switch_info.enforce_cap ),\r
+             p_sir->switch_info.flags\r
+           );\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_pkey_block(\r
+  IN osm_log_t* const p_log,\r
+  IN uint64_t port_guid,\r
+  IN uint16_t block_num,\r
+  IN uint8_t port_num,\r
+  IN const ib_pkey_table_t* const p_pkey_tbl,\r
+  IN const osm_log_level_t log_level )\r
+{\r
+  int i;\r
+  char buf_line[1024];\r
+\r
+  if( osm_log_is_active( p_log, log_level ) )\r
+  {\r
+    buf_line[0] = '\0';\r
+    for (i = 0; i < 32; i++)\r
+      sprintf( buf_line,"%s 0x%04x |",\r
+               buf_line, cl_ntoh16(p_pkey_tbl->pkey_entry[i]));\r
+\r
+    osm_log( p_log, log_level,\r
+             "P_Key table dump:\n"\r
+             "\t\t\tport_guid...........0x%016" PRIx64 "\n"\r
+             "\t\t\tblock_num...........0x%X\n"\r
+             "\t\t\tport_num............0x%X\n\tP_Key Table: %s\n",\r
+             cl_ntoh64( port_guid ),\r
+             block_num,\r
+             port_num,\r
+             buf_line\r
+             );\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_slvl_map_table(\r
+  IN osm_log_t* const p_log,\r
+  IN uint64_t port_guid,\r
+  IN uint8_t in_port_num,\r
+  IN uint8_t out_port_num,\r
+  IN const ib_slvl_table_t* const p_slvl_tbl,\r
+  IN const osm_log_level_t log_level )\r
+{\r
+  uint8_t i;\r
+  char buf_line1[1024];\r
+  char buf_line2[1024];\r
+\r
+  if( osm_log_is_active( p_log, log_level ) )\r
+  {\r
+    buf_line1[0] = '\0';\r
+    buf_line2[0] = '\0';\r
+    for (i = 0; i < 16; i++)\r
+      sprintf( buf_line1,"%s %-2u |", buf_line1, i);\r
+    for (i = 0; i < 16; i++)\r
+      sprintf( buf_line2,"%s0x%01X |",\r
+               buf_line2, ib_slvl_table_get(p_slvl_tbl, i));\r
+    osm_log( p_log, log_level,\r
+             "SLtoVL dump:\n"\r
+             "\t\t\tport_guid............0x%016" PRIx64 "\n"\r
+             "\t\t\tin_port_num..........0x%X\n"\r
+             "\t\t\tout_port_num.........0x%X\n\tSL: | %s\n\tVL: | %s\n",\r
+             cl_ntoh64( port_guid ),\r
+             in_port_num,\r
+             out_port_num,\r
+             buf_line1, buf_line2\r
+             );\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_vl_arb_table(\r
+  IN osm_log_t* const p_log,\r
+  IN uint64_t port_guid,\r
+  IN uint8_t block_num,\r
+  IN uint8_t port_num,\r
+  IN const ib_vl_arb_table_t* const p_vla_tbl,\r
+  IN const osm_log_level_t log_level )\r
+{\r
+  int i;\r
+  char buf_line1[1024];\r
+  char buf_line2[1024];\r
+\r
+  if( osm_log_is_active( p_log, log_level ) )\r
+  {\r
+    buf_line1[0] = '\0';\r
+    buf_line2[0] = '\0';\r
+    for (i = 0; i < 32; i++)\r
+      sprintf( buf_line1,"%s 0x%01X |",\r
+               buf_line1, p_vla_tbl->vl_entry[i].vl);\r
+    for (i = 0; i < 32; i++)\r
+      sprintf( buf_line2,"%s 0x%01X |",\r
+               buf_line2, p_vla_tbl->vl_entry[i].weight);\r
+    osm_log( p_log, log_level,\r
+             "VlArb dump:\n"\r
+             "\t\t\tport_guid...........0x%016" PRIx64 "\n"\r
+             "\t\t\tblock_num...........0x%X\n"\r
+             "\t\t\tport_num............0x%X\n\tVL    : | %s\n\tWEIGHT:| %s\n",\r
+             cl_ntoh64( port_guid ),\r
+             block_num,\r
+             port_num,\r
+             buf_line1, buf_line2\r
+             );\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_sm_info(\r
+  IN osm_log_t* const p_log,\r
+  IN const ib_sm_info_t* const p_smi,\r
+  IN const osm_log_level_t log_level )\r
+{\r
+  if( osm_log_is_active( p_log, log_level ) )\r
+  {\r
+    osm_log( p_log, OSM_LOG_DEBUG,\r
+             "SMInfo dump:\n"\r
+             "\t\t\t\tguid....................0x%016" PRIx64 "\n"\r
+             "\t\t\t\tsm_key..................0x%016" PRIx64 "\n"\r
+             "\t\t\t\tact_count...............%u\n"\r
+             "\t\t\t\tpriority................%u\n"\r
+             "\t\t\t\tsm_state................%u\n"\r
+             "",\r
+             cl_ntoh64( p_smi->guid ),\r
+             cl_ntoh64( p_smi->sm_key ),\r
+             cl_ntoh32( p_smi->act_count ),\r
+             ib_sminfo_get_priority( p_smi ),\r
+             ib_sminfo_get_state( p_smi )\r
+             );\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_sm_info_record(\r
+  IN osm_log_t* const p_log,\r
+  IN const ib_sminfo_record_t* const p_smir,\r
+  IN const osm_log_level_t log_level )\r
+{\r
+  if( osm_log_is_active( p_log, log_level ) )\r
+  {\r
+    osm_log( p_log, OSM_LOG_DEBUG,\r
+             "SMInfo Record dump:\n"\r
+             "\t\t\t\tRID\n"\r
+             "\t\t\t\tLid.....................0x%X\n"\r
+             "\t\t\t\tReserved................0x%X\n"\r
+             "\t\t\t\tSMInfo dump:\n"\r
+             "\t\t\t\tguid....................0x%016" PRIx64 "\n"\r
+             "\t\t\t\tsm_key..................0x%016" PRIx64 "\n"\r
+             "\t\t\t\tact_count...............%u\n"\r
+             "\t\t\t\tpriority................%u\n"\r
+             "\t\t\t\tsm_state................%u\n"\r
+             "",\r
+             cl_ntoh16( p_smir->lid ),\r
+             cl_ntoh16( p_smir->resv0 ),\r
+             cl_ntoh64( p_smir->sm_info.guid ),\r
+             cl_ntoh64( p_smir->sm_info.sm_key ),\r
+             cl_ntoh32( p_smir->sm_info.act_count ),\r
+             ib_sminfo_get_priority( &p_smir->sm_info ),\r
+             ib_sminfo_get_state( &p_smir->sm_info )\r
+             );\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_notice(\r
+  IN osm_log_t* const p_log,\r
+  IN const ib_mad_notice_attr_t *p_ntci,\r
+  IN const osm_log_level_t log_level )\r
+{\r
+  char buff[1024];\r
+  buff[0] = '\0';\r
+\r
+  if( osm_log_is_active( p_log, log_level ) )\r
+  {\r
+    if (ib_notice_is_generic(p_ntci))\r
+    {\r
+      /* immediate data based on the trap */\r
+      switch (cl_ntoh16(p_ntci->g_or_v.generic.trap_num)) {\r
+      case 64:\r
+      case 65:\r
+      case 66:\r
+      case 67:\r
+        sprintf(buff,\r
+                "\t\t\t\tsrc_gid..................0x%016" PRIx64\r
+                ":0x%016" PRIx64 "\n",\r
+                cl_ntoh64(p_ntci->data_details.ntc_64_67.gid.unicast.prefix),\r
+                cl_ntoh64(p_ntci->data_details.ntc_64_67.gid.unicast.interface_id));\r
+        break;\r
+      case 128:\r
+        sprintf(buff,\r
+                "\t\t\t\tsw_lid...................0x%04X\n",\r
+                cl_ntoh16(p_ntci->data_details.ntc_128.sw_lid));\r
+        break;\r
+      case 129:\r
+      case 130:\r
+      case 131:\r
+        sprintf(buff,\r
+                "\t\t\t\tlid......................0x%04X\n"\r
+                "\t\t\t\tport_num.................%u\n",\r
+                cl_ntoh16(p_ntci->data_details.ntc_129_131.lid),\r
+                p_ntci->data_details.ntc_129_131.port_num);\r
+        break;\r
+      case 144:\r
+        sprintf(buff,\r
+                "\t\t\t\tlid......................0x%04x\n"\r
+                "\t\t\t\tnew_cap_mask.............0x%08x\n",\r
+                cl_ntoh16(p_ntci->data_details.ntc_144.lid),\r
+                cl_ntoh32(p_ntci->data_details.ntc_144.new_cap_mask));\r
+        break;\r
+      case 145:\r
+        sprintf(buff,\r
+                "\t\t\t\tlid......................0x%04X\n"\r
+                "\t\t\t\tnew_sys_guid.............0x%016" PRIx64 "\n",\r
+                cl_ntoh16(p_ntci->data_details.ntc_145.lid),\r
+                cl_ntoh64(p_ntci->data_details.ntc_145.new_sys_guid));\r
+        break;\r
+      }\r
+\r
+      osm_log( p_log, log_level,\r
+               "Generic Notice dump:\n"\r
+               "\t\t\t\ttype.....................0x%02X\n"\r
+               "\t\t\t\tprod_type................%u\n"\r
+               "\t\t\t\ttrap_num.................%u\n%s"\r
+               "",\r
+               ib_notice_get_type(p_ntci),\r
+               cl_ntoh32(ib_notice_get_prod_type(p_ntci)),\r
+               cl_ntoh16(p_ntci->g_or_v.generic.trap_num),\r
+               buff\r
+               );\r
+    }\r
+    else\r
+    {\r
+      osm_log( p_log, log_level,\r
+               "Vendor Notice dump:\n"\r
+               "\t\t\t\ttype.....................0x%04x\n"\r
+               "\t\t\t\tvendor...................%u\n"\r
+               "\t\t\t\tdevice_id................%u\n"\r
+               "",\r
+               cl_ntoh16(ib_notice_get_type(p_ntci)),\r
+               cl_ntoh32(ib_notice_get_vend_id(p_ntci)),\r
+               cl_ntoh16(p_ntci->g_or_v.vend.dev_id)\r
+               );\r
+    }\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_dr_smp(\r
+  IN osm_log_t* const p_log,\r
+  IN const ib_smp_t* const p_smp,\r
+  IN const osm_log_level_t log_level )\r
+{\r
+  uint32_t i;\r
+  char buf[BUF_SIZE];\r
+  char line[BUF_SIZE];\r
+\r
+  if( osm_log_is_active( p_log, log_level ) )\r
+  {\r
+    sprintf( buf,\r
+             "SMP dump:\n"\r
+             "\t\t\t\tbase_ver................0x%X\n"\r
+             "\t\t\t\tmgmt_class..............0x%X\n"\r
+             "\t\t\t\tclass_ver...............0x%X\n"\r
+             "\t\t\t\tmethod..................0x%X (%s)\n",\r
+             p_smp->base_ver,\r
+             p_smp->mgmt_class,\r
+             p_smp->class_ver,\r
+             p_smp->method, ib_get_sm_method_str(p_smp->method));\r
+\r
+    if (p_smp->mgmt_class == IB_MCLASS_SUBN_DIR)\r
+    {\r
+      sprintf( line,\r
+               "\t\t\t\tD bit...................0x%X\n"\r
+               "\t\t\t\tstatus..................0x%X\n",\r
+               ib_smp_is_d(p_smp),\r
+               ib_smp_get_status(p_smp));\r
+    }\r
+    else\r
+    {\r
+      sprintf( line,\r
+               "\t\t\t\tstatus..................0x%X\n",\r
+               cl_ntoh16(p_smp->status));\r
+    }\r
+    strcat( buf, line );\r
+\r
+    sprintf( line,\r
+             "\t\t\t\thop_ptr.................0x%X\n"\r
+             "\t\t\t\thop_count...............0x%X\n"\r
+             "\t\t\t\ttrans_id................0x%" PRIx64 "\n"\r
+             "\t\t\t\tattr_id.................0x%X (%s)\n"\r
+             "\t\t\t\tresv....................0x%X\n"\r
+             "\t\t\t\tattr_mod................0x%X\n"\r
+             "\t\t\t\tm_key...................0x%016" PRIx64 "\n",\r
+             p_smp->hop_ptr,\r
+             p_smp->hop_count,\r
+             cl_ntoh64(p_smp->trans_id),\r
+             cl_ntoh16(p_smp->attr_id),\r
+             ib_get_sm_attr_str( p_smp->attr_id ),\r
+             cl_ntoh16(p_smp->resv),\r
+             cl_ntoh32(p_smp->attr_mod),\r
+             cl_ntoh64(p_smp->m_key)\r
+             );\r
+    strcat( buf, line );\r
+\r
+    if (p_smp->mgmt_class == IB_MCLASS_SUBN_DIR)\r
+    {\r
+      sprintf( line,\r
+               "\t\t\t\tdr_slid.................0x%X\n"\r
+               "\t\t\t\tdr_dlid.................0x%X\n",\r
+               cl_ntoh16(p_smp->dr_slid),\r
+               cl_ntoh16(p_smp->dr_dlid)\r
+               );\r
+      strcat( buf, line );\r
+\r
+      strcat( buf, "\n\t\t\t\tInitial path: " );\r
+\r
+      for( i = 0; i <= p_smp->hop_count; i++ )\r
+      {\r
+        sprintf( line, "[%X]", p_smp->initial_path[i] );\r
+        strcat( buf, line );\r
+      }\r
+\r
+      strcat( buf, "\n\t\t\t\tReturn path:  " );\r
+\r
+      for( i = 0; i <= p_smp->hop_count; i++ )\r
+      {\r
+        sprintf( line, "[%X]", p_smp->return_path[i] );\r
+        strcat( buf, line );\r
+      }\r
+\r
+      strcat( buf, "\n\t\t\t\tReserved:     " );\r
+\r
+      for( i = 0; i < 7; i++ )\r
+      {\r
+        sprintf( line, "[%0X]", p_smp->resv1[i] );\r
+        strcat( buf, line );\r
+      }\r
+\r
+      strcat( buf, "\n" );\r
+\r
+      for( i = 0; i < 64; i += 16 )\r
+      {\r
+        sprintf( line, "\n\t\t\t\t%02X %02X %02X %02X "\r
+                 "%02X %02X %02X %02X"\r
+                 "   %02X %02X %02X %02X %02X %02X %02X %02X\n",\r
+                 p_smp->data[i],\r
+                 p_smp->data[i+1],\r
+                 p_smp->data[i+2],\r
+                 p_smp->data[i+3],\r
+                 p_smp->data[i+4],\r
+                 p_smp->data[i+5],\r
+                 p_smp->data[i+6],\r
+                 p_smp->data[i+7],\r
+                 p_smp->data[i+8],\r
+                 p_smp->data[i+9],\r
+                 p_smp->data[i+10],\r
+                 p_smp->data[i+11],\r
+                 p_smp->data[i+12],\r
+                 p_smp->data[i+13],\r
+                 p_smp->data[i+14],\r
+                 p_smp->data[i+15] );\r
+\r
+        strcat( buf, line );\r
+      }\r
+    }\r
+    else\r
+    {\r
+      /* not a Direct Route so provide source and destination lids */\r
+      strcat(buf, "\t\t\t\tMAD IS LID ROUTED\n");\r
+    }\r
+\r
+    osm_log( p_log, log_level,\r
+             "%s\n", buf );\r
+\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_sa_mad(\r
+  IN osm_log_t* const p_log,\r
+  IN const ib_sa_mad_t* const p_mad,\r
+  IN const osm_log_level_t log_level )\r
+{\r
+  char buf[BUF_SIZE];\r
+\r
+  /* make sure the mad is valid */\r
+  if (p_mad == NULL)\r
+  {\r
+    osm_log( p_log, log_level,\r
+             "NULL MAD POINTER\n");\r
+    return;\r
+  }\r
+\r
+  if( osm_log_is_active( p_log, log_level ) )\r
+  {\r
+    sprintf( buf,\r
+             "SA MAD dump:\n"\r
+             "\t\t\t\tbase_ver................0x%X\n"\r
+             "\t\t\t\tmgmt_class..............0x%X\n"\r
+             "\t\t\t\tclass_ver...............0x%X\n"\r
+             "\t\t\t\tmethod..................0x%X (%s)\n"\r
+             "\t\t\t\tstatus..................0x%X\n"\r
+             "\t\t\t\tresv....................0x%X\n"\r
+             "\t\t\t\ttrans_id................0x%" PRIx64 "\n"\r
+             "\t\t\t\tattr_id.................0x%X (%s)\n"\r
+             "\t\t\t\tresv1...................0x%X\n"\r
+             "\t\t\t\tattr_mod................0x%X\n"\r
+             "\t\t\t\trmpp_version............0x%X\n"\r
+             "\t\t\t\trmpp_type...............0x%X\n"\r
+             "\t\t\t\trmpp_flags..............0x%X\n"\r
+             "\t\t\t\trmpp_status.............0x%X\n"\r
+             "\t\t\t\tseg_num.................0x%X\n"\r
+             "\t\t\t\tpayload_len/new_win.....0x%X\n"\r
+             "\t\t\t\tsm_key..................0x%016" PRIx64 "\n"\r
+             "\t\t\t\tattr_offset.............0x%X\n"\r
+             "\t\t\t\tresv2...................0x%X\n"\r
+             "\t\t\t\tcomp_mask...............0x%016" PRIx64 "\n",\r
+             p_mad->base_ver,\r
+             p_mad->mgmt_class,\r
+             p_mad->class_ver,\r
+             p_mad->method, ib_get_sa_method_str(p_mad->method),\r
+             cl_ntoh16(p_mad->status),\r
+             cl_ntoh16(p_mad->resv),\r
+             cl_ntoh64(p_mad->trans_id),\r
+             cl_ntoh16(p_mad->attr_id),\r
+             ib_get_sa_attr_str( p_mad->attr_id ),\r
+             cl_ntoh16(p_mad->resv1),\r
+             cl_ntoh32(p_mad->attr_mod),\r
+             p_mad->rmpp_version,\r
+             p_mad->rmpp_type,\r
+             p_mad->rmpp_flags,\r
+             p_mad->rmpp_status,\r
+             cl_ntoh32(p_mad->seg_num),\r
+             cl_ntoh32(p_mad->paylen_newwin),\r
+             cl_ntoh64(p_mad->sm_key),\r
+             cl_ntoh16(p_mad->attr_offset),\r
+             cl_ntoh16(p_mad->resv3),\r
+             cl_ntoh64(p_mad->comp_mask)\r
+             );\r
+\r
+    strcat( buf, "\n" );\r
+\r
+    osm_log( p_log, log_level,\r
+             "%s\n", buf );\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_dr_path(\r
+  IN osm_log_t* const p_log,\r
+  IN const osm_dr_path_t* const p_path,\r
+  IN const osm_log_level_t log_level)\r
+{\r
+  uint32_t i;\r
+  char buf[BUF_SIZE];\r
+  char line[BUF_SIZE];\r
+\r
+  if( osm_log_is_active( p_log, log_level) )\r
+  {\r
+    sprintf( buf, "Directed Path Dump of %u hop path:"\r
+             "\n\t\t\t\tPath = ", p_path->hop_count );\r
+\r
+    for( i = 0; i <= p_path->hop_count; i++ )\r
+    {\r
+      sprintf( line, "[%X]", p_path->path[i] );\r
+      strcat( buf, line );\r
+    }\r
+    osm_log( p_log, log_level,\r
+             "%s\n", buf );\r
+  }\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+void\r
+osm_dump_smp_dr_path(\r
+  IN osm_log_t* const p_log,\r
+  IN const ib_smp_t* const p_smp,\r
+  IN const osm_log_level_t log_level\r
+  )\r
+{\r
+  uint32_t i;\r
+  char buf[BUF_SIZE];\r
+  char line[BUF_SIZE];\r
+\r
+  if( osm_log_is_active( p_log, log_level) )\r
+  {\r
+    sprintf( buf, "Received SMP on a %u hop path:"\r
+             "\n\t\t\t\tInitial path = ", p_smp->hop_count );\r
+\r
+    for( i = 0; i <= p_smp->hop_count; i++ )\r
+    {\r
+      sprintf( line, "[%X]", p_smp->initial_path[i] );\r
+      strcat( buf, line );\r
+    }\r
+\r
+    strcat( buf, "\n\t\t\t\tReturn path  = " );\r
+\r
+    for( i = 0; i <= p_smp->hop_count; i++ )\r
+    {\r
+      sprintf( line, "[%X]", p_smp->return_path[i] );\r
+      strcat( buf, line );\r
+    }\r
+\r
+    osm_log( p_log, log_level,\r
+             "%s\n", buf );\r
+  }\r
+}\r
+\r
+const char* const __osm_sm_state_str[] =\r
+{\r
+  "OSM_SM_STATE_NO_STATE",                 /* 0 */\r
+  "OSM_SM_STATE_INIT",                     /* 1 */\r
+  "OSM_SM_STATE_IDLE",                     /* 2 */\r
+  "OSM_SM_STATE_SWEEP_LIGHT",                 /* 3 */\r
+  "OSM_SM_STATE_SWEEP_LIGHT_WAIT",            /* 4 */\r
+  "OSM_SM_STATE_SWEEP_HEAVY_SELF",            /* 5 */\r
+  "OSM_SM_STATE_SWEEP_HEAVY_SUBNET",          /* 6 */\r
+  "OSM_SM_STATE_SET_SM_UCAST_LID",            /* 7 */\r
+  "OSM_SM_STATE_SET_SM_UCAST_LID_WAIT",       /* 8 */\r
+  "OSM_SM_STATE_SET_SM_UCAST_LID_DONE",       /* 9 */\r
+  "OSM_SM_STATE_SET_SUBNET_UCAST_LIDS",       /* 10 */\r
+  "OSM_SM_STATE_SET_SUBNET_UCAST_LIDS_WAIT",     /* 11 */\r
+  "OSM_SM_STATE_SET_SUBNET_UCAST_LIDS_DONE",     /* 12 */\r
+  "OSM_SM_STATE_SET_UCAST_TABLES",            /* 13 */\r
+  "OSM_SM_STATE_SET_UCAST_TABLES_WAIT",       /* 14 */\r
+  "OSM_SM_STATE_SET_UCAST_TABLES_DONE",       /* 15 */\r
+  "OSM_SM_STATE_SET_MCAST_TABLES",            /* 16 */\r
+  "OSM_SM_STATE_SET_MCAST_TABLES_WAIT",       /* 17 */\r
+  "OSM_SM_STATE_SET_MCAST_TABLES_DONE",       /* 18 */\r
+  "OSM_SM_STATE_SET_LINK_PORTS",                 /* 19 */\r
+  "OSM_SM_STATE_SET_LINK_PORTS_WAIT",               /* 20 */\r
+  "OSM_SM_STATE_SET_LINK_PORTS_DONE",               /* 21 */\r
+  "OSM_SM_STATE_SET_ARMED",                   /* 22 */\r
+  "OSM_SM_STATE_SET_ARMED_WAIT",              /* 23 */\r
+  "OSM_SM_STATE_SET_ARMED_DONE",              /* 24 */\r
+  "OSM_SM_STATE_SET_ACTIVE",                  /* 25 */\r
+  "OSM_SM_STATE_SET_ACTIVE_WAIT",             /* 26 */\r
+  "OSM_SM_STATE_LOST_NEGOTIATION",            /* 27 */\r
+  "OSM_SM_STATE_STANDBY",                     /* 28 */\r
+  "OSM_SM_STATE_SUBNET_UP",                   /* 29 */\r
+  "OSM_SM_STATE_PROCESS_REQUEST",             /* 30 */\r
+  "OSM_SM_STATE_PROCESS_REQUEST_WAIT",        /* 31 */\r
+  "OSM_SM_STATE_PROCESS_REQUEST_DONE",        /* 32 */\r
+  "OSM_SM_STATE_MASTER_OR_HIGHER_SM_DETECTED",/* 33 */\r
+  "OSM_SM_STATE_SET_PKEY",                    /* 34 */\r
+  "OSM_SM_STATE_SET_PKEY_WAIT",               /* 35 */\r
+  "OSM_SM_STATE_SET_PKEY_DONE",               /* 36 */\r
+  "UNKNOWN STATE!!"                           /* 37 */\r
+};\r
+\r
+const char* const __osm_sm_signal_str[] =\r
+{\r
+  "OSM_SIGNAL_NONE",                       /* 0 */\r
+  "OSM_SIGNAL_SWEEP",                      /* 1 */\r
+  "OSM_SIGNAL_CHANGE_DETECTED",               /* 2 */\r
+  "OSM_SIGNAL_NO_PENDING_TRANSACTIONS",       /* 3 */\r
+  "OSM_SIGNAL_DONE",                       /* 4 */\r
+  "OSM_SIGNAL_DONE_PENDING",                  /* 5 */\r
+  "OSM_SIGNAL_LOST_SM_NEGOTIATION",           /* 6 */\r
+  "OSM_SIGNAL_LIGHT_SWEEP_FAIL",              /* 7 */\r
+  "OSM_SIGNAL_IDLE_TIME_PROCESS",             /* 8 */\r
+  "OSM_SIGNAL_IDLE_TIME_PROCESS_REQUEST",        /* 9 */\r
+  "OSM_SIGNAL_MASTER_OR_HIGHER_SM_DETECTED",  /* 10 */\r
+  "OSM_SIGNAL_EXIT_STBY",                /* 11 */\r
+  "UNKNOWN SIGNAL!!"                       /* 12 */\r
+};\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+const char*\r
+osm_get_sm_state_str(\r
+  IN osm_sm_state_t state )\r
+{\r
+  if( state > OSM_SM_STATE_MAX )\r
+    state = OSM_SM_STATE_MAX;\r
+  return( __osm_sm_state_str[state] );\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+const char*\r
+osm_get_sm_signal_str(\r
+  IN osm_signal_t signal )\r
+{\r
+  if( signal > OSM_SIGNAL_MAX )\r
+    signal = OSM_SIGNAL_MAX;\r
+  return( __osm_sm_signal_str[signal] );\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+\r
+static const char* const __osm_disp_msg_str[] =\r
+{\r
+  "OSM_MSG_REQ",\r
+  "OSM_MSG_MAD_NODE_INFO",\r
+  "OSM_MSG_MAD_PORT_INFO,",\r
+  "OSM_MSG_MAD_SWITCH_INFO",\r
+  "OSM_MSG_MAD_NODE_DESC",\r
+  "OSM_MSG_NO_SMPS_OUTSTANDING",\r
+  "OSM_MSG_MAD_NODE_RECORD",\r
+  "OSM_MSG_MAD_PORTINFO_RECORD",\r
+  "OSM_MSG_MAD_SERVICE_RECORD",\r
+  "OSM_MSG_MAD_PATH_RECORD",\r
+  "OSM_MSG_MAD_MCMEMBER_RECORD",\r
+  "OSM_MSG_MAD_LINK_RECORD",\r
+  "OSM_MSG_MAD_SMINFO_RECORD",\r
+  "OSM_MSG_MAD_CLASS_PORT_INFO",\r
+  "OSM_MSG_MAD_INFORM_INFO",\r
+  "OSM_MSG_MAD_LFT_RECORD",\r
+  "OSM_MSG_MAD_LFT",\r
+  "OSM_MSG_MAD_SM_INFO",\r
+  "OSM_MSG_MAD_NOTICE",\r
+  "OSM_MSG_LIGHT_SWEEP_FAIL",\r
+  "OSM_MSG_MAD_MFT",\r
+  "OSM_MSG_MAD_PKEY_TBL_RECORD",\r
+  "OSM_MSG_MAD_VL_ARB_RECORD",\r
+  "OSM_MSG_MAD_SLVL_TBL_RECORD",\r
+  "OSM_MSG_MAD_PKEY",\r
+  "OSM_MSG_MAD_VL_ARB",\r
+  "OSM_MSG_MAD_SLVL",\r
+  "OSM_MSG_MAD_GUIDINFO_RECORD",\r
+  "OSM_MSG_MAD_INFORM_INFO_RECORD",\r
+#if defined (VENDOR_RMPP_SUPPORT) && defined (DUAL_SIDED_RMPP)\r
+  "OSM_MSG_MAD_MULTIPATH_RECORD",\r
+#endif\r
+  "UNKNOWN!!"\r
+};\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+const char*\r
+osm_get_disp_msg_str(\r
+  IN cl_disp_msgid_t msg )\r
+{\r
+  if( msg > OSM_MSG_MAX )\r
+    msg = OSM_MSG_MAX;\r
+  return( __osm_disp_msg_str[msg] );\r
+}\r
+\r
+static const char* const __osm_port_state_str_fixed_width[] =\r
+{\r
+  "NOC",\r
+  "DWN",\r
+  "INI",\r
+  "ARM",\r
+  "ACT",\r
+  "???"\r
+};\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+const char*\r
+osm_get_port_state_str_fixed_width(\r
+  IN uint8_t port_state )\r
+{\r
+  if( port_state > IB_LINK_ACTIVE )\r
+    port_state = IB_LINK_ACTIVE + 1;\r
+  return( __osm_port_state_str_fixed_width[port_state] );\r
+}\r
+\r
+static const char* const __osm_node_type_str_fixed_width[] =\r
+{\r
+  "??",\r
+  "CA",\r
+  "SW",\r
+  "RT",\r
+};\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+const char*\r
+osm_get_node_type_str_fixed_width(\r
+  IN uint32_t node_type )\r
+{\r
+  if( node_type >= IB_NOTICE_NODE_TYPE_ROUTER )\r
+    node_type = 0;\r
+  return( __osm_node_type_str_fixed_width[node_type] );\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+const char*\r
+osm_get_manufacturer_str(\r
+  IN uint64_t              const guid_ho )\r
+{\r
+  static const char* intel_str         = "Intel      ";\r
+  static const char* mellanox_str      = "Mellanox   ";\r
+  static const char* redswitch_str     = "Redswitch  ";\r
+  static const char* silverstorm_str   = "SilverStorm";\r
+  static const char* topspin_str       = "Topspin    ";\r
+  static const char* fujitsu_str       = "Fujitsu    ";\r
+  static const char* voltaire_str      = "Voltaire   ";\r
+  static const char* yotta_str         = "YottaYotta ";\r
+  static const char* pathscale_str     = "PathScale  ";\r
+  static const char* ibm_str           = "IBM        ";\r
+  static const char* divergenet_str    = "DivergeNet ";\r
+  static const char* flextronics_str   = "Flextronics";\r
+  static const char* agilent_str       = "Agilent    ";\r
+  static const char* obsidian_str      = "Obsidian   ";\r
+  static const char* baymicro_str      = "BayMicro   ";\r
+  static const char* lsilogic_str      = "LSILogic   ";\r
+  static const char* ddn_str           = "DataDirect ";\r
+  static const char* panta_str         = "Panta      ";\r
+  static const char* hp_str            = "HP         ";\r
+  static const char* rioworks_str      = "Rioworks   ";\r
+  static const char* unknown_str       = "Unknown    ";\r
+\r
+  switch( (uint32_t)(guid_ho >> (5 * 8)) )\r
+  {\r
+  case OSM_VENDOR_ID_INTEL:\r
+    return( intel_str );\r
+  case OSM_VENDOR_ID_MELLANOX:\r
+    return( mellanox_str );\r
+  case OSM_VENDOR_ID_REDSWITCH:\r
+    return( redswitch_str );\r
+  case OSM_VENDOR_ID_SILVERSTORM:\r
+    return( silverstorm_str );\r
+  case OSM_VENDOR_ID_TOPSPIN:\r
+    return( topspin_str );\r
+  case OSM_VENDOR_ID_FUJITSU:\r
+  case OSM_VENDOR_ID_FUJITSU2:\r
+    return( fujitsu_str );\r
+  case OSM_VENDOR_ID_VOLTAIRE:\r
+    return( voltaire_str );\r
+  case OSM_VENDOR_ID_YOTTAYOTTA:\r
+    return( yotta_str );\r
+  case OSM_VENDOR_ID_PATHSCALE:\r
+    return( pathscale_str );\r
+  case OSM_VENDOR_ID_IBM:\r
+    return( ibm_str );\r
+  case OSM_VENDOR_ID_DIVERGENET:\r
+    return( divergenet_str );\r
+  case OSM_VENDOR_ID_FLEXTRONICS:\r
+    return( flextronics_str );\r
+  case OSM_VENDOR_ID_AGILENT:\r
+    return( agilent_str );\r
+  case OSM_VENDOR_ID_OBSIDIAN:\r
+    return( obsidian_str );\r
+  case OSM_VENDOR_ID_BAYMICRO:\r
+    return( baymicro_str );\r
+  case OSM_VENDOR_ID_LSILOGIC:\r
+    return( lsilogic_str );\r
+  case OSM_VENDOR_ID_DDN:\r
+    return( ddn_str );\r
+  case OSM_VENDOR_ID_PANTA:\r
+    return( panta_str );\r
+  case OSM_VENDOR_ID_HP:\r
+    return( hp_str );\r
+  case OSM_VENDOR_ID_RIOWORKS:\r
+    return( rioworks_str );\r
+  default:\r
+    return( unknown_str );\r
+  }\r
+}\r
+\r
+static const char* const __osm_mtu_str_fixed_width[] =\r
+{\r
+  "??? ",\r
+  "256 ",\r
+  "512 ",\r
+  "1024",\r
+  "2048",\r
+  "4096"\r
+};\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+const char*\r
+osm_get_mtu_str(\r
+  IN uint8_t               const mtu )\r
+{\r
+  if( mtu > IB_MTU_LEN_4096 )\r
+    return( __osm_mtu_str_fixed_width[0] );\r
+  else\r
+    return( __osm_mtu_str_fixed_width[mtu] );\r
+}\r
+\r
+static const char* const __osm_lwa_str_fixed_width[] =\r
+{\r
+  "???",\r
+  "1x ",\r
+  "4x ",\r
+  "???",\r
+  "???",\r
+  "???",\r
+  "???",\r
+  "???",\r
+  "12x"\r
+};\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+const char*\r
+osm_get_lwa_str(\r
+  IN uint8_t               const lwa )\r
+{\r
+  if( lwa > 8 )\r
+    return( __osm_lwa_str_fixed_width[0] );\r
+  else\r
+    return( __osm_lwa_str_fixed_width[lwa] );\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+static const char* const __osm_lsa_str_fixed_width[] =\r
+{\r
+  "???",\r
+  "2.5",\r
+  "5  ",\r
+  "???",\r
+  "10 "\r
+};\r
+\r
+const char*\r
+osm_get_lsa_str(\r
+  IN uint8_t               const lsa )\r
+{\r
+  if( lsa > 4 )\r
+    return( __osm_lsa_str_fixed_width[0] );\r
+  else\r
+    return( __osm_lsa_str_fixed_width[lsa] );\r
+}\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+\r
+const char* const __osm_sm_mgr_signal_str[] =\r
+{\r
+  "OSM_SM_SIGNAL_INIT",                 /* 0 */\r
+  "OSM_SM_SIGNAL_DISCOVERY_COMPLETED",   /* 2 */\r
+  "OSM_SM_SIGNAL_POLLING_TIMEOUT",       /* 3 */\r
+  "OSM_SM_SIGNAL_DISCOVER",              /* 4 */\r
+  "OSM_SM_SIGNAL_DISABLE",               /* 5 */\r
+  "OSM_SM_SIGNAL_HANDOVER",              /* 6 */\r
+  "OSM_SM_SIGNAL_HANDOVER_SENT",         /* 7 */\r
+  "OSM_SM_SIGNAL_ACKNOWLEDGE",           /* 8 */\r
+  "OSM_SM_SIGNAL_STANDBY",               /* 9 */\r
+  "OSM_SM_SIGNAL_MASTER_OR_HIGHER_SM_DETECTED",        /* 10 */\r
+  "OSM_SM_SIGNAL_MASTER_OR_HIGHER_SM_DETECTED_DONE",    /* 11 */\r
+  "OSM_SM_SIGNAL_WAIT_FOR_HANDOVER",     /* 12 */\r
+  "UNKNOWN STATE!!"                      /* 13 */\r
+\r
+};\r
+\r
+/**********************************************************************\r
+ **********************************************************************/\r
+const char*\r
+osm_get_sm_mgr_signal_str(\r
+  IN osm_sm_signal_t signal )\r
+{\r
+  if( signal > OSM_SM_SIGNAL_MAX )\r
+    signal = OSM_SM_SIGNAL_MAX;\r
+  return( __osm_sm_mgr_signal_str[signal] );\r
+}\r
+\r
+const char* const __osm_sm_mgr_state_str[] =\r
+{\r
+  "IB_SMINFO_STATE_NOTACTIVE",                /* 0 */\r
+  "IB_SMINFO_STATE_DISCOVERING",              /* 1 */\r
+  "IB_SMINFO_STATE_STANDBY",                     /* 2 */\r
+  "IB_SMINFO_STATE_MASTER",                   /* 3 */\r
+  "IB_SMINFO_STATE_INIT",                     /* 4 */\r
+  "UNKNOWN STATE!!"                              /* 5 */\r
+\r
+};\r
+\r
+const char*\r
+osm_get_sm_mgr_state_str(\r
+  IN uint16_t state )\r
+{\r
+  if( state > IB_SMINFO_STATE_INIT )\r
+    state = IB_SMINFO_STATE_INIT + 1;\r
+  return( __osm_sm_mgr_state_str[state] );\r
+}\r
+\r
+\r