Lines Matching refs:info
48 struct xt_statistic_info *info = cb->data;
51 info->flags |= XT_STATISTIC_INVERT;
57 info->mode = XT_STATISTIC_MODE_RANDOM;
59 info->mode = XT_STATISTIC_MODE_NTH;
65 info->u.random.probability = lround(0x80000000 * cb->val.dbl);
68 --info->u.nth.every;
75 struct xt_statistic_info *info = cb->data;
77 if (info->mode == XT_STATISTIC_MODE_RANDOM &&
82 if (info->mode == XT_STATISTIC_MODE_NTH &&
88 /* at this point, info->u.nth.every have been decreased. */
89 if (info->u.nth.packet > info->u.nth.every)
93 info->u.nth.count = info->u.nth.every - info->u.nth.packet;
96 static void print_match(const struct xt_statistic_info *info, char *prefix)
98 switch (info->mode) {
101 (info->flags & XT_STATISTIC_INVERT) ? " !" : "",
103 1.0 * info->u.random.probability / 0x80000000);
107 (info->flags & XT_STATISTIC_INVERT) ? " !" : "",
109 info->u.nth.every + 1);
110 if (info->u.nth.packet)
111 printf(" %spacket %u", prefix, info->u.nth.packet);
119 const struct xt_statistic_info *info = (const void *)match->data;
122 print_match(info, "");
127 const struct xt_statistic_info *info = (const void *)match->data;
129 print_match(info, "--");