static int immediate_mode;
#endif
static int count_mode;
-static u_int packets_skipped;
+static u_int packets_to_skip;
static int infodelay;
static int infoprint;
break;
case OPTION_SKIP:
- packets_skipped = parse_u_int("packet skip count",
+ packets_to_skip = parse_u_int("packet skip count",
optarg, NULL, 0, INT_MAX, 0);
break;
warning("-x[x] and -X[X] are mutually exclusive. -x[x] ignored.");
if (cnt != -1)
- if ((int)packets_skipped > (INT_MAX - cnt))
- // cnt + (int)packets_skipped used in pcap_loop() call
+ if ((int)packets_to_skip > (INT_MAX - cnt))
+ // cnt + (int)packets_to_skip used in pcap_loop() call
error("Overflow (-c count) %d + (--skip count) %d", cnt,
- (int)packets_skipped);
+ (int)packets_to_skip);
if (Dflag)
show_devices_and_exit();
do {
status = pcap_loop(pd,
- (cnt == -1 ? -1 : cnt + (int)packets_skipped),
+ (cnt == -1 ? -1 : cnt + (int)packets_to_skip),
callback, pcap_userdata);
if (WFileName == NULL) {
/*
dump_info = (struct dump_info *)user;
- if (packets_captured <= packets_skipped)
+ if (packets_captured <= packets_to_skip)
return;
/*
dump_info = (struct dump_info *)user;
- if (packets_captured <= packets_skipped)
+ if (packets_captured <= packets_to_skip)
return;
pcap_dump((u_char *)dump_info->pdd, h, sp);
++infodelay;
- if (!count_mode && packets_captured > packets_skipped)
+ if (!count_mode && packets_captured > packets_to_skip)
pretty_print_packet((netdissect_options *)user, h, sp, packets_captured);
--infodelay;