Buffer used by QueueReadPolicy / QueueWritePolicy. More...
#include <senf/Socket/QueueReadWritePolicy.hh>
Public Types | |
typedef unsigned char * | iterator |
typedef unsigned char const * | const_iterator |
typedef std::size_t | size_type |
Public Member Functions | |
SocketQueueBuffer () | |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
size_type | size () const |
bool | empty () const |
iterator | frameBegin () |
iterator | frameEnd () |
const_iterator | frameBegin () const |
const_iterator | frameEnd () const |
size_type | frameSize () const |
unsigned | dataOffset () const |
senf::ClockService::clock_type | timestamp () const |
return packet receive timestamp More... | |
std::uint32_t const * | timestampPtr () const |
return a pointer to the tp_hdr sec/nsec fieldes More... | |
senf::LLSocketAddress | address () const |
return incoming interface address More... | |
boost::optional< unsigned > | vlan () const |
return the preprocessed VLAN TCI if any More... | |
unsigned | tpid () const |
return the preprocessed VLAN TPID More... | |
void | resize (size_type sz) |
resize active packet data to given size More... | |
Buffer used by QueueReadPolicy / QueueWritePolicy.
This class provides a convenient interface to the frame buffers as utilized by the queue based read and write policy. This class resembles an iterator range with additional access to information found in the buffer header.
The SocketQueueBuffer is a fixed space container which may be resized within the space available. There are several views into that space:
begin()
, end()
, size()
and empty()
provide access to the active frame data frameBegin()
, frameEnd()
and frameSize()
provide access to the maximum space usable for packet data Definition at line 49 of file QueueReadWritePolicy.hh.
typedef unsigned char const* senf::SocketQueueBuffer::const_iterator |
Definition at line 53 of file QueueReadWritePolicy.hh.
typedef unsigned char* senf::SocketQueueBuffer::iterator |
Definition at line 52 of file QueueReadWritePolicy.hh.
typedef std::size_t senf::SocketQueueBuffer::size_type |
Definition at line 54 of file QueueReadWritePolicy.hh.
senf::SocketQueueBuffer::SocketQueueBuffer | ( | ) |
senf::LLSocketAddress senf::SocketQueueBuffer::address | ( | ) | const |
return incoming interface address
iterator senf::SocketQueueBuffer::begin | ( | ) |
const_iterator senf::SocketQueueBuffer::begin | ( | ) | const |
unsigned senf::SocketQueueBuffer::dataOffset | ( | ) | const |
bool senf::SocketQueueBuffer::empty | ( | ) | const |
iterator senf::SocketQueueBuffer::end | ( | ) |
const_iterator senf::SocketQueueBuffer::end | ( | ) | const |
iterator senf::SocketQueueBuffer::frameBegin | ( | ) |
const_iterator senf::SocketQueueBuffer::frameBegin | ( | ) | const |
iterator senf::SocketQueueBuffer::frameEnd | ( | ) |
const_iterator senf::SocketQueueBuffer::frameEnd | ( | ) | const |
size_type senf::SocketQueueBuffer::frameSize | ( | ) | const |
void senf::SocketQueueBuffer::resize | ( | size_type | sz | ) |
resize active packet data to given size
size_type senf::SocketQueueBuffer::size | ( | ) | const |
senf::ClockService::clock_type senf::SocketQueueBuffer::timestamp | ( | ) | const |
return packet receive timestamp
std::uint32_t const* senf::SocketQueueBuffer::timestampPtr | ( | ) | const |
return a pointer to the tp_hdr sec/nsec fieldes
unsigned senf::SocketQueueBuffer::tpid | ( | ) | const |
return the preprocessed VLAN TPID
boost::optional<unsigned> senf::SocketQueueBuffer::vlan | ( | ) | const |
return the preprocessed VLAN TCI if any