LQLElement

LQLElement — LQLElement is a base class for the LQLQDisc and LQLClass.

Synopsis




struct      LQLElement;
LQLElement* lql_element_new                 (void);
guint32     lql_element_get_kernelHandle    (LQLElement *self);
gboolean    lql_element_set_kernelHandle    (LQLElement *self,
                                             guint32 kernelHandle);
gboolean    lql_element_set_interface       (LQLElement *self,
                                             LQLInterface *interface);
int         lql_element_get_ifIndex         (LQLElement *self);
gboolean    lql_element_set_ifIndex         (LQLElement *self,
                                             int ifIndex);
gboolean    lql_element_set_parentHandle    (LQLElement *self,
                                             guint32 parentHandle);
guint32     lql_element_get_parentHandle    (LQLElement *self);
gboolean    lql_element_fill_from_nlhdr     (LQLElement *self,
                                             const struct nlmsghdr *hdr);

Object Hierarchy


  GObject
   +----LQLElement
         +----LQLQDisc
         +----LQLClass

Properties


  "interface-index"      gint                 : Read / Write
  "kernel-handle"        guint                : Read / Write
  "parent-handle"        guint                : Read / Write

Description

LQLElement is the base class for LQLQDisc and LQLClass. It contains the basic fields necessary to identify the network element to the kernel.

Details

struct LQLElement

struct LQLElement;

This should not be accessed directly.


lql_element_new ()

LQLElement* lql_element_new                 (void);

Build a new instance of LQLElement.

Returns : A new LQLElement instance.

lql_element_get_kernelHandle ()

guint32     lql_element_get_kernelHandle    (LQLElement *self);

Get the handle of this object.

self : The LQLElement instance.
Returns : The element HANDLE.

lql_element_set_kernelHandle ()

gboolean    lql_element_set_kernelHandle    (LQLElement *self,
                                             guint32 kernelHandle);

Set the handle field of this object.

self : The LQLElement instance.
kernelHandle : The value to set the handle instance variable to.
Returns : TRUE on success, FALSE on error.

lql_element_set_interface ()

gboolean    lql_element_set_interface       (LQLElement *self,
                                             LQLInterface *interface);

Set the interface that this LQLElement is attached to.

self : The LQLElement instance.
interface : An LQLInterface instance.
Returns : TRUE on success, FALSE on failure.

lql_element_get_ifIndex ()

int         lql_element_get_ifIndex         (LQLElement *self);

Get the interface index this LQLElement is attached to.

self : The LQLElement instance.
Returns : The element index, -1 on error.

lql_element_set_ifIndex ()

gboolean    lql_element_set_ifIndex         (LQLElement *self,
                                             int ifIndex);

Set the network interface index that this Element is attached to. Most of the time you will want to use lql_element_set_interface() instead of the _ifIndex() functions.

self : The LQLElement instance.
ifIndex : The index of a network interface.
Returns : TRUE on success, FALSE on error.

lql_element_set_parentHandle ()

gboolean    lql_element_set_parentHandle    (LQLElement *self,
                                             guint32 parentHandle);

Set the parentHandle field of this object.

self : The LQLElement instance.
parentHandle : The index to set the parentHandle instance variable to.
Returns : TRUE on success, FALSE on error.

lql_element_get_parentHandle ()

guint32     lql_element_get_parentHandle    (LQLElement *self);

Get the parentHandle of this Element.

self : The LQLElement instance.
Returns : The element parentHandle, -1 on error.

lql_element_fill_from_nlhdr ()

gboolean    lql_element_fill_from_nlhdr     (LQLElement *self,
                                             const struct nlmsghdr *hdr);

This function is used by the implementations of sub-classes to fill out the LQLElement specific fields from the data returned by the kernel. There is no reason for a normal application to use this function.

self : The LQLElment instance.
hdr : The nlmsghdr from the kernel.
Returns : TRUE on success, FALSE on failure.

Properties

"interface-index" (gint : Read / Write)

Set/Get the network interface index that this element is attached to.

"kernel-handle" (guint : Read / Write)

Set/Get the 32bit unsigned integer that identifies this element to the kernel.

"parent-handle" (guint : Read / Write)

Set/Get the 32bit unsigned integer that identifies this elements parent element.