Commit 6a27f5ea authored by David S. Miller's avatar David S. Miller Committed by Sridhar Samudrala

[TCP]: Named struct initializers and tabbing fixes.

parent a7280d6a
......@@ -86,11 +86,11 @@ void tcp_v4_send_check(struct sock *sk, struct tcphdr *th, int len,
struct sk_buff *skb);
struct tcp_hashinfo __cacheline_aligned tcp_hashinfo = {
.__tcp_lhash_lock = RW_LOCK_UNLOCKED,
.__tcp_lhash_users = ATOMIC_INIT(0),
.__tcp_lhash_lock = RW_LOCK_UNLOCKED,
.__tcp_lhash_users = ATOMIC_INIT(0),
.__tcp_lhash_wait
= __WAIT_QUEUE_HEAD_INITIALIZER(tcp_hashinfo.__tcp_lhash_wait),
.__tcp_portalloc_lock = SPIN_LOCK_UNLOCKED
.__tcp_portalloc_lock = SPIN_LOCK_UNLOCKED
};
/*
......@@ -1410,11 +1410,11 @@ static inline struct ip_options *tcp_v4_save_options(struct sock *sk,
int sysctl_max_syn_backlog = 256;
struct or_calltable or_ipv4 = {
.family = PF_INET,
.rtx_syn_ack = tcp_v4_send_synack,
.send_ack = tcp_v4_or_send_ack,
.destructor = tcp_v4_or_free,
.send_reset = tcp_v4_send_reset,
.family = PF_INET,
.rtx_syn_ack = tcp_v4_send_synack,
.send_ack = tcp_v4_or_send_ack,
.destructor = tcp_v4_or_free,
.send_reset = tcp_v4_send_reset,
};
int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
......@@ -2047,17 +2047,17 @@ int tcp_v4_tw_remember_stamp(struct tcp_tw_bucket *tw)
}
struct tcp_func ipv4_specific = {
.queue_xmit = ip_queue_xmit,
.send_check = tcp_v4_send_check,
.rebuild_header =tcp_v4_rebuild_header,
.conn_request = tcp_v4_conn_request,
.syn_recv_sock =tcp_v4_syn_recv_sock,
.remember_stamp =tcp_v4_remember_stamp,
.net_header_len =sizeof(struct iphdr),
.setsockopt = ip_setsockopt,
.getsockopt = ip_getsockopt,
.addr2sockaddr =v4_addr2sockaddr,
.sockaddr_len = sizeof(struct sockaddr_in),
.queue_xmit = ip_queue_xmit,
.send_check = tcp_v4_send_check,
.rebuild_header = tcp_v4_rebuild_header,
.conn_request = tcp_v4_conn_request,
.syn_recv_sock = tcp_v4_syn_recv_sock,
.remember_stamp = tcp_v4_remember_stamp,
.net_header_len = sizeof(struct iphdr),
.setsockopt = ip_setsockopt,
.getsockopt = ip_getsockopt,
.addr2sockaddr = v4_addr2sockaddr,
.sockaddr_len = sizeof(struct sockaddr_in),
};
/* NOTE: A lot of things set to zero explicitly by call to
......@@ -2543,10 +2543,10 @@ static int tcp_seq_show(struct seq_file *seq, void *v)
}
static struct seq_operations tcp_seq_ops = {
.start = tcp_seq_start,
.next = tcp_seq_next,
.stop = tcp_seq_stop,
.show = tcp_seq_show,
.start = tcp_seq_start,
.next = tcp_seq_next,
.stop = tcp_seq_stop,
.show = tcp_seq_show,
};
static int tcp_seq_open(struct inode *inode, struct file *file)
......@@ -2571,10 +2571,10 @@ static int tcp_seq_open(struct inode *inode, struct file *file)
}
static struct file_operations tcp_seq_fops = {
.open = tcp_seq_open,
.read = seq_read,
.llseek = seq_lseek,
.release = ip_seq_release,
.open = tcp_seq_open,
.read = seq_read,
.llseek = seq_lseek,
.release = ip_seq_release,
};
int __init tcp_proc_init(void)
......@@ -2596,23 +2596,23 @@ void __init tcp_proc_exit(void)
#endif /* CONFIG_PROC_FS */
struct proto tcp_prot = {
.name = "TCP",
.close = tcp_close,
.connect = tcp_v4_connect,
.disconnect = tcp_disconnect,
.accept = tcp_accept,
.ioctl = tcp_ioctl,
.init = tcp_v4_init_sock,
.destroy = tcp_v4_destroy_sock,
.shutdown = tcp_shutdown,
.setsockopt = tcp_setsockopt,
.getsockopt = tcp_getsockopt,
.sendmsg = tcp_sendmsg,
.recvmsg = tcp_recvmsg,
.backlog_rcv = tcp_v4_do_rcv,
.hash = tcp_v4_hash,
.unhash = tcp_unhash,
.get_port = tcp_v4_get_port,
.name = "TCP",
.close = tcp_close,
.connect = tcp_v4_connect,
.disconnect = tcp_disconnect,
.accept = tcp_accept,
.ioctl = tcp_ioctl,
.init = tcp_v4_init_sock,
.destroy = tcp_v4_destroy_sock,
.shutdown = tcp_shutdown,
.setsockopt = tcp_setsockopt,
.getsockopt = tcp_getsockopt,
.sendmsg = tcp_sendmsg,
.recvmsg = tcp_recvmsg,
.backlog_rcv = tcp_v4_do_rcv,
.hash = tcp_v4_hash,
.unhash = tcp_unhash,
.get_port = tcp_v4_get_port,
};
......
......@@ -934,11 +934,11 @@ static void tcp_v6_or_free(struct open_request *req)
}
static struct or_calltable or_ipv6 = {
AF_INET6,
tcp_v6_send_synack,
tcp_v6_or_send_ack,
tcp_v6_or_free,
tcp_v6_send_reset
.family = AF_INET6,
.rtx_syn_ack = tcp_v6_send_synack,
.send_ack = tcp_v6_or_send_ack,
.destructor = tcp_v6_or_free,
.send_reset = tcp_v6_send_reset
};
static int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb)
......@@ -1812,18 +1812,18 @@ static int tcp_v6_remember_stamp(struct sock *sk)
}
static struct tcp_func ipv6_specific = {
tcp_v6_xmit,
tcp_v6_send_check,
tcp_v6_rebuild_header,
tcp_v6_conn_request,
tcp_v6_syn_recv_sock,
tcp_v6_remember_stamp,
sizeof(struct ipv6hdr),
ipv6_setsockopt,
ipv6_getsockopt,
v6_addr2sockaddr,
sizeof(struct sockaddr_in6)
.queue_xmit = tcp_v6_xmit,
.send_check = tcp_v6_send_check,
.rebuild_header = tcp_v6_rebuild_header,
.conn_request = tcp_v6_conn_request,
.syn_recv_sock = tcp_v6_syn_recv_sock,
.remember_stamp = tcp_v6_remember_stamp,
.net_header_len = sizeof(struct ipv6hdr),
.setsockopt = ipv6_setsockopt,
.getsockopt = ipv6_getsockopt,
.addr2sockaddr = v6_addr2sockaddr,
.sockaddr_len = sizeof(struct sockaddr_in6)
};
/*
......@@ -1831,18 +1831,18 @@ static struct tcp_func ipv6_specific = {
*/
static struct tcp_func ipv6_mapped = {
ip_queue_xmit,
tcp_v4_send_check,
tcp_v4_rebuild_header,
tcp_v6_conn_request,
tcp_v6_syn_recv_sock,
tcp_v4_remember_stamp,
sizeof(struct iphdr),
ipv6_setsockopt,
ipv6_getsockopt,
v6_addr2sockaddr,
sizeof(struct sockaddr_in6)
.queue_xmit = ip_queue_xmit,
.send_check = tcp_v4_send_check,
.rebuild_header = tcp_v4_rebuild_header,
.conn_request = tcp_v6_conn_request,
.syn_recv_sock = tcp_v6_syn_recv_sock,
.remember_stamp = tcp_v4_remember_stamp,
.net_header_len = sizeof(struct iphdr),
.setsockopt = ipv6_setsockopt,
.getsockopt = ipv6_getsockopt,
.addr2sockaddr = v6_addr2sockaddr,
.sockaddr_len = sizeof(struct sockaddr_in6)
};
......@@ -2157,23 +2157,23 @@ int tcp6_get_info(char *buffer, char **start, off_t offset, int length)
}
struct proto tcpv6_prot = {
.name = "TCPv6",
.close = tcp_close,
.connect = tcp_v6_connect,
.disconnect = tcp_disconnect,
.accept = tcp_accept,
.ioctl = tcp_ioctl,
.init = tcp_v6_init_sock,
.destroy = tcp_v6_destroy_sock,
.shutdown = tcp_shutdown,
.setsockopt = tcp_setsockopt,
.getsockopt = tcp_getsockopt,
.sendmsg = tcp_sendmsg,
.recvmsg = tcp_recvmsg,
.backlog_rcv = tcp_v6_do_rcv,
.hash = tcp_v6_hash,
.unhash = tcp_unhash,
.get_port = tcp_v6_get_port,
.name = "TCPv6",
.close = tcp_close,
.connect = tcp_v6_connect,
.disconnect = tcp_disconnect,
.accept = tcp_accept,
.ioctl = tcp_ioctl,
.init = tcp_v6_init_sock,
.destroy = tcp_v6_destroy_sock,
.shutdown = tcp_shutdown,
.setsockopt = tcp_setsockopt,
.getsockopt = tcp_getsockopt,
.sendmsg = tcp_sendmsg,
.recvmsg = tcp_recvmsg,
.backlog_rcv = tcp_v6_do_rcv,
.hash = tcp_v6_hash,
.unhash = tcp_unhash,
.get_port = tcp_v6_get_port,
};
static struct inet6_protocol tcpv6_protocol = {
......@@ -2184,13 +2184,13 @@ static struct inet6_protocol tcpv6_protocol = {
extern struct proto_ops inet6_stream_ops;
static struct inet_protosw tcpv6_protosw = {
.type = SOCK_STREAM,
.protocol = IPPROTO_TCP,
.prot = &tcpv6_prot,
.ops = &inet6_stream_ops,
.capability =-1,
.no_check = 0,
.flags = INET_PROTOSW_PERMANENT,
.type = SOCK_STREAM,
.protocol = IPPROTO_TCP,
.prot = &tcpv6_prot,
.ops = &inet6_stream_ops,
.capability = -1,
.no_check = 0,
.flags = INET_PROTOSW_PERMANENT,
};
void __init tcpv6_init(void)
......
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