|
@@ -136,6 +136,16 @@ static inline size_t pkb_len ( struct pk_buff *pkb ) {
|
136
|
136
|
return ( pkb->tail - pkb->data );
|
137
|
137
|
}
|
138
|
138
|
|
|
139
|
+/**
|
|
140
|
+ * Calculate available space in a packet buffer
|
|
141
|
+ *
|
|
142
|
+ * @v pkb Packet buffer
|
|
143
|
+ * @ret len Length of data available in buffer
|
|
144
|
+ */
|
|
145
|
+static inline size_t pkb_available ( struct pk_buff *pkb ) {
|
|
146
|
+ return ( pkb->end - pkb->tail );
|
|
147
|
+}
|
|
148
|
+
|
139
|
149
|
extern struct pk_buff * alloc_pkb ( size_t len );
|
140
|
150
|
extern void free_pkb ( struct pk_buff *pkb );
|
141
|
151
|
|