void print_flags()

in src/parameter.c [9:105]


void print_flags(struct ntttcp_test *test)
{
	if (test->server_role)
		printf("%s\n", "*** receiver role");
	if (test->client_role)
		printf("%s\n", "*** sender role");
	if (test->daemon)
		printf("%s\n", "*** run as daemon");
	if (test->server_role && test->use_epoll)
		printf("%s\n", "*** use epoll()");
	if (test->server_role && !test->exit_after_done)
		printf("%s\n", "*** hold receiver always running");

	if (test->multi_clients_mode)
		printf("%s:\t\t %s\n", "multiple clients", "yes");

	if (test->last_client)
		printf("%s:\t\t\t %s\n", "last client", "yes");

	if (test->no_synch)
		printf("%s\n", "*** no sender/receiver synch");

	// printf("%s:\t\t\t %s\n", "mapping", test->mapping);

	if (test->client_role)
		printf("%s:\t\t\t %d X %d X %d\n",
			"connections",
			test->server_ports, test->threads_per_server_port, test->conns_per_thread);
	else
		printf("%s:\t\t\t\t %d\n", "ports", test->server_ports);

	if (test->cpu_affinity == -1)
		printf("%s:\t\t\t %s\n", "cpu affinity", "*");
	else
		printf("%s:\t\t\t %d\n", "cpu affinity", test->cpu_affinity);

	printf("%s:\t\t\t %s\n", "server address", test->bind_address);

	if (test->domain == AF_INET)
		printf("%s:\t\t\t\t %s\n", "domain", "IPv4");
	if (test->domain == AF_INET6)
		printf("%s:\t\t\t\t %s\n", "domain", "IPv6");
	if (test->protocol == TCP)
		printf("%s:\t\t\t %s\n", "protocol", "TCP");
	else if (test->protocol == UDP)
		printf("%s:\t\t\t %s\n", "protocol", "UDP");
	else
		printf("%s:\t\t\t %s\n", "protocol", "unsupported");

	printf("%s:\t %d\n", "server port starting at", test->server_base_port);

	if (test->client_role && test->client_base_port > 0)
		printf("%s:\t %d\n", "client source port starting at", test->client_base_port);

	if (test->server_role)
		printf("%s:\t %ld\n", "receiver socket buffer (bytes)", test->recv_buf_size);
	if (test->client_role)
		printf("%s:\t %ld\n", "sender socket buffer (bytes)", test->send_buf_size);

	if (test->client_role && test->bandwidth_limit != 0)
		printf("%s:\t %ld\n", "bandwidth limit (bits/sec)", test->bandwidth_limit);

	if (test->client_role && test->fq_rate_limit != 0)
		printf("%s:\t %ld\n", "fq rate limit (bits/sec)", test->fq_rate_limit);

	if (test->warmup == 0)
		printf("%s:\t\t %s\n", "test warm-up (sec)", "no");
	else
		printf("%s:\t\t %d\n", "test warm-up (sec)", test->warmup);

	if (test->duration == 0)
		printf("%s:\t\t %s\n", "test duration (sec)", "continuous");
	else
		printf("%s:\t\t %d\n", "test duration (sec)", test->duration);

	if (test->cooldown == 0)
		printf("%s:\t\t %s\n", "test cool-down (sec)", "no");
	else
		printf("%s:\t\t %d\n", "test cool-down (sec)", test->cooldown);

	printf("%s:\t %s\n", "show system tcp retransmit", test->show_tcp_retransmit ? "yes" : "no");
	if (strcmp(test->show_interface_packets, ""))
		printf("%s:\t\t %s\n", "show packets for", test->show_interface_packets);
	if (strcmp(test->show_dev_interrupts, ""))
		printf("%s:\t %s\n", "show device interrupts for", test->show_dev_interrupts);

	if (test->save_console_log)
		printf("%s:\t %s\n", "capture console output to:", test->console_log_filename);
	if (test->save_xml_log)
		printf("%s:\t %s\n", "save output to xml file:", test->xml_log_filename);
	if (test->save_json_log)
		printf("%s:\t %s\n", "save output to json file:", test->json_log_filename);

	printf("%s:\t\t\t %s\n", "quiet mode", test->quiet ? "enabled" : "disabled");
	printf("%s:\t\t\t %s\n", "verbose mode", test->verbose ? "enabled" : "disabled");
	printf("---------------------------------------------------------\n");
}