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 * FILE osmv_transport.h 38219820Sjeff * AUTHOR Edward Bortnikov 39219820Sjeff * 40219820Sjeff * DESCRIPTION 41219820Sjeff * The lower-level MAD transport interface implementation 42219820Sjeff * that allows sending a single MAD/receiving a callback 43219820Sjeff * when a single MAD is received. 44219820Sjeff*/ 45219820Sjeff 46219820Sjeff#ifndef _OSMV_TRANSPORT_H_ 47219820Sjeff#define _OSMV_TRANSPORT_H_ 48219820Sjeff 49219820Sjeff#include <vendor/osm_vendor_mlx.h> 50219820Sjeff#include <vendor/osm_vendor_mlx_defs.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/* 62219820Sjeff * NAME 63219820Sjeff * osmv_transport_init 64219820Sjeff * 65219820Sjeff * DESCRIPTION 66219820Sjeff * Setup the MAD transport infrastructure (filters, callbacks etc). 67219820Sjeff */ 68219820Sjeff#define VENDOR_HCA_MAXNAMES 32 69219820Sjeffib_api_status_t 70219820Sjeffosmv_transport_init(IN osm_bind_info_t * p_info, 71219820Sjeff IN char hca_id[VENDOR_HCA_MAXNAMES], 72219820Sjeff IN uint8_t hca_idx, IN osmv_bind_obj_t * p_bo); 73219820Sjeff 74219820Sjeff/* 75219820Sjeff * NAME 76219820Sjeff * osmv_transport_send_mad 77219820Sjeff * 78219820Sjeff * DESCRIPTION 79219820Sjeff * Send a single MAD (256 byte) 80219820Sjeff */ 81219820Sjeffib_api_status_t 82219820Sjeffosmv_transport_mad_send(IN const osm_bind_handle_t h_bind, 83219820Sjeff IN void *p_mad, IN const osm_mad_addr_t * p_mad_addr); 84219820Sjeff 85219820Sjeff/* 86219820Sjeff * NAME 87219820Sjeff * osmv_transport_done 88219820Sjeff * 89219820Sjeff * DESCRIPTION 90219820Sjeff * deallocator of transportation infrastructure 91219820Sjeff */ 92219820Sjeffvoid osmv_transport_done(IN const osm_bind_handle_t h_bind); 93219820Sjeff 94219820SjeffEND_C_DECLS 95219820Sjeff#endif /* _OSMV_TRANSPORT_H_ */ 96