This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] sysdeps/gnu/netinet/tcp.h: Sync struct tcp_info to Linux 4.6

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]