9815 Want basic AHCI enclosure services
[unleashed.git] / usr / src / uts / sun4u / opl / sys / oplkm_msg.h
blob2e49a63e0febbeaa5d530137fcdef203ba9d712f
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _SYS_OPLKM_MSG_H
27 #define _SYS_OPLKM_MSG_H
29 #pragma ident "%Z%%M% %I% %E% SMI"
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
36 * This header file describes the format of the mailbox messages
37 * exchanged between the OPL key management driver on a OPL Domain
38 * and the OPL Service Processor.
43 * Request message header.
45 typedef struct okm_req_hdr {
46 uint32_t krq_version; /* Protocol version */
47 uint32_t krq_transid; /* Transaction ID */
48 uint32_t krq_cmd; /* Request */
49 uint32_t krq_reserved; /* Reserved */
50 } okm_req_hdr_t;
53 * Reply message header.
55 typedef struct okm_rep_hdr {
56 uint32_t krp_version; /* protocol version */
57 uint32_t krp_transid; /* Transaction ID */
58 uint32_t krp_status; /* Status */
59 uint32_t krp_sadb_errno; /* PF_KEY errno, if applicable */
60 uint32_t krp_sadb_version; /* PF_KEY version, if applicable */
61 } okm_rep_hdr_t;
64 * Version of this current protocol.
66 #define OKM_PROTOCOL_VERSION 1
70 * Message types.
72 #define OKM_MSG_SADB 0x1 /* SADB message from SP */
75 * Values for sckm_msg_rep_hdr status field.
77 #define OKM_SUCCESS 0x0 /* Operation succeeded */
78 #define OKM_ERR_VERSION 0x1 /* Unexpected version */
79 #define OKM_ERR_SADB_PFKEY 0x2 /* PF_KEY returned an error */
80 #define OKM_ERR_SADB_MSG 0x3 /* bad SADB msg detect by driver */
81 #define OKM_ERR_DAEMON 0x4 /* Error communicating with daemon */
82 #define OKM_ERR_BAD_CMD 0x5 /* unknown command */
83 #define OKM_ERR_SADB_VERSION 0x6 /* bad SADB version */
84 #define OKM_ERR_SADB_TIMEOUT 0x7 /* no response from key engine */
85 #define OKM_ERR_SADB_BAD_TYPE 0x8 /* bad SADB msg type */
87 #ifdef __cplusplus
89 #endif
91 #endif /* _SYS_OPLKM_MSG_H */