![]() |
L4Re Operating System Framework
Interface and Usage Documentation
|
Abstraction for a network request. More...
#include <request.h>
Public Member Functions | |
const uint8_t * | buffer (size_t *size) const |
Get the location and size of the current buffer. | |
Mac_addr | dst_mac () const |
Get the Mac address of the destination port. | |
Mac_addr | src_mac () const |
Get the Mac address of the source port. | |
Static Public Member Functions | |
static void | drop_requests (Virtio_net *dev, L4virtio::Svr::Virtqueue *queue) |
Drop all requests of a specific queue. | |
static std::optional< Virtio_net_request > | get_request (Virtio_net *dev, L4virtio::Svr::Virtqueue *queue) |
Construct a request from the next entry of a provided queue. | |
Abstraction for a network request.
A Virtio_net_request
is constructed by the source port, using the static function get_request()
as part of Virtio_port::get_tx_request()
.
On destruction, finish()
will be called, which, will trigger the client IRQ of the source client.
|
inline |
Get the location and size of the current buffer.
[out] | size | Size of the current buffer. |
This function returns the address and size of the currently active buffer for this request. The buffer might only be a part of the request, which may consist of more than one buffer.
Definition at line 90 of file request.h.
References L4virtio::Svr::Data_buffer::left, and L4virtio::Svr::Data_buffer::pos.
|
inlinestatic |
Drop all requests of a specific queue.
This function is used for example to drop all requests in the transmission queue of a monitor port, since monitor ports are not allowed to transmit data.
dev | Port of the provided virtqueue. |
queue | Virtqueue to drop all requests of. |
Definition at line 222 of file request.h.
References L4virtio::Svr::Virtqueue::desc_avail(), L4virtio::Svr::Virtqueue::finish(), L4_UNLIKELY, L4virtio::Svr::Device_t< DATA >::mem_info(), L4virtio::Svr::Virtqueue::next_avail(), L4virtio::Virtqueue::ready(), and L4virtio::Svr::Request_processor::start().
Referenced by Virtio_port::drop_requests().
|
inlinestatic |
Construct a request from the next entry of a provided queue.
dev | Port of the provided virtqueue. |
queue | Virtqueue to extract next entry from. |
Definition at line 249 of file request.h.
References L4_UNLIKELY, L4virtio::Svr::Virtqueue::next_avail(), and L4virtio::Virtqueue::ready().
Referenced by Virtio_port::get_tx_request().