LQLClass

LQLClass — LQLClass is the base class for all QoS classes.

Synopsis




struct      LQLClass;
LQLClass*   lql_class_new                   (void);
gboolean    lql_class_add                   (LQLClass *self,
                                             LQLCon *con);
gboolean    lql_class_modify                (LQLClass *self,
                                             LQLCon *con);
gboolean    lql_class_delete                (LQLClass *self,
                                             LQLCon *con);
void        lql_class_print                 (LQLClass *self);
gboolean    lql_class_updateStats           (LQLClass *self,
                                             LQLCon *con);
void        lql_class_printStats            (LQLClass *self);
guint16     lql_class_get_id                (LQLClass *self);
gboolean    lql_class_set_id                (LQLClass *self,
                                             guint16 id);
gboolean    lql_class_set_parent            (LQLClass *self,
                                             LQLElement *element);
unsigned int lql_class_get_priority         (LQLClass *self);
gboolean    lql_class_set_priority          (LQLClass *self,
                                             unsigned int priority);
gboolean    lql_class_fill_from_nlhdr       (LQLClass *self,
                                             const struct nlmsghdr *hdr);
guint32     lql_class_get_queueLength       (LQLClass *self);
guint32     lql_class_get_backlog           (LQLClass *self);
guint32     lql_class_get_pps               (LQLClass *self);
guint64     lql_class_get_bytes             (LQLClass *self);
guint32     lql_class_get_packets           (LQLClass *self);
guint32     lql_class_get_overlimits        (LQLClass *self);
guint32     lql_class_get_bps               (LQLClass *self);
guint32     lql_class_get_drops             (LQLClass *self);

Object Hierarchy


  GObject
   +----LQLElement
         +----LQLClass
               +----LQLClassHTB
               +----LQLClassPriomap
               +----LQLClassDSMark
               +----LQLClassNetem

Properties


  "backlog"              guint                : Read
  "bps"                  guint                : Read
  "dropped-packets"      guint                : Read
  "enqueued-bytes"       gint64               : Read
  "enqueued-packets"     guint                : Read
  "id"                   guint                : Read / Write
  "overlimits"           guint                : Read
  "pps"                  guint                : Read
  "priority"             guint                : Read / Write
  "queue-length"         guint                : Read

Description

LQLClass is the base class for all QoS classes. You will almost certainly never have any reason to instantiate a LQLClass instance. Always use one of the subclasses.

Details

struct LQLClass

struct LQLClass;

This should not be accessed directly.


lql_class_new ()

LQLClass*   lql_class_new                   (void);

Build a new instance of LQLClass.

Returns : A new LQLClass instance.

lql_class_add ()

gboolean    lql_class_add                   (LQLClass *self,
                                             LQLCon *con);

Add this queueing discipline to the system.

self : The LQLClass object to add to the system.
con : The LQLCon connection to use when adding this queueing discipline.
Returns : TRUE on success, FALSE on failure.

lql_class_modify ()

gboolean    lql_class_modify                (LQLClass *self,
                                             LQLCon *con);

Modify the queueing discipline in the system to match the current object state.

self : The LQLClass object to modify.
con : The LQLCon connection to use when adding this class.
Returns : TRUE on success, FALSE on failure.

lql_class_delete ()

gboolean    lql_class_delete                (LQLClass *self,
                                             LQLCon *con);

Delete this queueing discipline from the system.

self : The LQLClass object to delete from the system.
con : The LQLCon connection to use when deleting this queueing discipline.
Returns : TRUE on success, FALSE on failure.

lql_class_print ()

void        lql_class_print                 (LQLClass *self);

Print out the parameters for this class. Each sub-class overrides this method to print out class specific details.

self : The LQLClass instance.

lql_class_updateStats ()

gboolean    lql_class_updateStats           (LQLClass *self,
                                             LQLCon *con);

This method is used to communicate with the kernel to get updated statistics information for this class.

self : The LQLClass instance.
con : The LQLCon instance.
Returns : TRUE on success, FALSE on failure.

lql_class_printStats ()

void        lql_class_printStats            (LQLClass *self);

