mirror of
https://github.com/ipxe/ipxe
synced 2025-12-15 00:12:19 +03:00
Added pkb_reserve().
This commit is contained in:
@@ -40,6 +40,20 @@ struct pk_buff {
|
|||||||
struct ll_protocol *ll_protocol;
|
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
|
* Add data to start of packet buffer
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user