Home | History | Annotate | Download | only in extensions

Lines Matching refs:info

116 	struct xt_rateest_match_info *info = (void *)(*match)->data;
130 strncpy(info->name1, optarg, sizeof(info->name1) - 1);
143 strncpy(info->name2, optarg, sizeof(info->name2) - 1);
144 info->flags |= XT_RATEEST_MATCH_REL;
157 info->flags |= XT_RATEEST_MATCH_BPS;
163 if (rateest_get_rate(&info->bps1, argv[optind]) < 0)
180 info->flags |= XT_RATEEST_MATCH_PPS;
190 info->pps1 = val;
204 info->flags |= XT_RATEEST_MATCH_BPS;
210 if (rateest_get_rate(&info->bps2, argv[optind]) < 0)
227 info->flags |= XT_RATEEST_MATCH_PPS;
237 info->pps2 = val;
251 info->flags |= XT_RATEEST_MATCH_DELTA;
260 info->mode = XT_RATEEST_MATCH_EQ;
262 info->flags |= XT_RATEEST_MATCH_INVERT;
271 info->mode = XT_RATEEST_MATCH_LT;
273 info->flags |= XT_RATEEST_MATCH_INVERT;
282 info->mode = XT_RATEEST_MATCH_GT;
284 info->flags |= XT_RATEEST_MATCH_INVERT;
293 struct xt_rateest_match_info *info = cb->data;
295 if (info == NULL)
298 if (!(info->flags & XT_RATEEST_MATCH_REL))
299 info->flags |= XT_RATEEST_MATCH_ABS;
318 rateest_print_mode(const struct xt_rateest_match_info *info,
321 if (info->flags & XT_RATEEST_MATCH_INVERT)
324 switch (info->mode) {
342 const struct xt_rateest_match_info *info = (const void *)match->data;
346 printf("%s", info->name1);
347 if (info->flags & XT_RATEEST_MATCH_DELTA)
350 if (info->flags & XT_RATEEST_MATCH_BPS) {
352 if (info->flags & XT_RATEEST_MATCH_DELTA)
353 rateest_print_rate(info->bps1, numeric);
354 if (info->flags & XT_RATEEST_MATCH_ABS) {
355 rateest_print_rate(info->bps2, numeric);
356 rateest_print_mode(info, "");
359 if (info->flags & XT_RATEEST_MATCH_PPS) {
361 if (info->flags & XT_RATEEST_MATCH_DELTA)
362 printf(" %u", info->pps1);
363 if (info->flags & XT_RATEEST_MATCH_ABS) {
364 rateest_print_mode(info, "");
365 printf(" %u", info->pps2);
369 if (info->flags & XT_RATEEST_MATCH_REL) {
370 rateest_print_mode(info, "");
372 printf(" %s", info->name2);
374 if (info->flags & XT_RATEEST_MATCH_BPS) {
376 if (info->flags & XT_RATEEST_MATCH_DELTA)
377 rateest_print_rate(info->bps2, numeric);
379 if (info->flags & XT_RATEEST_MATCH_PPS) {
381 if (info->flags & XT_RATEEST_MATCH_DELTA)
382 printf(" %u", info->pps2);
387 static void __rateest_save_rate(const struct xt_rateest_match_info *info,
391 if (info->flags & XT_RATEEST_MATCH_DELTA) {
394 rateest_print_mode(info, "--rateest-");
397 rateest_print_mode(info, "--rateest-");
401 if (info->flags & (XT_RATEEST_MATCH_ABS|XT_RATEEST_MATCH_DELTA))
405 static void rateest_save_rates(const struct xt_rateest_match_info *info)
407 if (info->flags & XT_RATEEST_MATCH_BPS)
408 __rateest_save_rate(info, "bps", info->bps1, info->bps2, 0);
409 if (info->flags & XT_RATEEST_MATCH_PPS)
410 __rateest_save_rate(info, "pps", info->pps1, info->pps2, 1);
417 const struct xt_rateest_match_info *info = (const void *)match->data;
419 if (info->flags & XT_RATEEST_MATCH_DELTA)
422 if (info->flags & XT_RATEEST_MATCH_REL) {
423 printf(" --rateest1 %s", info->name1);
424 rateest_save_rates(info);
425 printf(" --rateest2 %s", info->name2);
427 printf(" --rateest %s", info->name1);
428 rateest_save_rates(info);