History

tcp: ULP infrastructure

Add the infrustructure for attaching Upper Layer Protocols (ULPs) over TCP sockets. Based on a similar infrastructure in tcp_cong. The idea is that any ULP can add its own logic by changing the TCP proto_ops structure to its own methods. Example usage: setsockopt(sock, SOL_TCP, TCP_ULP, "tls", sizeof("tls")); modules will call: tcp_register_ulp(&tcp_tls_ulp_ops); to register/unregister their ulp, with an init function and name. A list of registered ulps will be returned by tcp_get_available_ulp, which is hooked up to /proc. Example: $ cat /proc/sys/net/ipv4/tcp_available_ulp tls There is currently no functionality to remove or chain ULPs, but it should be possible to add these in the future if needed.

Dave Watson committed 9 years ago

Commit 734942c1 parent 206f60e8 files · +220 −1Browse files

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

Unified · Split

include/uapi/linux/tcp.h+1−0
@@ -117,6 +117,7 @@ enum { · 116 unmodified lines
117#define TCP_SAVED_SYN 28 /* Get SYN headers recorded for connection */117#define TCP_SAVED_SYN 28 /* Get SYN headers recorded for connection */
118#define TCP_REPAIR_WINDOW 29 /* Get/set window parameters */118#define TCP_REPAIR_WINDOW 29 /* Get/set window parameters */
119#define TCP_FASTOPEN_CONNECT 30 /* Attempt FastOpen with connect */119#define TCP_FASTOPEN_CONNECT 30 /* Attempt FastOpen with connect */
120#define TCP_ULP 31 /* Attach a ULP to a TCP connection */
120 121
121struct tcp_repair_opt {122struct tcp_repair_opt {
122 __u32 opt_code;123 __u32 opt_code;