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#ifndef _OSMV_H_
37219820Sjeff#define _OSMV_H_
38219820Sjeff
39219820Sjeff#include <sys/types.h>
40219820Sjeff#include <opensm/osm_log.h>
41219820Sjeff#include <complib/cl_qlist.h>
42219820Sjeff
43219820Sjeff#ifdef __cplusplus
44219820Sjeff#  define BEGIN_C_DECLS extern "C" {
45219820Sjeff#  define END_C_DECLS   }
46219820Sjeff#else				/* !__cplusplus */
47219820Sjeff#  define BEGIN_C_DECLS
48219820Sjeff#  define END_C_DECLS
49219820Sjeff#endif				/* __cplusplus */
50219820Sjeff
51219820SjeffBEGIN_C_DECLS
52219820Sjeff/*
53219820Sjeff  Forward reference
54219820Sjeff*/
55219820Sjeffstruct _osm_pkt_randomizer;
56219820Sjeff
57219820Sjeff/* The structure behind the OSM Vendor handle */
58219820Sjeff
59219820Sjefftypedef struct _osm_vendor {
60219820Sjeff
61219820Sjeff	/* for holding common transport info - useful at ibmgt transport */
62219820Sjeff	void *p_transport_info;
63219820Sjeff
64219820Sjeff	osm_log_t *p_log;
65219820Sjeff
66219820Sjeff	/* Uniform timeout for every ACK/single MAD */
67219820Sjeff	uint32_t resp_timeout;
68219820Sjeff
69219820Sjeff	/* Uniform timeout for every rmpp transaction */
70219820Sjeff	uint32_t ttime_timeout;
71219820Sjeff
72219820Sjeff	/* All the bind handles associated with the vendor */
73219820Sjeff	cl_qlist_t bind_handles;
74219820Sjeff
75219820Sjeff	/* run randomizer flag */
76219820Sjeff	boolean_t run_randomizer;
77219820Sjeff
78219820Sjeff	/* Packet Randomizer object */
79219820Sjeff	struct _osm_pkt_randomizer *p_pkt_randomizer;
80219820Sjeff
81219820Sjeff} osm_vendor_t;
82219820Sjeff
83219820Sjeff/* Repeating the definitions in osm_vendor_api.h */
84219820Sjeff
85219820Sjefftypedef void *osm_bind_handle_t;
86219820Sjeff
87219820Sjefftypedef struct _osm_vend_wrap {
88219820Sjeff	ib_mad_t *p_mad;
89219820Sjeff} osm_vend_wrap_t;
90219820Sjeff
91219820Sjeff#ifndef OSM_BIND_INVALID_HANDLE
92219820Sjeff#define OSM_BIND_INVALID_HANDLE NULL
93219820Sjeff#endif
94219820Sjeff
95219820SjeffEND_C_DECLS
96219820Sjeff#endif
97