mirror of https://github.com/ipxe/ipxe.git
Added pkb_reserve().
parent
26749951dc
commit
455b76980f
|
@ -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
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue