Nmap Development mailing list archives

Re: Match ICMP echo reply to request in scan_engine.cc


From: David Fifield <david () bamsoftware com>
Date: Thu, 8 Aug 2013 13:18:52 -0700

On Thu, Aug 08, 2013 at 04:00:37PM -0400, Chris Johnson wrote:
2. I disagree with the suggestion of storing icmp_ident in
probespec_icmpdata. The ident value is (ideally) unique to each probe.

It's fine to say that, but that's not how it works in fact. In the
patch, the ident member is used by no other probe type than ICMP.
UltraProbe could use a refactoring to have a unique ID per probe, like
Probe::token in traceroute.cc. But doing so shouldn't be a part of this
patch. It's not good to add a new class member that will be
uninitialized except in the ICMP case.

But now that I look at it more, I think a better place to store the ICMP
ID is in a new struct IPExtraProbeData_icmp, like the existing
IPExtraProbeData_tcp, IPExtraProbeData_udp, and IPExtraProbeData_sctp.

3. I've created an icmp_probe_match helper function, as suggested.

Thanks, that looks good. Please move the declaration of struct ppkt to
scan_engine.cc if it doesn't need wider scope.

David Fifield
_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: