[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>
This commit is contained in:
Michael Brown
2015-07-20 12:15:21 +01:00
parent cbbd6b761e
commit 07b0d4fa30
2 changed files with 44 additions and 0 deletions

View File

@@ -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 */