LQLQDisc

LQLQDisc — LQLQDisc is the base class for all other QDiscs.

Synopsis




struct      LQLQDisc;
LQLQDisc*   lql_qdisc_new                   (void);
gboolean    lql_qdisc_add                   (LQLQDisc *self,
                                             LQLCon *con);
gboolean    lql_qdisc_modify                (LQLQDisc *self,
                                             LQLCon *con);
gboolean    lql_qdisc_delete                (LQLQDisc *self,
                                             LQLCon *con);
gboolean    lql_qdisc_updateStats           (LQLQDisc *self,
                                             LQLCon *con);
void        lql_qdisc_print                 (LQLQDisc *self);
void        lql_qdisc_printStats            (LQLQDisc *self);
gboolean    lql_qdisc_fill_from_nlhdr       (LQLQDisc *self,
                                             const struct nlmsghdr *hdr);
guint16     lql_qdisc_get_id                (LQLQDisc *self);
gboolean    lql_qdisc_set_id                (LQLQDisc *self,
                                             guint16 id);
gboolean    lql_qdisc_set_parent            (LQLQDisc *self,
                                             LQLElement *parent);
gboolean    lql_qdisc_set_parent_class_id   (LQLQDisc *self,
                                             guint16 klass);
guint32     lql_qdisc_get_pps               (LQLQDisc *self);
guint32     lql_qdisc_get_bps               (LQLQDisc *self);
guint32     lql_qdisc_get_overlimits        (LQLQDisc *self);
guint32     lql_qdisc_get_packets           (LQLQDisc *self);
guint64     lql_qdisc_get_bytes             (LQLQDisc *self);
guint32     lql_qdisc_get_drops             (LQLQDisc *self);
guint32     lql_qdisc_get_backlog           (LQLQDisc *self);
guint32     lql_qdisc_get_queueLength       (LQLQDisc *self);

Object Hierarchy


  GObject
   +----LQLElement
         +----LQLQDisc
               +----LQLQDiscHTB
               +----LQLQDiscSFQ
               +----LQLQDiscPFIFO
               +----LQLQDiscPFIFOFast
               +----LQLQDiscPriomap
               +----LQLQDiscDSMark
               +----LQLQDiscNetem

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
  "queue-length"         guint                : Read

Description

LQLQDisc is the base class for all other QDiscs.

Details

struct LQLQDisc

struct LQLQDisc;

This should not be accessed directly.


lql_qdisc_new ()

LQLQDisc*   lql_qdisc_new                   (void);

Build a new instance of LQLQDisc.

Returns : A new LQLQDisc instance.

lql_qdisc_add ()

gboolean    lql_qdisc_add                   (LQLQDisc *self,
                                             LQLCon *con);

Add this queueing discipline to the system.

self : The LQLQDisc 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_qdisc_modify ()

gboolean    lql_qdisc_modify                (LQLQDisc *self,
                                             LQLCon *con);

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

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

lql_qdisc_delete ()

gboolean    lql_qdisc_delete                (LQLQDisc *self,
                                             LQLCon *con);

Delete this queueing discipline from the system.

self : The LQLQDisc 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_qdisc_updateStats ()

gboolean    lql_qdisc_updateStats           (LQLQDisc *self,
                                             LQLCon *con);

Update the statistics for this QDisc. This involves querying the information from the kernel.

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

lql_qdisc_print ()

void        lql_qdisc_print                 (LQLQDisc *self);

Print out some information on this QDisc.

self : The LQLQDisc instance.

lql_qdisc_printStats ()

void        lql_qdisc_printStats            (LQLQDisc *self);

Print out the statistics information for this QDisc.

self : The LQLQDisc instance.

lql_qdisc_fill_from_nlhdr ()

gboolean    lql_qdisc_fill_from_nlhdr       (LQLQDisc *self,
                                             const struct nlmsghdr *hdr);

Fill in the instance variables for this instance of LQLQDisc to match the network qdisc information in hdr. This function is used by the LQLCon functions that get the list of QDiscs that are currently configured on the system.

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

lql_qdisc_get_id ()

guint16     lql_qdisc_get_id                (LQLQDisc *self);

Get the ID number of this QDisc. In relation to TC this number is the part of the QDisc identifier before the colon.

self : The LQLQDisc instance.
Returns : The ID number of this QDisc.

lql_qdisc_set_id ()

gboolean    lql_qdisc_set_id                (LQLQDisc *self,
                                             guint16 id);

Set the ID number for this qdisc. In relation to TC this number is the part of the QDisc identifier before the colon.

self : The LQLQDisc instance.
id : The ID of this LQLQDisc.
Returns : TRUE on success, FALSE on error.

lql_qdisc_set_parent ()

gboolean    lql_qdisc_set_parent            (LQLQDisc *self,
                                             LQLElement *parent);

Sets the parent of this LQLQDisc to be the passed LQLElement.

self : The LQLQDisc instance.
parent : The LQLElement that is the parent of this LQLQDisc.
Returns : TRUE on success, FALSE on failure.

lql_qdisc_set_parent_class_id ()

gboolean    lql_qdisc_set_parent_class_id   (LQLQDisc *self,
                                             guint16 klass);

Set the class portion of the parent handle. This method is only useful in situations where the underlying QDisc automatically creates classes that you probably don't have a LQLClass instance for. Priomap in particular does this.

self : The LQLQdisc instance.
klass : The class handle.
Returns : TRUE on success, FALSE on error.

lql_qdisc_get_pps ()

guint32     lql_qdisc_get_pps               (LQLQDisc *self);

Get the current packets per second rate for this QDisc.

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

lql_qdisc_get_bps ()

guint32     lql_qdisc_get_bps               (LQLQDisc *self);

Get the current bytes per second rate for this QDisc.

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

lql_qdisc_get_overlimits ()

guint32     lql_qdisc_get_overlimits        (LQLQDisc *self);

Get the number of over limits packets.

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

lql_qdisc_get_packets ()

guint32     lql_qdisc_get_packets           (LQLQDisc *self);

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

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

lql_qdisc_get_bytes ()

guint64     lql_qdisc_get_bytes             (LQLQDisc *self);

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

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

lql_qdisc_get_drops ()

guint32     lql_qdisc_get_drops             (LQLQDisc *self);

Get the number of packets dropped by this QDisc.

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

lql_qdisc_get_backlog ()

guint32     lql_qdisc_get_backlog           (LQLQDisc *self);

Get the current number of backlog packets.

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

lql_qdisc_get_queueLength ()

guint32     lql_qdisc_get_queueLength       (LQLQDisc *self);

Get the current queue length for this QDisc.

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

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 of this QDisc.

"overlimits" (guint : Read)

Get the count of how many packets were overlimits.

"pps" (guint : Read)

Get the rate in packets per second.

"queue-length" (guint : Read)

Get the length of the packet queue.