ncall.h revision fcf3ce441efd61da9bb2884968af01cb7c1452cc
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _NCALL_H
#define _NCALL_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef DS_DDICT
#endif
#ifdef _KERNEL
/*
* ncall_t is opaque RPC pointer
*/
typedef struct ncall_s {
int opaque;
} ncall_t;
/*
* ncall send flags
*/
extern void ncall_register_svc(int, void (*)(ncall_t *, int *));
extern void ncall_unregister_svc(int);
extern int ncall_nodeid(char *);
extern char *ncall_nodename(int);
extern int ncall_mirror(int);
extern int ncall_self(void);
extern int ncall_alloc(int, int, int, ncall_t **);
void (*)(ncall_t *, void *), void *, ...);
extern int ncall_send(ncall_t *, int, int, ...);
extern int ncall_read_reply(ncall_t *, int, ...);
extern void ncall_reset(ncall_t *);
extern void ncall_free(ncall_t *);
extern int ncall_put_data(ncall_t *, void *, int);
extern int ncall_get_data(ncall_t *, void *, int);
extern int ncall_sender(ncall_t *);
extern void ncall_reply(ncall_t *, ...);
extern void ncall_pend(ncall_t *);
extern void ncall_done(ncall_t *);
extern int ncall_ping(char *, int *);
extern int ncall_maxnodes(void);
extern int ncall_nextnode(void **);
extern int ncall_errcode(ncall_t *, int *);
#endif /* _KERNEL */
#define NCALLNMLN 257
/*
* Basic node info
*/
typedef struct ncall_node_s {
int nc_nodeid; /* Nodeid */
} ncall_node_t;
/*
* _NCIOC_(5) to _NCIOC_(20) are reserved for the implementation module
*/
#ifdef __cplusplus
}
#endif
#endif /* _NCALL_H */