1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-10 09:49:05 +00:00

Remove the struct scan_lists parameter from getpts_aux and some of its auxiliary functions. It was used only to keep track of the number of ports and protocols, which can be derived after the bit map is filled in. This is preparation for a minor refactoring of getpts so it can be used for ping port selection.

This commit is contained in:
david
2007-10-30 04:40:10 +00:00
parent 83224a187c
commit 2dcf70d520
5 changed files with 21 additions and 22 deletions

View File

@@ -190,7 +190,7 @@ static int nmap_protocols_init() {
*/
int addprotocolsfromservmask(char *mask, u8 *porttbl, struct scan_lists *ports) {
int addprotocolsfromservmask(char *mask, u8 *porttbl) {
struct protocol_list *current;
int bucket, t=0;
@@ -201,7 +201,6 @@ int addprotocolsfromservmask(char *mask, u8 *porttbl, struct scan_lists *ports)
for(current = protocol_table[bucket % PROTOCOL_TABLE_SIZE]; current; current = current->next) {
if (wildtest(mask, current->protoent->p_name)) {
porttbl[ntohs(current->protoent->p_proto)] |= SCAN_PROTOCOLS;
ports->prot_count++;
t++;
}
}