summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDavid S. Miller <davem@nuts.davemloft.net>2005-01-09 05:14:10 -0800
committerDavid S. Miller <davem@nuts.davemloft.net>2005-01-09 05:14:10 -0800
commitf07143f53a5fab1d07637a063b9479ae2c3092bf (patch)
tree04a4f0a2d6092265fa1a2c31a91d6f7b042102e8 /include/linux
parent11d7829025bddd70d592061728e62e0419de0349 (diff)
parente093407dfb2d957d0055528d6d198e191296eb71 (diff)
Merge nuts.davemloft.net:/disk1/BK/network-2.6
into nuts.davemloft.net:/disk1/BK/net-2.6
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ipv6.h3
-rw-r--r--include/linux/tcp.h14
2 files changed, 6 insertions, 11 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index f042ae186520..9d2999715321 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -268,8 +268,7 @@ struct udp6_sock {
};
struct tcp6_sock {
- struct inet_sock inet;
- struct tcp_opt tcp;
+ struct tcp_sock tcp;
struct ipv6_pinfo inet6;
};
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 61de59d3cef4..b8d7df3916a5 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -214,7 +214,9 @@ enum tcp_congestion_algo {
TCP_BIC,
};
-struct tcp_opt {
+struct tcp_sock {
+ /* inet_sock has to be the first member of tcp_sock */
+ struct inet_sock inet;
int tcp_header_len; /* Bytes of tcp header to send */
/*
@@ -438,15 +440,9 @@ struct tcp_opt {
} bictcp;
};
-/* WARNING: don't change the layout of the members in tcp_sock! */
-struct tcp_sock {
- struct inet_sock inet;
- struct tcp_opt tcp;
-};
-
-static inline struct tcp_opt * tcp_sk(const struct sock *__sk)
+static inline struct tcp_sock *tcp_sk(const struct sock *sk)
{
- return &((struct tcp_sock *)__sk)->tcp;
+ return (struct tcp_sock *)sk;
}
#endif