senf::SocketQueueBuffer Class Reference

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...
 

Detailed Description

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:

Definition at line 49 of file QueueReadWritePolicy.hh.

Member Typedef Documentation

◆ const_iterator

typedef unsigned char const* senf::SocketQueueBuffer::const_iterator

Definition at line 53 of file QueueReadWritePolicy.hh.

◆ iterator

typedef unsigned char* senf::SocketQueueBuffer::iterator

Definition at line 52 of file QueueReadWritePolicy.hh.

◆ size_type

Definition at line 54 of file QueueReadWritePolicy.hh.

Constructor & Destructor Documentation

◆ SocketQueueBuffer()

senf::SocketQueueBuffer::SocketQueueBuffer ( )

Member Function Documentation

◆ address()

senf::LLSocketAddress senf::SocketQueueBuffer::address ( ) const

return incoming interface address

◆ begin() [1/2]

iterator senf::SocketQueueBuffer::begin ( )

◆ begin() [2/2]

const_iterator senf::SocketQueueBuffer::begin ( ) const

◆ dataOffset()

unsigned senf::SocketQueueBuffer::dataOffset ( ) const

◆ empty()

bool senf::SocketQueueBuffer::empty ( ) const

◆ end() [1/2]

iterator senf::SocketQueueBuffer::end ( )

◆ end() [2/2]

const_iterator senf::SocketQueueBuffer::end ( ) const

◆ frameBegin() [1/2]

iterator senf::SocketQueueBuffer::frameBegin ( )

◆ frameBegin() [2/2]

const_iterator senf::SocketQueueBuffer::frameBegin ( ) const

◆ frameEnd() [1/2]

iterator senf::SocketQueueBuffer::frameEnd ( )

◆ frameEnd() [2/2]

const_iterator senf::SocketQueueBuffer::frameEnd ( ) const

◆ frameSize()

size_type senf::SocketQueueBuffer::frameSize ( ) const

◆ resize()

void senf::SocketQueueBuffer::resize ( size_type  sz)

resize active packet data to given size

◆ size()

size_type senf::SocketQueueBuffer::size ( ) const

◆ timestamp()

senf::ClockService::clock_type senf::SocketQueueBuffer::timestamp ( ) const

return packet receive timestamp

◆ timestampPtr()

std::uint32_t const* senf::SocketQueueBuffer::timestampPtr ( ) const

return a pointer to the tp_hdr sec/nsec fieldes

◆ tpid()

unsigned senf::SocketQueueBuffer::tpid ( ) const

return the preprocessed VLAN TPID

◆ vlan()

boost::optional<unsigned> senf::SocketQueueBuffer::vlan ( ) const

return the preprocessed VLAN TCI if any


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