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