1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-30 11:29:01 +00:00

merge soc07 r5005:5016 - Adding <times> element for the host's final times (srtt, rttvar, to)

This commit is contained in:
fyodor
2007-08-11 04:47:38 +00:00
parent 83ec445bcf
commit aac82901d3
2 changed files with 10 additions and 1 deletions

View File

@@ -132,7 +132,7 @@
<!ELEMENT host ( status, address , (address | hostnames |
smurf | ports | os | distance | uptime |
tcpsequence | ipidsequence | tcptssequence |
hostscript | trace)* ) >
hostscript | trace)*, times ) >
<!-- these elements are written by output.c:write_xml_initial_hostinfo() -->
<!ELEMENT status EMPTY >
@@ -297,6 +297,13 @@
errorstr CDATA #IMPLIED
>
<!ELEMENT times EMPTY>
<!ATTLIST times
srtt CDATA #REQUIRED
rttvar CDATA #REQUIRED
to CDATA #REQUIRED
>
<!-- these elements are generated in output.c:printfinaloutput() -->
<!ELEMENT runstats (finished, hosts) >

View File

@@ -1764,6 +1764,8 @@ int nmap_main(int argc, char *argv[]) {
if (o.debugging)
log_write(LOG_STDOUT, "Final times for host: srtt: %d rttvar: %d to: %d\n",
currenths->to.srtt, currenths->to.rttvar, currenths->to.timeout);
log_write(LOG_XML, "<times srtt=\"%d\" rttvar=\"%d\" to=\"%d\" />\n",
currenths->to.srtt, currenths->to.rttvar, currenths->to.timeout);
log_write(LOG_NORMAL|LOG_SKID|LOG_STDOUT|LOG_MACHINE,"\n");
log_write(LOG_XML, "</host>\n");
}