mirror of
https://github.com/nmap/nmap.git
synced 2026-01-04 21:59:02 +00:00
Use const. New function nmap_getprotbyname()
This commit is contained in:
@@ -504,7 +504,7 @@ void printportoutput(const Target *currenths, const PortList *plist) {
|
||||
char serviceinfo[64];
|
||||
int i;
|
||||
int first = 1;
|
||||
struct nprotoent *proto;
|
||||
const struct nprotoent *proto;
|
||||
Port *current;
|
||||
Port port;
|
||||
char hostname[1200];
|
||||
@@ -2282,7 +2282,7 @@ static void printtraceroute_normal(const Target *currenths) {
|
||||
log_write(LOG_PLAIN, "TRACEROUTE (using port %d/%s)\n",
|
||||
probe.pd.sctp.dport, proto2ascii_lowercase(probe.proto));
|
||||
} else if (probe.type == PS_ICMP || probe.type == PS_ICMPV6 || probe.type == PS_PROTO) {
|
||||
struct nprotoent *proto = nmap_getprotbynum(probe.proto);
|
||||
const struct nprotoent *proto = nmap_getprotbynum(probe.proto);
|
||||
log_write(LOG_PLAIN, "TRACEROUTE (using proto %d/%s)\n",
|
||||
probe.proto, proto ? proto->p_name : "unknown");
|
||||
} else if (probe.type == PS_NONE) {
|
||||
|
||||
Reference in New Issue
Block a user