iPXE
blocktrans.h
Go to the documentation of this file.
1 #ifndef _IPXE_BLOCKTRANS_H
2 #define _IPXE_BLOCKTRANS_H
3 
4 /** @file
5  *
6  * Block device translator
7  *
8  */
9 
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11 
12 #include <stdint.h>
13 #include <ipxe/refcnt.h>
14 #include <ipxe/interface.h>
15 #include <ipxe/xferbuf.h>
16 #include <ipxe/uaccess.h>
17 
18 /** A block device translator */
20  /** Reference count */
21  struct refcnt refcnt;
22  /** Block device interface */
23  struct interface block;
24  /** Data transfer interface */
25  struct interface xfer;
26 
27  /** Data transfer buffer */
29  /** Data buffer */
31  /** Block size */
32  size_t blksize;
33 };
34 
35 extern int block_translate ( struct interface *block,
36  userptr_t buffer, size_t size );
37 
38 #endif /* _IPXE_BLOCKTRANS_H */
A data transfer buffer.
Definition: xferbuf.h:19
uint16_t block
Definition: tftp.h:12
int block_translate(struct interface *block, userptr_t buffer, size_t size)
Insert block device translator.
Definition: blocktrans.c:223
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
Definition: netvsc.h:16
Access to external ("user") memory.
A reference counter.
Definition: refcnt.h:26
An object interface.
Definition: interface.h:109
A block device translator.
Definition: blocktrans.h:19
Object interfaces.
struct interface xfer
Data transfer interface.
Definition: blocktrans.h:25
Reference counting.
uint8_t size
Entry size (in 32-bit words)
Definition: ena.h:16
struct xfer_buffer xferbuf
Data transfer buffer.
Definition: blocktrans.h:28
size_t blksize
Block size.
Definition: blocktrans.h:32
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
userptr_t buffer
Data buffer.
Definition: blocktrans.h:30
Data transfer buffer.
unsigned long userptr_t
A pointer to a user buffer.
Definition: uaccess.h:33
struct interface block
Block device interface.
Definition: blocktrans.h:23