mirror of
https://github.com/xcat2/xNBA.git
synced 2024-12-14 23:31:39 +00:00
Add pkb_available()
This commit is contained in:
parent
e8daeb62b1
commit
6858b14a34
@ -136,6 +136,16 @@ static inline size_t pkb_len ( struct pk_buff *pkb ) {
|
||||
return ( pkb->tail - pkb->data );
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate available space in a packet buffer
|
||||
*
|
||||
* @v pkb Packet buffer
|
||||
* @ret len Length of data available in buffer
|
||||
*/
|
||||
static inline size_t pkb_available ( struct pk_buff *pkb ) {
|
||||
return ( pkb->end - pkb->tail );
|
||||
}
|
||||
|
||||
extern struct pk_buff * alloc_pkb ( size_t len );
|
||||
extern void free_pkb ( struct pk_buff *pkb );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user