diff options
| author | Michael Brown | 2007-01-09 21:56:31 +0100 |
|---|---|---|
| committer | Michael Brown | 2007-01-09 21:56:31 +0100 |
| commit | 18e5353bed3bd66c8d07b2dbb23d989239da9937 (patch) | |
| tree | d54b470da7ed4c50d7577f5b67abfc9eec445836 /src/include/gpxe | |
| parent | Added net device TX queue; this will be needed to support the PXE UNDI API (diff) | |
| download | ipxe-18e5353bed3bd66c8d07b2dbb23d989239da9937.tar.gz ipxe-18e5353bed3bd66c8d07b2dbb23d989239da9937.tar.xz ipxe-18e5353bed3bd66c8d07b2dbb23d989239da9937.zip | |
Rename pkb_available() to pkb_tailroom() for consistency with Linux's
skb_tailroom(). Add pkb_headroom().
Diffstat (limited to 'src/include/gpxe')
| -rw-r--r-- | src/include/gpxe/pkbuff.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/include/gpxe/pkbuff.h b/src/include/gpxe/pkbuff.h index 21a771678..dc3d24c4b 100644 --- a/src/include/gpxe/pkbuff.h +++ b/src/include/gpxe/pkbuff.h @@ -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 ); } |
