udp: cleanups
Pure style cleanups. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
652f6787c0
commit
c482c56857
1 changed files with 43 additions and 44 deletions
|
@ -110,11 +110,12 @@ struct udp_table udp_table;
|
|||
EXPORT_SYMBOL(udp_table);
|
||||
|
||||
int sysctl_udp_mem[3] __read_mostly;
|
||||
int sysctl_udp_rmem_min __read_mostly;
|
||||
int sysctl_udp_wmem_min __read_mostly;
|
||||
|
||||
EXPORT_SYMBOL(sysctl_udp_mem);
|
||||
|
||||
int sysctl_udp_rmem_min __read_mostly;
|
||||
EXPORT_SYMBOL(sysctl_udp_rmem_min);
|
||||
|
||||
int sysctl_udp_wmem_min __read_mostly;
|
||||
EXPORT_SYMBOL(sysctl_udp_wmem_min);
|
||||
|
||||
atomic_t udp_memory_allocated;
|
||||
|
@ -221,6 +222,7 @@ fail_unlock:
|
|||
fail:
|
||||
return error;
|
||||
}
|
||||
EXPORT_SYMBOL(udp_lib_get_port);
|
||||
|
||||
static int ipv4_rcv_saddr_equal(const struct sock *sk1, const struct sock *sk2)
|
||||
{
|
||||
|
@ -782,6 +784,7 @@ do_confirm:
|
|||
err = 0;
|
||||
goto out;
|
||||
}
|
||||
EXPORT_SYMBOL(udp_sendmsg);
|
||||
|
||||
int udp_sendpage(struct sock *sk, struct page *page, int offset,
|
||||
size_t size, int flags)
|
||||
|
@ -871,6 +874,7 @@ int udp_ioctl(struct sock *sk, int cmd, unsigned long arg)
|
|||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(udp_ioctl);
|
||||
|
||||
/*
|
||||
* This should be easy, if there is something there we
|
||||
|
@ -925,7 +929,9 @@ try_again:
|
|||
err = skb_copy_datagram_iovec(skb, sizeof(struct udphdr),
|
||||
msg->msg_iov, copied);
|
||||
else {
|
||||
err = skb_copy_and_csum_datagram_iovec(skb, sizeof(struct udphdr), msg->msg_iov);
|
||||
err = skb_copy_and_csum_datagram_iovec(skb,
|
||||
sizeof(struct udphdr),
|
||||
msg->msg_iov);
|
||||
|
||||
if (err == -EINVAL)
|
||||
goto csum_copy_err;
|
||||
|
@ -941,8 +947,7 @@ try_again:
|
|||
sock_recv_timestamp(msg, sk, skb);
|
||||
|
||||
/* Copy the address. */
|
||||
if (sin)
|
||||
{
|
||||
if (sin) {
|
||||
sin->sin_family = AF_INET;
|
||||
sin->sin_port = udp_hdr(skb)->source;
|
||||
sin->sin_addr.s_addr = ip_hdr(skb)->saddr;
|
||||
|
@ -995,6 +1000,7 @@ int udp_disconnect(struct sock *sk, int flags)
|
|||
sk_dst_reset(sk);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(udp_disconnect);
|
||||
|
||||
void udp_lib_unhash(struct sock *sk)
|
||||
{
|
||||
|
@ -1426,6 +1432,7 @@ int udp_lib_setsockopt(struct sock *sk, int level, int optname,
|
|||
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL(udp_lib_setsockopt);
|
||||
|
||||
int udp_setsockopt(struct sock *sk, int level, int optname,
|
||||
char __user *optval, int optlen)
|
||||
|
@ -1490,6 +1497,7 @@ int udp_lib_getsockopt(struct sock *sk, int level, int optname,
|
|||
return -EFAULT;
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(udp_lib_getsockopt);
|
||||
|
||||
int udp_getsockopt(struct sock *sk, int level, int optname,
|
||||
char __user *optval, int __user *optlen)
|
||||
|
@ -1552,6 +1560,7 @@ unsigned int udp_poll(struct file *file, struct socket *sock, poll_table *wait)
|
|||
return mask;
|
||||
|
||||
}
|
||||
EXPORT_SYMBOL(udp_poll);
|
||||
|
||||
struct proto udp_prot = {
|
||||
.name = "UDP",
|
||||
|
@ -1582,6 +1591,7 @@ struct proto udp_prot = {
|
|||
.compat_getsockopt = compat_udp_getsockopt,
|
||||
#endif
|
||||
};
|
||||
EXPORT_SYMBOL(udp_prot);
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
#ifdef CONFIG_PROC_FS
|
||||
|
@ -1703,11 +1713,13 @@ int udp_proc_register(struct net *net, struct udp_seq_afinfo *afinfo)
|
|||
rc = -ENOMEM;
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL(udp_proc_register);
|
||||
|
||||
void udp_proc_unregister(struct net *net, struct udp_seq_afinfo *afinfo)
|
||||
{
|
||||
proc_net_remove(net, afinfo->name);
|
||||
}
|
||||
EXPORT_SYMBOL(udp_proc_unregister);
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
static void udp4_format_sock(struct sock *sp, struct seq_file *f,
|
||||
|
@ -1877,16 +1889,3 @@ out:
|
|||
return segs;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(udp_disconnect);
|
||||
EXPORT_SYMBOL(udp_ioctl);
|
||||
EXPORT_SYMBOL(udp_prot);
|
||||
EXPORT_SYMBOL(udp_sendmsg);
|
||||
EXPORT_SYMBOL(udp_lib_getsockopt);
|
||||
EXPORT_SYMBOL(udp_lib_setsockopt);
|
||||
EXPORT_SYMBOL(udp_poll);
|
||||
EXPORT_SYMBOL(udp_lib_get_port);
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
EXPORT_SYMBOL(udp_proc_register);
|
||||
EXPORT_SYMBOL(udp_proc_unregister);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue