1 '\" te
2 .\" Copyright 1989 AT&T Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved
3 .\" 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.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" 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]
6 .TH SPRAY 3SOCKET "Dec 30, 1996"
7 .SH NAME
8 spray \- scatter data in order to test the network
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsocket\fR \fB -lnsl \fR [ \fIlibrary\fR ... ]
13 #include <rpcsvc/spray.h>
14
15 \fBbool_t\fR \fBxdr_sprayarr\fR(\fBXDR *\fR\fIxdrs\fR, \fBsprayarr *\fR\fIobjp\fR);
16 .fi
17
18 .LP
19 .nf
20 \fBbool_t\fR \fBxdr_spraycumul\fR(\fBXDR *\fR\fIxdrs\fR, \fBspraycumul *\fR\fIobjp\fR);
21 .fi
22
23 .SH DESCRIPTION
24 .sp
25 .LP
26 The spray program sends packets to a given machine to test communications with
27 that machine.
28 .sp
29 .LP
30 The spray program is not a C function interface, per se, but it can be accessed
31 using the generic remote procedure calling interface \fBclnt_call()\fR. See
32 \fBrpc_clnt_calls\fR(3NSL). The program sends a packet to the called host. The
33 host acknowledges receipt of the packet. The program counts the number of
34 acknowledgments and can return that count.
35 .sp
36 .LP
37 The spray program currently supports the following procedures, which should be
38 called in the order given:
39 .sp
40 .ne 2
41 .na
42 \fB\fBSPRAYPROC_CLEAR\fR\fR
43 .ad
44 .RS 19n
95 /* handle this error */
96 }
97 while (loop\(mi > 0) {
98 if (clnt_call(clnt, SPRAYPROC_SPRAY,
99 xdr_sprayarr, &spray_data, xdr_void, NULL, timeout0)) {
100 /* handle this error */
101 }
102 }
103 if (clnt_call(clnt, SPRAYPROC_GET,
104 xdr_void, NULL, xdr_spraycumul, &spray_result, timeout25)) {
105 /* handle this error */
106 }
107 printf("Acknowledged %ld of 1000 packets in %d secs %d usecs\en",
108 spray_result.counter,
109 spray_result.clock.sec,
110 spray_result.clock.usec);
111 .fi
112 .in -2
113
114 .SH ATTRIBUTES
115 .sp
116 .LP
117 See \fBattributes\fR(5) for descriptions of the following attributes:
118 .sp
119
120 .sp
121 .TS
122 box;
123 c | c
124 l | l .
125 ATTRIBUTE TYPE ATTRIBUTE VALUE
126 _
127 MT-Level Unsafe
128 .TE
129
130 .SH SEE ALSO
131 .sp
132 .LP
133 \fBspray\fR(1M), \fBrpc_clnt_calls\fR(3NSL), \fBattributes\fR(5)
134 .SH NOTES
135 .sp
136 .LP
137 This interface is unsafe in multithreaded applications. Unsafe interfaces
138 should be called only from the main thread.
139 .sp
140 .LP
141 A spray program is not useful as a networking benchmark as it uses unreliable
142 connectionless transports, for example, udp. It can report a large number of
143 packets dropped, when the drops were caused by the program sending packets
144 faster than they can be buffered locally, that is, before the packets get to
145 the network medium.
|
1 '\" te
2 .\" Copyright 1989 AT&T Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved
3 .\" 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.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" 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]
6 .TH SPRAY 3RPC "Apr 13, 2017"
7 .SH NAME
8 spray \- scatter data in order to test the network
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsocket\fR \fB-lnsl\fR \
13 \fB-lrpcsvc\fR [ \fIlibrary\fR ... ]
14 #include <rpcsvc/spray.h>
15
16 \fBbool_t\fR \fBxdr_sprayarr\fR(\fBXDR *\fR\fIxdrs\fR, \fBsprayarr *\fR\fIobjp\fR);
17 .fi
18
19 .LP
20 .nf
21 \fBbool_t\fR \fBxdr_spraycumul\fR(\fBXDR *\fR\fIxdrs\fR, \fBspraycumul *\fR\fIobjp\fR);
22 .fi
23
24 .SH DESCRIPTION
25 .LP
26 The spray program sends packets to a given machine to test communications with
27 that machine.
28 .sp
29 .LP
30 The spray program is not a C function interface, per se, but it can be accessed
31 using the generic remote procedure calling interface \fBclnt_call()\fR. See
32 \fBrpc_clnt_calls\fR(3NSL). The program sends a packet to the called host. The
33 host acknowledges receipt of the packet. The program counts the number of
34 acknowledgments and can return that count.
35 .sp
36 .LP
37 The spray program currently supports the following procedures, which should be
38 called in the order given:
39 .sp
40 .ne 2
41 .na
42 \fB\fBSPRAYPROC_CLEAR\fR\fR
43 .ad
44 .RS 19n
95 /* handle this error */
96 }
97 while (loop\(mi > 0) {
98 if (clnt_call(clnt, SPRAYPROC_SPRAY,
99 xdr_sprayarr, &spray_data, xdr_void, NULL, timeout0)) {
100 /* handle this error */
101 }
102 }
103 if (clnt_call(clnt, SPRAYPROC_GET,
104 xdr_void, NULL, xdr_spraycumul, &spray_result, timeout25)) {
105 /* handle this error */
106 }
107 printf("Acknowledged %ld of 1000 packets in %d secs %d usecs\en",
108 spray_result.counter,
109 spray_result.clock.sec,
110 spray_result.clock.usec);
111 .fi
112 .in -2
113
114 .SH ATTRIBUTES
115 .LP
116 See \fBattributes\fR(5) for descriptions of the following attributes:
117 .sp
118
119 .sp
120 .TS
121 box;
122 c | c
123 l | l .
124 ATTRIBUTE TYPE ATTRIBUTE VALUE
125 _
126 MT-Level Unsafe
127 .TE
128
129 .SH SEE ALSO
130 .LP
131 \fBrpc_clnt_calls\fR(3NSL), \fBattributes\fR(5)
132 .SH NOTES
133 .LP
134 This interface is unsafe in multithreaded applications. Unsafe interfaces
135 should be called only from the main thread.
136 .sp
137 .LP
138 A spray program is not useful as a networking benchmark as it uses unreliable
139 connectionless transports, for example, udp. It can report a large number of
140 packets dropped, when the drops were caused by the program sending packets
141 faster than they can be buffered locally, that is, before the packets get to
142 the network medium.
|