static void
explain(void)
{
- fprintf(stderr, "Usage: ... connmark [zone ZONE] [CONTROL] [index <INDEX>]\n");
- fprintf(stderr, "where :\n"
+ fprintf(stderr,
+ "Usage: ... connmark [zone ZONE] [CONTROL] [index <INDEX>]\n"
+ "where :\n"
"\tZONE is the conntrack zone\n"
"\tCONTROL := reclassify | pipe | drop | continue | ok |\n"
"\t goto chain <CHAIN_INDEX>\n");
if (matches(*argv, "zone") == 0) {
NEXT_ARG();
if (get_u16(&sel.zone, *argv, 10)) {
- fprintf(stderr, "simple: Illegal \"index\"\n");
+ fprintf(stderr, "connmark: Illegal \"zone\"\n");
return -1;
}
argc--;
if (matches(*argv, "index") == 0) {
NEXT_ARG();
if (get_u32(&sel.index, *argv, 10)) {
- fprintf(stderr, "simple: Illegal \"index\"\n");
+ fprintf(stderr, "connmark: Illegal \"index\"\n");
return -1;
}
argc--;
parse_rtattr_nested(tb, TCA_CONNMARK_MAX, arg);
if (tb[TCA_CONNMARK_PARMS] == NULL) {
- print_string(PRINT_FP, NULL, "%s", "[NULL connmark parameters]");
+ fprintf(stderr, "Missing connmark parameters\n");
return -1;
}
print_uint(PRINT_ANY, "zone", "zone %u", ci->zone);
print_action_control(f, " ", ci->action, "");
- print_string(PRINT_FP, NULL, "%s", _SL_);
+ print_nl();
print_uint(PRINT_ANY, "index", "\t index %u", ci->index);
print_int(PRINT_ANY, "ref", " ref %d", ci->refcnt);
print_int(PRINT_ANY, "bind", " bind %d", ci->bindcnt);
print_tm(f, tm);
}
}
- print_string(PRINT_FP, NULL, "%s", _SL_);
+ print_nl();
return 0;
}