LQLQDiscNetem

LQLQDiscNetem — LQLQDiscNetem models a Netem queueing discipline.

Synopsis




struct      LQLQDiscNetem;
LQLQDiscNetem* lql_qdisc_netem_new          (void);
float       lql_qdisc_netem_get_latencyCorrelation
                                            (LQLQDiscNetem *self);
gboolean    lql_qdisc_netem_set_latencyCorrelation
                                            (LQLQDiscNetem *self,
                                             float latency);
float       lql_qdisc_netem_get_duplicate   (LQLQDiscNetem *self);
gboolean    lql_qdisc_netem_set_duplicate   (LQLQDiscNetem *self,
                                             float duplicate);
float       lql_qdisc_netem_get_duplicateCorrelation
                                            (LQLQDiscNetem *self);
gboolean    lql_qdisc_netem_set_duplicateCorrelation
                                            (LQLQDiscNetem *self,
                                             float duplicate);
guint32     lql_qdisc_netem_get_gap         (LQLQDiscNetem *self);
gboolean    lql_qdisc_netem_set_gap         (LQLQDiscNetem *self,
                                             guint32 gap);
guint32     lql_qdisc_netem_get_jitter      (LQLQDiscNetem *self);
gboolean    lql_qdisc_netem_set_jitter      (LQLQDiscNetem *self,
                                             guint32 jitter);
guint32     lql_qdisc_netem_get_latency     (LQLQDiscNetem *self);
gboolean    lql_qdisc_netem_set_latency     (LQLQDiscNetem *self,
                                             guint32 latency);
guint32     lql_qdisc_netem_get_limit       (LQLQDiscNetem *self);
gboolean    lql_qdisc_netem_set_limit       (LQLQDiscNetem *self,
                                             guint32 limit);
float       lql_qdisc_netem_get_loss        (LQLQDiscNetem *self);
gboolean    lql_qdisc_netem_set_loss        (LQLQDiscNetem *self,
                                             float loss);
float       lql_qdisc_netem_get_lossCorrelation
                                            (LQLQDiscNetem *self);
gboolean    lql_qdisc_netem_set_lossCorrelation
                                            (LQLQDiscNetem *self,
                                             float loss);

Object Hierarchy


  GObject
   +----LQLElement
         +----LQLQDisc
               +----LQLQDiscNetem

Properties


  "duplicate"            gfloat               : Read / Write
  "duplicate-correlation" gfloat               : Read / Write
  "gap"                  guint                : Read / Write
  "jitter"               guint                : Read / Write
  "latency"              guint                : Read / Write
  "latency-correlation"  gfloat               : Read / Write
  "limit"                guint                : Read / Write
  "loss"                 gfloat               : Read / Write
  "loss-correlation"     gfloat               : Read / Write

Description

LQLQDiscNetem models a Netem queueing discipline.

Netem allows emulating the properties of wide area networks.

Details

struct LQLQDiscNetem

struct LQLQDiscNetem;


lql_qdisc_netem_new ()

LQLQDiscNetem* lql_qdisc_netem_new          (void);

Build a new instance of LQLQDiscNetem.

Returns : A new LQLQDiscNetem instance.

lql_qdisc_netem_get_latencyCorrelation ()

float       lql_qdisc_netem_get_latencyCorrelation
                                            (LQLQDiscNetem *self);

Network delay variation isn't purely random, so to emulate this there is a latency correlation value. This correlation is expressed as a precentage. For example, a value of 25% means the next packets latency is 25% dependant on the previous packet.

self : The LQLQDiscNetem instance.
Returns : The current latency correlation value expressed as a precentage.

lql_qdisc_netem_set_latencyCorrelation ()

gboolean    lql_qdisc_netem_set_latencyCorrelation
                                            (LQLQDiscNetem *self,
                                             float latency);

Set the current latency correlation value.

self : The LQLQDiscNetem instance.
latency : The latency correlation value expressed as a float between 0.0 and 100.0.
Returns : TRUE on success, FALSE on failure.

lql_qdisc_netem_get_duplicate ()

float       lql_qdisc_netem_get_duplicate   (LQLQDiscNetem *self);

The duplicate value is the percentage of packets that are duplicated. This is expressed as a float number between 0 and 100.

self : The LQLQDiscNetem instance.
Returns : The current duplication percentage.

lql_qdisc_netem_set_duplicate ()

gboolean    lql_qdisc_netem_set_duplicate   (LQLQDiscNetem *self,
                                             float duplicate);

Set the percentage of packets that are being duplicated.

self : The LQLQDiscNetem instance.
duplicate : The percentage of packets to duplicate (0.0 to 100.0).
Returns : TRUE on success, FALSE on error.

lql_qdisc_netem_get_duplicateCorrelation ()

float       lql_qdisc_netem_get_duplicateCorrelation
                                            (LQLQDiscNetem *self);

Network duplication variation isn't purely random, so to emulate this there is a duplication correlation value. This correlation is expressed as a precentage. For example, a value of 25% means the next packets chance of being duplicated is 25% dependant on the previous packet.

self : The LQLQDiscNetem instance.
Returns : The current duplication correlation value expressed as a float (0.0 to 100.0).

lql_qdisc_netem_set_duplicateCorrelation ()

gboolean    lql_qdisc_netem_set_duplicateCorrelation
                                            (LQLQDiscNetem *self,
                                             float duplicate);

