summaryrefslogtreecommitdiff
path: root/include/net/icmp.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@conectiva.com.br>2005-01-13 22:39:01 -0200
committerArnaldo Carvalho de Melo <acme@conectiva.com.br>2005-01-13 22:39:01 -0200
commitc76178d6293fc6d894e5362001bb83d30bf4b54c (patch)
tree3c062cfe58765cd801f4107a1d9d2f79f6131219 /include/net/icmp.h
parentdfdae3a1fb466b4145e053460a99dcd13abe115d (diff)
[RAW] merge raw_sock with raw_opt
No need for two structs, follow the new inet_sock layout style. Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/icmp.h')
-rw-r--r--include/net/icmp.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/include/net/icmp.h b/include/net/icmp.h
index 32b159f7ae22..3fc192478aa2 100644
--- a/include/net/icmp.h
+++ b/include/net/icmp.h
@@ -46,16 +46,15 @@ extern void icmp_init(struct net_proto_family *ops);
/* Move into dst.h ? */
extern int xrlim_allow(struct dst_entry *dst, int timeout);
-struct raw_opt {
- struct icmp_filter filter;
-};
-
-/* WARNING: don't change the layout of the members in raw_sock! */
struct raw_sock {
- struct inet_sock inet;
- struct raw_opt raw4;
+ /* inet_sock has to be the first member */
+ struct inet_sock inet;
+ struct icmp_filter filter;
};
-#define raw4_sk(__sk) (&((struct raw_sock *)__sk)->raw4)
+static inline struct raw_sock *raw_sk(const struct sock *sk)
+{
+ return (struct raw_sock *)sk;
+}
#endif /* _ICMP_H */