1/* 2 Copyright (C) 1993, Hewlett-Packard Company 3*/ 4 5 /* This file contains the test-specific definitions for netperf's */ 6 /* DLPI tests */ 7 8 9struct dlpi_co_stream_request_struct { 10 int recv_win_size; 11 int send_win_size; 12 int receive_size; /* how many bytes do we want to */ 13 /* receive at one time? */ 14 int recv_alignment; /* what is the alignment of the */ 15 /* receive buffer? */ 16 int recv_offset; /* and at what offset from that */ 17 /* alignment? */ 18 int measure_cpu; /* does the client want server cpu */ 19 /* utilization measured? */ 20 float cpu_rate; /* do we know how fast the cpu is */ 21 /* already? */ 22 int test_length; /* how long is the test? */ 23 int so_rcvavoid; /* do we want the remote to avoid */ 24 /* copies on 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 sap; /* */ 31 int ppa; /* which device do we wish to use? */ 32 int dev_name_len; /* the length of the device name string. this */ 33 /* is used to put it into the proper order on */ 34 /* @#$% byte-swapped boxes... */ 35 char dlpi_device[32]; /* the path to the dlpi device */ 36}; 37 38struct dlpi_co_stream_response_struct { 39 int recv_win_size; /* how big does the client want it */ 40 int send_win_size; 41 int receive_size; 42 int measure_cpu; /* does the client want server cpu */ 43 int test_length; /* how long is the test? */ 44 int data_port_number; /* connect to me here */ 45 float cpu_rate; /* could we measure */ 46 int so_rcvavoid; /* could the remote avoid receive copies? */ 47 int so_sndavoid; /* could the remote avoid send copies? */ 48 int station_addr_len; 49 int station_addr[1];/* what is the station address for the */ 50 /* specified ppa? */ 51}; 52 53struct dlpi_co_stream_results_struct { 54 int bytes_received; /* ignored initially */ 55 int recv_calls; /* ignored initially */ 56 float elapsed_time; /* how long the test ran */ 57 float cpu_util; /* -1 if not measured */ 58 float serv_dem; /* -1 if not measured */ 59 int cpu_method; /* how was CPU util measured? */ 60 int num_cpus; /* how many CPUs were there? */ 61}; 62 63struct dlpi_co_rr_request_struct { 64 int recv_win_size; /* how big does the client want it */ 65 int send_win_size; 66 int recv_alignment; 67 int recv_offset; 68 int send_alignment; 69 int send_offset; 70 int request_size; 71 int response_size; 72 int measure_cpu; /* does the client want server cpu */ 73 float cpu_rate; /* do we know how fast the cpu is? */ 74 int test_length; /* how long is the test? */ 75 int so_rcvavoid; /* do we want the remote to avoid receive copies? */ 76 int so_sndavoid; /* do we want the remote to avoid send copies? */ 77 int ppa; /* which device do we wish to use? */ 78 int sap; /* which sap should be used? */ 79 int dev_name_len; /* the length of the device name string. this */ 80 /* is used to put it into the proper order on */ 81 /* @#$% byte-swapped boxes... */ 82 char dlpi_device[32]; /* the path to the dlpi device */ 83}; 84 85struct dlpi_co_rr_response_struct { 86 int recv_win_size; /* how big does the client want it */ 87 int send_win_size; 88 int measure_cpu; /* does the client want server cpu */ 89 int test_length; /* how long is the test? */ 90 int data_port_number; /* connect to me here */ 91 float cpu_rate; /* could we measure */ 92 int so_rcvavoid; /* could the remote avoid receive copies? */ 93 int so_sndavoid; /* could the remote avoid send copies? */ 94 int station_addr_len; /* the length of the station address */ 95 int station_addr[1]; /* the remote's station address */ 96}; 97 98struct dlpi_co_rr_results_struct { 99 int bytes_received; /* ignored initially */ 100 int recv_calls; /* ignored initially */ 101 int trans_received; /* not ignored */ 102 float elapsed_time; /* how long the test ran */ 103 float cpu_util; /* -1 if not measured */ 104 float serv_dem; /* -1 if not measured */ 105 int cpu_method; /* how was CPU util measured? */ 106 int num_cpus; /* how many CPUs were there? */ 107}; 108 109struct dlpi_cl_stream_request_struct { 110 int recv_win_size; 111 int message_size; 112 int recv_alignment; 113 int recv_offset; 114 int checksum_off; 115 int measure_cpu; 116 float cpu_rate; 117 int test_length; 118 int so_rcvavoid; /* do we want the remote to avoid receive copies? */ 119 int so_sndavoid; /* do we want the remote to avoid send copies? */ 120 int ppa; /* which device do we wish to use? */ 121 int sap; 122 int dev_name_len; /* the length of the device name string. this */ 123 /* is used to put it into the proper order on */ 124 /* @#$% byte-swapped boxes... */ 125 char dlpi_device[32]; /* the path to the dlpi device */ 126}; 127 128struct dlpi_cl_stream_response_struct { 129 int recv_win_size; 130 int send_win_size; 131 int measure_cpu; 132 int test_length; 133 int data_port_number; 134 float cpu_rate; 135 int so_rcvavoid; /* could the remote avoid receive copies? */ 136 int so_sndavoid; /* could the remote avoid send copies? */ 137 int station_addr_len; /* the length of the station address */ 138 int station_addr[1]; /* the remote's station address */ 139}; 140 141struct dlpi_cl_stream_results_struct { 142 int messages_recvd; 143 int bytes_received; 144 float elapsed_time; 145 float cpu_util; 146 int num_cpus; 147}; 148 149 150struct dlpi_cl_rr_request_struct { 151 int recv_win_size; /* how big does the client want it */ 152 int send_win_size; 153 int recv_alignment; 154 int recv_offset; 155 int send_alignment; 156 int send_offset; 157 int request_size; 158 int response_size; 159 int no_delay; 160 int measure_cpu; /* does the client want server cpu */ 161 float cpu_rate; /* do we know how fast the cpu is? */ 162 int test_length; /* how long is the test? */ 163 int so_rcvavoid; /* do we want the remote to avoid receive */ 164 /* copies? */ 165 int so_sndavoid; /* do we want the remote to avoid send copies? */ 166 int ppa; /* which device do we wish to use? */ 167 int sap; /* which sap? */ 168 int dev_name_len; /* the length of the device name string. this */ 169 /* is used to put it into the proper order on */ 170 /* @#$% byte-swapped boxes... */ 171 char dlpi_device[32]; /* the path to the dlpi device */ 172}; 173 174struct dlpi_cl_rr_response_struct { 175 int recv_win_size; /* how big does the client want it */ 176 int send_win_size; 177 int no_delay; 178 int measure_cpu; /* does the client want server cpu */ 179 int test_length; /* how long is the test? */ 180 int data_port_number; /* connect to me here */ 181 float cpu_rate; /* could we measure */ 182 int so_rcvavoid; /* could the remote avoid receive copies? */ 183 int so_sndavoid; /* could the remote avoid send copies? */ 184 int station_addr_len; /* the length of the station address */ 185 int station_addr[1]; /* the remote's station address */ 186}; 187 188struct dlpi_cl_rr_results_struct { 189 int bytes_received; /* ignored initially */ 190 int recv_calls; /* ignored initially */ 191 int trans_received; /* not ignored */ 192 float elapsed_time; /* how long the test ran */ 193 float cpu_util; /* -1 if not measured */ 194 float serv_dem; /* -1 if not measured */ 195 int cpu_method; /* how was CPU util measured? */ 196 int num_cpus; /* how many CPUs were there? */ 197}; 198 199extern void send_dlpi_co_stream(); 200 201extern int recv_dlpi_co_stream(); 202 203extern int send_dlpi_co_rr(char remote_host[]); 204 205extern void send_dlpi_cl_stream(char remote_host[]); 206 207extern int recv_dlpi_cl_stream(); 208 209extern int send_dlpi_cl_rr(char remote_host[]); 210 211extern int recv_dlpi_cl_rr(); 212 213extern int recv_dlpi_co_rr(); 214 215extern void scan_dlpi_args(int argc, char *argv[]); 216