mirror of
https://github.com/nmap/nmap.git
synced 2026-01-03 05:09:14 +00:00
Committing MTU-related changes:
* Adding path-mtu.nse for Path MTU Discovery * Nmap now stores the MTU for interfaces (from SIOCGIFMTU or libdnet) * Scripts can access the MTU for host.interface via host.interface_mtu * Nmap prints the MTU for interfaces in --iflist
This commit is contained in:
14
Target.cc
14
Target.cc
@@ -133,8 +133,9 @@ void Target::Initialize() {
|
||||
htn.toclock_running = false;
|
||||
htn.host_start = htn.host_end = 0;
|
||||
interface_type = devt_other;
|
||||
devname[0] = '\0';
|
||||
devfullname[0] = '\0';
|
||||
devname[0] = '\0';
|
||||
devfullname[0] = '\0';
|
||||
mtu = 0;
|
||||
state_reason_init(&reason);
|
||||
memset(&pingprobe, 0, sizeof(pingprobe));
|
||||
pingprobe_state = PORT_UNKNOWN;
|
||||
@@ -378,6 +379,15 @@ void Target::setNextHop(struct sockaddr_storage *next_hop, size_t next_hop_len)
|
||||
nexthopsocklen = next_hop_len;
|
||||
}
|
||||
|
||||
/* Set MTU (to correspond with devname) */
|
||||
void Target::setMTU(int devmtu) {
|
||||
mtu = devmtu;
|
||||
}
|
||||
|
||||
/* Get MTU (to correspond with devname) */
|
||||
int Target::MTU(void) {
|
||||
return mtu;
|
||||
}
|
||||
|
||||
/* Starts the timeout clock for the host running (e.g. you are
|
||||
beginning a scan). If you do not have the current time handy,
|
||||
|
||||
Reference in New Issue
Block a user