@@ -207,7 +207,7 @@ static int timeout = 1000; /* default timeout = 1000 ms = 1 s */
207
207
static int immediate_mode ;
208
208
#endif
209
209
static int count_mode ;
210
- static u_int packets_skipped ;
210
+ static u_int packets_to_skip ;
211
211
212
212
static int infodelay ;
213
213
static int infoprint ;
@@ -2055,7 +2055,7 @@ main(int argc, char **argv)
2055
2055
break ;
2056
2056
2057
2057
case OPTION_SKIP :
2058
- packets_skipped = parse_u_int ("packet skip count" ,
2058
+ packets_to_skip = parse_u_int ("packet skip count" ,
2059
2059
optarg , NULL , 0 , INT_MAX , 0 );
2060
2060
break ;
2061
2061
@@ -2098,10 +2098,10 @@ main(int argc, char **argv)
2098
2098
warning ("-x[x] and -X[X] are mutually exclusive. -x[x] ignored." );
2099
2099
2100
2100
if (cnt != -1 )
2101
- if ((int )packets_skipped > (INT_MAX - cnt ))
2102
- // cnt + (int)packets_skipped used in pcap_loop() call
2101
+ if ((int )packets_to_skip > (INT_MAX - cnt ))
2102
+ // cnt + (int)packets_to_skip used in pcap_loop() call
2103
2103
error ("Overflow (-c count) %d + (--skip count) %d" , cnt ,
2104
- (int )packets_skipped );
2104
+ (int )packets_to_skip );
2105
2105
2106
2106
if (Dflag )
2107
2107
show_devices_and_exit ();
@@ -2699,7 +2699,7 @@ DIAG_ON_ASSIGN_ENUM
2699
2699
2700
2700
do {
2701
2701
status = pcap_loop (pd ,
2702
- (cnt == -1 ? -1 : cnt + (int )packets_skipped ),
2702
+ (cnt == -1 ? -1 : cnt + (int )packets_to_skip ),
2703
2703
callback , pcap_userdata );
2704
2704
if (WFileName == NULL ) {
2705
2705
/*
@@ -3190,7 +3190,7 @@ dump_packet_and_trunc(u_char *user, const struct pcap_pkthdr *h, const u_char *s
3190
3190
3191
3191
dump_info = (struct dump_info * )user ;
3192
3192
3193
- if (packets_captured <= packets_skipped )
3193
+ if (packets_captured <= packets_to_skip )
3194
3194
return ;
3195
3195
3196
3196
/*
@@ -3322,7 +3322,7 @@ dump_packet(u_char *user, const struct pcap_pkthdr *h, const u_char *sp)
3322
3322
3323
3323
dump_info = (struct dump_info * )user ;
3324
3324
3325
- if (packets_captured <= packets_skipped )
3325
+ if (packets_captured <= packets_to_skip )
3326
3326
return ;
3327
3327
3328
3328
pcap_dump ((u_char * )dump_info -> pdd , h , sp );
@@ -3344,7 +3344,7 @@ print_packet(u_char *user, const struct pcap_pkthdr *h, const u_char *sp)
3344
3344
3345
3345
++ infodelay ;
3346
3346
3347
- if (!count_mode && packets_captured > packets_skipped )
3347
+ if (!count_mode && packets_captured > packets_to_skip )
3348
3348
pretty_print_packet ((netdissect_options * )user , h , sp , packets_captured );
3349
3349
3350
3350
-- infodelay ;
0 commit comments