http://git.etherboot.org
/
gpxe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2674995
)
Added pkb_reserve().
author
Michael Brown
<mcb30@etherboot.org>
Mon, 24 Apr 2006 19:34:51 +0000
(19:34 +0000)
committer
Michael Brown
<mcb30@etherboot.org>
Mon, 24 Apr 2006 19:34:51 +0000
(19:34 +0000)
src/include/gpxe/pkbuff.h
patch
|
blob
|
history
diff --git
a/src/include/gpxe/pkbuff.h
b/src/include/gpxe/pkbuff.h
index
2e3980a
..
895367a
100644
(file)
--- a/
src/include/gpxe/pkbuff.h
+++ b/
src/include/gpxe/pkbuff.h
@@
-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
*