summaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-09-19 19:15:08 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-09-19 19:15:08 +0000
commit03ba4131783cc9e872f8bb26a03f15bc11f27564 (patch)
tree88db8dba75ae06ba3bad08e42c5e52efc162535c /include/linux/skbuff.h
parent257730f99381dd26e10b832fce4c94cae7ac1176 (diff)
- Merge with Linux 2.1.121.
- Bugfixes.
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index ee6c79970..c242c0907 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -537,6 +537,19 @@ extern __inline__ struct sk_buff *dev_alloc_skb(unsigned int length)
return skb;
}
+extern __inline__ struct sk_buff *
+skb_cow(struct sk_buff *skb, unsigned int headroom)
+{
+ headroom = (headroom+15)&~15;
+
+ if ((unsigned)skb_headroom(skb) < headroom || skb_cloned(skb)) {
+ struct sk_buff *skb2 = skb_realloc_headroom(skb, headroom);
+ kfree_skb(skb);
+ skb = skb2;
+ }
+ return skb;
+}
+
extern struct sk_buff * skb_recv_datagram(struct sock *sk,unsigned flags,int noblock, int *err);
extern unsigned int datagram_poll(struct file *file, struct socket *sock, struct poll_table_struct *wait);
extern int skb_copy_datagram(struct sk_buff *from, int offset, char *to,int size);