class BufferData
Defined at line 248 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.h
A collection of `BufferRegion`s and metadata associated with a `Buffer`.
Public Methods
bool is_loaded ()
Returns true if this `BufferData` contains at least 1 `BufferRegion`.
Defined at line 251 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.h
uint32_t parts ()
The number of `BufferRegion`s in this `BufferData`.
Defined at line 253 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.h
BufferData & operator= (BufferData && )
Move assignment deleted to abide by `Buffer` destruction semantics.
See `Buffer` for more details.
Defined at line 288 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.h
BufferRegion & part (size_t idx)
Retrieves a `BufferRegion` part from this `BufferData`.
Crashes if `idx >= parts()`.
Defined at line 975 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
const BufferRegion & part (size_t idx)
Defined at line 980 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
uint32_t len ()
The total length, in bytes, of the buffer.
Defined at line 985 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
netdev::wire::PortId port_id ()
Defined at line 1001 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
netdev::wire::FrameType frame_type ()
Defined at line 993 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
netdev::wire::InfoType info_type ()
Defined at line 1017 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
uint32_t inbound_flags ()
Defined at line 1021 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
uint32_t return_flags ()
Defined at line 1025 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
void SetPortId (netdev::wire::PortId port_id)
Defined at line 1009 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
void SetFrameType (netdev::wire::FrameType type)
Defined at line 997 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
void SetTxRequest (netdev::wire::TxFlags tx_flags)
Defined at line 1029 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
size_t Write (const void * src, size_t len)
Writes up to `len` bytes from `src` into the buffer, returning the number of bytes written.
Defined at line 1033 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
size_t Read (void * dst, size_t len)
Reads up to `len` bytes from the buffer into `dst`, returning the number of bytes read.
Defined at line 1086 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
size_t Write (const BufferData & data)
Writes the contents of `data` into this buffer, returning the number of bytes written.
Defined at line 1046 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
zx_status_t PadTo (size_t size)
Zero pads buffer to total size `size`.
Returns `ZX_ERR_BUFFER_TOO_SMALL` if buffer doesn't have enough available space to be padded
to size. No-op and returns `ZX_OK` if `len()` is at least `size`.
Defined at line 1075 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
Protected Methods
void BufferData ()
Defined at line 292 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.h
void BufferData (BufferData && other)
Defined at line 293 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.h
void Load (NetworkDeviceClient * parent, uint16_t idx)
Loads buffer information from `parent` using the descriptor `idx`.
Defined at line 960 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
Friends
class Buffer