/* Turn on/off any Nagle-like algorithm. This means that packets are generally sent as soon as possible and no unnecessary delays are introduced, at the cost of more packets in the network. Expects an integer boolean flag.  */
static int sctp_getsockopt_nodelay(struct sock *sk, int len, char __user *optval, int __user *optlen)
/* Turn on/off any Nagle-like algorithm. This means that packets are generally sent as soon as possible and no unnecessary delays are introduced, at the cost of more packets in the network. Expects an integer boolean flag.  */
static int sctp_getsockopt_nodelay(struct sock *sk, int len, char __user *optval, int __user *optlen)
{
	int val;
	if (len < sizeof(int))
		return -EINVAL;
	len = sizeof(int);
	val = (sctp_sk(sk)->nodelay == 1);
	if (put_user(len, optlen))
		return -EFAULT;
	if (copy_to_user(optval, &val, len))
		return -EFAULT;
	return 0;
}