2
0
mirror of https://github.com/xcat2/xNBA.git synced 2025-01-11 10:17:49 +00:00

Added pkb_reserve().

This commit is contained in:
Michael Brown 2006-04-24 19:34:51 +00:00
parent 26749951dc
commit 455b76980f

View File

@ -40,6 +40,20 @@ struct pk_buff {
struct ll_protocol *ll_protocol;
};
/**
* Reserve space at start of packet buffer
*
* @v pkb Packet buffer
* @v len Length to reserve
* @ret data Pointer to new start of buffer
*/
static inline void * pkb_reserve ( struct pk_buff *pkb, size_t len ) {
pkb->data += len;
pkb->tail += len;
assert ( pkb->tail <= pkb->end );
return pkb->data;
}
/**
* Add data to start of packet buffer
*