LQL Reference Manual |
---|
LQLElement — LQLElement is a base class for the LQLQDisc and LQLClass.
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);
"interface-index" gint : Read / Write "kernel-handle" guint : Read / Write "parent-handle" guint : Read / Write
LQLElement is the base class for LQLQDisc and LQLClass. It contains the basic fields necessary to identify the network element to the kernel.
LQLElement* lql_element_new (void);
Build a new instance of LQLElement.
Returns : | A new LQLElement instance. |
guint32 lql_element_get_kernelHandle (LQLElement *self);
Get the handle of this object.
self : | The LQLElement instance. |
Returns : | The element HANDLE. |
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. |
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. |
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. |
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. |
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. |
guint32 lql_element_get_parentHandle (LQLElement *self);
Get the parentHandle of this Element.
self : | The LQLElement instance. |
Returns : | The element parentHandle, -1 on error. |
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. |
<< LQLInterface | LQLQDisc >> |