LQLClassifier

LQLClassifier — LQLClassifier is the base class for all classifiers.

Synopsis




struct      LQLClassifier;
guint32     lql_classifier_get_id           (LQLClassifier *self);
gboolean    lql_classifier_set_id           (LQLClassifier *self,
                                             guint32 id);
gboolean    lql_classifier_set_parent       (LQLClassifier *self,
                                             LQLElement *parent);
guint32     lql_classifier_get_parentHandle (LQLClassifier *self);
gboolean    lql_classifier_set_parentHandle (LQLClassifier *self,
                                             guint32 parent);
gboolean    lql_classifier_set_class        (LQLClassifier *self,
                                             LQLClass *klass);
guint32     lql_classifier_get_classHandle  (LQLClassifier *self);
gboolean    lql_classifier_set_classHandle  (LQLClassifier *self,
                                             guint32 klass);
unsigned int lql_classifier_get_priority    (LQLClassifier *self);
gboolean    lql_classifier_set_priority     (LQLClassifier *self,
                                             unsigned int priority);
unsigned int lql_classifier_get_protocol    (LQLClassifier *self);
gboolean    lql_classifier_set_protocol     (LQLClassifier *self,
                                             unsigned int protocol);
gboolean    lql_classifier_set_interface    (LQLClassifier *self,
                                             LQLInterface *interface);
int         lql_classifier_get_ifIndex      (LQLClassifier *self);
gboolean    lql_classifier_set_ifIndex      (LQLClassifier *self,
                                             int ifIndex);
LQLClassifier* lql_classifier_new           (void);
gboolean    lql_classifier_fill_from_nlhdr  (LQLClassifier *self,
                                             const struct nlmsghdr *hdr);
gboolean    lql_classifier_add              (LQLClassifier *self,
                                             LQLCon *con);
gboolean    lql_classifier_modify           (LQLClassifier *self,
                                             LQLCon *con);
gboolean    lql_classifier_delete           (LQLClassifier *self,
                                             LQLCon *con);

Object Hierarchy


  GObject
   +----LQLClassifier
         +----LQLClassifierU32
         +----LQLClassifierFwmark
         +----LQLClassifierTCIndex

Properties


  "class"                guint                : Read / Write
  "id"                   guint                : Read / Write
  "ifIndex"              gint                 : Read / Write
  "parent"               guint                : Read / Write
  "priority"             guint                : Read / Write
  "protocol"             guint                : Read / Write

Description

LQLClassifier and all of it's sub-classes are considered experimental API at this point. Significant API changes in this area are likely.

LQLClassifier is the base class for all classifiers. There is no reason to instantiate an object of this type. Use one of the subclasses instead.

Details

struct LQLClassifier

struct LQLClassifier;

This should not be accessed directly.


lql_classifier_get_id ()

guint32     lql_classifier_get_id           (LQLClassifier *self);

Get the ID of this Classifier.

self : The LQLClassifier object to work with.
Returns : The classifier ID.

lql_classifier_set_id ()

gboolean    lql_classifier_set_id           (LQLClassifier *self,
                                             guint32 id);

Set the ID field of this object.

self : The LQLClassifier object to work with.
id : The value to set the ID instance variable to.
Returns : TRUE on success, FALSE on error.

lql_classifier_set_parent ()

gboolean    lql_classifier_set_parent       (LQLClassifier *self,
                                             LQLElement *parent);

Set the parent field of this object.

self : The LQLClassifier object to work with.
parent : The LQLElement that is the parent.
Returns : TRUE on success, FALSE on error.

lql_classifier_get_parentHandle ()

guint32     lql_classifier_get_parentHandle (LQLClassifier *self);

Get the handle of the parent of this Classifier.

self : The LQLClassifier object to work with.
Returns : The classifier parent, -1 on error.

lql_classifier_set_parentHandle ()

gboolean    lql_classifier_set_parentHandle (LQLClassifier *self,
                                             guint32 parent);

Set the handle of the parent of this LQLClassifier. Usually you will want to use lql_classifier_set_parent() instead of this function.

self : The LQLClassifier instance.
parent : The handle of the parent.
Returns : TRUE on success, FALSE on failure.

lql_classifier_set_class ()

gboolean    lql_classifier_set_class        (LQLClassifier *self,
                                             LQLClass *klass);

