X-Git-Url: http://sjero.net/git/?p=iperf;a=blobdiff_plain;f=src%2FReportDefault.c;h=150df1069d333e5c12557cae9636edf870262580;hp=dcb38527476d9ed3c71d14580409568ff39cf8eb;hb=840e9078558547dbd9e2ed33670c3e116e718897;hpb=a5a03e6ab0fdf9c4d7d4c085fcf01436f9ba3202 diff --git a/src/ReportDefault.c b/src/ReportDefault.c index dcb3852..150df10 100644 --- a/src/ReportDefault.c +++ b/src/ReportDefault.c @@ -204,6 +204,24 @@ void reporter_reportsettings( ReporterData *data ) { printf( warn_window_requested, buffer ); } printf( "\n" ); + + if (data->mProtocol == kProto_TCP) { + char *cong_requested = data->info.congAlgo, + cong[64]; + Socklen_t len = sizeof(cong); + + if (getsockopt(data->info.transferID, IPPROTO_TCP, TCP_CONGESTION, cong, &len) < 0) { + fprintf(stderr, "WARNING: cannot determine TCP congestion control algorithm (err: %d %s)\n", + errno, strerror(errno)); + } else { + printf("TCP congestion control algorithm: %s", cong[0] == '\0' ? "default" : cong); + + if (data->info.congAlgo && strcmp(cong, data->info.congAlgo)) + printf(" (NOT \"%s\"!)", data->info.congAlgo); + printf("\n"); + } + } + printf( seperator_line ); }