1219820Sjeff/* 2219820Sjeff * Copyright (c) 2004, 2005 Voltaire, Inc. All rights reserved. 3219820Sjeff * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved. 4219820Sjeff * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. 5219820Sjeff * 6219820Sjeff * This software is available to you under a choice of one of two 7219820Sjeff * licenses. You may choose to be licensed under the terms of the GNU 8219820Sjeff * General Public License (GPL) Version 2, available from the file 9219820Sjeff * COPYING in the main directory of this source tree, or the 10219820Sjeff * OpenIB.org BSD license below: 11219820Sjeff * 12219820Sjeff * Redistribution and use in source and binary forms, with or 13219820Sjeff * without modification, are permitted provided that the following 14219820Sjeff * conditions are met: 15219820Sjeff * 16219820Sjeff * - Redistributions of source code must retain the above 17219820Sjeff * copyright notice, this list of conditions and the following 18219820Sjeff * disclaimer. 19219820Sjeff * 20219820Sjeff * - Redistributions in binary form must reproduce the above 21219820Sjeff * copyright notice, this list of conditions and the following 22219820Sjeff * disclaimer in the documentation and/or other materials 23219820Sjeff * provided with the distribution. 24219820Sjeff * 25219820Sjeff * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 26219820Sjeff * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 27219820Sjeff * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 28219820Sjeff * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 29219820Sjeff * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 30219820Sjeff * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 31219820Sjeff * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 32219820Sjeff * SOFTWARE. 33219820Sjeff * 34219820Sjeff */ 35219820Sjeff 36219820Sjeff/* 37219820Sjeff * Abstract: 38219820Sjeff * Declaration of osm_mad_wrapper_t. 39219820Sjeff * This object represents the context wrapper for OpenSM MAD processing. 40219820Sjeff * This object is part of the OpenSM family of objects. 41219820Sjeff */ 42219820Sjeff 43219820Sjeff#ifndef _OSM_VENDOR_UMADT_h_ 44219820Sjeff#define _OSM_VENDOR_UMADT_h_ 45219820Sjeff 46219820Sjeff#include "iba/ib_types.h" 47219820Sjeff#include "complib/cl_qlist.h" 48219820Sjeff#include "complib/cl_thread.h" 49219820Sjeff#include <opensm/osm_base.h> 50219820Sjeff#include <vendor/umadt.h> 51219820Sjeff 52219820Sjeff#ifdef __cplusplus 53219820Sjeff# define BEGIN_C_DECLS extern "C" { 54219820Sjeff# define END_C_DECLS } 55219820Sjeff#else /* !__cplusplus */ 56219820Sjeff# define BEGIN_C_DECLS 57219820Sjeff# define END_C_DECLS 58219820Sjeff#endif /* __cplusplus */ 59219820Sjeff 60219820SjeffBEGIN_C_DECLS 61219820Sjeff/****h* OpenSM/ Vendor Umadt 62219820Sjeff* NAME 63219820Sjeff* MAD Wrapper 64219820Sjeff* 65219820Sjeff* DESCRIPTION 66219820Sjeff* 67219820Sjeff* 68219820Sjeff* AUTHOR 69219820Sjeff* Ranjit Pandit, Intel 70219820Sjeff* 71219820Sjeff*********/ 72219820Sjefftypedef void *osm_vendor_t; 73219820Sjeff#define OSM_BIND_INVALID_HANDLE 0 74219820Sjeff 75219820Sjeff/****s* OpenSM: Vendor Umadt /osm_bind_handle_t 76219820Sjeff* NAME 77219820Sjeff* osm_bind_handle_t 78219820Sjeff* 79219820Sjeff* DESCRIPTION 80219820Sjeff* handle returned by the vendor transport bind call. 81219820Sjeff* 82219820Sjeff* SYNOPSIS 83219820Sjeff*/ 84219820Sjeff 85219820Sjefftypedef void *osm_bind_handle_t; 86219820Sjeff 87219820Sjeff/****s* OpenSM: Vendor Umadt /mad_direction_t 88219820Sjeff* NAME 89219820Sjeff* mad_direction_t 90219820Sjeff* 91219820Sjeff* DESCRIPTION 92219820Sjeff* Tags for mad wrapper to indicate the direction of mads. 93219820Sjeff* Umadt vendor transport layer uses this tag to call the appropriate 94219820Sjeff* Umadt APIs. 95219820Sjeff* 96219820Sjeff* SYNOPSIS 97219820Sjeff*/ 98219820Sjefftypedef enum _mad_direction_t { 99219820Sjeff SEND = 0, 100219820Sjeff RECEIVE, 101219820Sjeff} mad_direction_t; 102219820Sjeff 103219820Sjeff/****s* OpenSM/ osm_vend_wrap_t 104219820Sjeff* NAME 105219820Sjeff* Umadt Vendor MAD Wrapper 106219820Sjeff* 107219820Sjeff* DESCRIPTION 108219820Sjeff* Umadt specific MAD wrapper. Umadt transport layer sets this for 109219820Sjeff* housekeeping. 110219820Sjeff* 111219820Sjeff* SYNOPSIS 112219820Sjeff*********/ 113219820Sjefftypedef struct _osm_vend_wrap_t { 114219820Sjeff MadtStruct *p_madt_struct; 115219820Sjeff mad_direction_t direction; // send or receive 116219820Sjeff uint32_t size; 117219820Sjeff} osm_vend_wrap_t; 118219820Sjeff/* 119219820Sjeff* FIELDS 120219820Sjeff* p_madt_struct 121219820Sjeff* Umadt mad structure to identify a mad. 122219820Sjeff* 123219820Sjeff* direction 124219820Sjeff* Used to identify a mad with it's direction. 125219820Sjeff* 126219820Sjeff* SEE ALSO 127219820Sjeff*********/ 128219820Sjeff 129219820SjeffEND_C_DECLS 130219820Sjeff#endif /* _OSM_VENDOR_UMADT_h_ */ 131