blob: 3bf9968a68934063dde0f4a55c758235e82bb500 [file] [log] [blame]
The Android Open Source Project02fb0ac2009-03-03 19:30:07 -08001/*
2 * Copyright (C) 1995,2004 Hewlett-Packard Company
3 */
4
5 /* This file contains the test-specific definitions for netperf's BSD */
6 /* sockets tests */
7
8struct xti_tcp_stream_request_struct {
9 int send_buf_size;
10 int recv_buf_size; /* how big does the client want it - the */
11 /* receive socket buffer that is */
12 int receive_size; /* how many bytes do we want to receive at one */
13 /* time? */
14 int recv_alignment; /* what is the alignment of the receive */
15 /* buffer? */
16 int recv_offset; /* and at what offset from that alignment? */
17 int no_delay; /* do we disable the nagle algorithm for send */
18 /* coalescing? */
19 int measure_cpu; /* does the client want server cpu utilization */
20 /* measured? */
21 float cpu_rate; /* do we know how fast the cpu is already? */
22 int test_length; /* how long is the test? */
23 int so_rcvavoid; /* do we want the remote to avoid copies on */
24 /* receives? */
25 int so_sndavoid; /* do we want the remote to avoid send copies? */
26 int dirty_count; /* how many integers in the receive buffer */
27 /* should be made dirty before calling recv? */
28 int clean_count; /* how many integers should be read from the */
29 /* recv buffer before calling recv? */
30 int dev_name_len; /* the length of the device name string. this */
31 /* is used to put it into the proper order on */
32 /* @#$% byte-swapped boxes... */
33 char xti_device[32]; /* the path to the dlpi device */
34};
35
36struct xti_tcp_stream_response_struct {
37 int recv_buf_size; /* how big does the client want it */
38 int receive_size;
39 int no_delay;
40 int measure_cpu; /* does the client want server cpu */
41 int test_length; /* how long is the test? */
42 int send_buf_size;
43 int data_port_number; /* connect to me here */
44 float cpu_rate; /* could we measure */
45 int so_rcvavoid; /* could the remote avoid receive copies? */
46 int so_sndavoid; /* could the remote avoid send copies? */
47};
48
49struct xti_tcp_stream_results_struct {
50 double bytes_received;
51 unsigned int recv_calls;
52 float elapsed_time; /* how long the test ran */
53 float cpu_util; /* -1 if not measured */
54 float serv_dem; /* -1 if not measured */
55 int cpu_method; /* how was cpu util measured? */
56 int num_cpus; /* how many CPUs were there */
57};
58
59struct xti_tcp_rr_request_struct {
60 int recv_buf_size; /* how big does the client want it */
61 int send_buf_size;
62 int recv_alignment;
63 int recv_offset;
64 int send_alignment;
65 int send_offset;
66 int request_size;
67 int response_size;
68 int no_delay;
69 int measure_cpu; /* does the client want server cpu */
70 float cpu_rate; /* do we know how fast the cpu is? */
71 int test_length; /* how long is the test? */
72 int so_rcvavoid; /* do we want the remote to avoid receive */
73 /* copies? */
74 int so_sndavoid; /* do we want the remote to avoid send copies? */
75 int dev_name_len; /* the length of the device name string. this */
76 /* is used to put it into the proper order on */
77 /* @#$% byte-swapped boxes... */
78 char xti_device[32]; /* the path to the dlpi device */
79};
80
81struct xti_tcp_rr_response_struct {
82 int recv_buf_size; /* how big does the client want it */
83 int no_delay;
84 int measure_cpu; /* does the client want server cpu */
85 int test_length; /* how long is the test? */
86 int send_buf_size;
87 int data_port_number; /* connect to me here */
88 float cpu_rate; /* could we measure */
89 int so_rcvavoid; /* could the remote avoid receive copies? */
90 int so_sndavoid; /* could the remote avoid send copies? */
91};
92
93struct xti_tcp_rr_results_struct {
94 unsigned int bytes_received; /* ignored initially */
95 unsigned int recv_calls; /* ignored initially */
96 unsigned int trans_received; /* not ignored */
97 float elapsed_time; /* how long the test ran */
98 float cpu_util; /* -1 if not measured */
99 float serv_dem; /* -1 if not measured */
100 int cpu_method; /* how was cpu util measured? */
101 int num_cpus; /* how many CPUs were there */
102};
103
104struct xti_tcp_conn_rr_request_struct {
105 int recv_buf_size; /* how big does the client want it */
106 int send_buf_size;
107 int recv_alignment;
108 int recv_offset;
109 int send_alignment;
110 int send_offset;
111 int request_size;
112 int response_size;
113 int no_delay;
114 int measure_cpu; /* does the client want server cpu */
115 float cpu_rate; /* do we know how fast the cpu is? */
116 int test_length; /* how long is the test? */
117 int so_rcvavoid; /* do we want the remote to avoid receive */
118 /* copies? */
119 int so_sndavoid; /* do we want the remote to avoid send copies? */
120 int dev_name_len; /* the length of the device name string. this */
121 /* is used to put it into the proper order on */
122 /* @#$% byte-swapped boxes... */
123 char xti_device[32]; /* the path to the dlpi device */
124};
125
126
127struct xti_tcp_conn_rr_response_struct {
128 int recv_buf_size; /* how big does the client want it */
129 int no_delay;
130 int measure_cpu; /* does the client want server cpu */
131 int test_length; /* how long is the test? */
132 int send_buf_size;
133 int data_port_number; /* connect to me here */
134 float cpu_rate; /* could we measure */
135 int so_rcvavoid; /* could the remote avoid receive copies? */
136 int so_sndavoid; /* could the remote avoid send copies? */
137};
138
139struct xti_tcp_conn_rr_results_struct {
140 unsigned int bytes_received; /* ignored initially */
141 unsigned int recv_calls; /* ignored initially */
142 unsigned int trans_received; /* not ignored */
143 float elapsed_time; /* how long the test ran */
144 float cpu_util; /* -1 if not measured */
145 float serv_dem; /* -1 if not measured */
146 int cpu_method; /* how was cpu util measured? */
147 int num_cpus; /* how many CPUs were there */
148};
149
150struct xti_udp_stream_request_struct {
151 int recv_buf_size;
152 int message_size;
153 int recv_alignment;
154 int recv_offset;
155 int checksum_off; /* not used. left in for compatibility */
156 int measure_cpu;
157 float cpu_rate;
158 int test_length;
159 int so_rcvavoid; /* do we want the remote to avoid receive */
160 /* copies? */
161 int so_sndavoid; /* do we want the remote to avoid send copies? */
162 int dev_name_len; /* the length of the device name string. this */
163 /* is used to put it into the proper order on */
164 /* @#$% byte-swapped boxes... */
165 char xti_device[32]; /* the path to the dlpi device */
166};
167
168struct xti_udp_stream_response_struct {
169 int recv_buf_size;
170 int send_buf_size;
171 int measure_cpu;
172 int test_length;
173 int data_port_number;
174 float cpu_rate;
175 int so_rcvavoid; /* could the remote avoid receive copies? */
176 int so_sndavoid; /* could the remote avoid send copies? */
177};
178
179struct xti_udp_stream_results_struct {
180 unsigned int messages_recvd;
181 unsigned int bytes_received;
182 float elapsed_time;
183 float cpu_util;
184 int cpu_method; /* how was cpu util measured? */
185 int num_cpus; /* how many CPUs were there */
186};
187
188
189struct xti_udp_rr_request_struct {
190 int recv_buf_size; /* how big does the client want it */
191 int send_buf_size;
192 int recv_alignment;
193 int recv_offset;
194 int send_alignment;
195 int send_offset;
196 int request_size;
197 int response_size;
198 int no_delay;
199 int measure_cpu; /* does the client want server cpu */
200 float cpu_rate; /* do we know how fast the cpu is? */
201 int test_length; /* how long is the test? */
202 int so_rcvavoid; /* do we want the remote to avoid receive */
203 /* copies? */
204 int so_sndavoid; /* do we want the remote to avoid send copies? */
205 int dev_name_len; /* the length of the device name string. this */
206 /* is used to put it into the proper order on */
207 /* @#$% byte-swapped boxes... */
208 char xti_device[32]; /* the path to the dlpi device */
209};
210
211struct xti_udp_rr_response_struct {
212 int recv_buf_size; /* how big does the client want it */
213 int no_delay;
214 int measure_cpu; /* does the client want server cpu */
215 int test_length; /* how long is the test? */
216 int send_buf_size;
217 int data_port_number; /* connect to me here */
218 float cpu_rate; /* could we measure */
219 int so_rcvavoid; /* could the remote avoid receive copies? */
220 int so_sndavoid; /* could the remote avoid send copies? */
221};
222
223struct xti_udp_rr_results_struct {
224 unsigned int bytes_received; /* ignored initially */
225 unsigned int recv_calls; /* ignored initially */
226 unsigned int trans_received; /* not ignored */
227 float elapsed_time; /* how long the test ran */
228 float cpu_util; /* -1 if not measured */
229 float serv_dem; /* -1 if not measured */
230 int cpu_method; /* how was cpu util measured? */
231 int num_cpus; /* how many CPUs were there */
232};
233
234extern void send_xti_tcp_stream(char remote_host[]);
235
236extern void recv_xti_tcp_stream();
237
238extern void send_xti_tcp_rr(char remote_host[]);
239
240extern void send_xti_udp_stream(char remote_host[]);
241
242extern void recv_xti_udp_stream();
243
244extern void send_xti_udp_rr(char remote_host[]);
245
246extern void recv_xti_udp_rr();
247
248extern void recv_xti_tcp_rr();
249
250extern void send_xti_tcp_conn_rr(char remote_host[]);
251
252extern void recv_xti_tcp_conn_rr();
253
254extern void scan_xti_args(int argc, char *argv[]);
255
256
257
258
259
260
261
262
263
264