/* * Copyright (c) 2010 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of Apple Inc. ("Apple") nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Portions of this software have been released under the following terms: * * (c) Copyright 1989-1993 OPEN SOFTWARE FOUNDATION, INC. * (c) Copyright 1989-1993 HEWLETT-PACKARD COMPANY * (c) Copyright 1989-1993 DIGITAL EQUIPMENT CORPORATION * * To anyone who acknowledges that this file is provided "AS IS" * without any express or implied warranty: * permission to use, copy, modify, and distribute this file for any * purpose is hereby granted without fee, provided that the above * copyright notices and this notice appears in all source code copies, * and that none of the names of Open Software Foundation, Inc., Hewlett- * Packard Company or Digital Equipment Corporation be used * in advertising or publicity pertaining to distribution of the software * without specific, written prior permission. Neither Open Software * Foundation, Inc., Hewlett-Packard Company nor Digital * Equipment Corporation makes any representations about the suitability * of this software for any purpose. * * Copyright (c) 2007, Novell, Inc. All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of Novell Inc. nor the names of its contributors * may be used to endorse or promote products derived from this * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * @APPLE_LICENSE_HEADER_END@ */ /* ** ** NAME ** ** perf.idl ** ** FACILITY: ** ** Remote Procedure Call (RPC) ** ** ABSTRACT: ** ** Performance and system exerciser network interface definition. ** ** */ [uuid(34D6281B-B000-0000-0D00-00C366000000), version(2), endpoint("ncadg_ip_udp:[2001]", "ncadg_dds:[18]", "ncacn_ip_tcp:[2001]", "ncacn_dnet_nsp:[perf_server]") ] interface perf { const long perf_magic = 432; typedef [v1_array] unsigned long perf_data_t[0..*]; typedef unsigned long perf_slow_mode_t; const long perf_slow_sleep = 0; const long perf_slow_io = 1; const long perf_slow_cpu = 2; const long perf_slow_fork_sleep = 3; typedef [context_handle] void *perf_context_t; /* * Initialize server */ void perf_init ( [in] handle_t handle ); void perf_info ( [in] handle_t handle, [out] unsigned long *n, [out] unsigned long *nm, [out] unsigned long *nb, [out] unsigned long *nbm ); /* * Null procedure */ void perf_null ( [in] handle_t handle ); /* * Idempotent null procedure */ [idempotent] void perf_null_idem ( [in] handle_t handle ); /* * Call with variable length input params */ void perf_in ( [in] handle_t handle, [in, length_is(l), size_is(l)] perf_data_t data, [in] unsigned long l, [in] boolean v, [out] unsigned long *sum ); /* * Idempotent version of above */ [idempotent] void perf_in_idem ( [in] handle_t handle, [in, length_is(l), size_is(l)] perf_data_t data, [in] unsigned long l, [in] boolean v, [out] unsigned long *sum ); /* * Call with variable length output params */ void perf_out ( [in] handle_t handle, [out, length_is(*l), size_is(m)] perf_data_t data, [in, out] unsigned long *l, [in] unsigned long m, [in] unsigned long p, [in] boolean v ); /* * Idempotent version of above */ [idempotent] void perf_out_idem ( [in] handle_t handle, [out, length_is(*l), size_is(m)] perf_data_t data, [in, out] unsigned long *l, [in] unsigned long m, [in] unsigned long p, [in] boolean v ); /* * Broadcast; returns host name */ [broadcast] void perf_brd ( [in] handle_t handle, [out, v1_array, v1_string] char name[256] ); /* * Null maybe procedure */ [maybe] void perf_maybe ( [in] handle_t handle ); /* * Null maybe, broadcast procedure */ [broadcast, maybe] void perf_brd_maybe ( [in] handle_t handle ); /* * Floating point test */ void perf_fp_test ( [in] handle_t handle, [in] float *float1, /* Pointer to avoid single->double ... */ [in] float *float2, /* ... conversion in C calls */ [in] double double1, [in] double double2, [out] float *out1, [out] double *out2 ); /* * Tell server to register "perfb" i/f */ void perf_register_b ( [in] handle_t handle, [in] boolean global, [out] unsigned32 *status ); /* * Tell server to unregister "perfb" i/f */ void perf_unregister_b ( [in] handle_t handle, [out] unsigned32 *status ); /* * Routine that raises an exception */ void perf_exception ( [in] handle_t handle ); /* * Routine that takes a long time to run */ void perf_null_slow ( [in] handle_t handle, [in] perf_slow_mode_t mode, [in] unsigned long seconds ); /* * Idempotent version of above */ [idempotent] void perf_null_slow_idem ( [in] handle_t handle, [in] perf_slow_mode_t mode, [in] unsigned long seconds ); /* * Shutdown server */ void perf_shutdown ( [in] handle_t handle ); /* * Tell server to call me back */ void perf_call_callback ( [in] handle_t handle, [in] unsigned long idempotent ); /* * Routine that returns a context handle */ void perf_get_context ( [in] handle_t handle, [in] unsigned long data, [out] perf_context_t *context ); /* * Routine to take context */ boolean perf_test_context ( [in] perf_context_t context, [out] unsigned long *data ); /* * Routine to free context */ boolean perf_free_context ( [in, out] perf_context_t *context, [out] unsigned long *data ); /* * Shutdown server (but have shutdown done from outside the manager routine) */ void perf_shutdown2 ( [in] handle_t handle, [in] unsigned32 secs /* # of secs to delay shutdown */ ); /* * Broadcast; faults (shouln't see fault) */ [broadcast] void perf_brd_fault ( [in] handle_t handle ); }