diff options
Diffstat (limited to 'include/linux/mroute.h')
| -rw-r--r-- | include/linux/mroute.h | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/include/linux/mroute.h b/include/linux/mroute.h index de4decfa1bfc..8a455694d682 100644 --- a/include/linux/mroute.h +++ b/include/linux/mroute.h | |||
| @@ -6,7 +6,6 @@ | |||
| 6 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
| 7 | #include <linux/in.h> | 7 | #include <linux/in.h> |
| 8 | #endif | 8 | #endif |
| 9 | #include <linux/pim.h> | ||
| 10 | 9 | ||
| 11 | /* | 10 | /* |
| 12 | * Based on the MROUTING 3.5 defines primarily to keep | 11 | * Based on the MROUTING 3.5 defines primarily to keep |
| @@ -130,6 +129,7 @@ struct igmpmsg | |||
| 130 | */ | 129 | */ |
| 131 | 130 | ||
| 132 | #ifdef __KERNEL__ | 131 | #ifdef __KERNEL__ |
| 132 | #include <linux/pim.h> | ||
| 133 | #include <net/sock.h> | 133 | #include <net/sock.h> |
| 134 | 134 | ||
| 135 | #ifdef CONFIG_IP_MROUTE | 135 | #ifdef CONFIG_IP_MROUTE |
| @@ -144,11 +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 void 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 | } | ||
| 151 | 172 | ||
| 173 | static inline int ip_mr_init(void) | ||
| 174 | { | ||
| 175 | return 0; | ||
| 176 | } | ||
| 177 | #endif | ||
| 152 | 178 | ||
| 153 | struct vif_device | 179 | struct vif_device |
| 154 | { | 180 | { |
