1d6b92ffaSHans Petter Selasky /*
2d6b92ffaSHans Petter Selasky  * Copyright (c) 2011 Mellanox Technologies LTD. All rights reserved.
3d6b92ffaSHans Petter Selasky  *
4d6b92ffaSHans Petter Selasky  * This software is available to you under a choice of one of two
5d6b92ffaSHans Petter Selasky  * licenses.  You may choose to be licensed under the terms of the GNU
6d6b92ffaSHans Petter Selasky  * General Public License (GPL) Version 2, available from the file
7d6b92ffaSHans Petter Selasky  * COPYING in the main directory of this source tree, or the
8d6b92ffaSHans Petter Selasky  * OpenIB.org BSD license below:
9d6b92ffaSHans Petter Selasky  *
10d6b92ffaSHans Petter Selasky  *     Redistribution and use in source and binary forms, with or
11d6b92ffaSHans Petter Selasky  *     without modification, are permitted provided that the following
12d6b92ffaSHans Petter Selasky  *     conditions are met:
13d6b92ffaSHans Petter Selasky  *
14d6b92ffaSHans Petter Selasky  *      - Redistributions of source code must retain the above
15d6b92ffaSHans Petter Selasky  *        copyright notice, this list of conditions and the following
16d6b92ffaSHans Petter Selasky  *        disclaimer.
17d6b92ffaSHans Petter Selasky  *
18d6b92ffaSHans Petter Selasky  *      - Redistributions in binary form must reproduce the above
19d6b92ffaSHans Petter Selasky  *        copyright notice, this list of conditions and the following
20d6b92ffaSHans Petter Selasky  *        disclaimer in the documentation and/or other materials
21d6b92ffaSHans Petter Selasky  *        provided with the distribution.
22d6b92ffaSHans Petter Selasky  *
23d6b92ffaSHans Petter Selasky  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24d6b92ffaSHans Petter Selasky  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25d6b92ffaSHans Petter Selasky  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26d6b92ffaSHans Petter Selasky  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27d6b92ffaSHans Petter Selasky  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28d6b92ffaSHans Petter Selasky  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29d6b92ffaSHans Petter Selasky  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30d6b92ffaSHans Petter Selasky  * SOFTWARE.
31d6b92ffaSHans Petter Selasky  *
32d6b92ffaSHans Petter Selasky  */
33d6b92ffaSHans Petter Selasky 
34d6b92ffaSHans Petter Selasky #ifndef _OSM_GUID_H_
35d6b92ffaSHans Petter Selasky #define _OSM_GUID_H_
36d6b92ffaSHans Petter Selasky 
37d6b92ffaSHans Petter Selasky #include <iba/ib_types.h>
38d6b92ffaSHans Petter Selasky #include <complib/cl_list.h>
39d6b92ffaSHans Petter Selasky #include <opensm/osm_sa.h>
40d6b92ffaSHans Petter Selasky 
41d6b92ffaSHans Petter Selasky #ifdef __cplusplus
42d6b92ffaSHans Petter Selasky #  define BEGIN_C_DECLS extern "C" {
43d6b92ffaSHans Petter Selasky #  define END_C_DECLS   }
44d6b92ffaSHans Petter Selasky #else				/* !__cplusplus */
45d6b92ffaSHans Petter Selasky #  define BEGIN_C_DECLS
46d6b92ffaSHans Petter Selasky #  define END_C_DECLS
47d6b92ffaSHans Petter Selasky #endif				/* __cplusplus */
48d6b92ffaSHans Petter Selasky 
49d6b92ffaSHans Petter Selasky BEGIN_C_DECLS
50d6b92ffaSHans Petter Selasky 
51d6b92ffaSHans Petter Selasky typedef struct osm_guidinfo_work_obj {
52d6b92ffaSHans Petter Selasky 	cl_list_item_t list_item;
53d6b92ffaSHans Petter Selasky 	osm_port_t *p_port;
54d6b92ffaSHans Petter Selasky 	uint8_t block_num;
55d6b92ffaSHans Petter Selasky } osm_guidinfo_work_obj_t;
56d6b92ffaSHans Petter Selasky 
57d6b92ffaSHans Petter Selasky osm_guidinfo_work_obj_t *osm_guid_work_obj_new(IN osm_port_t * p_port,
58d6b92ffaSHans Petter Selasky 					       IN uint8_t block_num);
59d6b92ffaSHans Petter Selasky 
60d6b92ffaSHans Petter Selasky void osm_guid_work_obj_delete(IN osm_guidinfo_work_obj_t * p_wobj);
61d6b92ffaSHans Petter Selasky 
62d6b92ffaSHans Petter Selasky int osm_queue_guidinfo(IN osm_sa_t *sa, IN osm_port_t *p_port,
63d6b92ffaSHans Petter Selasky 		       IN uint8_t block_num);
64d6b92ffaSHans Petter Selasky 
65d6b92ffaSHans Petter Selasky END_C_DECLS
66d6b92ffaSHans Petter Selasky #endif				/* _OSM_GUID_H_ */
67