2009-07-11 14:05:54 +00:00
|
|
|
--- a/netem/maketable.c
|
|
|
|
+++ b/netem/maketable.c
|
2023-02-22 14:56:25 +00:00
|
|
|
@@ -11,7 +11,9 @@
|
2007-04-08 20:59:28 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <math.h>
|
2008-08-08 21:49:17 +00:00
|
|
|
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
|
2007-04-08 20:59:28 +00:00
|
|
|
#include <malloc.h>
|
|
|
|
+#endif
|
|
|
|
#include <string.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
2009-07-11 14:05:54 +00:00
|
|
|
--- a/netem/normal.c
|
|
|
|
+++ b/netem/normal.c
|
2023-02-22 14:56:25 +00:00
|
|
|
@@ -9,8 +9,12 @@
|
2007-04-08 20:59:28 +00:00
|
|
|
#include <string.h>
|
|
|
|
#include <limits.h>
|
|
|
|
|
2008-08-08 21:49:17 +00:00
|
|
|
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
|
2007-04-08 20:59:28 +00:00
|
|
|
#include <linux/types.h>
|
|
|
|
#include <linux/pkt_sched.h>
|
|
|
|
+#else
|
|
|
|
+#define NETEM_DIST_SCALE 8192
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
#define TABLESIZE 16384
|
|
|
|
#define TABLEFACTOR NETEM_DIST_SCALE
|
2009-07-11 14:05:54 +00:00
|
|
|
--- a/netem/pareto.c
|
|
|
|
+++ b/netem/pareto.c
|
2023-02-22 14:56:25 +00:00
|
|
|
@@ -8,8 +8,12 @@
|
2007-04-08 20:59:28 +00:00
|
|
|
#include <math.h>
|
|
|
|
#include <limits.h>
|
|
|
|
|
2008-08-08 21:49:17 +00:00
|
|
|
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
|
2007-04-08 20:59:28 +00:00
|
|
|
#include <linux/types.h>
|
|
|
|
#include <linux/pkt_sched.h>
|
|
|
|
+#else
|
|
|
|
+#define NETEM_DIST_SCALE 8192
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
static const double a=3.0;
|
|
|
|
#define TABLESIZE 16384
|
2009-07-11 14:05:54 +00:00
|
|
|
--- a/netem/paretonormal.c
|
|
|
|
+++ b/netem/paretonormal.c
|
2023-02-22 14:56:25 +00:00
|
|
|
@@ -15,10 +15,13 @@
|
2007-04-08 20:59:28 +00:00
|
|
|
#include <string.h>
|
|
|
|
#include <math.h>
|
|
|
|
#include <limits.h>
|
2008-08-08 21:49:17 +00:00
|
|
|
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
|
2007-04-08 20:59:28 +00:00
|
|
|
#include <malloc.h>
|
|
|
|
-
|
|
|
|
#include <linux/types.h>
|
|
|
|
#include <linux/pkt_sched.h>
|
|
|
|
+#else
|
|
|
|
+#define NETEM_DIST_SCALE 8192
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
#define TABLESIZE 16384
|
|
|
|
#define TABLEFACTOR NETEM_DIST_SCALE
|