rsmapi.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 1999-2002 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _RSMAPI_H
#define _RSMAPI_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include <poll.h>
typedef enum {
RSM_MAP_NONE = 0x0,
RSM_MAP_FIXED = 0x1,
RSM_MAP_RESERVED = 0x2
/*
* Topology data structures - The primary structure is struct rsm_topology_t
*
* The key interconnect data required for segment operations includes the
* cluster nodeids and the controllers (name, hardware address); with
* the fundamental constraint that the controller specified for a segment
* import must have a physical connection with the contorller used in the
* export of the segment. To facilitate applications in the establishment
* of proper and efficient export and import policies, a delineation of the
* interconnect topology is provided by these data structures.
*
*/
#define RSM_CONNECTION_ACTIVE 3
typedef struct rsm_topology_hdr {
typedef struct rsm_connections_hdr {
int remote_cntlr_count;
/*
* The remote cntrlname element should be used for matching with the
* cntrlname of an exported segment.
*
* An application must not attempt to use a connection unless the
* the connection_state element of struct rsm_remote_cntlr_t is equal to
* RSM_CONNECTION_ACTIVE
*/
typedef struct rsm_remote_cntlr {
char remote_cntlrname[MAXNAMELEN];
/*
* The actual size of the remote_cntlr array is equal to the remote_cntlr_count
* of the rsm_connections_hdr_t struct.
*/
typedef struct rsm_connection {
/*
* A pointer to an instance of this structure type is returned by a call
* to rsm_get_interconnect_topology(). The actual size of the connections
* array is equal to the local_cntlr_count of the rsm_topology_hdr_t struct.
*/
typedef struct rsm_topology {
/*
* function templates:
*/
/*
* Export side memory segment operations
*/
/*
* import side memory segment operations:
*/
/*
* import side memory segment operations (read access functions):
*/
void *dst_addr,
/*
* import side memory segment operations (write access functions):
*/
void *src_addr,
/*
* import side memory segment operations (mapping):
*/
void **address,
/*
* import side memory segment operations (barriers):
*/
int rsm_memseg_get_pollfd(void *, struct pollfd *);
int rsm_memseg_release_pollfd(void *);
#ifdef __cplusplus
}
#endif
#endif /* _RSMAPI_H */