summaryrefslogtreecommitdiffstats
path: root/qemu/roms/ipxe/src/include/ipxe/xferbuf.h
diff options
context:
space:
mode:
Diffstat (limited to 'qemu/roms/ipxe/src/include/ipxe/xferbuf.h')
-rw-r--r--qemu/roms/ipxe/src/include/ipxe/xferbuf.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/qemu/roms/ipxe/src/include/ipxe/xferbuf.h b/qemu/roms/ipxe/src/include/ipxe/xferbuf.h
new file mode 100644
index 000000000..2ca871e59
--- /dev/null
+++ b/qemu/roms/ipxe/src/include/ipxe/xferbuf.h
@@ -0,0 +1,31 @@
+#ifndef _IPXE_XFERBUF_H
+#define _IPXE_XFERBUF_H
+
+/** @file
+ *
+ * Data transfer buffer
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER );
+
+#include <stdint.h>
+#include <ipxe/iobuf.h>
+#include <ipxe/xfer.h>
+
+/** A data transfer buffer */
+struct xfer_buffer {
+ /** Data */
+ void *data;
+ /** Size of data */
+ size_t len;
+ /** Current offset within data */
+ size_t pos;
+};
+
+extern void xferbuf_done ( struct xfer_buffer *xferbuf );
+extern int xferbuf_deliver ( struct xfer_buffer *xferbuf,
+ struct io_buffer *iobuf,
+ struct xfer_metadata *meta );
+
+#endif /* _IPXE_XFERBUF_H */