X-Git-Url: http://sjero.net/git/?p=iperf;a=blobdiff_plain;f=src%2FSettings.cpp;h=4034158cf261d326965afb4d5496de18700871a4;hp=549a9cca9d7523afb8c88e31e72901e3b16f8124;hb=840e9078558547dbd9e2ed33670c3e116e718897;hpb=a5a03e6ab0fdf9c4d7d4c085fcf01436f9ba3202 diff --git a/src/Settings.cpp b/src/Settings.cpp index 549a9cc..4034158 100644 --- a/src/Settings.cpp +++ b/src/Settings.cpp @@ -107,6 +107,7 @@ const struct option long_options[] = {"reportstyle",required_argument, NULL, 'y'}, // more esoteric options +{"algorithm", required_argument, NULL, 'A'}, {"bind", required_argument, NULL, 'B'}, {"compatibility", no_argument, NULL, 'C'}, {"daemon", no_argument, NULL, 'D'}, @@ -152,6 +153,7 @@ const struct option env_options[] = {"IPERF_REPORTSTYLE",required_argument, NULL, 'y'}, // more esoteric options +{"IPERF_CC", required_argument, NULL, 'A'}, {"IPERF_BIND", required_argument, NULL, 'B'}, {"IPERF_COMPAT", no_argument, NULL, 'C'}, {"IPERF_DAEMON", no_argument, NULL, 'D'}, @@ -172,7 +174,7 @@ const struct option env_options[] = #define SHORT_OPTIONS() const char short_options[] = - "12b::c:df:hi:j:l:mn:o:p:rst:uvw:x:y:B:CDF:IJ:L:M:NP:RS:T:UV:W"; + "12b::c:df:hi:j:l:mn:o:p:rst:uvw:x:y:A:B:CDF:IJ:L:M:NP:RS:T:UV:W"; /* ------------------------------------------------------------------- * defaults @@ -542,6 +544,11 @@ void Settings_Interpret( char option, const char *optarg, thread_Settings *mExtS // more esoteric options + case 'A': // set TCP congestion control algorithm + mExtSettings->congAlgo = new char[ strlen( optarg ) + 1 ]; + strcpy( mExtSettings->congAlgo, optarg ); + break; + case 'B': // specify bind address mExtSettings->mLocalhost = new char[ strlen( optarg ) + 1 ]; strcpy( mExtSettings->mLocalhost, optarg );