} else if (matches(*argv, "tcindex") == 0) {
ife_tcindex = IFE_META_TCINDEX;
} else {
- fprintf(stderr, "Illegal meta define <%s>\n",
- *argv);
- return -1;
+ invarg("Illegal meta define", *argv);
}
} else if (matches(*argv, "use") == 0) {
NEXT_ARG();
invarg("ife tcindex val is invalid",
*argv);
} else {
- fprintf(stderr, "Illegal meta use type <%s>\n",
- *argv);
- return -1;
+ invarg("Illegal meta use type", *argv);
}
} else if (matches(*argv, "type") == 0) {
NEXT_ARG();
if (sscanf(daddr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
dbuf, dbuf + 1, dbuf + 2,
dbuf + 3, dbuf + 4, dbuf + 5) != 6) {
- fprintf(stderr, "Invalid mac address %s\n",
- daddr);
+ invarg("Invalid mac address", *argv);
}
fprintf(stderr, "dst MAC address <%s>\n", daddr);
if (sscanf(saddr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
sbuf, sbuf + 1, sbuf + 2,
sbuf + 3, sbuf + 4, sbuf + 5) != 6) {
- fprintf(stderr, "Invalid mac address %s\n",
- saddr);
+ invarg("Invalid mac address", *argv);
}
fprintf(stderr, "src MAC address <%s>\n", saddr);
} else if (matches(*argv, "help") == 0) {
p = RTA_DATA(tb[TCA_IFE_PARMS]);
print_string(PRINT_ANY, "kind", "%s ", "ife");
- print_string(PRINT_ANY, "mode", "%s",
+ print_string(PRINT_ANY, "mode", "%s ",
p->flags & IFE_ENCODE ? "encode" : "decode");
print_action_control(f, "action ", p->action, " ");
if (tb[TCA_IFE_TYPE]) {
ife_type = rta_getattr_u16(tb[TCA_IFE_TYPE]);
has_optional = 1;
- print_0xhex(PRINT_ANY, "type", "type 0x%X ", ife_type);
+ print_0xhex(PRINT_ANY, "type", "type %#llX ", ife_type);
}
if (has_optional)