diff options
| author | Christoph Hellwig <hch@lst.de> | 2003-05-20 04:56:40 -0700 |
|---|---|---|
| committer | David S. Miller <davem@nuts.ninka.net> | 2003-05-20 04:56:40 -0700 |
| commit | a6a1faca24996aaab9527353e6112919cd99ca73 (patch) | |
| tree | 32cb7e8be328ba3f4bec924d4a5ffce9e3a7600f /include | |
| parent | 12a7f674a5c1df7685c2e92e833bc9fc9a6ac795 (diff) | |
[NET]: Clean up the divert ifdef mess.
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/divert.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/include/linux/divert.h b/include/linux/divert.h index 66e56ec15b66..38497a643657 100644 --- a/include/linux/divert.h +++ b/include/linux/divert.h @@ -107,11 +107,24 @@ struct divert_cf /* diverter functions */ #include <linux/skbuff.h> + +#ifdef CONFIG_NET_DIVERT int alloc_divert_blk(struct net_device *); void free_divert_blk(struct net_device *); int divert_ioctl(unsigned int cmd, struct divert_cf *arg); void divert_frame(struct sk_buff *skb); - +static inline void handle_diverter(struct sk_buff *skb) +{ + /* if diversion is supported on device, then divert */ + if (skb->dev->divert && skb->dev->divert->divert) + divert_frame(skb); +} + +#else +# define alloc_divert_blk(dev) (0) +# define free_divert_blk(dev) do {} while (0) +# define divert_ioctl(cmd, arg) (-ENOPKG) +# define handle_diverter(skb) do {} while (0) +#endif #endif - #endif /* _LINUX_DIVERT_H */ |
