MCPcopy Create free account
hub / github.com/esnet/iperf / iperf_exchange_parameters

Function iperf_exchange_parameters

src/iperf_api.c:2351–2388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2349 */
2350
2351int
2352iperf_exchange_parameters(struct iperf_test *test)
2353{
2354 int s;
2355
2356 if (test->role == 'c') {
2357
2358 if (send_parameters(test) < 0)
2359 return -1;
2360
2361 } else {
2362
2363 if (get_parameters(test) < 0) {
2364 return -1;
2365 }
2366
2367#if defined(HAVE_SSL)
2368 if (test_is_authorized(test) < 0){
2369 return -1;
2370 }
2371#endif //HAVE_SSL
2372
2373 if ((s = test->protocol->listen(test)) < 0) {
2374 return -1;
2375 }
2376
2377 FD_SET(s, &test->read_set);
2378 test->max_fd = (s > test->max_fd) ? s : test->max_fd;
2379 test->prot_listener = s;
2380
2381 // Send the control message to create streams and start the test
2382 if (iperf_set_send_state(test, CREATE_STREAMS) != 0)
2383 return -1;
2384
2385 }
2386
2387 return 0;
2388}
2389
2390/*************************************************************/
2391

Callers 2

iperf_acceptFunction · 0.85

Calls 4

send_parametersFunction · 0.85
get_parametersFunction · 0.85
test_is_authorizedFunction · 0.85
iperf_set_send_stateFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…