diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mroute.h | 27 | ||||
-rw-r--r-- | include/linux/mroute6.h | 32 |
2 files changed, 59 insertions, 0 deletions
diff --git a/include/linux/mroute.h b/include/linux/mroute.h index df8efd42bf8a..07112ee9293a 100644 --- a/include/linux/mroute.h +++ b/include/linux/mroute.h | |||
@@ -144,10 +144,37 @@ static inline int ip_mroute_opt(int opt) | |||
144 | } | 144 | } |
145 | #endif | 145 | #endif |
146 | 146 | ||
147 | #ifdef CONFIG_IP_MROUTE | ||
147 | extern int ip_mroute_setsockopt(struct sock *, int, char __user *, int); | 148 | extern int ip_mroute_setsockopt(struct sock *, int, char __user *, int); |
148 | extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *); | 149 | extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *); |
149 | extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg); | 150 | extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg); |
150 | extern int ip_mr_init(void); | 151 | extern int ip_mr_init(void); |
152 | #else | ||
153 | static inline | ||
154 | int ip_mroute_setsockopt(struct sock *sock, | ||
155 | int optname, char __user *optval, int optlen) | ||
156 | { | ||
157 | return -ENOPROTOOPT; | ||
158 | } | ||
159 | |||
160 | static inline | ||
161 | int ip_mroute_getsockopt(struct sock *sock, | ||
162 | int optname, char __user *optval, int __user *optlen) | ||
163 | { | ||
164 | return -ENOPROTOOPT; | ||
165 | } | ||
166 | |||
167 | static inline | ||
168 | int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg) | ||
169 | { | ||
170 | return -ENOIOCTLCMD; | ||
171 | } | ||
172 | |||
173 | static inline int ip_mr_init(void) | ||
174 | { | ||
175 | return 0; | ||
176 | } | ||
177 | #endif | ||
151 | 178 | ||
152 | struct vif_device | 179 | struct vif_device |
153 | { | 180 | { |
diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h index 4c4d6f57d5c5..5cf50473a10f 100644 --- a/include/linux/mroute6.h +++ b/include/linux/mroute6.h | |||
@@ -131,12 +131,44 @@ static inline int ip6_mroute_opt(int opt) | |||
131 | 131 | ||
132 | struct sock; | 132 | struct sock; |
133 | 133 | ||
134 | #ifdef CONFIG_IPV6_MROUTE | ||
134 | extern int ip6_mroute_setsockopt(struct sock *, int, char __user *, int); | 135 | extern int ip6_mroute_setsockopt(struct sock *, int, char __user *, int); |
135 | extern int ip6_mroute_getsockopt(struct sock *, int, char __user *, int __user *); | 136 | extern int ip6_mroute_getsockopt(struct sock *, int, char __user *, int __user *); |
136 | extern int ip6_mr_input(struct sk_buff *skb); | 137 | extern int ip6_mr_input(struct sk_buff *skb); |
137 | extern int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg); | 138 | extern int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg); |
138 | extern int ip6_mr_init(void); | 139 | extern int ip6_mr_init(void); |
139 | extern void ip6_mr_cleanup(void); | 140 | extern void ip6_mr_cleanup(void); |
141 | #else | ||
142 | static inline | ||
143 | int ip6_mroute_setsockopt(struct sock *sock, | ||
144 | int optname, char __user *optval, int optlen) | ||
145 | { | ||
146 | return -ENOPROTOOPT; | ||
147 | } | ||
148 | |||
149 | static inline | ||
150 | int ip6_mroute_getsockopt(struct sock *sock, | ||
151 | int optname, char __user *optval, int __user *optlen) | ||
152 | { | ||
153 | return -ENOPROTOOPT; | ||
154 | } | ||
155 | |||
156 | static inline | ||
157 | int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg) | ||
158 | { | ||
159 | return -ENOIOCTLCMD; | ||
160 | } | ||
161 | |||
162 | static inline int ip6_mr_init(void) | ||
163 | { | ||
164 | return 0; | ||
165 | } | ||
166 | |||
167 | static inline void ip6_mr_cleanup(void) | ||
168 | { | ||
169 | return; | ||
170 | } | ||
171 | #endif | ||
140 | 172 | ||
141 | struct mif_device | 173 | struct mif_device |
142 | { | 174 | { |