@@ -605,6 +605,29 @@ else if(rds == 3)
605605 }
606606 }
607607 }
608+ else if (rds == 4 )
609+ {
610+ qsort (aplist , APLIST_MAX , APLIST_SIZE , sort_aplist_by_tsresponse );
611+ for (i = 0 ; i < APLIST_MAX - 1 ; i ++ )
612+ {
613+ if ((aplist + i )-> tsakt == 0 ) break ;
614+ if ((scanlist + scanlistindex )-> channel == (aplist + i )-> apdata -> channel )
615+ {
616+ tvlast = (aplist + i )-> tsakt / 1000000000ULL ;
617+ strftime (timestring , TIMESTRING_LEN , "%H:%M:%S" , localtime (& tvlast ));
618+ if ((aplist + i )-> apdata -> tsresponse > 0 )
619+ {
620+ tvlast = (aplist + i )-> apdata -> tsresponse / 1000000000ULL ;
621+ strftime (timestringresponse , TIMESTRING_LEN , "%H:%M:%S" , localtime (& tvlast ));
622+ fprintf (stdout , "%3u|%s|%s|%4d|%02x%02x%02x%02x%02x%02x|%.*s\n" ,
623+ (aplist + i )-> apdata -> channel , timestring , timestringresponse , (s8 )(aplist + i )-> apdata -> rtrssi ,
624+ (aplist + i )-> apdata -> maca [00 ], (aplist + i )-> apdata -> maca [01 ], (aplist + i )-> apdata -> maca [02 ],
625+ (aplist + i )-> apdata -> maca [03 ], (aplist + i )-> apdata -> maca [04 ], (aplist + i )-> apdata -> maca [05 ],
626+ (aplist + i )-> apdata -> essidlen , (aplist + i )-> apdata -> essid );
627+ }
628+ }
629+ }
630+ }
608631qsort (aplist , APLIST_MAX , APLIST_SIZE , sort_aplist_by_tsakt );
609632return ;
610633}
@@ -5349,6 +5372,7 @@ fprintf(stdout, "--ftc : enable fake time clock\n"
53495372 " 1 = show APs on current channel sorted by PROBERESPONSE timestamp\n"
53505373 " 2 = show APs on current channel sorted by RSSI\n"
53515374 " 3 = show APs of all channels sorted by RSSI\n"
5375+ " 4 = show only APs in range on current channel sorted by PROBERESPONSE timestamp\n"
53525376 "--rdt : disable TIOCGWINSZ for real time displays\n"
53535377 "--rcascan=<mode> : radio channel assessment scan\n"
53545378 " (a)ctive = active scan (transmit undirected PROBEREQUEST frames)\n"
0 commit comments