Rename pkb_available() to pkb_tailroom() for consistency with Linux's

skb_tailroom().  Add pkb_headroom().
This commit is contained in:
Michael Brown
2007-01-09 20:56:31 +00:00
parent b7fcfe8ece
commit 18e5353bed
4 changed files with 21 additions and 11 deletions

View File

@@ -137,12 +137,22 @@ static inline size_t pkb_len ( struct pk_buff *pkb ) {
}
/**
* Calculate available space in a packet buffer
* Calculate available space at start of a packet buffer
*
* @v pkb Packet buffer
* @ret len Length of data available in buffer
* @ret len Length of data available at start of buffer
*/
static inline size_t pkb_available ( struct pk_buff *pkb ) {
static inline size_t pkb_headroom ( struct pk_buff *pkb ) {
return ( pkb->data - pkb->head );
}
/**
* Calculate available space at end of a packet buffer
*
* @v pkb Packet buffer
* @ret len Length of data available at end of buffer
*/
static inline size_t pkb_tailroom ( struct pk_buff *pkb ) {
return ( pkb->end - pkb->tail );
}