summaryrefslogtreecommitdiff
path: root/include/linux/ip.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-12-28 19:06:28 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-12-28 19:06:28 -0800
commit1c9a512c3de2d3cf0697ceae110595ea4de9ecbb (patch)
treef9afca047a64b963b5b74ac61a03fdae384fca43 /include/linux/ip.h
parentd70e75637caeba4bfb5c35ed16379d0e4c1a2b68 (diff)
parent7faf92a451f2dc9c086c48bbfa9f069bed748248 (diff)
Merge bk://kernel.bkbits.net/davem/net-2.6
into ppc970.osdl.org:/home/torvalds/v2.6/linux
Diffstat (limited to 'include/linux/ip.h')
-rw-r--r--include/linux/ip.h24
1 files changed, 10 insertions, 14 deletions
diff --git a/include/linux/ip.h b/include/linux/ip.h
index 12d504ef8df0..3fe93474047d 100644
--- a/include/linux/ip.h
+++ b/include/linux/ip.h
@@ -107,7 +107,14 @@ struct ip_options {
#define optlength(opt) (sizeof(struct ip_options) + opt->optlen)
-struct inet_opt {
+struct ipv6_pinfo;
+
+struct inet_sock {
+ /* sk and pinet6 has to be the first two members of inet_sock */
+ struct sock sk;
+#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
+ struct ipv6_pinfo *pinet6;
+#endif
/* Socket demultiplex comparisons on incoming packets. */
__u32 daddr; /* Foreign IPv4 addr */
__u32 rcv_saddr; /* Bound local IPv4 addr */
@@ -146,20 +153,9 @@ struct inet_opt {
#define IPCORK_OPT 1 /* ip-options has been held in ipcork.opt */
-struct ipv6_pinfo;
-
-/* WARNING: don't change the layout of the members in inet_sock! */
-struct inet_sock {
- struct sock sk;
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
- struct ipv6_pinfo *pinet6;
-#endif
- struct inet_opt inet;
-};
-
-static inline struct inet_opt * inet_sk(const struct sock *__sk)
+static inline struct inet_sock *inet_sk(const struct sock *sk)
{
- return &((struct inet_sock *)__sk)->inet;
+ return (struct inet_sock *)sk;
}
#endif