Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
6a27f5ea
Commit
6a27f5ea
authored
Jan 20, 2003
by
David S. Miller
Committed by
Sridhar Samudrala
Jan 20, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TCP]: Named struct initializers and tabbing fixes.
parent
a7280d6a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
97 additions
and
97 deletions
+97
-97
net/ipv4/tcp_ipv4.c
net/ipv4/tcp_ipv4.c
+44
-44
net/ipv6/tcp_ipv6.c
net/ipv6/tcp_ipv6.c
+53
-53
No files found.
net/ipv4/tcp_ipv4.c
View file @
6a27f5ea
...
...
@@ -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
,
};
...
...
net/ipv6/tcp_ipv6.c
View file @
6a27f5ea
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment