LQL Reference Manual |
---|
LQLInterface — LQLInterface represents a network interface.
struct LQLInterface; LQLInterface* lql_interface_new (void); int lql_interface_get_ifIndex (LQLInterface *self); gboolean lql_interface_set_ifIndex (LQLInterface *self, int ifIndex); int lql_interface_get_mtu (LQLInterface *self); gboolean lql_interface_set_mtu (LQLInterface *self, int mtu); gchar* lql_interface_get_name (LQLInterface *self); gboolean lql_interface_set_name (LQLInterface *self, const gchar *name); gboolean lql_interface_fill_from_nlhdr (LQLInterface *self, const struct nlmsghdr *hdr);
LQLInterface models a network interface on the system. Currently, LQLInterface is not capable of changes to the actual interface settings. It only represents them to the rest of the LQL code.
LQLInterface* lql_interface_new (void);
Build a new instance of LQLInterface.
Returns : | A new LQLInterface instance. |
int lql_interface_get_ifIndex (LQLInterface *self);
Get the index of the interface that this LQLInterface represents.
self : | The LQLInterface object to work with. |
Returns : | The interface index, -1 on error. |
gboolean lql_interface_set_ifIndex (LQLInterface *self, int ifIndex);
Set the ifIndex field of this object.
self : | The LQLInterface object to work with. |
ifIndex : | The index to set the ifIndex instance variable to. |
Returns : | TRUE on success, FALSE on error. |
int lql_interface_get_mtu (LQLInterface *self);
Get the MTU.
self : | The LQLInterface object to work with. |
Returns : | The value of the MTU instance variable, -1 on error. |
gboolean lql_interface_set_mtu (LQLInterface *self, int mtu);
Set the MTU instance variable.
self : | The LQLInterface object to work with. |
mtu : | The value to set the MTU field to. |
Returns : | TRUE on success, FALSE on error. |
gchar* lql_interface_get_name (LQLInterface *self);
Get the name of the interface.
self : | The LQLInterface object to work with. |
Returns : | The name of this interface, NULL on error. |
gboolean lql_interface_set_name (LQLInterface *self, const gchar *name);
Set the name instance variable.
self : | The LQLInterface object to work with. |
name : | A pointer to the string to set the name to. |
Returns : | TRUE on success, FALSE on error. |
gboolean lql_interface_fill_from_nlhdr (LQLInterface *self, const struct nlmsghdr *hdr);
Fill in the instance variables for this instance of LQLInterface to match the network interface information in hdr.
self : | The LQLInterface object to work with. |
hdr : | The interface information from the kernel. |
Returns : | TRUE on success, FALSE on failure. |
<< LQLCon | LQLElement >> |