diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-05 06:47:02 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-05 06:47:02 +0000 |
commit | 99a7e12f34b3661a0d1354eef83a0eef4df5e34c (patch) | |
tree | 3560aca9ca86792f9ab7bd87861ea143a1b3c7a3 /include/linux/skbuff.h | |
parent | e73a04659c0b8cdee4dd40e58630e2cf63afb316 (diff) |
Merge with Linux 2.3.38.
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 27232bd5b..7bea8a9a0 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -133,6 +133,10 @@ struct sk_buff { __u32 ifield; } private; #endif + +#ifdef CONFIG_NET_SCHED + __u32 tc_index; /* traffic control index */ +#endif }; /* These are just the default values. This is run time configurable. @@ -168,19 +172,25 @@ extern struct sk_buff * alloc_skb(unsigned int size, int priority); extern struct sk_buff * dev_alloc_skb(unsigned int size); extern void kfree_skbmem(struct sk_buff *skb); extern struct sk_buff * skb_clone(struct sk_buff *skb, int priority); -extern struct sk_buff * skb_copy(struct sk_buff *skb, int priority); -extern struct sk_buff * skb_realloc_headroom(struct sk_buff *skb, int newheadroom); +extern struct sk_buff * skb_copy(const struct sk_buff *skb, int priority); +extern struct sk_buff * skb_copy_expand(const struct sk_buff *skb, + int newheadroom, + int newtailroom, + int priority); #define dev_kfree_skb(a) kfree_skb(a) extern unsigned char * skb_put(struct sk_buff *skb, unsigned int len); extern unsigned char * skb_push(struct sk_buff *skb, unsigned int len); extern unsigned char * skb_pull(struct sk_buff *skb, unsigned int len); -extern int skb_headroom(struct sk_buff *skb); -extern int skb_tailroom(struct sk_buff *skb); +extern int skb_headroom(const struct sk_buff *skb); +extern int skb_tailroom(const struct sk_buff *skb); extern void skb_reserve(struct sk_buff *skb, unsigned int len); extern void skb_trim(struct sk_buff *skb, unsigned int len); extern void skb_over_panic(struct sk_buff *skb, int len, void *here); extern void skb_under_panic(struct sk_buff *skb, int len, void *here); +/* Backwards compatibility */ +#define skb_realloc_headroom(skb, nhr) skb_copy_expand(skb, nhr, skb_tailroom(skb), GFP_ATOMIC) + /* Internal */ extern __inline__ atomic_t *skb_datarefp(struct sk_buff *skb) { @@ -534,12 +544,12 @@ extern __inline__ unsigned char * skb_pull(struct sk_buff *skb, unsigned int len return __skb_pull(skb,len); } -extern __inline__ int skb_headroom(struct sk_buff *skb) +extern __inline__ int skb_headroom(const struct sk_buff *skb) { return skb->data-skb->head; } -extern __inline__ int skb_tailroom(struct sk_buff *skb) +extern __inline__ int skb_tailroom(const struct sk_buff *skb) { return skb->end-skb->tail; } |