X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=include%2Fheaders.h;h=0ef1c2e231e53d1faa1da290fc0f5df528baf65f;hb=840e9078558547dbd9e2ed33670c3e116e718897;hp=5b534f742a3ac978bba8a7f6277565ca5f71a729;hpb=90fc1e2c0c74319759b21d4a177c32691b88fdf3;p=iperf diff --git a/include/headers.h b/include/headers.h index 5b534f7..0ef1c2e 100644 --- a/include/headers.h +++ b/include/headers.h @@ -126,15 +126,9 @@ SPECIAL_OSF1_EXTERN_C_STOP #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 @@ -153,6 +147,11 @@ typedef uintmax_t max_size_t; #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 #ifndef SOCK_DCCP