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
8e2c7522
Commit
8e2c7522
authored
Feb 09, 2005
by
osdl.net!shemminger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename: tc/pareto.c -> netem/pareto.c
}(Logical change 1.141)
parent
a59e8eda
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
41 deletions
+0
-41
tc/pareto.c
tc/pareto.c
+0
-41
No files found.
tc/pareto.c
deleted
100644 → 0
View file @
a59e8eda
/*
* Pareto distribution table generator
* Taken from the uncopyrighted NISTnet code.
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <limits.h>
#include <linux/types.h>
#include <linux/pkt_sched.h>
static
const
double
a
=
3
.
0
;
#define TABLESIZE 16384
#define TABLEFACTOR NETEM_DIST_SCALE
int
main
(
int
argc
,
char
**
argv
)
{
int
i
,
n
;
double
dvalue
;
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
;
dvalue
=
1
.
0
/
pow
(
dvalue
,
1
.
0
/
a
);
dvalue
-=
1
.
5
;
dvalue
*=
(
4
.
0
/
3
.
0
)
*
(
double
)
TABLEFACTOR
;
if
(
dvalue
>
32767
)
dvalue
=
32767
;
printf
(
" %d"
,
(
int
)
rint
(
dvalue
));
if
(
++
n
==
8
)
{
putchar
(
'\n'
);
n
=
0
;
}
}
return
0
;
}
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