class BufferData
Defined at line 246 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 249 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 251 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 286 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 972 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
const BufferRegion & part (size_t idx)
Defined at line 977 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 982 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
netdev::wire::PortId port_id ()
Defined at line 998 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
netdev::wire::FrameType frame_type ()
Defined at line 990 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
netdev::wire::InfoType info_type ()
Defined at line 1014 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
uint32_t inbound_flags ()
Defined at line 1018 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
uint32_t return_flags ()
Defined at line 1022 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
void SetPortId (netdev::wire::PortId port_id)
Defined at line 1006 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
void SetFrameType (netdev::wire::FrameType type)
Defined at line 994 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
void SetTxRequest (netdev::wire::TxFlags tx_flags)
Defined at line 1026 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 1030 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 1083 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 1043 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 1072 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
Protected Methods
void BufferData ()
Defined at line 290 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.h
void BufferData (BufferData && other)
Defined at line 291 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 957 of file ../../src/connectivity/lib/network-device/cpp/network_device_client.cc
Friends
class Buffer