aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/addrconf.h3
-rw-r--r--include/net/af_rxrpc.h3
-rw-r--r--include/net/af_unix.h2
-rw-r--r--include/net/atmclip.h2
-rw-r--r--include/net/bluetooth/hci.h2
-rw-r--r--include/net/dst.h3
-rw-r--r--include/net/if_inet6.h3
-rw-r--r--include/net/ip6_fib.h3
-rw-r--r--include/net/ip6_route.h3
-rw-r--r--include/net/ip_vs.h5
-rw-r--r--include/net/ipv6.h7
-rw-r--r--include/net/ipx.h2
-rw-r--r--include/net/ndisc.h6
-rw-r--r--include/net/netevent.h2
-rw-r--r--include/net/netfilter/nf_conntrack.h2
-rw-r--r--include/net/netfilter/nf_conntrack_tuple.h4
-rw-r--r--include/net/netfilter/nf_nat.h4
-rw-r--r--include/net/rawv6.h4
-rw-r--r--include/net/route.h4
-rw-r--r--include/net/transp_v6.h4
-rw-r--r--include/net/wimax.h5
21 files changed, 0 insertions, 73 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index 7c4d92c0dd1d..582e4ae70753 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -42,8 +42,6 @@ struct prefix_info {
42}; 42};
43 43
44 44
45#ifdef __KERNEL__
46
47#include <linux/netdevice.h> 45#include <linux/netdevice.h>
48#include <net/if_inet6.h> 46#include <net/if_inet6.h>
49#include <net/ipv6.h> 47#include <net/ipv6.h>
@@ -285,4 +283,3 @@ extern void if6_proc_exit(void);
285#endif 283#endif
286 284
287#endif 285#endif
288#endif
diff --git a/include/net/af_rxrpc.h b/include/net/af_rxrpc.h
index 00c2eaa07c25..03e6e9453623 100644
--- a/include/net/af_rxrpc.h
+++ b/include/net/af_rxrpc.h
@@ -12,8 +12,6 @@
12#ifndef _NET_RXRPC_H 12#ifndef _NET_RXRPC_H
13#define _NET_RXRPC_H 13#define _NET_RXRPC_H
14 14
15#ifdef __KERNEL__
16
17#include <linux/rxrpc.h> 15#include <linux/rxrpc.h>
18 16
19struct rxrpc_call; 17struct rxrpc_call;
@@ -53,5 +51,4 @@ extern struct rxrpc_call *rxrpc_kernel_accept_call(struct socket *,
53 unsigned long); 51 unsigned long);
54extern int rxrpc_kernel_reject_call(struct socket *); 52extern int rxrpc_kernel_reject_call(struct socket *);
55 53
56#endif /* __KERNEL__ */
57#endif /* _NET_RXRPC_H */ 54#endif /* _NET_RXRPC_H */
diff --git a/include/net/af_unix.h b/include/net/af_unix.h
index 18e5c3f67580..91ab5b01678a 100644
--- a/include/net/af_unix.h
+++ b/include/net/af_unix.h
@@ -41,7 +41,6 @@ struct unix_skb_parms {
41 spin_lock_nested(&unix_sk(s)->lock, \ 41 spin_lock_nested(&unix_sk(s)->lock, \
42 SINGLE_DEPTH_NESTING) 42 SINGLE_DEPTH_NESTING)
43 43
44#ifdef __KERNEL__
45/* The AF_UNIX socket */ 44/* The AF_UNIX socket */
46struct unix_sock { 45struct unix_sock {
47 /* WARNING: sk has to be the first member */ 46 /* WARNING: sk has to be the first member */
@@ -72,4 +71,3 @@ static inline int unix_sysctl_register(struct net *net) { return 0; }
72static inline void unix_sysctl_unregister(struct net *net) {} 71static inline void unix_sysctl_unregister(struct net *net) {}
73#endif 72#endif
74#endif 73#endif
75#endif
diff --git a/include/net/atmclip.h b/include/net/atmclip.h
index 467c531b8a7e..497ef6444a7a 100644
--- a/include/net/atmclip.h
+++ b/include/net/atmclip.h
@@ -54,8 +54,6 @@ struct clip_priv {
54}; 54};
55 55
56 56
57#ifdef __KERNEL__
58extern struct neigh_table *clip_tbl_hook; 57extern struct neigh_table *clip_tbl_hook;
59#endif
60 58
61#endif 59#endif
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 6138e313d175..499b7b7c7c9a 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -1067,7 +1067,6 @@ struct hci_sco_hdr {
1067 __u8 dlen; 1067 __u8 dlen;
1068} __packed; 1068} __packed;
1069 1069
1070#ifdef __KERNEL__
1071#include <linux/skbuff.h> 1070#include <linux/skbuff.h>
1072static inline struct hci_event_hdr *hci_event_hdr(const struct sk_buff *skb) 1071static inline struct hci_event_hdr *hci_event_hdr(const struct sk_buff *skb)
1073{ 1072{
@@ -1083,7 +1082,6 @@ static inline struct hci_sco_hdr *hci_sco_hdr(const struct sk_buff *skb)
1083{ 1082{
1084 return (struct hci_sco_hdr *) skb->data; 1083 return (struct hci_sco_hdr *) skb->data;
1085} 1084}
1086#endif
1087 1085
1088/* Command opcode pack/unpack */ 1086/* Command opcode pack/unpack */
1089#define hci_opcode_pack(ogf, ocf) (__u16) ((ocf & 0x03ff)|(ogf << 10)) 1087#define hci_opcode_pack(ogf, ocf) (__u16) ((ocf & 0x03ff)|(ogf << 10))
diff --git a/include/net/dst.h b/include/net/dst.h
index 75b95df4afe7..d7bb74062df1 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -92,8 +92,6 @@ struct dst_entry {
92 }; 92 };
93}; 93};
94 94
95#ifdef __KERNEL__
96
97extern u32 *dst_cow_metrics_generic(struct dst_entry *dst, unsigned long old); 95extern u32 *dst_cow_metrics_generic(struct dst_entry *dst, unsigned long old);
98extern const u32 dst_default_metrics[RTAX_MAX]; 96extern const u32 dst_default_metrics[RTAX_MAX];
99 97
@@ -438,6 +436,5 @@ extern struct dst_entry *xfrm_lookup(struct net *net, struct dst_entry *dst_orig
438 const struct flowi *fl, struct sock *sk, 436 const struct flowi *fl, struct sock *sk,
439 int flags); 437 int flags);
440#endif 438#endif
441#endif
442 439
443#endif /* _NET_DST_H */ 440#endif /* _NET_DST_H */
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h
index 3d982f72d48e..0c603fe65377 100644
--- a/include/net/if_inet6.h
+++ b/include/net/if_inet6.h
@@ -30,8 +30,6 @@
30#define IF_PREFIX_ONLINK 0x01 30#define IF_PREFIX_ONLINK 0x01
31#define IF_PREFIX_AUTOCONF 0x02 31#define IF_PREFIX_AUTOCONF 0x02
32 32
33#ifdef __KERNEL__
34
35enum { 33enum {
36 INET6_IFADDR_STATE_DAD, 34 INET6_IFADDR_STATE_DAD,
37 INET6_IFADDR_STATE_POSTDAD, 35 INET6_IFADDR_STATE_POSTDAD,
@@ -303,4 +301,3 @@ static inline int ipv6_ipgre_mc_map(const struct in6_addr *addr,
303} 301}
304 302
305#endif 303#endif
306#endif
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index aca8ef4dd67c..477ef75f3873 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -13,8 +13,6 @@
13#ifndef _IP6_FIB_H 13#ifndef _IP6_FIB_H
14#define _IP6_FIB_H 14#define _IP6_FIB_H
15 15
16#ifdef __KERNEL__
17
18#include <linux/ipv6_route.h> 16#include <linux/ipv6_route.h>
19#include <linux/rtnetlink.h> 17#include <linux/rtnetlink.h>
20#include <linux/spinlock.h> 18#include <linux/spinlock.h>
@@ -240,4 +238,3 @@ static inline void fib6_rules_cleanup(void)
240} 238}
241#endif 239#endif
242#endif 240#endif
243#endif
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index d5c21d4d9e7e..5e91b72fc718 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -21,8 +21,6 @@ struct route_info {
21 __u8 prefix[0]; /* 0,8 or 16 */ 21 __u8 prefix[0]; /* 0,8 or 16 */
22}; 22};
23 23
24#ifdef __KERNEL__
25
26#include <net/flow.h> 24#include <net/flow.h>
27#include <net/ip6_fib.h> 25#include <net/ip6_fib.h>
28#include <net/sock.h> 26#include <net/sock.h>
@@ -193,4 +191,3 @@ static inline int ip6_skb_dst_mtu(struct sk_buff *skb)
193} 191}
194 192
195#endif 193#endif
196#endif
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index d516f00c8e0f..e0b7f139aa88 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -8,9 +8,6 @@
8 8
9#include <linux/ip_vs.h> /* definitions shared with userland */ 9#include <linux/ip_vs.h> /* definitions shared with userland */
10 10
11/* old ipvsadm versions still include this file directly */
12#ifdef __KERNEL__
13
14#include <asm/types.h> /* for __uXX types */ 11#include <asm/types.h> /* for __uXX types */
15 12
16#include <linux/sysctl.h> /* for ctl_path */ 13#include <linux/sysctl.h> /* for ctl_path */
@@ -1415,6 +1412,4 @@ ip_vs_dest_conn_overhead(struct ip_vs_dest *dest)
1415 atomic_read(&dest->inactconns); 1412 atomic_read(&dest->inactconns);
1416} 1413}
1417 1414
1418#endif /* __KERNEL__ */
1419
1420#endif /* _NET_IP_VS_H */ 1415#endif /* _NET_IP_VS_H */
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 5da192653153..e1c60b43e73b 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -77,11 +77,9 @@
77/* 77/*
78 * Addr scopes 78 * Addr scopes
79 */ 79 */
80#ifdef __KERNEL__
81#define IPV6_ADDR_MC_SCOPE(a) \ 80#define IPV6_ADDR_MC_SCOPE(a) \
82 ((a)->s6_addr[1] & 0x0f) /* nonstandard */ 81 ((a)->s6_addr[1] & 0x0f) /* nonstandard */
83#define __IPV6_ADDR_SCOPE_INVALID -1 82#define __IPV6_ADDR_SCOPE_INVALID -1
84#endif
85#define IPV6_ADDR_SCOPE_NODELOCAL 0x01 83#define IPV6_ADDR_SCOPE_NODELOCAL 0x01
86#define IPV6_ADDR_SCOPE_LINKLOCAL 0x02 84#define IPV6_ADDR_SCOPE_LINKLOCAL 0x02
87#define IPV6_ADDR_SCOPE_SITELOCAL 0x05 85#define IPV6_ADDR_SCOPE_SITELOCAL 0x05
@@ -91,14 +89,12 @@
91/* 89/*
92 * Addr flags 90 * Addr flags
93 */ 91 */
94#ifdef __KERNEL__
95#define IPV6_ADDR_MC_FLAG_TRANSIENT(a) \ 92#define IPV6_ADDR_MC_FLAG_TRANSIENT(a) \
96 ((a)->s6_addr[1] & 0x10) 93 ((a)->s6_addr[1] & 0x10)
97#define IPV6_ADDR_MC_FLAG_PREFIX(a) \ 94#define IPV6_ADDR_MC_FLAG_PREFIX(a) \
98 ((a)->s6_addr[1] & 0x20) 95 ((a)->s6_addr[1] & 0x20)
99#define IPV6_ADDR_MC_FLAG_RENDEZVOUS(a) \ 96#define IPV6_ADDR_MC_FLAG_RENDEZVOUS(a) \
100 ((a)->s6_addr[1] & 0x40) 97 ((a)->s6_addr[1] & 0x40)
101#endif
102 98
103/* 99/*
104 * fragmentation header 100 * fragmentation header
@@ -113,8 +109,6 @@ struct frag_hdr {
113 109
114#define IP6_MF 0x0001 110#define IP6_MF 0x0001
115 111
116#ifdef __KERNEL__
117
118#include <net/sock.h> 112#include <net/sock.h>
119 113
120/* sysctls */ 114/* sysctls */
@@ -667,5 +661,4 @@ extern int ipv6_static_sysctl_register(void);
667extern void ipv6_static_sysctl_unregister(void); 661extern void ipv6_static_sysctl_unregister(void);
668#endif 662#endif
669 663
670#endif /* __KERNEL__ */
671#endif /* _NET_IPV6_H */ 664#endif /* _NET_IPV6_H */
diff --git a/include/net/ipx.h b/include/net/ipx.h
index 05d7e4a88b49..c1fec6b464cc 100644
--- a/include/net/ipx.h
+++ b/include/net/ipx.h
@@ -80,7 +80,6 @@ struct ipx_route {
80 atomic_t refcnt; 80 atomic_t refcnt;
81}; 81};
82 82
83#ifdef __KERNEL__
84struct ipx_cb { 83struct ipx_cb {
85 u8 ipx_tctrl; 84 u8 ipx_tctrl;
86 __be32 ipx_dest_net; 85 __be32 ipx_dest_net;
@@ -116,7 +115,6 @@ static inline struct ipx_sock *ipx_sk(struct sock *sk)
116} 115}
117 116
118#define IPX_SKB_CB(__skb) ((struct ipx_cb *)&((__skb)->cb[0])) 117#define IPX_SKB_CB(__skb) ((struct ipx_cb *)&((__skb)->cb[0]))
119#endif
120 118
121#define IPX_MIN_EPHEMERAL_SOCKET 0x4000 119#define IPX_MIN_EPHEMERAL_SOCKET 0x4000
122#define IPX_MAX_EPHEMERAL_SOCKET 0x7fff 120#define IPX_MAX_EPHEMERAL_SOCKET 0x7fff
diff --git a/include/net/ndisc.h b/include/net/ndisc.h
index 6144685d601b..62beeb97c4b1 100644
--- a/include/net/ndisc.h
+++ b/include/net/ndisc.h
@@ -42,8 +42,6 @@ enum {
42#define ND_REACHABLE_TIME (30*HZ) 42#define ND_REACHABLE_TIME (30*HZ)
43#define ND_RETRANS_TIMER HZ 43#define ND_RETRANS_TIMER HZ
44 44
45#ifdef __KERNEL__
46
47#include <linux/compiler.h> 45#include <linux/compiler.h>
48#include <linux/icmpv6.h> 46#include <linux/icmpv6.h>
49#include <linux/in6.h> 47#include <linux/in6.h>
@@ -156,8 +154,4 @@ static inline struct neighbour * ndisc_get_neigh(struct net_device *dev, const s
156 return ERR_PTR(-ENODEV); 154 return ERR_PTR(-ENODEV);
157} 155}
158 156
159
160#endif /* __KERNEL__ */
161
162
163#endif 157#endif
diff --git a/include/net/netevent.h b/include/net/netevent.h
index 22b239c17eaa..086f8a5b59dc 100644
--- a/include/net/netevent.h
+++ b/include/net/netevent.h
@@ -10,7 +10,6 @@
10 * 10 *
11 * Changes: 11 * Changes:
12 */ 12 */
13#ifdef __KERNEL__
14 13
15struct dst_entry; 14struct dst_entry;
16 15
@@ -29,4 +28,3 @@ extern int unregister_netevent_notifier(struct notifier_block *nb);
29extern int call_netevent_notifiers(unsigned long val, void *v); 28extern int call_netevent_notifiers(unsigned long val, void *v);
30 29
31#endif 30#endif
32#endif
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index d0d13378991e..c7c42e7acc31 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -14,7 +14,6 @@
14 14
15#include <linux/netfilter/nf_conntrack_common.h> 15#include <linux/netfilter/nf_conntrack_common.h>
16 16
17#ifdef __KERNEL__
18#include <linux/bitops.h> 17#include <linux/bitops.h>
19#include <linux/compiler.h> 18#include <linux/compiler.h>
20#include <asm/atomic.h> 19#include <asm/atomic.h>
@@ -326,5 +325,4 @@ do { \
326#define MODULE_ALIAS_NFCT_HELPER(helper) \ 325#define MODULE_ALIAS_NFCT_HELPER(helper) \
327 MODULE_ALIAS("nfct-helper-" helper) 326 MODULE_ALIAS("nfct-helper-" helper)
328 327
329#endif /* __KERNEL__ */
330#endif /* _NF_CONNTRACK_H */ 328#endif /* _NF_CONNTRACK_H */
diff --git a/include/net/netfilter/nf_conntrack_tuple.h b/include/net/netfilter/nf_conntrack_tuple.h
index 4ee44c84a304..7ca6bdd5bae6 100644
--- a/include/net/netfilter/nf_conntrack_tuple.h
+++ b/include/net/netfilter/nf_conntrack_tuple.h
@@ -104,8 +104,6 @@ struct nf_conntrack_tuple_mask {
104 } src; 104 } src;
105}; 105};
106 106
107#ifdef __KERNEL__
108
109static inline void nf_ct_dump_tuple_ip(const struct nf_conntrack_tuple *t) 107static inline void nf_ct_dump_tuple_ip(const struct nf_conntrack_tuple *t)
110{ 108{
111#ifdef DEBUG 109#ifdef DEBUG
@@ -148,8 +146,6 @@ struct nf_conntrack_tuple_hash {
148 struct nf_conntrack_tuple tuple; 146 struct nf_conntrack_tuple tuple;
149}; 147};
150 148
151#endif /* __KERNEL__ */
152
153static inline bool __nf_ct_tuple_src_equal(const struct nf_conntrack_tuple *t1, 149static inline bool __nf_ct_tuple_src_equal(const struct nf_conntrack_tuple *t1,
154 const struct nf_conntrack_tuple *t2) 150 const struct nf_conntrack_tuple *t2)
155{ 151{
diff --git a/include/net/netfilter/nf_nat.h b/include/net/netfilter/nf_nat.h
index aff80b190c12..0346b0070864 100644
--- a/include/net/netfilter/nf_nat.h
+++ b/include/net/netfilter/nf_nat.h
@@ -48,7 +48,6 @@ struct nf_nat_multi_range_compat {
48 struct nf_nat_range range[1]; 48 struct nf_nat_range range[1];
49}; 49};
50 50
51#ifdef __KERNEL__
52#include <linux/list.h> 51#include <linux/list.h>
53#include <linux/netfilter/nf_conntrack_pptp.h> 52#include <linux/netfilter/nf_conntrack_pptp.h>
54#include <net/netfilter/nf_conntrack_extend.h> 53#include <net/netfilter/nf_conntrack_extend.h>
@@ -93,7 +92,4 @@ static inline struct nf_conn_nat *nfct_nat(const struct nf_conn *ct)
93#endif 92#endif
94} 93}
95 94
96#else /* !__KERNEL__: iptables wants this to compile. */
97#define nf_nat_multi_range nf_nat_multi_range_compat
98#endif /*__KERNEL__*/
99#endif 95#endif
diff --git a/include/net/rawv6.h b/include/net/rawv6.h
index f6b9b830df8c..cf7577234457 100644
--- a/include/net/rawv6.h
+++ b/include/net/rawv6.h
@@ -1,8 +1,6 @@
1#ifndef _NET_RAWV6_H 1#ifndef _NET_RAWV6_H
2#define _NET_RAWV6_H 2#define _NET_RAWV6_H
3 3
4#ifdef __KERNEL__
5
6#include <net/protocol.h> 4#include <net/protocol.h>
7 5
8void raw6_icmp_error(struct sk_buff *, int nexthdr, 6void raw6_icmp_error(struct sk_buff *, int nexthdr,
@@ -20,5 +18,3 @@ int rawv6_mh_filter_unregister(int (*filter)(struct sock *sock,
20#endif 18#endif
21 19
22#endif 20#endif
23
24#endif
diff --git a/include/net/route.h b/include/net/route.h
index b3962e249e14..3684c3edbae4 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -35,10 +35,6 @@
35#include <linux/cache.h> 35#include <linux/cache.h>
36#include <linux/security.h> 36#include <linux/security.h>
37 37
38#ifndef __KERNEL__
39#warning This file is not supposed to be used outside of kernel.
40#endif
41
42#define RTO_ONLINK 0x01 38#define RTO_ONLINK 0x01
43 39
44#define RTO_CONN 0 40#define RTO_CONN 0
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h
index a8122dc56410..5271a741c3a3 100644
--- a/include/net/transp_v6.h
+++ b/include/net/transp_v6.h
@@ -7,8 +7,6 @@
7 * IPv6 transport protocols 7 * IPv6 transport protocols
8 */ 8 */
9 9
10#ifdef __KERNEL__
11
12extern struct proto rawv6_prot; 10extern struct proto rawv6_prot;
13extern struct proto udpv6_prot; 11extern struct proto udpv6_prot;
14extern struct proto udplitev6_prot; 12extern struct proto udplitev6_prot;
@@ -57,5 +55,3 @@ extern const struct inet_connection_sock_af_ops ipv4_specific;
57extern void inet6_destroy_sock(struct sock *sk); 55extern void inet6_destroy_sock(struct sock *sk);
58 56
59#endif 57#endif
60
61#endif
diff --git a/include/net/wimax.h b/include/net/wimax.h
index c799ba7b708b..7328d5019d88 100644
--- a/include/net/wimax.h
+++ b/include/net/wimax.h
@@ -250,7 +250,6 @@
250 250
251#ifndef __NET__WIMAX_H__ 251#ifndef __NET__WIMAX_H__
252#define __NET__WIMAX_H__ 252#define __NET__WIMAX_H__
253#ifdef __KERNEL__
254 253
255#include <linux/wimax.h> 254#include <linux/wimax.h>
256#include <net/genetlink.h> 255#include <net/genetlink.h>
@@ -518,8 +517,4 @@ extern ssize_t wimax_msg_len(struct sk_buff *);
518extern int wimax_rfkill(struct wimax_dev *, enum wimax_rf_state); 517extern int wimax_rfkill(struct wimax_dev *, enum wimax_rf_state);
519extern int wimax_reset(struct wimax_dev *); 518extern int wimax_reset(struct wimax_dev *);
520 519
521#else
522/* You might be looking for linux/wimax.h */
523#error This file should not be included from user space.
524#endif /* #ifdef __KERNEL__ */
525#endif /* #ifndef __NET__WIMAX_H__ */ 520#endif /* #ifndef __NET__WIMAX_H__ */