/*
- * tc_red.c RED maintanance routines.
+ * tc_red.c RED maintenance routines.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
#include <arpa/inet.h>
#include <string.h>
+#include "utils.h"
#include "tc_core.h"
+#include "tc_util.h"
#include "tc_red.h"
/*
sbuf[255] = 31;
return clog;
}
+
+void tc_red_print_flags(__u32 flags)
+{
+ if (flags & TC_RED_ECN)
+ print_bool(PRINT_ANY, "ecn", "ecn ", true);
+ else
+ print_bool(PRINT_ANY, "ecn", NULL, false);
+
+ if (flags & TC_RED_HARDDROP)
+ print_bool(PRINT_ANY, "harddrop", "harddrop ", true);
+ else
+ print_bool(PRINT_ANY, "harddrop", NULL, false);
+
+ if (flags & TC_RED_ADAPTATIVE)
+ print_bool(PRINT_ANY, "adaptive", "adaptive ", true);
+ else
+ print_bool(PRINT_ANY, "adaptive", NULL, false);
+
+ if (flags & TC_RED_NODROP)
+ print_bool(PRINT_ANY, "nodrop", "nodrop ", true);
+ else
+ print_bool(PRINT_ANY, "nodrop", NULL, false);
+}