7888 installboot: print version info of the file
[unleashed.git] / include / rpcsvc / spray.x
blob765264994a0563360ec8a3e0fc602ec4c86908f1
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 %/*
23 % * Copyright (c) 1987, 1991 by Sun Microsystems, Inc.
24 % */
26 %/* from spray.x */
28 #ifdef RPC_HDR
30 %#pragma ident  "%Z%%M% %I%     %E% SMI"
32 #endif
35  * Spray a server with packets
36  * Useful for testing flakiness of network interfaces
37  */
39 const SPRAYMAX = 8845;  /* max amount can spray */
42  * GMT since 0:00, 1 January 1970
43  */
44 struct spraytimeval {
45         unsigned int sec;
46         unsigned int usec;
50  * spray statistics
51  */
52 struct spraycumul {
53         unsigned int counter;
54         spraytimeval clock;
58  * spray data
59  */
60 typedef opaque sprayarr<SPRAYMAX>;
62 program SPRAYPROG {
63         version SPRAYVERS {
64                 /*
65                  * Just throw away the data and increment the counter
66                  * This call never returns, so the client should always 
67                  * time it out.
68                  */
69                 void
70                 SPRAYPROC_SPRAY(sprayarr) = 1;
72                 /*
73                  * Get the value of the counter and elapsed time  since
74                  * last CLEAR.
75                  */
76                 spraycumul      
77                 SPRAYPROC_GET(void) = 2;
79                 /*
80                  * Clear the counter and reset the elapsed time
81                  */
82                 void
83                 SPRAYPROC_CLEAR(void) = 3;
84         } = 1;
85 } = 100012;