/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _LDMA_H
#define _LDMA_H
#include <libds.h>
#include <sys/sysmacros.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* The following definitions are part of the LDoms Agent specification.
*/
/* reply message types */
/* error codes for error messages */
/*
* LDoms Device Agent
*/
/*
* LDoms System Agent
*/
/*
* LDoms Direct IO Agent
*/
/*
* Size of the header of an agent message. This is the minimal size that
* a message can have.
*/
/*
* Macro to compute the size of a message with a msg_data of size dlen.
* The size of the msg_data field must be a multiple of 8-bytes so dlen
* is roundup to an 8-bytes multiple.
*/
/*
* Macro to compute the size of the msg_data field from the size of the message.
*/
/*
* Handy macros for using the message and header structures.
*/
/* agent message header structure */
typedef struct ldma_message_header {
/* agent message structure */
typedef struct ldma_message {
/*
* Additional structures and definition for the implementation.
*/
typedef enum ldma_request_status_t {
/*
* The domain service framework only allows connexion of a domain with
* the control domain. So agents not running in the control domain can
* only receive requests from the control domain. But, agents running
* on the control can receive requests from any domain.
*
* For agents running in the control domain, the LDMA_MSGFLG_ACCESS_*
* flags control whether messages sent by domains different from the
* control domain should be processed or not.
*
* If a message handler is defined with LDMA_MSGFLG_ACCESS_CONTROL then
* only messages sent by the control domain should be processed. Otherwise
* if a message handler is defined with LDMA_MSGFLG_ACCESS_ANY then messages
* sent by any domain can be processed.
*/
typedef struct ldma_msg_handler {
typedef struct ldma_agent_info {
/*
* Helper functions for the daemon and agents.
*/
/* function to allocate a result message */
/* functions to log messages */
/*
* LDMA_MODULE as the name under which messages are logged. For a given agent,
* LDMA_MODULE should be set to the name of the agent.
*/
#ifdef __cplusplus
}
#endif
#endif /* _LDMA_H */