Set the duplication correlation value.

self : The LQLQDiscNetem instance.
duplicate : The duplication correlation value expressed as a percentage (0.0% to 100.0%).
Returns : TRUE on success, FALSE on error.

lql_qdisc_netem_get_gap ()

guint32     lql_qdisc_netem_get_gap         (LQLQDiscNetem *self);

The gap value tells the Netem instance which packets are effected by the Netem parameters. For example, gap=5 means the 5th, 10th, 15th ... packets are effected while the rest are not.

self : The LQLQDiscNetem instance.
Returns : The current gap value.

lql_qdisc_netem_set_gap ()

gboolean    lql_qdisc_netem_set_gap         (LQLQDiscNetem *self,
                                             guint32 gap);

Set the current gap value.

self : The LQLQDiscNetem instance.
gap : The gap value.
Returns : TRUE on success, FALSE on error.

lql_qdisc_netem_get_jitter ()

guint32     lql_qdisc_netem_get_jitter      (LQLQDiscNetem *self);

Get the amount of jitter (in ms) applied to packets.

self : The LQLQDiscNetem instance.
Returns : The amount of packet jitter in ms.

lql_qdisc_netem_set_jitter ()

gboolean    lql_qdisc_netem_set_jitter      (LQLQDiscNetem *self,
                                             guint32 jitter);

Set the amount of jitter (in ms) that is applied to packets.

self : The LQLQDiscNetem instance.
jitter : The amount of jitter in ms.
Returns : TRUE on success, FALSE on error.

lql_qdisc_netem_get_latency ()

guint32     lql_qdisc_netem_get_latency     (LQLQDiscNetem *self);

Return the amount of latency in ms that the netem qdisc is adding to packets.

self : The LQLQDiscNetem instance.
Returns : The amount of latency being added to packets in ms

lql_qdisc_netem_set_latency ()

gboolean    lql_qdisc_netem_set_latency     (LQLQDiscNetem *self,
                                             guint32 latency);

Set the amount of latency in ms that the netem qdisc adds to packets.

self : The LQLQDiscNetem instance.
latency : The amount of latency in ms to add to packets.
Returns : TRUE on success, FALSE on error.

lql_qdisc_netem_get_limit ()

guint32     lql_qdisc_netem_get_limit       (LQLQDiscNetem *self);

Get the maximum number of packets this Netem instance will hold. The default value is 1000. In order to change latency Netem must hold onto packets. This value puts a upper limit on the number of packets held.

self : The LQLQDiscNetem instance.
Returns : The maximum number of packets.

lql_qdisc_netem_set_limit ()

gboolean    lql_qdisc_netem_set_limit       (LQLQDiscNetem *self,
                                             guint32 limit);

Set the maximum number of packets that the Netem instance will hold.

self : The LQLQDiscNetem instance.
limit : The new packet limit.
Returns : TRUE on success, FALSE on error.

lql_qdisc_netem_get_loss ()

float       lql_qdisc_netem_get_loss        (LQLQDiscNetem *self);

Get the current percentage of packets being dropped by this qdisc. This is expressed as a float value between 0 and 100.

self : The LQLQDiscNetem instance.
Returns : The percentage of packets being dropped.

lql_qdisc_netem_set_loss ()

gboolean    lql_qdisc_netem_set_loss        (LQLQDiscNetem *self,
                                             float loss);

Set the current percentage of packets being dropped by this qdisc. This is expressed as a float value between 0 and 100.

self : The LQLQDiscNetem instance.
loss : The percentage of packets to drop.
Returns : TRUE on success, FALSE on error.

lql_qdisc_netem_get_lossCorrelation ()

float       lql_qdisc_netem_get_lossCorrelation
                                            (LQLQDiscNetem *self);

Network loss variation isn't purely random, so to emulate this there is a loss correlation value. This correlation is expressed as a precentage. For example, a value of 25% means the next packets chance of being dropped is 25% dependant on the previous packet.

self : The LQLQDiscNetem instance.
Returns :

lql_qdisc_netem_set_lossCorrelation ()

gboolean    lql_qdisc_netem_set_lossCorrelation
                                            (LQLQDiscNetem *self,
                                             float loss);

Set the current loss correlation value.

self : The LQLQDiscNetem instance.
loss : The loss correlation value expressed as a float between 0.0 and 100.0.
Returns : TRUE on success, FALSE on error.

Properties

"duplicate" (gfloat : Read / Write)

Set/Get the percentage of packets to randomly duplicate.

"duplicate-correlation" (gfloat : Read / Write)

Set/Get the amount that the previous packet effects the next packets duplication probability expressed as a percentage.

"gap" (guint : Read / Write)

Set/Get the reordering gap.

"jitter" (guint : Read / Write)

Set/Get the amount of random jitter to add in ms.

"latency" (guint : Read / Write)

Set/Get the amount of delay added to each packet ms.

"latency-correlation" (gfloat : Read / Write)

Set/Get the amount that the previous packet effects the next packets latency expressed as a precentage.

"limit" (guint : Read / Write)

Set/Get the limit on the number of packets the QDisc will hold.

"loss" (gfloat : Read / Write)

Set/Get the percentage of packets to be dropped.

"loss-correlation" (gfloat : Read / Write)

Set/Get the amount that the previous packet effects the next packets loss probability expressed as a percentage.

See Also

Netem website