You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xferbuf.h 583B

12345678910111213141516171819202122232425262728293031
  1. #ifndef _IPXE_XFERBUF_H
  2. #define _IPXE_XFERBUF_H
  3. /** @file
  4. *
  5. * Data transfer buffer
  6. *
  7. */
  8. FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  9. #include <stdint.h>
  10. #include <ipxe/iobuf.h>
  11. #include <ipxe/xfer.h>
  12. /** A data transfer buffer */
  13. struct xfer_buffer {
  14. /** Data */
  15. void *data;
  16. /** Size of data */
  17. size_t len;
  18. /** Current offset within data */
  19. size_t pos;
  20. };
  21. extern void xferbuf_done ( struct xfer_buffer *xferbuf );
  22. extern int xferbuf_deliver ( struct xfer_buffer *xferbuf,
  23. struct io_buffer *iobuf,
  24. struct xfer_metadata *meta );
  25. #endif /* _IPXE_XFERBUF_H */