1#ifndef __VSF_LINUX_SKBUFF_H__
2#define __VSF_LINUX_SKBUFF_H__
60static inline bool skb_unref(
struct sk_buff *skb)
62 return refcount_dec_and_test(&skb->
users);
65static inline void skb_reserve(
struct sk_buff *skb,
int len)
71static inline unsigned char * skb_tail_pointer(
const struct sk_buff *skb)
76static inline void skb_reset_tail_pointer(
struct sk_buff *skb)
81static inline void skb_set_tail_pointer(
struct sk_buff *skb,
const int offset)
83 skb_reset_tail_pointer(skb);
87static inline unsigned char * skb_end_pointer(
const struct sk_buff *skb)
92static inline unsigned int skb_end_offset(
const struct sk_buff *skb)
97static inline void skb_set_end_offset(
struct sk_buff *skb,
unsigned int offset)
102static inline void * skb_put(
struct sk_buff *skb,
int len)
104 void *tmp = skb_tail_pointer(skb);
110static inline void * skb_put_zero(
struct sk_buff *skb,
unsigned int len)
112 void *tmp = skb_put(skb,
len);
117static inline void * skb_put_data(
struct sk_buff *skb,
const void *
data,
unsigned int len)
119 void *tmp = skb_put(skb,
len);
124static inline void skb_put_u8(
struct sk_buff *skb,
u8 val)
126 *(
u8 *)skb_put(skb, 1) = val;
129static inline void * skb_push(
struct sk_buff *skb,
unsigned int len)
136static inline void * skb_pull(
struct sk_buff *skb,
unsigned int len)
144 refcount_inc(&skb->
users);
148static inline unsigned int skb_headroom(
const struct sk_buff *skb)
153static inline int skb_tailroom(
const struct sk_buff *skb)
158static inline void skb_trim(
struct sk_buff *skb,
unsigned int len)
162 skb_set_tail_pointer(skb,
len);
230 __skb_unlink(skb,
list);
238 __skb_queue_after(
list, old, newsk);
280 skb = skb_peek(
list);
282 __skb_unlink(skb,
list);
292 skb = skb_peek_tail(
list);
294 __skb_unlink(skb,
list);
301static inline void consume_skb(
struct sk_buff *skb)
306#define dev_kfree_skb(__skb) consume_skb(__skb)
307#define dev_kfree_skb_any(__skb) dev_kfree_skb(__skb)
308#define dev_consume_skb_any(__skb) consume_skb(__skb)
309static inline struct sk_buff * dev_alloc_skb(
unsigned int length)
unsigned int gfp_t
Definition gfp.h:10
#define GFP_ATOMIC
Definition gfp.h:15
struct ieee80211_ext_chansw_ie data
Definition ieee80211.h:80
#define spin_lock_init(lock)
Definition spinlock.h:29
#define spin_unlock_irqrestore(lock, flags)
Definition spinlock.h:38
int spinlock_t
Definition spinlock.h:26
#define spin_lock_irqsave(lock, flags)
Definition spinlock.h:37
uint32_t __u32
Definition types.h:55
uint8_t __u8
Definition types.h:51
#define NULL
Definition lvgl.h:26
unsigned char u8
Definition lvgl.h:40
unsigned int sk_buff_data_t
Definition skbuff.h:15
void skb_init(void)
Definition vsf_linux_core.c:947
struct sk_buff * alloc_skb(unsigned int size, gfp_t priority)
Definition vsf_linux_core.c:884
void kfree_skb(struct sk_buff *skb)
Definition vsf_linux_core.c:930
void * memset(void *s, int ch, size_t n)
void * memcpy(void *dest, const void *src, size_t n)
struct list_head * prev
Definition list.h:78
struct list_head * next
Definition list.h:78
spinlock_t lock
Definition skbuff.h:55
struct sk_buff_list list
Definition skbuff.h:52
__u32 qlen
Definition skbuff.h:54
struct sk_buff * next
Definition skbuff.h:49
struct sk_buff * prev
Definition skbuff.h:50
struct sk_buff * next
Definition skbuff.h:42
struct sk_buff * prev
Definition skbuff.h:43
unsigned char * head
Definition skbuff.h:37
struct sk_buff * prev
Definition skbuff.h:26
struct sk_buff * next
Definition skbuff.h:25
unsigned char * data
Definition skbuff.h:37
char cb[48]
Definition skbuff.h:32
struct llist_node ll_node
Definition skbuff.h:29
sk_buff_data_t tail
Definition skbuff.h:35
refcount_t users
Definition skbuff.h:38
sk_buff_data_t end
Definition skbuff.h:36
unsigned int len
Definition skbuff.h:34
struct list_head list
Definition skbuff.h:28
unsigned int data_len
Definition skbuff.h:34
__u8 flags
Definition skbuff.h:18
atomic_t dataref
Definition skbuff.h:19
uint64_t offset
Definition vsf_memfs.h:49
uint32_t size
Definition vsf_memfs.h:50
vsf_msgt_node_offset_t next
Definition vsf_msg_tree.h:192
uint_fast8_t length
Definition vsf_pbuf.c:38