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)
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -112,6 +112,7 @@ enum { · 111 unmodified lines | ||
| 112 | 112 | #define TCP_FASTOPEN 23 /* Enable FastOpen on listeners */ |
| 113 | 113 | #define TCP_TIMESTAMP 24 |
| 114 | 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 | |
| 116 | 117 | struct tcp_repair_opt { |
| 117 | 118 | __u32 opt_code; |