git://git.onelab.eu
/
ipfw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Major changes:
[ipfw.git]
/
ipfw
/
dummynet.c
diff --git
a/ipfw/dummynet.c
b/ipfw/dummynet.c
index
fd8fc4d
..
e2c5ff1
100644
(file)
--- a/
ipfw/dummynet.c
+++ b/
ipfw/dummynet.c
@@
-74,8
+74,12
@@
static struct _s_x dummynet_params[] = {
{ NULL, 0 } /* terminator */
};
{ NULL, 0 } /* terminator */
};
+/*
+ * XXX to be updated to the new version,
+ * without the global struct command_opts variable
+ */
static int
static int
-sort_q(const void *pa, const void *pb)
+sort_q(
void * to_be_done,
const void *pa, const void *pb)
{
int rev = (co.do_sort < 0);
int field = rev ? -co.do_sort : co.do_sort;
{
int rev = (co.do_sort < 0);
int field = rev ? -co.do_sort : co.do_sort;
@@
-118,7
+122,7
@@
list_queues(struct dn_flow_set *fs, struct dn_flow_queue *q)
return;
if (co.do_sort != 0)
return;
if (co.do_sort != 0)
-
heapsort(q, fs->rq_elements, sizeof *q
, sort_q);
+
qsort_r(q, fs->rq_elements, sizeof *q, NULL
, sort_q);
/* Print IPv4 flows */
index_printed = 0;
/* Print IPv4 flows */
index_printed = 0;
@@
-477,7
+481,7
@@
is_valid_number(const char *s)
* and return the numeric bandwidth value.
* set clocking interface or bandwidth value
*/
* and return the numeric bandwidth value.
* set clocking interface or bandwidth value
*/
-void
+
static
void
read_bandwidth(char *arg, int *bandwidth, char *if_name, int namelen)
{
if (*bandwidth != -1)
read_bandwidth(char *arg, int *bandwidth, char *if_name, int namelen)
{
if (*bandwidth != -1)
@@
-521,7
+525,7
@@
struct point {
double delay;
};
double delay;
};
-int
+
static
int
compare_points(const void *vp1, const void *vp2)
{
const struct point *p1 = vp1;
compare_points(const void *vp1, const void *vp2)
{
const struct point *p1 = vp1;