|
@@ -40,6 +40,20 @@ struct pk_buff {
|
40
|
40
|
struct ll_protocol *ll_protocol;
|
41
|
41
|
};
|
42
|
42
|
|
|
43
|
+/**
|
|
44
|
+ * Reserve space at start of packet buffer
|
|
45
|
+ *
|
|
46
|
+ * @v pkb Packet buffer
|
|
47
|
+ * @v len Length to reserve
|
|
48
|
+ * @ret data Pointer to new start of buffer
|
|
49
|
+ */
|
|
50
|
+static inline void * pkb_reserve ( struct pk_buff *pkb, size_t len ) {
|
|
51
|
+ pkb->data += len;
|
|
52
|
+ pkb->tail += len;
|
|
53
|
+ assert ( pkb->tail <= pkb->end );
|
|
54
|
+ return pkb->data;
|
|
55
|
+}
|
|
56
|
+
|
43
|
57
|
/**
|
44
|
58
|
* Add data to start of packet buffer
|
45
|
59
|
*
|