]> sjero.net Git - iperf/blobdiff - src/Settings.cpp
Actually add CCID selection ability
[iperf] / src / Settings.cpp
index 3cb619faf3bd36ef257ec383b94f0cb8e153beb2..42c21a2bf5b22630f0c329478a2510c81ff36998 100644 (file)
@@ -124,6 +124,7 @@ const struct option long_options[] =
 {"single_udp",       no_argument, NULL, 'U'},
 {"ipv6_domian",      no_argument, NULL, 'V'},
 {"suggest_win_size", no_argument, NULL, 'W'},
+{"ccid",          required_argument, NULL, 'Z'},
 {0, 0, 0, 0}
 };
 
@@ -169,13 +170,14 @@ const struct option env_options[] =
 {"IPERF_SINGLE_UDP",       no_argument, NULL, 'U'},
 {"IPERF_IPV6_DOMAIN",      no_argument, NULL, 'V'},
 {"IPERF_SUGGEST_WIN_SIZE", required_argument, NULL, 'W'},
+{"IPERF_CCID", required_argument, NULL, 'Z'},
 {0, 0, 0, 0}
 };
 
 #define SHORT_OPTIONS()
 
 const char short_options[] =
-      "12b::c:df:hi:j:l:mn:o:p:rst:u::vw:x:y:A: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:WZ:";
 
 /* -------------------------------------------------------------------
  * defaults
@@ -669,6 +671,13 @@ void Settings_Interpret( char option, const char *optarg, thread_Settings *mExtS
             fprintf( stderr, "The -W option is not available in this release\n");
             break;
 
+       case 'Z': //DCCP CCID
+               mExtSettings->mCCID=atoi(optarg);
+               if(mExtSettings->mCCID > 255 || mExtSettings->mCCID<=0){
+                       fprintf( stderr, "CCID %s is invalid\n", optarg);
+               }
+               break;
+
         default: // ignore unknown
             break;
     }