tcp.c (d41ecaac903c9f4658a71d4e7a708673cfb5abba) tcp.c (480aeb9639d6a077c611b303a22f9b1e5937d081)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * INET An implementation of the TCP/IP protocol suite for the LINUX
4 * operating system. INET is implemented using the BSD Socket
5 * interface as the means of communication with the user level.
6 *
7 * Implementation of the Transmission Control Protocol(TCP).
8 *

--- 2932 unchanged lines hidden (view full) ---

2941
2942 lock_sock(sk);
2943 tcp_sk(sk)->keepalive_intvl = val * HZ;
2944 release_sock(sk);
2945 return 0;
2946}
2947EXPORT_SYMBOL(tcp_sock_set_keepintvl);
2948
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * INET An implementation of the TCP/IP protocol suite for the LINUX
4 * operating system. INET is implemented using the BSD Socket
5 * interface as the means of communication with the user level.
6 *
7 * Implementation of the Transmission Control Protocol(TCP).
8 *

--- 2932 unchanged lines hidden (view full) ---

2941
2942 lock_sock(sk);
2943 tcp_sk(sk)->keepalive_intvl = val * HZ;
2944 release_sock(sk);
2945 return 0;
2946}
2947EXPORT_SYMBOL(tcp_sock_set_keepintvl);
2948
2949int tcp_sock_set_keepcnt(struct sock *sk, int val)
2950{
2951 if (val < 1 || val > MAX_TCP_KEEPCNT)
2952 return -EINVAL;
2953
2954 lock_sock(sk);
2955 tcp_sk(sk)->keepalive_probes = val;
2956 release_sock(sk);
2957 return 0;
2958}
2959EXPORT_SYMBOL(tcp_sock_set_keepcnt);
2960
2949/*
2950 * Socket option code for TCP.
2951 */
2952static int do_tcp_setsockopt(struct sock *sk, int level,
2953 int optname, char __user *optval, unsigned int optlen)
2954{
2955 struct tcp_sock *tp = tcp_sk(sk);
2956 struct inet_connection_sock *icsk = inet_csk(sk);

--- 1204 unchanged lines hidden ---
2961/*
2962 * Socket option code for TCP.
2963 */
2964static int do_tcp_setsockopt(struct sock *sk, int level,
2965 int optname, char __user *optval, unsigned int optlen)
2966{
2967 struct tcp_sock *tp = tcp_sk(sk);
2968 struct inet_connection_sock *icsk = inet_csk(sk);

--- 1204 unchanged lines hidden ---