Click
Loading...
Searching...
No Matches
Public Member Functions | List of all members
FlowBufferContentIter Class Reference

This iterator allows to iterate the content in the buffer seamlessly accross the packets. More...

#include <flowbuffer.hh>

Public Member Functions

 FlowBufferContentIter (FlowBuffer *_flowBuffer, Packet *packet, int posInFirstPacket=0)
 Construct a FlowBufferContentIter.
 
bool operator== (const FlowBufferContentIter &other) const
 Compare two FlowBufferContentIter.
 
bool operator!= (const FlowBufferContentIter &other) const
 Compare two FlowBufferContentIter.
 
unsigned char & operator* ()
 Return the byte to which this iterator points.
 
unsigned char * get_ptr ()
 Return the byte to which this iterator points.
 
FlowBufferContentIter & operator++ ()
 Move the iterator to the next byte in the buffer.
 
FlowBufferContentIter & operator+= (int p)
 Move the iterator to the next N bytes in the buffer.
 
 operator bool () const
 
PacketBatch * flush ()
 
Packet * current ()
 
bool lastChunk ()
 
void moveToNextChunk ()
 
int leftInChunk ()
 
void print_ascii ()
 

Detailed Description

This iterator allows to iterate the content in the buffer seamlessly accross the packets.

Constructor & Destructor Documentation

◆ FlowBufferContentIter()

FlowBufferContentIter::FlowBufferContentIter ( FlowBuffer *  _flowBuffer,
Packet *  packet,
int  posInFirstPacket = 0 
)
inline

Construct a FlowBufferContentIter.

Parameters
_flowBufferThe FlowBuffer to which this iterator is linked
_entryThe entry in the buffer to which this iterator points

Member Function Documentation

◆ operator==()

bool FlowBufferContentIter::operator== ( const FlowBufferContentIter &  other) const
inline

Compare two FlowBufferContentIter.

Parameters
otherThe FlowBufferContentIter to be compared to
Returns
True if the two iterators point to the same data in the flow

◆ operator!=()

bool FlowBufferContentIter::operator!= ( const FlowBufferContentIter &  other) const
inline

Compare two FlowBufferContentIter.

Parameters
otherThe FlowBufferContentIter to be compared to
Returns
False if the two iterators point to the same data in the flow

◆ operator*()

unsigned char & FlowBufferContentIter::operator* ( )
inline

Return the byte to which this iterator points.

Returns
The byte to which this iterator points

◆ get_ptr()

unsigned char * FlowBufferContentIter::get_ptr ( )
inline

Return the byte to which this iterator points.

Returns
The byte to which this iterator points

◆ operator++()

FlowBufferContentIter & FlowBufferContentIter::operator++ ( )
inline

Move the iterator to the next byte in the buffer.

Returns
The iterator moved

◆ operator+=()

FlowBufferContentIter & FlowBufferContentIter::operator+= ( int  p)
inline

Move the iterator to the next N bytes in the buffer.

Returns
The iterator moved

◆ flush()

PacketBatch * FlowBufferContentIter::flush ( )
inline

Return all packets up to the current position, not included


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