Kea 2.7.5
isc::dhcp::PacketQueueRing4 Class Reference

DHCPv4 packet queue buffer implementation. More...

#include <packet_queue_ring.h>

+ Inheritance diagram for isc::dhcp::PacketQueueRing4:

Public Member Functions

 PacketQueueRing4 (const std::string &queue_type, size_t capacity)
 Constructor.
 
virtual ~PacketQueueRing4 ()
 virtual Destructor
 
- Public Member Functions inherited from isc::dhcp::PacketQueueRing< Pkt4Ptr >
 PacketQueueRing (const std::string &queue_type, size_t capacity)
 Constructor.
 
virtual ~PacketQueueRing ()
 virtual Destructor
 
virtual void clear ()
 Discards all packets currently in the buffer.
 
virtual Pkt4Ptr dequeuePacket ()
 Dequeues the next packet from the queue.
 
virtual int eatPackets (const QueueEnd &)
 Discards packets from one end of the queue.
 
virtual bool empty () const
 Returns True if the queue is empty.
 
virtual void enqueuePacket (Pkt4Ptr packet, const SocketInfo &source)
 Adds a packet to the queue.
 
virtual size_t getCapacity () const
 Returns the maximum number of packets allowed in the buffer.
 
virtual data::ElementPtr getInfo () const
 Fetches pertinent information.
 
virtual size_t getSize () const
 Returns the current number of packets in the buffer.
 
virtual const Pkt4Ptr peek (const QueueEnd &from=QueueEnd::FRONT) const
 Gets the packet currently at one end of the queue.
 
virtual Pkt4Ptr popPacket (const QueueEnd &from=QueueEnd::FRONT)
 Pops a packet from the queue.
 
virtual void pushPacket (Pkt4Ptr &packet, const QueueEnd &to=QueueEnd::BACK)
 Pushes a packet onto the queue.
 
virtual void setCapacity (size_t capacity)
 Sets the maximum number of packets allowed in the buffer.
 
virtual bool shouldDropPacket (Pkt4Ptr, const SocketInfo &)
 Determines if a packet should be discarded.
 
- Public Member Functions inherited from isc::dhcp::PacketQueue< PacketTypePtr >
 PacketQueue (const std::string &queue_type)
 Constructor.
 
virtual ~PacketQueue ()
 Virtual destructor.
 
virtual void enqueuePacket (PacketTypePtr packet, const SocketInfo &source)=0
 Adds a packet to the queue.
 
std::string getInfoStr () const
 Fetches a JSON string representation of queue operational info.
 
std::string getQueueType ()
 

Additional Inherited Members

- Static Public Attributes inherited from isc::dhcp::PacketQueueRing< Pkt4Ptr >
static const size_t MIN_RING_CAPACITY
 Minimum queue capacity permitted.
 

Detailed Description

DHCPv4 packet queue buffer implementation.

This implementation does not (currently) add any drop or packet skip logic, it operates as a verbatim ring queue for DHCPv4 packets.

Definition at line 226 of file packet_queue_ring.h.

Constructor & Destructor Documentation

◆ PacketQueueRing4()

isc::dhcp::PacketQueueRing4::PacketQueueRing4 ( const std::string & queue_type,
size_t capacity )
inline

Constructor.

Parameters
queue_typelogical name of the queue implementation
capacitymaximum number of packets the queue can hold

Definition at line 232 of file packet_queue_ring.h.

◆ ~PacketQueueRing4()

virtual isc::dhcp::PacketQueueRing4::~PacketQueueRing4 ( )
inlinevirtual

virtual Destructor

Definition at line 237 of file packet_queue_ring.h.


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