*
* Authors: PJ Waskiewicz, <peter.p.waskiewicz.jr@intel.com>
* Original Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> (from PRIO)
- *
- * Changes:
- *
- * Ole Husgaard <sparre@login.dknet.dk>: 990513: prio2band map was always reset.
- * J Hadi Salim <hadi@cyberus.ca>: 990609: priomap fix.
*/
#include <stdio.h>
fprintf(stderr, "Usage: ... rr bands NUMBER priomap P1 P2... [multiqueue]\n");
}
-#define usage() return(-1)
static int rr_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n)
{
- int ok = 0;
int pmap_mode = 0;
int idx = 0;
struct tc_prio_qopt opt={3,{ 1, 2, 2, 2, 1, 2, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 }};
fprintf(stderr, "Illegal \"bands\"\n");
return -1;
}
- ok++;
} else if (strcmp(*argv, "priomap") == 0) {
if (pmap_mode) {
fprintf(stderr, "Error: duplicate priomap\n");
if (tb[TCA_PRIO_MQ])
fprintf(f, " multiqueue: %s ",
- *(unsigned char *)RTA_DATA(tb[TCA_PRIO_MQ]) ? "on" : "off");
+ rta_getattr_u8(tb[TCA_PRIO_MQ]) ? "on" : "off");
return 0;
}