Commit 53d3176b authored by Changli Gao's avatar Changli Gao Committed by David S. Miller

net: cleanups

remove useless blanks.
Signed-off-by: default avatarChangli Gao <xiaosuo@gmail.com>
----
 include/net/inet_common.h |   55 ++++-------
 include/net/tcp.h         |  222 +++++++++++++++++-----------------------------
 include/net/udp.h         |   38 +++----
 3 files changed, 123 insertions(+), 192 deletions(-)
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dbe000ed
......@@ -14,35 +14,22 @@ struct sockaddr;
struct socket;
extern int inet_release(struct socket *sock);
extern int inet_stream_connect(struct socket *sock,
struct sockaddr * uaddr,
extern int inet_stream_connect(struct socket *sock, struct sockaddr * uaddr,
int addr_len, int flags);
extern int inet_dgram_connect(struct socket *sock,
struct sockaddr * uaddr,
extern int inet_dgram_connect(struct socket *sock, struct sockaddr * uaddr,
int addr_len, int flags);
extern int inet_accept(struct socket *sock,
struct socket *newsock, int flags);
extern int inet_sendmsg(struct kiocb *iocb,
struct socket *sock,
struct msghdr *msg,
size_t size);
extern int inet_accept(struct socket *sock, struct socket *newsock, int flags);
extern int inet_sendmsg(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, size_t size);
extern int inet_shutdown(struct socket *sock, int how);
extern int inet_listen(struct socket *sock, int backlog);
extern void inet_sock_destruct(struct sock *sk);
extern int inet_bind(struct socket *sock,
struct sockaddr *uaddr, int addr_len);
extern int inet_getname(struct socket *sock,
struct sockaddr *uaddr,
extern int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len);
extern int inet_getname(struct socket *sock, struct sockaddr *uaddr,
int *uaddr_len, int peer);
extern int inet_ioctl(struct socket *sock,
unsigned int cmd, unsigned long arg);
extern int inet_ctl_sock_create(struct sock **sk,
unsigned short family,
unsigned short type,
unsigned char protocol,
extern int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
extern int inet_ctl_sock_create(struct sock **sk, unsigned short family,
unsigned short type, unsigned char protocol,
struct net *net);
static inline void inet_ctl_sock_destroy(struct sock *sk)
......@@ -51,5 +38,3 @@ static inline void inet_ctl_sock_destroy(struct sock *sk)
}
#endif
......@@ -303,38 +303,23 @@ extern void tcp_shutdown (struct sock *sk, int how);
extern int tcp_v4_rcv(struct sk_buff *skb);
extern int tcp_v4_remember_stamp(struct sock *sk);
extern int tcp_v4_tw_remember_stamp(struct inet_timewait_sock *tw);
extern int tcp_sendmsg(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, size_t size);
extern ssize_t tcp_sendpage(struct socket *sock, struct page *page, int offset, size_t size, int flags);
extern int tcp_ioctl(struct sock *sk,
int cmd,
unsigned long arg);
extern int tcp_rcv_state_process(struct sock *sk,
struct sk_buff *skb,
struct tcphdr *th,
unsigned len);
extern int tcp_rcv_established(struct sock *sk,
struct sk_buff *skb,
struct tcphdr *th,
unsigned len);
extern ssize_t tcp_sendpage(struct socket *sock, struct page *page, int offset,
size_t size, int flags);
extern int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg);
extern int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
struct tcphdr *th, unsigned len);
extern int tcp_rcv_established(struct sock *sk, struct sk_buff *skb,
struct tcphdr *th, unsigned len);
extern void tcp_rcv_space_adjust(struct sock *sk);
extern void tcp_cleanup_rbuf(struct sock *sk, int copied);
extern int tcp_twsk_unique(struct sock *sk,
struct sock *sktw, void *twp);
extern int tcp_twsk_unique(struct sock *sk, struct sock *sktw, void *twp);
extern void tcp_twsk_destructor(struct sock *sk);
extern ssize_t tcp_splice_read(struct socket *sk, loff_t *ppos,
struct pipe_inode_info *pipe, size_t len, unsigned int flags);
struct pipe_inode_info *pipe, size_t len,
unsigned int flags);
static inline void tcp_dec_quickack_mode(struct sock *sk,
const unsigned int pkts)
......@@ -375,84 +360,55 @@ enum tcp_tw_status {
extern enum tcp_tw_status tcp_timewait_state_process(struct inet_timewait_sock *tw,
struct sk_buff *skb,
const struct tcphdr *th);
extern struct sock * tcp_check_req(struct sock *sk,struct sk_buff *skb,
struct request_sock *req,
struct request_sock **prev);
extern int tcp_child_process(struct sock *parent,
struct sock *child,
extern int tcp_child_process(struct sock *parent, struct sock *child,
struct sk_buff *skb);
extern int tcp_use_frto(struct sock *sk);
extern void tcp_enter_frto(struct sock *sk);
extern void tcp_enter_loss(struct sock *sk, int how);
extern void tcp_clear_retrans(struct tcp_sock *tp);
extern void tcp_update_metrics(struct sock *sk);
extern void tcp_close(struct sock *sk,
long timeout);
extern unsigned int tcp_poll(struct file * file, struct socket *sock, struct poll_table_struct *wait);
extern int tcp_getsockopt(struct sock *sk, int level,
int optname,
char __user *optval,
int __user *optlen);
extern int tcp_setsockopt(struct sock *sk, int level,
int optname, char __user *optval,
unsigned int optlen);
extern int compat_tcp_getsockopt(struct sock *sk,
int level, int optname,
extern void tcp_close(struct sock *sk, long timeout);
extern unsigned int tcp_poll(struct file * file, struct socket *sock,
struct poll_table_struct *wait);
extern int tcp_getsockopt(struct sock *sk, int level, int optname,
char __user *optval, int __user *optlen);
extern int tcp_setsockopt(struct sock *sk, int level, int optname,
char __user *optval, unsigned int optlen);
extern int compat_tcp_getsockopt(struct sock *sk, int level, int optname,
char __user *optval, int __user *optlen);
extern int compat_tcp_setsockopt(struct sock *sk,
int level, int optname,
extern int compat_tcp_setsockopt(struct sock *sk, int level, int optname,
char __user *optval, unsigned int optlen);
extern void tcp_set_keepalive(struct sock *sk, int val);
extern void tcp_syn_ack_timeout(struct sock *sk,
struct request_sock *req);
extern int tcp_recvmsg(struct kiocb *iocb, struct sock *sk,
struct msghdr *msg,
size_t len, int nonblock,
int flags, int *addr_len);
extern void tcp_syn_ack_timeout(struct sock *sk, struct request_sock *req);
extern int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
size_t len, int nonblock, int flags, int *addr_len);
extern void tcp_parse_options(struct sk_buff *skb,
struct tcp_options_received *opt_rx,
u8 **hvpp,
struct tcp_options_received *opt_rx, u8 **hvpp,
int estab);
extern u8 *tcp_parse_md5sig_option(struct tcphdr *th);
/*
* TCP v4 functions exported for the inet6 API
*/
extern void tcp_v4_send_check(struct sock *sk,
struct sk_buff *skb);
extern int tcp_v4_conn_request(struct sock *sk,
struct sk_buff *skb);
extern void tcp_v4_send_check(struct sock *sk, struct sk_buff *skb);
extern int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb);
extern struct sock * tcp_create_openreq_child(struct sock *sk,
struct request_sock *req,
struct sk_buff *skb);
extern struct sock * tcp_v4_syn_recv_sock(struct sock *sk,
struct sk_buff *skb,
extern struct sock * tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
struct request_sock *req,
struct dst_entry *dst);
extern int tcp_v4_do_rcv(struct sock *sk,
struct sk_buff *skb);
extern int tcp_v4_connect(struct sock *sk,
struct sockaddr *uaddr,
extern int tcp_v4_do_rcv(struct sock *sk, struct sk_buff *skb);
extern int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr,
int addr_len);
extern int tcp_connect(struct sock *sk);
extern struct sk_buff * tcp_make_synack(struct sock *sk,
struct dst_entry *dst,
extern struct sk_buff * tcp_make_synack(struct sock *sk, struct dst_entry *dst,
struct request_sock *req,
struct request_values *rvp);
extern int tcp_disconnect(struct sock *sk, int flags);
......@@ -1174,22 +1130,14 @@ struct tcp_md5sig_pool {
#define TCP_MD5SIG_MAXKEYS (~(u32)0) /* really?! */
/* - functions */
extern int tcp_v4_md5_hash_skb(char *md5_hash,
struct tcp_md5sig_key *key,
struct sock *sk,
struct request_sock *req,
extern int tcp_v4_md5_hash_skb(char *md5_hash, struct tcp_md5sig_key *key,
struct sock *sk, struct request_sock *req,
struct sk_buff *skb);
extern struct tcp_md5sig_key *tcp_v4_md5_lookup(struct sock *sk,
extern struct tcp_md5sig_key * tcp_v4_md5_lookup(struct sock *sk,
struct sock *addr_sk);
extern int tcp_v4_md5_do_add(struct sock *sk,
__be32 addr,
u8 *newkey,
extern int tcp_v4_md5_do_add(struct sock *sk, __be32 addr, u8 *newkey,
u8 newkeylen);
extern int tcp_v4_md5_do_del(struct sock *sk,
__be32 addr);
extern int tcp_v4_md5_do_del(struct sock *sk, __be32 addr);
#ifdef CONFIG_TCP_MD5SIG
#define tcp_twsk_md5_key(twsk) ((twsk)->tw_md5_keylen ? \
......
......@@ -163,13 +163,12 @@ extern int udp_lib_get_port(struct sock *sk, unsigned short snum,
/* net/ipv4/udp.c */
extern int udp_get_port(struct sock *sk, unsigned short snum,
int (*saddr_cmp)(const struct sock *, const struct sock *));
int (*saddr_cmp)(const struct sock *,
const struct sock *));
extern void udp_err(struct sk_buff *, u32);
extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk,
struct msghdr *msg, size_t len);
extern void udp_flush_pending_frames(struct sock *sk);
extern int udp_rcv(struct sk_buff *skb);
extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg);
extern int udp_disconnect(struct sock *sk, int flags);
......@@ -180,7 +179,6 @@ extern int udp_lib_getsockopt(struct sock *sk, int level, int optname,
extern int udp_lib_setsockopt(struct sock *sk, int level, int optname,
char __user *optval, unsigned int optlen,
int (*push_pending_frames)(struct sock *));
extern struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport,
__be32 daddr, __be16 dport,
int dif);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment