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

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: