Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
emulab-devel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Emmanuel Cecchet
emulab-devel
Commits
19ca9e33
Commit
19ca9e33
authored
24 years ago
by
place
Browse files
Options
Downloads
Patches
Plain Diff
put the bandwidth,loss,delay parameters in separate structs because
dn_pipe had grown ridiculously.
parent
206b922c
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
delay/dummynet_mods/ip_dummynet.h
+41
-26
41 additions, 26 deletions
delay/dummynet_mods/ip_dummynet.h
with
41 additions
and
26 deletions
delay/dummynet_mods/ip_dummynet.h
+
41
−
26
View file @
19ca9e33
...
...
@@ -115,6 +115,7 @@ struct dn_flow_queue {
int
hash_slot
;
/* debugging/diagnostic */
}
;
/* distribution types */
#define DN_DIST_CONST_TIME 0x01
#define DN_DIST_CONST_RATE 0x02
#define DN_DIST_UNIFORM 0x04
...
...
@@ -126,6 +127,43 @@ struct dn_flow_queue {
(DN_DIST_TABLE_RANDOM|DN_DIST_TABLE_DETERM|DN_DIST_POISSON)
#define DN_CONST_DIST (DN_DIST_CONST_RATE|DN_DIST_CONST_TIME)
/* delay, bandwidth, loss parameters for dn_pipe */
struct
dn_delay
{
int
delay
;
/* really, ticks */
int
dist
;
/* distribution type */
int
mean
;
int
variance
;
int
*
table
;
/* table of possible values */
int
entries
;
/* entries in table */
int
tablepos
;
/* current pos in table for deterministic */
};
struct
dn_bw
{
int
bandwidth
;
/* bits/sec */
int
dist
;
/* distribution type */
int
mean
;
int
variance
;
int
quantum
;
/* how frequently to recalculate bw */
int
quantum_expire
;
/* its expiration date */
int
*
table
;
/* table of possible values */
int
entries
;
/* entries in table */
int
tablepos
;
/* current pos in table for deterministic */
};
struct
dn_loss
{
int
plr
;
/* pkt loss rate (2^31-1 means 100%) */
int
dist
;
/* distribution type */
int
nextdroptime
;
/* time to drop pkt at head of queue */
int
mean
;
int
variance
;
int
quantum
;
/* how frequently to recalc loss rate */
int
quantum_expire
;
/* its expiration date */
int
*
table
;
/* table of possible values */
int
entries
;
/* entries in table */
int
tablepos
;
/* current pos in table for deterministic */
};
/*
* Pipe descriptor. Contains global parameters, delay-line queue,
* and the hash array of the per-flow queues.
...
...
@@ -136,34 +174,11 @@ struct dn_pipe { /* a pipe */
u_short
pipe_nr
;
/* number */
u_short
flags
;
/* to speed up things */
#define DN_HAVE_FLOW_MASK 8
int
bandwidth
;
/* bits/sec */
int
bwdist
;
/* distribution type */
int
bwmean
;
int
bwvar
;
int
bwquantum
;
/* how frequently to recalculate bw */
int
bwquantum_expire
;
/* its expiration date */
int
*
bwtable
;
/* table of possible values */
int
bwentries
;
/* entries in table */
int
bwtablepos
;
/* current pos in table for deterministic */
struct
dn_delay
delay
;
struct
dn_bw
bw
;
struct
dn_loss
loss
;
int
queue_size
;
int
queue_size_bytes
;
int
delay
;
/* really, ticks */
int
delaydist
;
/* distribution type */
int
delaymean
;
int
delayvar
;
/* variance */
int
*
delaytable
;
/* table of possible values */
int
delayentries
;
/* entries in table */
int
delaytablepos
;
/* current pos in table for deterministic */
int
plr
;
/* pkt loss rate (2^31-1 means 100%) */
int
lossdist
;
/* distribution type */
int
nextdroptime
;
/* time to drop pkt at head of queue */
int
lossmean
;
int
lossvar
;
int
lossquantum
;
/* how frequently to recalc loss rate */
int
lossquantum_expire
;
/* its expiration date */
int
*
losstable
;
/* table of possible values */
int
lossentries
;
/* entries in table */
int
losstablepos
;
/* current pos in table for deterministic */
struct
dn_queue
p
;
struct
ipfw_flow_id
flow_mask
;
int
rq_size
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment