8354 sync regcomp(3C) with upstream (fix make catalog)
[unleashed/tickless.git] / usr / src / uts / sun4u / starcat / sys / sckm_msg.h
blobfc2727a0476e22069b66400e26acc06b95e6c382
1 /*
2 * CDDL HEADER START
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
7 * with the License.
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]
20 * CDDL HEADER END
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SYS_SCKM_MSG_H
28 #define _SYS_SCKM_MSG_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
37 * This header file describes the format of the IOSRAM mailbox messages
38 * exchanged between the sckmr driver on a Starcat Domain and the
39 * Starcat System Controller.
42 #include <sys/types.h>
45 * MBOXSC_MSG_EVENT or MBOXSC_MSG_REQUEST message header.
47 typedef struct sckm_mbox_req_hdr {
48 uint32_t sckm_version; /* protocol version */
49 uint32_t reserved;
50 } sckm_mbox_req_hdr_t;
53 * MBOXSC_MSG_REPLY message header
55 typedef struct sckm_mbox_rep_hdr {
56 uint32_t sckm_version; /* protocol version */
57 uint32_t status; /* error code */
58 uint32_t sadb_msg_errno; /* PF_KEY errno, if applicable */
59 uint32_t sadb_msg_version; /* PF_KEY version, if applicable */
60 } sckm_mbox_rep_hdr_t;
63 * Version of this current protocol.
65 #define SCKM_PROTOCOL_VERSION 1
68 * Keys for SC to Domain and Domain to SC mailboxes
70 #define KEY_SCKD 0x53434b44 /* SC to Domain mailbox */
71 #define KEY_KDSC 0x4b445343 /* Domain to SC mailbox */
74 * Max data size, in bytes, for IOSRAM mailboxes
76 #define SCKM_SCKD_MAXDATA 1024
77 #define SCKM_KDSC_MAXDATA 1024
80 * Message types.
82 #define SCKM_MSG_SADB 0x1 /* SADB message SC<->D */
85 * Values for sckm_msg_rep_hdr status field.
87 #define SCKM_SUCCESS 0x0 /* Operation succeeded */
88 #define SCKM_ERR_VERSION 0x1 /* Unexpected version */
89 #define SCKM_ERR_SADB_PFKEY 0x2 /* PF_KEY returned an error */
90 #define SCKM_ERR_SADB_MSG 0x3 /* bad SADB msg detect by driver */
91 #define SCKM_ERR_DAEMON 0x4 /* Error communicating with daemon */
92 #define SCKM_ERR_BAD_CMD 0x5 /* unknown command */
93 #define SCKM_ERR_SADB_VERSION 0x6 /* bad SADB version */
94 #define SCKM_ERR_SADB_TIMEOUT 0x7 /* no response from key engine */
95 #define SCKM_ERR_SADB_BAD_TYPE 0x8 /* bad SADB msg type */
97 #ifdef __cplusplus
99 #endif
101 #endif /* _SYS_SCKM_MSG_H */