753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore/*
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * CDDL HEADER START
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore *
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * The contents of this file are subject to the terms of the
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * Common Development and Distribution License (the "License").
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * You may not use this file except in compliance with the License.
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore *
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * or http://www.opensolaris.org/os/licensing.
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * See the License for the specific language governing permissions
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * and limitations under the License.
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore *
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * When distributing Covered Code, include this CDDL HEADER in each
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * If applicable, add the following below this CDDL HEADER, with the
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * fields enclosed by brackets "[]" replaced with your own identifying
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * information: Portions Copyright [yyyy] [name of copyright owner]
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore *
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * CDDL HEADER END
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore */
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore/*
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore * Use is subject to license terms.
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore */
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore#ifndef _NCALL_MODULE_H
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore#define _NCALL_MODULE_H
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore#ifdef __cplusplus
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Mooreextern "C" {
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore#endif
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore#ifdef _KERNEL
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore#define NCALL_MODULE_VER 4
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Mooretypedef struct ncall_module_s {
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore int ncall_version;
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore char *ncall_name;
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore int (*ncall_stop)(void);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore void (*ncall_register_svc)(int, void (*)(ncall_t *, int *));
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore void (*ncall_unregister_svc)(int);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore int (*ncall_nodeid)(char *);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore char *(*ncall_nodename)(int);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore int (*ncall_mirror)(int);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore int (*ncall_self)(void);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore int (*ncall_alloc)(int, int, int, ncall_t **);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore int (*ncall_timedsend)(ncall_t *, int, int, struct timeval *,
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore va_list);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore int (*ncall_timedsendnotify)(ncall_t *, int, int, struct timeval *,
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore void (*)(ncall_t *, void *), void *, va_list);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore int (*ncall_broadcast)(ncall_t *, int, int, struct timeval *,
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore va_list);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore int (*ncall_read_reply)(ncall_t *, int, va_list);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore void (*ncall_reset)(ncall_t *);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore void (*ncall_free)(ncall_t *);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore int (*ncall_put_data)(ncall_t *, void *, int);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore int (*ncall_get_data)(ncall_t *, void *, int);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore int (*ncall_sender)(ncall_t *);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore void (*ncall_reply)(ncall_t *, va_list);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore void (*ncall_pend)(ncall_t *);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore void (*ncall_done)(ncall_t *);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore int (*ncall_ping)(char *, int *);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore int (*ncall_maxnodes)(void);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore int (*ncall_nextnode)(void **);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore int (*ncall_errcode)(ncall_t *, int *);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore} ncall_module_t;
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Mooreextern int ncall_register_module(ncall_module_t *, ncall_node_t *);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Mooreextern int ncall_unregister_module(ncall_module_t *);
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore#endif /* _KERNEL */
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore#ifdef __cplusplus
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore}
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore#endif
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore#endif /* _NCALL_MODULE_H */
753a6d457b330b1b29b2d3eefcd0831116ce950dSherry Moore