Set the CLASS field of this object.

self : The LQLClassifier object to work with.
klass : The LQLClass to set.
Returns : TRUE on success, FALSE on error.

lql_classifier_get_classHandle ()

guint32     lql_classifier_get_classHandle  (LQLClassifier *self);

Get the handle of the class that this LQLClassifer will direct packets to.

self : The LQLClassifier object to work with.
Returns : The classifier handle.

lql_classifier_set_classHandle ()

gboolean    lql_classifier_set_classHandle  (LQLClassifier *self,
                                             guint32 klass);

Set the handle of the class that this classifier will direct packets to.

self : The LQLClassifier instance.
klass : The handle of the class.
Returns : TRUE on success, FALSE on failure.

lql_classifier_get_priority ()

unsigned int lql_classifier_get_priority    (LQLClassifier *self);

Get the ID of the priority of this Classifier.

self : The LQLClassifier object to work with.
Returns : The classifier priority, -1 on error.

lql_classifier_set_priority ()

gboolean    lql_classifier_set_priority     (LQLClassifier *self,
                                             unsigned int priority);

Set the priority field of this object.

self : The LQLClassifier object to work with.
priority : The index to set the priority instance variable to.
Returns : TRUE on success, FALSE on error.

lql_classifier_get_protocol ()

unsigned int lql_classifier_get_protocol    (LQLClassifier *self);

Get the protocol number that this classifier is working with.

self : The LQLClassifier object to work with.
Returns : The classifier protocol, -1 on error.

lql_classifier_set_protocol ()

gboolean    lql_classifier_set_protocol     (LQLClassifier *self,
                                             unsigned int protocol);

Set the protocol field of this object.

self : The LQLClassifier object to work with.
protocol : The index to set the protocol instance variable to.
Returns : TRUE on success, FALSE on error.

lql_classifier_set_interface ()

gboolean    lql_classifier_set_interface    (LQLClassifier *self,
                                             LQLInterface *interface);

Set the network interface that this classifier is attached to.

self : The LQLClassifier instance.
interface : The LQLInterface object.
Returns : TRUE on success, FALSE on failure.

lql_classifier_get_ifIndex ()

int         lql_classifier_get_ifIndex      (LQLClassifier *self);

Get the interface index this Classifier is attached to.

self : The LQLClassifier object to work with.
Returns : The classifier index, -1 on error.

lql_classifier_set_ifIndex ()

gboolean    lql_classifier_set_ifIndex      (LQLClassifier *self,
                                             int ifIndex);

Set the network interface index that this Classifier is attached to.

self : The LQLClassifier object to work with.
ifIndex : The index of a network interface.
Returns : TRUE on success, FALSE on error.

lql_classifier_new ()

LQLClassifier* lql_classifier_new           (void);

Build a new instance of LQLClassifier.

Returns : A new LQLClassifier instance.

lql_classifier_fill_from_nlhdr ()

gboolean    lql_classifier_fill_from_nlhdr  (LQLClassifier *self,
                                             const struct nlmsghdr *hdr);

Fill in the instance variables for this instance of LQLClassifier to match the network classifier information in hdr.

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

lql_classifier_add ()

gboolean    lql_classifier_add              (LQLClassifier *self,
                                             LQLCon *con);

Add this queueing discipline to the system.

self : The LQLClassifier 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_classifier_modify ()

gboolean    lql_classifier_modify           (LQLClassifier *self,
                                             LQLCon *con);

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

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

lql_classifier_delete ()

gboolean    lql_classifier_delete           (LQLClassifier *self,
                                             LQLCon *con);

Delete this queueing discipline from the system.

self : The LQLClassifier object to delete from the system.
con : The LQLCon connection to use when deleting this queueing discipline.
Returns : TRUE on success, FALSE on failure.

Properties

"class" (guint : Read / Write)

Set/Get the ID of the class to direct matching packets to.

"id" (guint : Read / Write)

Set/Get the ID for this Classifier.

"ifIndex" (gint : Read / Write)

Set/Get the network interface this LQLClassifier is attached to.

"parent" (guint : Read / Write)

Set/Get the parent ID for this classifier.

"priority" (guint : Read / Write)

Set/Get the priority of this classifier.

"protocol" (guint : Read / Write)

Set/Get the protocol ID for this classifier.