• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2         Copyright (C) 1993-2012 Hewlett-Packard Company
3 */
4 
5  /* This file contains the test-specific definitions for netperf's BSD */
6  /* sockets tests */
7 
8 /* well boys and girls, seems that while AF_INET is "2" and AF_UNSPEC
9    is "0" the world over, AF_INET6 is different values depending on
10    the platform... grrr.  On HP-UX 11i it is "22" and on Linux 2.6 it
11    is "10" sooooo... we have to define our own space for netperf to
12    enable us to pass values around from machine to machine. raj
13    2005-02-08 */
14 #define NF_UNSPEC 0
15 #define NF_INET   4
16 #define NF_INET6  6
17 /* since it isn't clear that AF_RDS will be the same value everywhere
18    we will have an NF_RDS as well and will make it "lucky 7" raj
19    20091014 */
20 #define NF_RDS    7
21 
22 /* it would also seem that the socket type defines differ from
23    platform to platform, which means we need to define our own values
24    to pass between netperf and netserver so they can be translated to
25    the local versions.  NST == Netperf Socket Type raj 2008-01-14 */
26 #define NST_UNKN     -1
27 #define NST_STREAM    1
28 #define NST_DGRAM     2
29 #define NST_DCCP      3
30 #define NST_SEQPACKET 4
31 
32 #ifdef WANT_OMNI
33 #define OMNI_NO_DELAY        0x00000001
34 #define OMNI_USE_SENDFILE    0x00000002
35 #define OMNI_CONNECT_TEST    0x00000004
36 #define OMNI_MEASURE_CPU     0x00000008
37 #define OMNI_CHECKSUM_OFF    0x00000010
38 #define OMNI_ROUTING_ALLOWED 0x00000020
39 #define OMNI_WANT_IFNAME     0x00000040
40 #define OMNI_WANT_IFSLOT     0x00000080
41 #define OMNI_WANT_IFIDS      0x00000100
42 #define OMNI_WANT_DRVINFO    0x00000200
43 #define OMNI_CHECK_INTERVAL  0x00000400  /* deprecated 2015-04-20 */
44 #define OMNI_FASTOPEN        0x00000800
45 #define OMNI_MANAGE_FIREWALL 0x00001000
46 #define OMNI_USE_PKTINFO     0x00002000
47 #define OMNI_USE_CONNECTED   0x00004000
48 #define OMNI_WANT_DEFER_ACCEPT 0x00008000
49 /* room in the middle */
50 #define OMNI_WANT_KEEPALIVE  0x80000000
51 
52 struct  omni_request_struct {
53   int32_t    send_buf_size;         /* SO_SNDBUF */
54   uint32_t   send_size;             /* bytes per send() call */
55   uint32_t   send_alignment;        /* alignment of send buffer */
56   uint32_t   send_offset;           /* offset from send alignment */
57   uint32_t   send_width;            /* number of send buffers to use */
58   int32_t    request_size;          /* size of a request */
59 
60   int32_t    recv_buf_size;         /* SO_RCVBUF */
61   uint32_t   receive_size;          /* size of buffers in recv */
62   uint32_t   recv_alignment;        /* alignment of recv buffer */
63   uint32_t   recv_offset;           /* offset from recv alignment */
64   uint32_t   recv_width;            /* number of recv buffers to use */
65   int32_t    response_size;         /* size of a response */
66 
67   uint32_t   flags;                 /* to convey things that didn't
68 				       really need to burn an entire
69 				       int */
70 
71   float      cpu_rate;       /* do we know how fast the cpu is already? */
72 
73   int32_t    test_length;    /* how long is the test? */
74 
75   uint32_t   so_rcvavoid;    /* avoid copies on recv? */
76   uint32_t   so_sndavoid;    /* avoid copies on send? */
77   uint32_t   send_dirty_count; /* bytes to dirty before calling send */
78   uint32_t   recv_dirty_count; /* bytes to dirty before calling recv */
79   uint32_t   recv_clean_count; /* bytes to access before calling recv */
80 
81   uint32_t   data_port;     /* what port number should netserver use? */
82   uint32_t   ipfamily;      /* address family of the data connection */
83   uint32_t   socket_type;   /* dgram? stream? other? */
84   uint32_t   protocol;      /* the protocol of the data connection */
85   uint32_t   direction;     /* which way flows the data? */
86   uint32_t   netperf_port;  /* when netserver needs netperf's data port */
87   uint32_t   interval_burst;/* how many things to do each interval */
88   uint32_t   interval_usecs;/* how long each interval should be */
89   uint32_t   netperf_ip[4]; /* when netserver needs netperf's data IP */
90   uint32_t   netserver_ip[4]; /* when netperf tells netserver his IP */
91   int32_t    socket_prio; /* what netserver should use for socket prio */
92   int32_t    socket_tos;  /* what netserver should use for socket tos */
93   /* there are 38 "ints" above here, add another and you will need to
94      adjust the define below */
95 #define OMNI_REQUEST_CONV_CUTOFF 38
96   char       cong_control[16]; /* the requested congestion control alg */
97   char       fill_file[32]; /* file from which netserver fills bufs */
98   /* total sizeof must be <= MAXSPECDATA*sizeof(int) */
99 };
100 
101 struct  omni_response_struct {
102   int32_t    recv_buf_size;
103   uint32_t   receive_size;
104   int32_t    recv_width;
105 
106   int32_t    send_buf_size;
107   uint32_t   send_size;
108   int32_t    send_width;
109 
110   uint32_t   flags;
111 
112   float      cpu_rate;
113 
114   uint32_t   test_length;
115 
116   uint32_t   so_rcvavoid;
117   uint32_t   so_sndavoid;
118 
119   uint32_t   data_port;     /* connect to this port number */
120 
121   uint32_t   interval_burst;/* how many things to do each interval */
122   uint32_t   interval_usecs;/* how long each interval should be */
123   /* these are here because they can be checked before actual data
124      connections are made, and the omni_results_struct is already
125      full */
126   uint32_t   cpu_frequency;  /* this should be megahertz */
127   uint32_t   security_info;
128   int32_t    socket_prio;
129   int32_t    socket_tos;
130   /* there are 18 ints above here, add another and you need to adjust
131      the define below */
132 #define OMNI_RESPONSE_CONV_CUTOFF 18
133   char       system_model[33];
134   char       cpu_model[80];  /* seems like an awful lot doesn't
135 				it. some clever person at Intel
136 				decided to give Montecito processors a
137 				name that long - and still didn't
138 				include the 9NNN model number! */
139   char       security_string[16];
140   /* total sizeof must be <= MAXSPECDATA*sizeof(int) */
141 };
142 
143 struct omni_results_struct {
144   uint32_t   bytes_received_hi;  /* why? because we cannot easily send */
145   uint32_t   bytes_received_lo;  /* uint64_t or doubles between endianess */
146   uint32_t   recv_calls;
147   int32_t    recv_buf_size; /* SO_RCVBUF at end of test */
148 
149   uint32_t   bytes_sent_hi;
150   uint32_t   bytes_sent_lo;
151   uint32_t   send_calls;
152   int32_t    send_buf_size; /* SO_SNDBUF at end of test */
153   uint32_t   failed_sends;
154   uint32_t   trans_received;
155 
156   float      elapsed_time;  /* length of test in seconds */
157 
158   float      cpu_util;
159   float      cpu_percent_user;
160   float      cpu_percent_system;
161   float      cpu_percent_iowait;
162   float      cpu_percent_irq;
163   float      cpu_percent_swintr;
164   float      serv_dem;
165   uint32_t   cpu_method;    /* how was CPU util measured? */
166   uint32_t   num_cpus;      /* number of CPUs in remote */
167 
168   int32_t    peak_cpu_id;   /* ID of the most utilized CPU */
169   float      peak_cpu_util; /* its individual utilization */
170   int32_t    vendor;
171   int32_t    device;        /* pci device id of the probable egress
172 			       interface */
173   int32_t    subvendor;
174   int32_t    subdevice;
175   int32_t    transport_retrans;
176   /* there are 27 ints above here, add another and you need to adjust
177      the define below */
178   #define OMNI_RESULTS_CONV_CUTOFF 27
179   char       ifname[16];    /* the probable egress interface */
180   char       driver[32];    /* size based on linux/ethtool.h */
181   char       version[32];
182   char       firmware[32];
183   char       bus[32];
184   char       ifslot[16];    /* slot id of the probable egress interface */
185   char       cong_control[16]; /* what the congestion control alg was */
186   /* total sizeof must be <= MAXSPECDATA*sizeof(int) */
187 };
188 
189 #endif /* WANT_OMNI */
190 
191 struct	tcp_stream_request_struct {
192   int	send_buf_size;
193   int	recv_buf_size;	/* how big does the client want it - the */
194 			/* receive socket buffer that is */
195   int	receive_size;   /* how many bytes do we want to receive at one */
196 			/* time? */
197   int	recv_alignment; /* what is the alignment of the receive */
198 			/* buffer? */
199   int	recv_offset;    /* and at what offset from that alignment? */
200   int	no_delay;       /* do we disable the nagle algorithm for send */
201 			/* coalescing? */
202   int	measure_cpu;	/* does the client want server cpu utilization */
203 			/* measured? */
204   float	cpu_rate;	/* do we know how fast the cpu is already? */
205   int	test_length;	/* how long is the test?		*/
206   int	so_rcvavoid;    /* do we want the remote to avoid copies on */
207 			/* receives? */
208   int	so_sndavoid;    /* do we want the remote to avoid send copies? */
209   int   dirty_count;    /* how many integers in the receive buffer */
210 			/* should be made dirty before calling recv? */
211   int   clean_count;    /* how many integers should be read from the */
212 			/* recv buffer before calling recv? */
213   int   port;           /* the port to which the recv side should bind
214 			   to allow netperf to run through those evil
215 			   firewall things */
216   int   ipfamily;       /* the address family of ipaddress */
217 };
218 
219 struct	tcp_stream_response_struct {
220   int	recv_buf_size;	/* how big does the client want it	*/
221   int	receive_size;
222   int	no_delay;
223   int	measure_cpu;	/* does the client want server cpu	*/
224   int	test_length;	/* how long is the test?		*/
225   int	send_buf_size;
226   int	data_port_number;	/* connect to me here	*/
227   float	cpu_rate;		/* could we measure	*/
228   int	so_rcvavoid;	/* could the remote avoid receive copies? */
229   int	so_sndavoid;	/* could the remote avoid send copies? */
230 };
231 
232 struct tcp_stream_results_struct {
233   double         bytes_received;
234   unsigned int	 recv_calls;
235   float	         elapsed_time;	/* how long the test ran */
236   float	         cpu_util;	/* -1 if not measured */
237   float	         serv_dem;	/* -1 if not measured */
238   int            cpu_method;    /* how was cpu util measured? */
239   int            num_cpus;      /* how many CPUs had the remote? */
240   int            recv_buf_size; /* how large was it at the end? */
241   int            send_buf_size; /* how large was it at the end? */
242 };
243 
244 struct	tcp_maerts_request_struct {
245   int	send_buf_size;
246   int	recv_buf_size;	/* how big does the client want it - the */
247 			/* receive socket buffer that is */
248   int	send_size;      /* how many bytes do we want netserver to send
249 			   at one time? */
250   int	send_alignment; /* what is the alignment of the send */
251 			/* buffer? */
252   int	send_offset;    /* and at what offset from that alignment? */
253   int	no_delay;       /* do we disable the nagle algorithm for send */
254 			/* coalescing? */
255   int	measure_cpu;	/* does the client want server cpu utilization */
256 			/* measured? */
257   float	cpu_rate;	/* do we know how fast the cpu is already? */
258   int	test_length;	/* how long is the test?		*/
259   int	so_rcvavoid;    /* do we want the remote to avoid copies on */
260 			/* receives? */
261   int	so_sndavoid;    /* do we want the remote to avoid send copies? */
262   int   dirty_count;    /* how many integers in the send buffer */
263 			/* should be made dirty before calling recv? */
264   int   clean_count;    /* how many integers should be read from the */
265 			/* recv buffer before calling recv? */
266   int   port;           /* the port to which the recv side should bind
267 			   to allow netperf to run through those evil
268 			   firewall things */
269   int   ipfamily;
270 };
271 
272 struct	tcp_maerts_response_struct {
273   int	recv_buf_size;	/* how big does the client want it	*/
274   int	send_size;
275   int	no_delay;
276   int	measure_cpu;	/* does the client want server cpu	*/
277   int	test_length;	/* how long is the test?		*/
278   int	send_buf_size;
279   int	data_port_number;	/* connect to me here	*/
280   float	cpu_rate;		/* could we measure	*/
281   int	so_rcvavoid;	/* could the remote avoid receive copies? */
282   int	so_sndavoid;	/* could the remote avoid send copies? */
283 };
284 
285 struct tcp_maerts_results_struct {
286   double         bytes_sent;
287   unsigned int	 send_calls;
288   float	         elapsed_time;	/* how long the test ran */
289   float	         cpu_util;	/* -1 if not measured */
290   float	         serv_dem;	/* -1 if not measured */
291   int            cpu_method;    /* how was cpu util measured? */
292   int            num_cpus;      /* how many CPUs had the remote? */
293 };
294 
295 struct	tcp_rr_request_struct {
296   int	recv_buf_size;	/* how big does the client want it	*/
297   int	send_buf_size;
298   int	recv_alignment;
299   int	recv_offset;
300   int	send_alignment;
301   int	send_offset;
302   int	request_size;
303   int	response_size;
304   int	no_delay;
305   int	measure_cpu;	/* does the client want server cpu	*/
306   float	cpu_rate;	/* do we know how fast the cpu is?	*/
307   int	test_length;	/* how long is the test?		*/
308   int	so_rcvavoid;    /* do we want the remote to avoid receive */
309 			/* copies? */
310   int	so_sndavoid;    /* do we want the remote to avoid send copies? */
311   int   port;           /* the port to which the recv side should bind
312 			   to allow netperf to run through those evil
313 			   firewall things */
314   int   ipfamily;
315 };
316 
317 struct	tcp_rr_response_struct {
318   int	recv_buf_size;	/* how big does the client want it	*/
319   int	no_delay;
320   int	measure_cpu;	/* does the client want server cpu	*/
321   int	test_length;	/* how long is the test?		*/
322   int	send_buf_size;
323   int	data_port_number;	/* connect to me here	*/
324   float	cpu_rate;		/* could we measure	*/
325   int	so_rcvavoid;	/* could the remote avoid receive copies? */
326   int	so_sndavoid;	/* could the remote avoid send copies? */
327 };
328 
329 struct tcp_rr_results_struct {
330   unsigned int  bytes_received;	/* ignored initially */
331   unsigned int	recv_calls;	/* ignored initially */
332   unsigned int	trans_received;	/* not ignored  */
333   float	        elapsed_time;	/* how long the test ran */
334   float	        cpu_util;	/* -1 if not measured */
335   float	        serv_dem;	/* -1 if not measured */
336   int           cpu_method;    /* how was cpu util measured? */
337   int           num_cpus;      /* how many CPUs had the remote? */
338 };
339 
340 struct	tcp_conn_rr_request_struct {
341   int	recv_buf_size;	/* how big does the client want it	*/
342   int	send_buf_size;
343   int	recv_alignment;
344   int	recv_offset;
345   int	send_alignment;
346   int	send_offset;
347   int	request_size;
348   int	response_size;
349   int	no_delay;
350   int	measure_cpu;	/* does the client want server cpu	*/
351   float	cpu_rate;	/* do we know how fast the cpu is?	*/
352   int	test_length;	/* how long is the test?		*/
353   int	so_rcvavoid;    /* do we want the remote to avoid receive */
354 			/* copies? */
355   int	so_sndavoid;    /* do we want the remote to avoid send copies? */
356   int   port;           /* the port to which the recv side should bind
357 			   to allow netperf to run through those evil
358 			   firewall things */
359   int   ipfamily;
360 };
361 
362 
363 struct	tcp_conn_rr_response_struct {
364   int	recv_buf_size;	/* how big does the client want it	*/
365   int	no_delay;
366   int	measure_cpu;	/* does the client want server cpu	*/
367   int	test_length;	/* how long is the test?		*/
368   int	send_buf_size;
369   int	data_port_number;	/* connect to me here	*/
370   float	cpu_rate;		/* could we measure	*/
371   int	so_rcvavoid;	/* could the remote avoid receive copies? */
372   int	so_sndavoid;	/* could the remote avoid send copies? */
373 };
374 
375 struct tcp_conn_rr_results_struct {
376   unsigned int	bytes_received;	/* ignored initially */
377   unsigned int	recv_calls;	/* ignored initially */
378   unsigned int	trans_received;	/* not ignored  */
379   float	        elapsed_time;	/* how long the test ran */
380   float	        cpu_util;	/* -1 if not measured */
381   float	        serv_dem;	/* -1 if not measured */
382   int           cpu_method;    /* how was cpu util measured? */
383   int           num_cpus;      /* how many CPUs had the remote? */
384 };
385 
386 struct	tcp_tran_rr_request_struct {
387   int	recv_buf_size;	/* how big does the client want it	*/
388   int	send_buf_size;
389   int	recv_alignment;
390   int	recv_offset;
391   int	send_alignment;
392   int	send_offset;
393   int	request_size;
394   int	response_size;
395   int	no_delay;
396   int	measure_cpu;	/* does the client want server cpu	*/
397   float	cpu_rate;	/* do we know how fast the cpu is?	*/
398   int	test_length;	/* how long is the test?		*/
399   int	so_rcvavoid;    /* do we want the remote to avoid receive */
400 			/* copies? */
401   int	so_sndavoid;    /* do we want the remote to avoid send copies? */
402   int   port;           /* the port to which the recv side should bind
403 			   to allow netperf to run through those evil
404 			   firewall things */
405   int   ipfamily;
406 };
407 
408 
409 struct	tcp_tran_rr_response_struct {
410   int	recv_buf_size;	/* how big does the client want it	*/
411   int	no_delay;
412   int	measure_cpu;	/* does the client want server cpu	*/
413   int	test_length;	/* how long is the test?		*/
414   int	send_buf_size;
415   int	data_port_number;	/* connect to me here	*/
416   float	cpu_rate;		/* could we measure	*/
417   int	so_rcvavoid;	/* could the remote avoid receive copies? */
418   int	so_sndavoid;	/* could the remote avoid send copies? */
419 };
420 
421 struct tcp_tran_rr_results_struct {
422   unsigned int	bytes_received;	/* ignored initially */
423   unsigned int	recv_calls;	/* ignored initially */
424   unsigned int	trans_received;	/* not ignored  */
425   float	        elapsed_time;	/* how long the test ran */
426   float	        cpu_util;	/* -1 if not measured */
427   float	        serv_dem;	/* -1 if not measured */
428   int           cpu_method;    /* how was cpu util measured? */
429   int           num_cpus;      /* how many CPUs had the remote? */
430 
431 };
432 
433 struct	udp_stream_request_struct {
434   int	recv_buf_size;
435   int	message_size;
436   int   recv_connected;
437   int	recv_alignment;
438   int	recv_offset;
439   int	checksum_off;
440   int	measure_cpu;
441   float	cpu_rate;
442   int	test_length;
443   int	so_rcvavoid;    /* do we want the remote to avoid receive */
444 			/* copies? */
445   int	so_sndavoid;    /* do we want the remote to avoid send copies? */
446   int   port;           /* the port to which the recv side should bind
447 			   to allow netperf to run through those evil
448 			   firewall things */
449   int   ipfamily;
450 
451 };
452 
453 struct	udp_stream_response_struct {
454   int	recv_buf_size;
455   int	send_buf_size;
456   int	measure_cpu;
457   int	test_length;
458   int	data_port_number;
459   float	cpu_rate;
460   int	so_rcvavoid;	/* could the remote avoid receive copies? */
461   int	so_sndavoid;	/* could the remote avoid send copies? */
462 };
463 
464 struct	udp_stream_results_struct {
465   unsigned int	messages_recvd;
466   unsigned int	bytes_received;
467   float	        elapsed_time;
468   float	        cpu_util;
469   int           cpu_method;    /* how was cpu util measured? */
470   int           num_cpus;      /* how many CPUs had the remote? */
471 };
472 
473 
474 struct	udp_rr_request_struct {
475   int	recv_buf_size;	/* how big does the client want it	*/
476   int	send_buf_size;
477   int	recv_alignment;
478   int	recv_offset;
479   int	send_alignment;
480   int	send_offset;
481   int	request_size;
482   int	response_size;
483   int	no_delay;
484   int	measure_cpu;	/* does the client want server cpu	*/
485   float	cpu_rate;	/* do we know how fast the cpu is?	*/
486   int	test_length;	/* how long is the test?		*/
487   int	so_rcvavoid;    /* do we want the remote to avoid receive */
488 			/* copies? */
489   int	so_sndavoid;    /* do we want the remote to avoid send copies? */
490   int   port;           /* the port to which the recv side should bind
491 			   to allow netperf to run through those evil
492 			   firewall things */
493   int   ipfamily;
494 };
495 
496 struct	udp_rr_response_struct {
497   int	recv_buf_size;	/* how big does the client want it	*/
498   int	no_delay;
499   int	measure_cpu;	/* does the client want server cpu	*/
500   int	test_length;	/* how long is the test?		*/
501   int	send_buf_size;
502   int	data_port_number;	/* connect to me here	*/
503   float	cpu_rate;		/* could we measure	*/
504   int	so_rcvavoid;	/* could the remote avoid receive copies? */
505   int	so_sndavoid;	/* could the remote avoid send copies? */
506 };
507 
508 struct udp_rr_results_struct {
509   unsigned int	bytes_received;	/* ignored initially */
510   unsigned int	recv_calls;	/* ignored initially */
511   unsigned int	trans_received;	/* not ignored  */
512   float	        elapsed_time;	/* how long the test ran */
513   float	        cpu_util;	/* -1 if not measured */
514   float	        serv_dem;	/* -1 if not measured */
515   int           cpu_method;    /* how was cpu util measured? */
516   int           num_cpus;      /* how many CPUs had the remote? */
517 };
518 
519 struct	tcp_cc_request_struct {
520   int	recv_buf_size;	/* how big does the client want it	*/
521   int	send_buf_size;
522   int	recv_alignment;
523   int	recv_offset;
524   int	send_alignment;
525   int	send_offset;
526   int	request_size;
527   int	response_size;
528   int	no_delay;
529   int	measure_cpu;	/* does the client want server cpu	*/
530   float	cpu_rate;	/* do we know how fast the cpu is?	*/
531   int	test_length;	/* how long is the test?		*/
532   int	so_rcvavoid;    /* do we want the remote to avoid receive */
533 			/* copies? */
534   int	so_sndavoid;    /* do we want the remote to avoid send copies? */
535   int   port;           /* the port to which the recv side should bind
536 			   to allow netperf to run through those evil
537 			   firewall things */
538   int   ipfamily;
539 };
540 
541 
542 struct	tcp_cc_response_struct {
543   int	recv_buf_size;	/* how big does the client want it	*/
544   int	no_delay;
545   int	measure_cpu;	/* does the client want server cpu	*/
546   int	test_length;	/* how long is the test?		*/
547   int	send_buf_size;
548   int	data_port_number;	/* connect to me here	*/
549   float	cpu_rate;		/* could we measure	*/
550   int	so_rcvavoid;	/* could the remote avoid receive copies? */
551   int	so_sndavoid;	/* could the remote avoid send copies? */
552 };
553 
554 struct tcp_cc_results_struct {
555   unsigned int	bytes_received;	/* ignored initially */
556   unsigned int	recv_calls;	/* ignored initially */
557   unsigned int	trans_received;	/* not ignored  */
558   float	        elapsed_time;	/* how long the test ran */
559   float	        cpu_util;	/* -1 if not measured */
560   float	        serv_dem;	/* -1 if not measured */
561   int           cpu_method;     /* how was cpu util measured? */
562   int           num_cpus;       /* how many CPUs had the remote? */
563 };
564 
565 extern int
566   socket_type,      /* initially used by the "omni" tests */
567   rss_size_req,     /* requested remote socket send buffer size */
568   rsr_size_req,     /* requested remote socket recv buffer size */
569   rss_size,         /* remote socket send buffer size */
570   rsr_size,         /* remote socket recv buffer size */
571   rsr_size_end,
572   rss_size_end,
573   lss_size_req,     /* requested local socket send buffer size */
574   lsr_size_req,     /* requested local socket recv buffer size */
575   lss_size,         /* local  socket send buffer size */
576   lsr_size,         /* local  socket recv buffer size */
577   lss_size_end,
578   lsr_size_end,
579   req_size,         /* request size */
580   rsp_size,         /* response size */
581   send_size,        /* how big are individual sends */
582   recv_size,        /* how big are individual receives */
583   loc_nodelay,      /* don't/do use NODELAY locally */
584   rem_nodelay,      /* don't/do use NODELAY remotely */
585   loc_sndavoid,     /* avoid send copies locally */
586   loc_rcvavoid,     /* avoid recv copies locally */
587   rem_sndavoid,     /* avoid send copies remotely */
588   rem_rcvavoid,     /* avoid recv_copies remotely */
589   routing_allowed,  /* do we set/clear SO_DONTROUTE on data sock */
590   multicast_ttl,    /* what should the TTL be on mcast dgrams */
591   want_keepalive,   /* do we bother setting SO_KEEPALIVE? */
592   transport_mss_req;
593 
594 #ifdef WANT_OMNI
595 extern void scan_omni_args(int argc, char *argv[]);
596 #endif
597 extern void scan_sockets_args(int argc, char *argv[]);
598 extern struct addrinfo *complete_addrinfo(char *controlhost,
599 				   char *data_address,
600 				   char *port,
601 				   int family,
602 				   int type,
603 				   int protocol,
604 				   int flags);
605 extern void complete_addrinfos(struct addrinfo **remote,
606 			       struct addrinfo **local,
607 			       char remote_host[],
608 			       int type,
609 			       int protocol,
610 			       int flags);
611 extern int af_to_nf(int af);
612 extern int nf_to_af(int nf);
613 extern int nst_to_hst(int nst);
614 extern int hst_to_nst(int hst);
615 extern char *hst_to_str(int hst);
616 extern char *protocol_to_str(int protocol);
617 extern void print_top_test_header(char test_name[],
618 				  struct addrinfo *source,
619 				  struct addrinfo *destination);
620 extern void set_port_number(struct addrinfo *res,
621 			    unsigned short port);
622 extern void set_hostname_and_port(char *hostname,
623 				  char *portstr,
624 				  int family,
625 				  int port);
626 extern void set_sockaddr_family_addr_port(struct sockaddr_storage *sockaddr,
627 					  int family,
628 					  void *addr,
629 					  int port);
630 extern int  get_sockaddr_family_addr_port(struct sockaddr_storage *sockaddr,
631 					  int family,
632 					  void *addr,
633 					  int *port);
634 extern void send_tcp_mss(char remote_host[]);
635 extern void send_tcp_stream(char remote_host[]);
636 extern void send_tcp_maerts(char remote_host[]);
637 extern void send_tcp_rr(char remote_host[]);
638 extern void send_tcp_conn_rr(char remote_host[]);
639 extern void send_tcp_cc(char remote_host[]);
640 extern void send_udp_stream(char remote_host[]);
641 extern void send_udp_rr(char remote_host[]);
642 
643 extern void send_omni(char remote_host[]);
644 extern void print_uuid(char remote_host[]);
645 extern void recv_omni();
646 
647 extern void recv_tcp_stream();
648 extern void recv_tcp_maerts();
649 extern void recv_tcp_rr();
650 extern void recv_tcp_conn_rr();
651 extern void recv_tcp_cc();
652 extern void recv_udp_stream();
653 extern void recv_udp_rr();
654 
655 extern void loc_cpu_rate();
656 extern void rem_cpu_rate();
657 
658 #ifdef HAVE_ICSC_EXS
659 extern void send_exs_tcp_stream(char remotehost[]);
660 #endif /* HAVE_ICSC_EXS */
661 
662 #ifdef HAVE_SENDFILE
663 extern void sendfile_tcp_stream(char remotehost[]);
664 #endif /* HAVE_SENDFILE */
665 
666 #if !defined(HAVE_STRUCT_SOCKADDR_STORAGE) && !defined(sockaddr_storage)
667 #define sockaddr_storage sockaddr_in
668 #endif
669 
670 #ifdef DO_NBRR
671 extern void send_tcp_nbrr(char remote_host[]);
672 
673 extern void recv_tcp_nbrr();
674 #endif
675 
676 extern SOCKET create_data_socket(struct addrinfo *res);
677