#define INET_ADDRSTRLEN 15
#endif
-//#ifdef __cplusplus
- #ifdef HAVE_IPV6
- #define REPORT_ADDRLEN (INET6_ADDRSTRLEN + 1)
-typedef struct sockaddr_storage iperf_sockaddr;
- #else
- #define REPORT_ADDRLEN (INET_ADDRSTRLEN + 1)
-typedef struct sockaddr_in iperf_sockaddr;
- #endif
-//#endif
+// All addresses use struct sockaddr_storage, for compatibility with both v4/v6
+// The maximum report length is the maximum host name length for getnameinfo(3).
+#define REPORT_ADDRLEN (NI_MAXHOST + 1)
// Rationalize stdint definitions and sizeof, thanks to ac_create_stdint_h.m4
// from the gnu archive
#define SHUT_RDWR 2
#endif // SHUT_RD
+/* Plug-able TCP congestion control algorithm */
+#ifndef TCP_CONGESTION
+#define TCP_CONGESTION 13 /* include/linux/tcp.h */
+#endif
+
/* DCCP-specific definitions */
#include <linux/dccp.h>
#ifndef SOCK_DCCP