summaryrefslogtreecommitdiff
path: root/pfinet/linux-src/include/linux/skbuff.h
diff options
context:
space:
mode:
Diffstat (limited to 'pfinet/linux-src/include/linux/skbuff.h')
-rw-r--r--pfinet/linux-src/include/linux/skbuff.h96
1 files changed, 40 insertions, 56 deletions
diff --git a/pfinet/linux-src/include/linux/skbuff.h b/pfinet/linux-src/include/linux/skbuff.h
index 82d5da6e..452cbdaf 100644
--- a/pfinet/linux-src/include/linux/skbuff.h
+++ b/pfinet/linux-src/include/linux/skbuff.h
@@ -134,62 +134,46 @@ struct sk_buff {
#include <asm/system.h>
extern void __kfree_skb(struct sk_buff *skb);
-extern void skb_queue_head_init(struct sk_buff_head *list);
-extern void skb_queue_head(struct sk_buff_head *list,struct sk_buff *buf);
-extern void skb_queue_tail(struct sk_buff_head *list,struct sk_buff *buf);
-extern struct sk_buff * skb_dequeue(struct sk_buff_head *list);
-extern void skb_insert(struct sk_buff *old,struct sk_buff *newsk);
-extern void skb_append(struct sk_buff *old,struct sk_buff *newsk);
-extern void skb_unlink(struct sk_buff *buf);
-extern __u32 skb_queue_len(struct sk_buff_head *list);
extern struct sk_buff * skb_peek_copy(struct sk_buff_head *list);
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);
#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 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);
/* Internal */
-extern __inline__ atomic_t *skb_datarefp(struct sk_buff *skb)
+static __inline__ atomic_t *skb_datarefp(struct sk_buff *skb)
{
return (atomic_t *)(skb->end);
}
-extern __inline__ int skb_queue_empty(struct sk_buff_head *list)
+static __inline__ int skb_queue_empty(struct sk_buff_head *list)
{
return (list->next == (struct sk_buff *) list);
}
-extern __inline__ void kfree_skb(struct sk_buff *skb)
+static __inline__ void kfree_skb(struct sk_buff *skb)
{
if (atomic_dec_and_test(&skb->users))
__kfree_skb(skb);
}
/* Use this if you didn't touch the skb state [for fast switching] */
-extern __inline__ void kfree_skb_fast(struct sk_buff *skb)
+static __inline__ void kfree_skb_fast(struct sk_buff *skb)
{
if (atomic_dec_and_test(&skb->users))
kfree_skbmem(skb);
}
-extern __inline__ int skb_cloned(struct sk_buff *skb)
+static __inline__ int skb_cloned(struct sk_buff *skb)
{
return skb->cloned && atomic_read(skb_datarefp(skb)) != 1;
}
-extern __inline__ int skb_shared(struct sk_buff *skb)
+static __inline__ int skb_shared(struct sk_buff *skb)
{
return (atomic_read(&skb->users) != 1);
}
@@ -201,7 +185,7 @@ extern __inline__ int skb_shared(struct sk_buff *skb)
* a packet thats being forwarded.
*/
-extern __inline__ struct sk_buff *skb_unshare(struct sk_buff *skb, int pri)
+static __inline__ struct sk_buff *skb_unshare(struct sk_buff *skb, int pri)
{
struct sk_buff *nskb;
if(!skb_cloned(skb))
@@ -218,7 +202,7 @@ extern __inline__ struct sk_buff *skb_unshare(struct sk_buff *skb, int pri)
* type system cli() peek the buffer copy the data and sti();
*/
-extern __inline__ struct sk_buff *skb_peek(struct sk_buff_head *list_)
+static __inline__ struct sk_buff *skb_peek(struct sk_buff_head *list_)
{
struct sk_buff *list = ((struct sk_buff *)list_)->next;
if (list == (struct sk_buff *)list_)
@@ -226,7 +210,7 @@ extern __inline__ struct sk_buff *skb_peek(struct sk_buff_head *list_)
return list;
}
-extern __inline__ struct sk_buff *skb_peek_tail(struct sk_buff_head *list_)
+static __inline__ struct sk_buff *skb_peek_tail(struct sk_buff_head *list_)
{
struct sk_buff *list = ((struct sk_buff *)list_)->prev;
if (list == (struct sk_buff *)list_)
@@ -238,12 +222,12 @@ extern __inline__ struct sk_buff *skb_peek_tail(struct sk_buff_head *list_)
* Return the length of an sk_buff queue
*/
-extern __inline__ __u32 skb_queue_len(struct sk_buff_head *list_)
+static __inline__ __u32 skb_queue_len(struct sk_buff_head *list_)
{
return(list_->qlen);
}
-extern __inline__ void skb_queue_head_init(struct sk_buff_head *list)
+static __inline__ void skb_queue_head_init(struct sk_buff_head *list)
{
list->prev = (struct sk_buff *)list;
list->next = (struct sk_buff *)list;
@@ -257,7 +241,7 @@ extern __inline__ void skb_queue_head_init(struct sk_buff_head *list)
* can only be called with interrupts disabled.
*/
-extern __inline__ void __skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk)
+static __inline__ void __skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk)
{
struct sk_buff *prev, *next;
@@ -273,7 +257,7 @@ extern __inline__ void __skb_queue_head(struct sk_buff_head *list, struct sk_buf
extern spinlock_t skb_queue_lock;
-extern __inline__ void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk)
+static __inline__ void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk)
{
unsigned long flags;
@@ -286,7 +270,7 @@ extern __inline__ void skb_queue_head(struct sk_buff_head *list, struct sk_buff
* Insert an sk_buff at the end of a list.
*/
-extern __inline__ void __skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk)
+static __inline__ void __skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk)
{
struct sk_buff *prev, *next;
@@ -300,7 +284,7 @@ extern __inline__ void __skb_queue_tail(struct sk_buff_head *list, struct sk_buf
prev->next = newsk;
}
-extern __inline__ void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk)
+static __inline__ void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk)
{
unsigned long flags;
@@ -313,7 +297,7 @@ extern __inline__ void skb_queue_tail(struct sk_buff_head *list, struct sk_buff
* Remove an sk_buff from a list.
*/
-extern __inline__ struct sk_buff *__skb_dequeue(struct sk_buff_head *list)
+static __inline__ struct sk_buff *__skb_dequeue(struct sk_buff_head *list)
{
struct sk_buff *next, *prev, *result;
@@ -333,7 +317,7 @@ extern __inline__ struct sk_buff *__skb_dequeue(struct sk_buff_head *list)
return result;
}
-extern __inline__ struct sk_buff *skb_dequeue(struct sk_buff_head *list)
+static __inline__ struct sk_buff *skb_dequeue(struct sk_buff_head *list)
{
long flags;
struct sk_buff *result;
@@ -348,7 +332,7 @@ extern __inline__ struct sk_buff *skb_dequeue(struct sk_buff_head *list)
* Insert a packet on a list.
*/
-extern __inline__ void __skb_insert(struct sk_buff *newsk,
+static __inline__ void __skb_insert(struct sk_buff *newsk,
struct sk_buff * prev, struct sk_buff *next,
struct sk_buff_head * list)
{
@@ -363,7 +347,7 @@ extern __inline__ void __skb_insert(struct sk_buff *newsk,
/*
* Place a packet before a given packet in a list
*/
-extern __inline__ void skb_insert(struct sk_buff *old, struct sk_buff *newsk)
+static __inline__ void skb_insert(struct sk_buff *old, struct sk_buff *newsk)
{
unsigned long flags;
@@ -376,12 +360,12 @@ extern __inline__ void skb_insert(struct sk_buff *old, struct sk_buff *newsk)
* Place a packet after a given packet in a list.
*/
-extern __inline__ void __skb_append(struct sk_buff *old, struct sk_buff *newsk)
+static __inline__ void __skb_append(struct sk_buff *old, struct sk_buff *newsk)
{
__skb_insert(newsk, old, old->next, old->list);
}
-extern __inline__ void skb_append(struct sk_buff *old, struct sk_buff *newsk)
+static __inline__ void skb_append(struct sk_buff *old, struct sk_buff *newsk)
{
unsigned long flags;
@@ -394,7 +378,7 @@ extern __inline__ void skb_append(struct sk_buff *old, struct sk_buff *newsk)
* remove sk_buff from list. _Must_ be called atomically, and with
* the list known..
*/
-extern __inline__ void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list)
+static __inline__ void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list)
{
struct sk_buff * next, * prev;
@@ -415,7 +399,7 @@ extern __inline__ void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *li
* _FIRST_.
*/
-extern __inline__ void skb_unlink(struct sk_buff *skb)
+static __inline__ void skb_unlink(struct sk_buff *skb)
{
unsigned long flags;
@@ -426,7 +410,7 @@ extern __inline__ void skb_unlink(struct sk_buff *skb)
}
/* XXX: more streamlined implementation */
-extern __inline__ struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list)
+static __inline__ struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list)
{
struct sk_buff *skb = skb_peek_tail(list);
if (skb)
@@ -434,7 +418,7 @@ extern __inline__ struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list)
return skb;
}
-extern __inline__ struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list)
+static __inline__ struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list)
{
long flags;
struct sk_buff *result;
@@ -449,7 +433,7 @@ extern __inline__ struct sk_buff *skb_dequeue_tail(struct sk_buff_head *list)
* Add data to an sk_buff
*/
-extern __inline__ unsigned char *__skb_put(struct sk_buff *skb, unsigned int len)
+static __inline__ unsigned char *__skb_put(struct sk_buff *skb, unsigned int len)
{
unsigned char *tmp=skb->tail;
skb->tail+=len;
@@ -457,7 +441,7 @@ extern __inline__ unsigned char *__skb_put(struct sk_buff *skb, unsigned int len
return tmp;
}
-extern __inline__ unsigned char *skb_put(struct sk_buff *skb, unsigned int len)
+static __inline__ unsigned char *skb_put(struct sk_buff *skb, unsigned int len)
{
unsigned char *tmp=skb->tail;
skb->tail+=len;
@@ -471,14 +455,14 @@ here: ;
return tmp;
}
-extern __inline__ unsigned char *__skb_push(struct sk_buff *skb, unsigned int len)
+static __inline__ unsigned char *__skb_push(struct sk_buff *skb, unsigned int len)
{
skb->data-=len;
skb->len+=len;
return skb->data;
}
-extern __inline__ unsigned char *skb_push(struct sk_buff *skb, unsigned int len)
+static __inline__ unsigned char *skb_push(struct sk_buff *skb, unsigned int len)
{
skb->data-=len;
skb->len+=len;
@@ -491,49 +475,49 @@ here: ;
return skb->data;
}
-extern __inline__ char *__skb_pull(struct sk_buff *skb, unsigned int len)
+static __inline__ char *__skb_pull(struct sk_buff *skb, unsigned int len)
{
skb->len-=len;
return skb->data+=len;
}
-extern __inline__ unsigned char * skb_pull(struct sk_buff *skb, unsigned int len)
+static __inline__ unsigned char * skb_pull(struct sk_buff *skb, unsigned int len)
{
if (len > skb->len)
return NULL;
return __skb_pull(skb,len);
}
-extern __inline__ int skb_headroom(struct sk_buff *skb)
+static __inline__ int skb_headroom(struct sk_buff *skb)
{
return skb->data-skb->head;
}
-extern __inline__ int skb_tailroom(struct sk_buff *skb)
+static __inline__ int skb_tailroom(struct sk_buff *skb)
{
return skb->end-skb->tail;
}
-extern __inline__ void skb_reserve(struct sk_buff *skb, unsigned int len)
+static __inline__ void skb_reserve(struct sk_buff *skb, unsigned int len)
{
skb->data+=len;
skb->tail+=len;
}
-extern __inline__ void __skb_trim(struct sk_buff *skb, unsigned int len)
+static __inline__ void __skb_trim(struct sk_buff *skb, unsigned int len)
{
skb->len = len;
skb->tail = skb->data+len;
}
-extern __inline__ void skb_trim(struct sk_buff *skb, unsigned int len)
+static __inline__ void skb_trim(struct sk_buff *skb, unsigned int len)
{
if (skb->len > len) {
__skb_trim(skb, len);
}
}
-extern __inline__ void skb_orphan(struct sk_buff *skb)
+static __inline__ void skb_orphan(struct sk_buff *skb)
{
if (skb->destructor)
skb->destructor(skb);
@@ -541,14 +525,14 @@ extern __inline__ void skb_orphan(struct sk_buff *skb)
skb->sk = NULL;
}
-extern __inline__ void skb_queue_purge(struct sk_buff_head *list)
+static __inline__ void skb_queue_purge(struct sk_buff_head *list)
{
struct sk_buff *skb;
while ((skb=skb_dequeue(list))!=NULL)
kfree_skb(skb);
}
-extern __inline__ struct sk_buff *dev_alloc_skb(unsigned int length)
+static __inline__ struct sk_buff *dev_alloc_skb(unsigned int length)
{
struct sk_buff *skb;
@@ -558,7 +542,7 @@ extern __inline__ struct sk_buff *dev_alloc_skb(unsigned int length)
return skb;
}
-extern __inline__ struct sk_buff *
+static __inline__ struct sk_buff *
skb_cow(struct sk_buff *skb, unsigned int headroom)
{
headroom = (headroom+15)&~15;