}
}
+static int ecn_xlate(const void *ip, const struct xt_entry_match *match,
+ struct xt_xlate *xl, int numeric)
+{
+ const struct xt_ecn_info *einfo =
+ (const struct xt_ecn_info *)match->data;
+
+ if (!(einfo->operation & XT_ECN_OP_MATCH_IP))
+ return 0;
+
+ xt_xlate_add(xl, "ip ecn ");
+ if (einfo->invert)
+ xt_xlate_add(xl,"!= ");
+
+ switch (einfo->ip_ect) {
+ case 0:
+ xt_xlate_add(xl, "not-ect ");
+ break;
+ case 1:
+ xt_xlate_add(xl, "ect1 ");
+ break;
+ case 2:
+ xt_xlate_add(xl, "ect0 ");
+ break;
+ case 3:
+ xt_xlate_add(xl, "ce ");
+ break;
+ }
+ return 1;
+}
+
static struct xtables_match ecn_mt_reg = {
.name = "ecn",
.version = XTABLES_VERSION,
.x6_parse = ecn_parse,
.x6_fcheck = ecn_check,
.x6_options = ecn_opts,
+ .xlate = ecn_xlate,
};
void _init(void)