From 07b0d4fa30d021322efa8a423295a0677325ec8d Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Mon, 20 Jul 2015 12:15:21 +0100 Subject: [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 --- src/include/ipxe/xferbuf.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/include') 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 #include #include +#include #include /** 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 */ -- cgit v1.2.3-55-g7522