david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

Added pkb_reserve().

This commit is contained in:
Michael Brown 2006-04-24 19:34:51 +00:00
parent 26749951dc
commit 455b76980f
1 changed files with 14 additions and 0 deletions

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
*