Print out the statistics information for this class. Each sub-class of LQLClass overrides this method to print out class specific details.

self : The LQLClass instance.

lql_class_get_id ()

guint16     lql_class_get_id                (LQLClass *self);

Get the ID of this class. In relation to the TC command line options this is the part of the class identifier after the colon.

self : The LQLClass instance.
Returns : The ID of the class

lql_class_set_id ()

gboolean    lql_class_set_id                (LQLClass *self,
                                             guint16 id);

Set the ID of this class. In relation to the TC command line options this is the part of the class identifier after the colon.

self : The LQLClass instance.
id : The ID value.
Returns : TRUE on success, FALSE on failure.

lql_class_set_parent ()

gboolean    lql_class_set_parent            (LQLClass *self,
                                             LQLElement *element);

Set the parent of this LQLClass to be the passed LQLElement.

self : The LQLClass instance.
element : The LQLElement to set as the parent.
Returns : TRUE on success, FALSE on error.

lql_class_get_priority ()

unsigned int lql_class_get_priority         (LQLClass *self);

Get the priority value for this class.

self : The LQLClass instance.
Returns : The priority value of this class.

lql_class_set_priority ()

gboolean    lql_class_set_priority          (LQLClass *self,
                                             unsigned int priority);

Set the priority value of this class.

self : The LQLClass instance.
priority : The priority value to set.
Returns : TRUE on success, FALSE on error.

lql_class_fill_from_nlhdr ()

gboolean    lql_class_fill_from_nlhdr       (LQLClass *self,
                                             const struct nlmsghdr *hdr);

Fill in the instance variables for this instance of LQLClass to match the network class information in hdr.

self : The LQLClass object to work with.
hdr : The class information from the kernel.
Returns : TRUE on success, FALSE on failure.

lql_class_get_queueLength ()

guint32     lql_class_get_queueLength       (LQLClass *self);

Get the current queue length for this Class.

self : The LQLClass instance.
Returns : The current queue length.

lql_class_get_backlog ()

guint32     lql_class_get_backlog           (LQLClass *self);

Get the current number of backlog packets.

self : The LQLClass instance.
Returns : The number of backlog packets.

lql_class_get_pps ()

guint32     lql_class_get_pps               (LQLClass *self);

Get the current packets per second rate for this Class.

self : The LQLClass instance.
Returns : The current PPS.

lql_class_get_bytes ()

guint64     lql_class_get_bytes             (LQLClass *self);

Get the number of bytes that have been passed by this Class.

self : The LQLClass instance.
Returns : The number of bytes.

lql_class_get_packets ()

guint32     lql_class_get_packets           (LQLClass *self);

Get the number of packets that have been passed by this Class.

self : The LQLClass instance.
Returns : The number of packets.

lql_class_get_overlimits ()

guint32     lql_class_get_overlimits        (LQLClass *self);

Get the number of over limits packets.

self : The LQLClass instance.
Returns : The number of over limits packets.

lql_class_get_bps ()

guint32     lql_class_get_bps               (LQLClass *self);

Get the current bytes per second rate for this Class.

self : The LQLClass instance.
Returns : The current BPS.

lql_class_get_drops ()

guint32     lql_class_get_drops             (LQLClass *self);

Get the number of packets dropped by this Class.

self : The LQLClass instance.
Returns : The number of drops.

Properties

"backlog" (guint : Read)

Get the number of backlog packets.

"bps" (guint : Read)

Get the rate in bytes per second.

"dropped-packets" (guint : Read)

Get the count of how many packets have been dropped.

"enqueued-bytes" (gint64 : Read)

Get the cound of how many bytes have been enqueued.

"enqueued-packets" (guint : Read)

Get the count of how many packets have been enqueued.

"id" (guint : Read / Write)

Set/Get the ID number of this class.

"overlimits" (guint : Read)

Get the count of how many packets were overlimits.

"pps" (guint : Read)

Get the rate in packets per second.

"priority" (guint : Read / Write)

Set/Get the priority for this class.

"queue-length" (guint : Read)

Get the length of the packet queue.