iPXE
blocktrans.h
Go to the documentation of this file.
00001 #ifndef _IPXE_BLOCKTRANS_H
00002 #define _IPXE_BLOCKTRANS_H
00003 
00004 /** @file
00005  *
00006  * Block device translator
00007  *
00008  */
00009 
00010 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
00011 
00012 #include <stdint.h>
00013 #include <ipxe/refcnt.h>
00014 #include <ipxe/interface.h>
00015 #include <ipxe/xferbuf.h>
00016 #include <ipxe/uaccess.h>
00017 
00018 /** A block device translator */
00019 struct block_translator {
00020         /** Reference count */
00021         struct refcnt refcnt;
00022         /** Block device interface */
00023         struct interface block;
00024         /** Data transfer interface */
00025         struct interface xfer;
00026 
00027         /** Data transfer buffer */
00028         struct xfer_buffer xferbuf;
00029         /** Data buffer */
00030         userptr_t buffer;
00031         /** Block size */
00032         size_t blksize;
00033 };
00034 
00035 extern int block_translate ( struct interface *block,
00036                              userptr_t buffer, size_t size );
00037 
00038 #endif /* _IPXE_BLOCKTRANS_H */