History

tcp: add TCP_CC_INFO socket option

Some Congestion Control modules can provide per flow information, but current way to get this information is to use netlink. Like TCP_INFO, let's add TCP_CC_INFO so that applications can issue a getsockopt() if they have a socket file descriptor, instead of playing complex netlink games. Sample usage would be : union tcp_cc_info info; socklen_t len = sizeof(info); if (getsockopt(fd, SOL_TCP, TCP_CC_INFO, &info, &len) == -1)

Eric Dumazet committed 11 years ago

Commit 6e9250f1 parent 64f40ff2 files · +22 −0Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/tcp.h+1−0
@@ -112,6 +112,7 @@ enum { · 111 unmodified lines
112#define TCP_FASTOPEN 23 /* Enable FastOpen on listeners */112#define TCP_FASTOPEN 23 /* Enable FastOpen on listeners */
113#define TCP_TIMESTAMP 24113#define TCP_TIMESTAMP 24
114#define TCP_NOTSENT_LOWAT 25 /* limit number of unsent bytes in write queue */114#define TCP_NOTSENT_LOWAT 25 /* limit number of unsent bytes in write queue */
115#define TCP_CC_INFO 26 /* Get Congestion Control (optional) info */
115 116
116struct tcp_repair_opt {117struct tcp_repair_opt {
117 __u32 opt_code;118 __u32 opt_code;