LQLInterface

LQLInterface — LQLInterface represents a network interface.

Synopsis




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);

Object Hierarchy


  GObject
   +----LQLInterface

Properties


  "ifIndex"              gint                 : Read / Write
  "mtu"                  gint                 : Read / Write
  "name"                 gchararray           : Read / Write

Description

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.

Details

struct LQLInterface

struct LQLInterface;

This should not be accessed directly.


lql_interface_new ()

LQLInterface* lql_interface_new             (void);

Build a new instance of LQLInterface.

Returns : A new LQLInterface instance.

lql_interface_get_ifIndex ()

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.

lql_interface_set_ifIndex ()

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.

lql_interface_get_mtu ()

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.

lql_interface_set_mtu ()

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.

lql_interface_get_name ()

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.

lql_interface_set_name ()

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.

lql_interface_fill_from_nlhdr ()

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.

Properties

"ifIndex" (gint : Read / Write)

Set/Get LQLInterface index.

"mtu" (gint : Read / Write)

Set/Get LQLInterface MTU.

"name" (gchararray : Read / Write)

Set/Get LQLInterface name.