2
* Copyright (c) 2004 Mellanox Technologies LTD. All rights reserved.
4
* This software is available to you under a choice of one of two
5
* licenses. You may choose to be licensed under the terms of the GNU
6
* General Public License (GPL) Version 2, available from the file
7
* COPYING in the main directory of this source tree, or the
8
* OpenIB.org BSD license below:
10
* Redistribution and use in source and binary forms, with or
11
* without modification, are permitted provided that the following
14
* - Redistributions of source code must retain the above
15
* copyright notice, this list of conditions and the following
18
* - Redistributions in binary form must reproduce the above
19
* copyright notice, this list of conditions and the following
20
* disclaimer in the documentation and/or other materials
21
* provided with the distribution.
23
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
37
* Definition of ibsm_t.
38
* This object represents the Subnet Management Packets Interface
39
* This object is part of the IBIS family of objects.
50
#include <complib/cl_qmap.h>
51
#include <complib/cl_passivelock.h>
52
#include <complib/cl_debug.h>
53
#include <iba/ib_types.h>
54
#include <opensm/osm_madw.h>
55
#include <opensm/osm_log.h>
56
#include <opensm/osm_mad_pool.h>
57
#include <opensm/osm_msgdef.h>
61
typedef enum _ibsm_state
68
/****s* IBIS: ibsm/ibsm_t
80
osm_bind_handle_t lid_route_bind;
81
osm_bind_handle_t dr_route_bind;
87
* The ibsm state: INIT, READ or BUSY
93
/****s* IBIS: ibsm/ibsm_dr_path_t
98
* ibsm directed route structure.
102
typedef struct _ibsm_dr_path {
104
uint8_t path[IB_SUBNET_PATH_HOPS_MAX];
110
* The list of output ports to be used in the path going out (initial)
118
/****f* IBIS: ibsm/ibsm_construct
123
* Allocation of ibsm_t struct
129
ibsm_construct(void);
136
* Return a pointer to an ibsm struct. Null if fails to do so.
139
* First step of the creation of ibsm_t
142
* ibsm_destroy ibsm_init
145
/****s* IBIS: ibsm/ibsm_destroy
150
* release of ibsm_t struct
157
IN ibsm_t* const p_ibsm );
162
* A pointer to the ibsm_t struct that is about to be released
167
* Final step of the releasing of ibsm_t
173
/****f* IBIS: ibsm/ibsm_init
178
* Initialization of an ibsm_t struct
184
IN ibsm_t* const p_ibsm );
189
* A pointer to the ibsm_t struct that is about to be initialized
192
* The status of the function.
201
/****f* IBIS: ibsm/ibsm_bind
206
* Binding the ibsm object to a lower level.
217
* A pointer to the ibsm_t struct that is about to be binded
220
* The status of the function.
228
/****f* IBIS: ibsm/ibsm_send_mad_by_lid
230
* ibsm_send_mad_by_lid
233
* Send a SMI mad to the given LID.
236
* ibsm_send_mad_by_lid(p_ibsm, p_mad, lid, attr, mod, meth)
237
* Note that all values are in host order.
240
ibsm_send_mad_by_lid(
251
* A pointer to the ibsm_t struct.
254
* [in/out] A pointer to attribute data. Will be overwritten in case of response.
257
* [in] The size of the attribute block
260
* The Destination lid of the MAD.
266
* Attribute modifier value
269
* The MAD method: Set/Get/Trap...
272
* The status of the function or response status.
280
/****f* IBIS: ibsm/ibsm_send_mad_by_dr
282
* ibsm_send_mad_by_dr
285
* Send a SMI mad to the given a directed route
288
* ibsm_send_mad_by_dr(p_ibsm, p_mad, dr[], attr, mod, meth)
289
* Note that all values are in network order.
303
* A pointer to the ibsm_t struct.
306
* [in/out] A pointer to attribute data. Will be overwritten in case of response.
309
* [in] The size of the attribute block
313
* The directed route to the destination as an
314
* array of bytes with last one is 0.
320
* Attribute modifier value
323
* The MAD method: Set/Get/Trap...
326
* The status of the function or response status.
334
#endif /* _IBSM_H_ */