This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] sysdeps/gnu/netinet/tcp.h: Sync struct tcp_info to Linux 4.6
- From: Florian Weimer <fweimer at redhat dot com>
- To: AsbjÃrn Sloth TÃnnesen <asbjorn at asbjorn dot st>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 18 May 2016 13:38:02 +0200
- Subject: Re: [PATCH] sysdeps/gnu/netinet/tcp.h: Sync struct tcp_info to Linux 4.6
- Authentication-results: sourceware.org; auth=none
- References: <1463520870-24031-1-git-send-email-asbjorn at asbjorn dot st>
On 05/17/2016 11:34 PM, AsbjÃrn Sloth TÃnnesen wrote:
--- a/sysdeps/gnu/netinet/tcp.h
+++ b/sysdeps/gnu/netinet/tcp.h
@@ -248,6 +248,18 @@ struct tcp_info
u_int32_t tcpi_rcv_space;
u_int32_t tcpi_total_retrans;
+
+ u_int64_t tcpi_pacing_rate;
+ u_int64_t tcpi_max_pacing_rate;
+ u_int64_t tcpi_bytes_acked; /* RFC4898 tcpEStatsAppHCThruOctetsAcked */
+ u_int64_t tcpi_bytes_received; /* RFC4898 tcpEStatsAppHCThruOctetsReceived */
+ u_int32_t tcpi_segs_out; /* RFC4898 tcpEStatsPerfSegsOut */
+ u_int32_t tcpi_segs_in; /* RFC4898 tcpEStatsPerfSegsIn */
+
+ u_int32_t tcpi_notsent_bytes;
+ u_int32_t tcpi_min_rtt;
+ u_int32_t tcpi_data_segs_in; /* RFC4898 tcpEStatsDataSegsIn */
+ u_int32_t tcpi_data_segs_out; /* RFC4898 tcpEStatsDataSegsOut */
};
The last change to this struct was in 2007. Can we really change the
ABI like this? It's not even in the Linux-specific part.
There is no comment at all in the header file that this struct must be
used exclusively with getsockopt, so libraries might have used the type
in their header files.
In fact, /usr/include/libnl3/netlink/idiag/msg.h has this:
extern struct tcp_info idiagnl_msg_get_tcpinfo(const struct idiagnl_msg *);
So we really can't make such a change to the struct definition. We
probably have to introduce a new type.
Thanks,
Florian