Loading...
Searching...
No Matches
Net_transfer Class Referenceabstract
Virtio Net Switch

A network request to only a single destination. More...

`#include <request.h>`

Collaboration diagram for Net_transfer:

## Public Member Functions

void const * | req_id () const
| Identifier for the underlying Net_request, used for logging purposes.
virtual void | copy_header (Virtio_net::Hdr *dst_header) const =0
| Populate the virtio-net header for the destination.
Buffer & | cur_buf ()
| Buffer containing (a part of) the packet data.
virtual bool | done ()=0
| Check whether the transfer has been completed, i.e.

## Detailed Description

A network request to only a single destination.

A Net_request can have multiple destinations (being a broadcast request, for example). That is why it is processed by multiple Net_transfers, each representing the delivery to a single destination port.

Port_iface::handle_request uses the Net_transfer to move one packet to the destination of the request.

Definition at line 33 of file request.h.

## Member Function Documentation

## cur_buf()

Buffer & Net_transfer::cur_buf | ( |  | ) |

inline

Buffer containing (a part of) the packet data.

Once emptied, a call to done() might replenish the buffer, in case the net request consisted of multiple chained buffers.

Definition at line 54 of file request.h.

## done()

virtual bool Net_transfer::done | ( |  | ) |

pure virtual

Check whether the transfer has been completed, i.e.

the entire packet data has been copied.

Return values

  false | There is remaining packet data that needs to be copied.
  true | The entire packet data has been copied.

Exceptions

  L4virtio::Svr::Bad_descriptor | Exception raised in SRC port queue.

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

- pkg/virtio-net-switch/server/switch/request.h