Flowgrind
Advanced TCP traffic generator
fg_math.h
Go to the documentation of this file.
1 
6 /*
7  * Copyright (C) 2010-2013 Christian Samsel <christian.samsel@rwth-aachen.de>
8  *
9  * This file is part of Flowgrind.
10  *
11  * Flowgrind is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation, either version 3 of the License, or
14  * (at your option) any later version.
15  *
16  * Flowgrind is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with Flowgrind. If not, see <http://www.gnu.org/licenses/>.
23  *
24  */
25 
26 #ifndef _FG_MATH_H_
27 #define _FG_MATH_H_
28 
29 #ifdef HAVE_CONFIG_H
30 #include "config.h"
31 #endif /* HAVE_CONFIG_H */
32 
33 #include "daemon.h"
34 
35 /* initalization for random number generator */
36 extern void init_math_functions (struct flow *flow, unsigned long seed);
37 extern void free_math_functions (struct flow *flow);
38 
39 /* basic probability distributions */
40 extern int dist_bernoulli (struct flow *flow, const double p);
41 extern double dist_pareto (struct flow *flow,
42  const double k, const double x_min);
43 extern double dist_weibull (struct flow *flow,
44  const double alpha, const double beta);
45 extern double dist_normal (struct flow *flow,
46  const double mu, const double sigma_square);
47 extern double dist_lognormal (struct flow *flow,
48  const double zeta, const double sigma);
49 extern double dist_uniform (struct flow *flow,
50  const double minval, const double maxval);
51 extern double dist_exponential (struct flow *flow, const double mu);
52 extern double dist_chisq (struct flow *flow, const double nu);
53 
54 #endif /* _FG_MATH_H_ */
double dist_exponential(struct flow *flow, const double mu)
Definition: fg_math.c:123
Routines used by the Flowgrind daemon.
void free_math_functions(struct flow *flow)
Definition: fg_math.c:97
double dist_pareto(struct flow *flow, const double k, const double x_min)
Definition: fg_math.c:190
double dist_lognormal(struct flow *flow, const double zeta, const double sigma)
Definition: fg_math.c:163
int dist_bernoulli(struct flow *flow, const double p)
Definition: fg_math.c:179
double dist_chisq(struct flow *flow, const double nu)
Definition: fg_math.c:219
double dist_normal(struct flow *flow, const double mu, const double sigma_square)
Definition: fg_math.c:149
double dist_weibull(struct flow *flow, const double alpha, const double beta)
Definition: fg_math.c:206
Definition: daemon.h:73
double dist_uniform(struct flow *flow, const double minval, const double maxval)
Definition: fg_math.c:136
void init_math_functions(struct flow *flow, unsigned long seed)
Definition: fg_math.c:58