iPXE
Data Fields
xfer_buffer_operations Struct Reference

Data transfer buffer operations. More...

#include <xferbuf.h>

Data Fields

int(* realloc )(struct xfer_buffer *xferbuf, size_t len)
 Reallocate data buffer.
void(* write )(struct xfer_buffer *xferbuf, size_t offset, const void *data, size_t len)
 Write data to buffer.
void(* read )(struct xfer_buffer *xferbuf, size_t offset, void *data, size_t len)
 Read data from buffer.

Detailed Description

Data transfer buffer operations.

Definition at line 31 of file xferbuf.h.


Field Documentation

Reallocate data buffer.

Parameters:
xferbufData transfer buffer
lenNew length (or zero to free buffer)
Return values:
rcReturn status code

Definition at line 38 of file xferbuf.h.

Referenced by xferbuf_ensure_size(), and xferbuf_free().

void( * xfer_buffer_operations::write)(struct xfer_buffer *xferbuf, size_t offset, const void *data, size_t len)

Write data to buffer.

Parameters:
xferbufData transfer buffer
offsetStarting offset
dataData to write
lenLength of data

This call is simply a wrapper for the appropriate memcpy()-like operation: the caller is responsible for ensuring that the write does not exceed the buffer length.

Definition at line 50 of file xferbuf.h.

Referenced by xferbuf_write().

void( * xfer_buffer_operations::read)(struct xfer_buffer *xferbuf, size_t offset, void *data, size_t len)

Read data from buffer.

Parameters:
xferbufData transfer buffer
offsetStarting offset
dataData to read
lenLength of data

This call is simply a wrapper for the appropriate memcpy()-like operation: the caller is responsible for ensuring that the read does not exceed the buffer length.

Definition at line 63 of file xferbuf.h.

Referenced by xferbuf_read().


The documentation for this struct was generated from the following file: