Lines Matching full:info
34 static struct xt_statistic_info *info;
44 info = (void *)(*match)->data;
47 info->flags |= XT_STATISTIC_INVERT;
54 info->mode = XT_STATISTIC_MODE_RANDOM;
56 info->mode = XT_STATISTIC_MODE_NTH;
68 info->u.random.probability = 0x80000000 * prob;
75 &info->u.nth.every) == -1)
78 if (info->u.nth.every == 0)
80 info->u.nth.every--;
87 &info->u.nth.packet) == -1)
107 if (flags & 0x2 && info->mode != XT_STATISTIC_MODE_RANDOM)
110 if (flags & 0x4 && info->mode != XT_STATISTIC_MODE_NTH)
113 if (flags & 0x8 && info->mode != XT_STATISTIC_MODE_NTH)
116 info->u.nth.count = info->u.nth.every - info->u.nth.packet;
120 static void print_match(const struct xt_statistic_info *info, char *prefix)
122 if (info->flags & XT_STATISTIC_INVERT)
125 switch (info->mode) {
128 1.0 * info->u.random.probability / 0x80000000);
132 info->u.nth.every + 1);
133 if (info->u.nth.packet)
134 printf("%spacket %u ", prefix, info->u.nth.packet);
144 struct xt_statistic_info *info = (struct xt_statistic_info *)match->data;
147 print_match(info, "");
154 struct xt_statistic_info *info = (struct xt_statistic_info *)match->data;
156 print_match(info, "--");