diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/net.h | 2 | ||||
-rw-r--r-- | include/linux/netdevice.h | 9 | ||||
-rw-r--r-- | include/linux/skbuff.h | 5 |
3 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/net.h b/include/linux/net.h index 0c4ae5d94de..65545ac6fb9 100644 --- a/include/linux/net.h +++ b/include/linux/net.h @@ -180,7 +180,7 @@ struct proto_ops { int offset, size_t size, int flags); ssize_t (*splice_read)(struct socket *sock, loff_t *ppos, struct pipe_inode_info *pipe, size_t len, unsigned int flags); - void (*set_peek_off)(struct sock *sk, int val); + int (*set_peek_off)(struct sock *sk, int val); }; #define DECLARE_SOCKADDR(type, dst, src) \ diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 96e4c21e15e..abf7756eaf9 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1772,6 +1772,15 @@ static inline int dev_parse_header(const struct sk_buff *skb, return dev->header_ops->parse(skb, haddr); } +static inline int dev_rebuild_header(struct sk_buff *skb) +{ + const struct net_device *dev = skb->dev; + + if (!dev->header_ops || !dev->header_ops->rebuild) + return 0; + return dev->header_ops->rebuild(skb); +} + typedef int gifconf_func_t(struct net_device * dev, char __user * bufptr, int len); extern int register_gifconf(unsigned int family, gifconf_func_t * gifconf); static inline int unregister_gifconf(unsigned int family) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 74db47ec09e..ded45ec6b22 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -1741,6 +1741,11 @@ static inline void skb_set_mac_header(struct sk_buff *skb, const int offset) } #endif /* NET_SKBUFF_DATA_USES_OFFSET */ +static inline void skb_pop_mac_header(struct sk_buff *skb) +{ + skb->mac_header = skb->network_header; +} + static inline void skb_probe_transport_header(struct sk_buff *skb, const int offset_hint) { |