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

Function get_optional_features

src/iperf_util.c:242–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240
241
242const char *
243get_optional_features(void)
244{
245 static char features[1024];
246 unsigned int numfeatures = 0;
247
248 snprintf(features, sizeof(features), "Optional features available: ");
249
250#if defined(HAVE_CPU_AFFINITY)
251 if (numfeatures > 0) {
252 strncat(features, ", ",
253 sizeof(features) - strlen(features) - 1);
254 }
255 strncat(features, "CPU affinity setting",
256 sizeof(features) - strlen(features) - 1);
257 numfeatures++;
258#endif /* HAVE_CPU_AFFINITY */
259
260#if defined(HAVE_FLOWLABEL)
261 if (numfeatures > 0) {
262 strncat(features, ", ",
263 sizeof(features) - strlen(features) - 1);
264 }
265 strncat(features, "IPv6 flow label",
266 sizeof(features) - strlen(features) - 1);
267 numfeatures++;
268#endif /* HAVE_FLOWLABEL */
269
270#if defined(HAVE_SCTP_H)
271 if (numfeatures > 0) {
272 strncat(features, ", ",
273 sizeof(features) - strlen(features) - 1);
274 }
275 strncat(features, "SCTP",
276 sizeof(features) - strlen(features) - 1);
277 numfeatures++;
278#endif /* HAVE_SCTP_H */
279
280#if defined(HAVE_TCP_CONGESTION)
281 if (numfeatures > 0) {
282 strncat(features, ", ",
283 sizeof(features) - strlen(features) - 1);
284 }
285 strncat(features, "TCP congestion algorithm setting",
286 sizeof(features) - strlen(features) - 1);
287 numfeatures++;
288#endif /* HAVE_TCP_CONGESTION */
289
290#if defined(HAVE_SENDFILE)
291 if (numfeatures > 0) {
292 strncat(features, ", ",
293 sizeof(features) - strlen(features) - 1);
294 }
295 strncat(features, "sendfile / zerocopy",
296 sizeof(features) - strlen(features) - 1);
297 numfeatures++;
298#endif /* HAVE_SENDFILE */
299

Callers 1

iperf_parse_argumentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…