Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
iproute2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
iproute2
Commits
d2c4ee1b
Commit
d2c4ee1b
authored
Aug 30, 2004
by
osdl.net!shemminger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change name of tablefactor.
(Logical change 1.73)
parent
fe2a5806
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
10 deletions
+6
-10
tc/normal.c
tc/normal.c
+3
-5
tc/pareto.c
tc/pareto.c
+2
-4
tc/paretonormal.c
tc/paretonormal.c
+1
-1
No files found.
tc/normal.c
View file @
d2c4ee1b
...
...
@@ -12,7 +12,7 @@
#include <linux/pkt_sched.h>
#define TABLESIZE 16384
#define TABLEFACTOR
TCA_NETEM_TABLEFACTOR
#define TABLEFACTOR
NETEM_DIST_SCALE
static
double
normal
(
double
x
,
double
mu
,
double
sigma
)
...
...
@@ -38,10 +38,8 @@ main(int argc, char **argv)
table
[
i
]
=
x
;
}
printf
(
"# This is the distribution table for the normal distribution.
\n
"
);
printf
(
"# This is the distribution table for the normal distribution.
\n
"
);
for
(
i
=
n
=
0
;
i
<
TABLESIZE
;
i
+=
4
)
{
int
value
=
(
int
)
rint
(
table
[
i
]
*
TABLEFACTOR
);
if
(
value
<
SHRT_MIN
)
value
=
SHRT_MIN
;
...
...
tc/pareto.c
View file @
d2c4ee1b
...
...
@@ -12,7 +12,7 @@
static
const
double
a
=
3
.
0
;
#define TABLESIZE 16384
#define TABLEFACTOR
TCA_NETEM_TABLEFACTOR
#define TABLEFACTOR
NETEM_DIST_SCALE
int
main
(
int
argc
,
char
**
argv
)
...
...
@@ -20,9 +20,7 @@ main(int argc, char **argv)
int
i
,
n
;
double
dvalue
;
printf
(
"# This is the distribution table for the pareto distribution.
\n
"
);
printf
(
"# This is the distribution table for the pareto distribution.
\n
"
);
for
(
i
=
65536
,
n
=
0
;
i
>
0
;
i
-=
16
)
{
dvalue
=
(
double
)
i
/
(
double
)
65536
;
...
...
tc/paretonormal.c
View file @
d2c4ee1b
...
...
@@ -21,7 +21,7 @@
#include <linux/pkt_sched.h>
#define TABLESIZE 16384
#define TABLEFACTOR
TCA_NETEM_TABLEFACTOR
#define TABLEFACTOR
NETEM_DIST_SCALE
static
double
normal
(
double
x
,
double
mu
,
double
sigma
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment