4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SYS_IB_MGT_IBMF_IBMF_SAA_UTILS_H
28 #define _SYS_IB_MGT_IBMF_IBMF_SAA_UTILS_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
36 #include <sys/ib/mgt/sa_recs.h>
39 * The defines, sizes, and functions used in ibmf_saa_utils.h are currently
40 * based on version 1.1 of the IB spec. With each iteration of the
41 * spec this file and ibmf_saa_utils.c must be updated.
44 ibmf_saa_utils_pack_sa_hdr(ib_sa_hdr_t
*sa_hdr
, void **packed_class_hdr
,
45 size_t *packed_class_hdr_len
, int km_sleep_flag
);
48 ibmf_saa_utils_unpack_sa_hdr(void *packed_class_hdr
,
49 size_t packed_class_hdr_len
, ib_sa_hdr_t
**sa_hdr
, int km_sleep_flag
);
52 ibmf_saa_utils_unpack_payload(uchar_t
*buf_payload
, size_t buf_payload_length
,
53 uint16_t attr_id
, void **structs_payloadp
, size_t *structs_payload_lengthp
,
54 uint16_t attr_offset
, boolean_t is_get_resp
, int km_sleep_flag
);
57 ibmf_saa_utils_pack_payload(uchar_t
*structs_payload
, size_t
58 structs_payload_length
, uint16_t attr_id
, void **buf_payloadp
,
59 size_t *buf_payload_lengthp
, int km_sleep_flag
);
62 ibmf_saa_gid_trap_parse_buffer(uchar_t
*buffer
, sm_trap_64_t
*sm_trap_64
);
65 ibmf_saa_capmask_chg_trap_parse_buffer(uchar_t
*buffer
,
66 sm_trap_144_t
*sm_trap_144
);
69 ibmf_saa_sysimg_guid_chg_trap_parse_buffer(uchar_t
*buffer
,
70 sm_trap_145_t
*sm_trap_145
);
76 #endif /* _SYS_IB_MGT_IBMF_IBMF_SAA_UTILS_H */