Lines Matching full:info
52 struct xt_statistic_info *info = cb->data;
55 info->flags |= XT_STATISTIC_INVERT;
61 info->mode = XT_STATISTIC_MODE_RANDOM;
63 info->mode = XT_STATISTIC_MODE_NTH;
69 info->u.random.probability = lround(0x80000000 * cb->val.dbl);
72 --info->u.nth.every;
79 struct xt_statistic_info *info = cb->data;
81 if (info->mode == XT_STATISTIC_MODE_RANDOM &&
86 if (info->mode == XT_STATISTIC_MODE_NTH &&
92 /* at this point, info->u.nth.every have been decreased. */
93 if (info->u.nth.packet > info->u.nth.every)
97 info->u.nth.count = info->u.nth.every - info->u.nth.packet;
100 static void print_match(const struct xt_statistic_info *info, char *prefix)
102 switch (info->mode) {
105 (info->flags & XT_STATISTIC_INVERT) ? " !" : "",
107 1.0 * info->u.random.probability / 0x80000000);
111 (info->flags & XT_STATISTIC_INVERT) ? " !" : "",
113 info->u.nth.every + 1);
114 if (info->u.nth.packet || *prefix)
115 printf(" %spacket %u", prefix, info->u.nth.packet);
123 const struct xt_statistic_info *info = (const void *)match->data;
126 print_match(info, "");
131 const struct xt_statistic_info *info = (const void *)match->data;
133 print_match(info, "--");