diff options
author | Michael Brown <mcb30@ipxe.org> | 2015-07-20 12:15:21 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2015-07-22 21:17:47 +0100 |
commit | 07b0d4fa30d021322efa8a423295a0677325ec8d (patch) | |
tree | 92ae1c8e37930a89835b77c488067b91bb0c52e2 /src/include/ipxe | |
parent | cbbd6b761ed315ab6df82f1434657ef76bb3e676 (diff) | |
download | ipxe-07b0d4fa30d021322efa8a423295a0677325ec8d.tar.gz |
[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/ipxe')
-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 */ |