diff options
| author | Michael Brown | 2015-07-20 13:15:21 +0200 |
|---|---|---|
| committer | Michael Brown | 2015-07-22 22:17:47 +0200 |
| commit | 07b0d4fa30d021322efa8a423295a0677325ec8d (patch) | |
| tree | 92ae1c8e37930a89835b77c488067b91bb0c52e2 /src/include | |
| parent | [xferbuf] Generalise to handle umalloc()-based buffers (diff) | |
| download | ipxe-07b0d4fa30d021322efa8a423295a0677325ec8d.tar.gz ipxe-07b0d4fa30d021322efa8a423295a0677325ec8d.tar.xz ipxe-07b0d4fa30d021322efa8a423295a0677325ec8d.zip | |
[xferbuf] Add xfer_buffer() to provide direct access to underlying buffer
Allow data transfer buffer users to provide direct access to their
underlying data transfer buffer.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/ipxe/xferbuf.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/ipxe/xferbuf.h b/src/include/ipxe/xferbuf.h index f2f336252..cb0b1a0e8 100644 --- a/src/include/ipxe/xferbuf.h +++ b/src/include/ipxe/xferbuf.h @@ -12,6 +12,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); #include <stdint.h> #include <ipxe/iobuf.h> #include <ipxe/uaccess.h> +#include <ipxe/interface.h> #include <ipxe/xfer.h> /** A data transfer buffer */ @@ -97,4 +98,8 @@ extern int xferbuf_deliver ( struct xfer_buffer *xferbuf, struct io_buffer *iobuf, struct xfer_metadata *meta ); +extern struct xfer_buffer * xfer_buffer ( struct interface *intf ); +#define xfer_buffer_TYPE( object_type ) \ + typeof ( struct xfer_buffer * ( object_type ) ) + #endif /* _IPXE_XFERBUF_H */ |
