Nmap Development mailing list archives
Re: [Patch] BSD traceroute fix
From: "Eddie Bell" <ejlbell () gmail com>
Date: Thu, 12 Apr 2007 18:38:18 +0100
I did think about doing exactly that :) but it seemed a little inelegant. Just commit your patch, so we don't have to worry about it in the future. - eddie On 12/04/07, Kris Katterjohn <katterjohn () gmail com> wrote:
Hey Instead of adding defined() tests (who's to say another one won't be needed later on), how about wrapping each of the #define's in #ifndef's so it'll cover everything? I attached a patch to show you what I mean. It hasn't been committed or anything, so please lemme know what you think! Thanks, Kris Katterjohn Eddie Bell wrote:hey all, Tiny patch to enable ICMP type and code definitions on BSD* for traceroute.h. Thanks to GWK for finding the bug - eddieIndex: traceroute.h =================================================================== --- traceroute.h (revision 4639) +++ traceroute.h (working copy) @@ -124,20 +124,46 @@ #define NAMEIPLEN MAXHOSTNAMELEN+INET6_ADDRSTRLEN -#if defined(WIN32) || defined(MACOSX) +#ifndef ICMP_ECHOREPLY #define ICMP_ECHOREPLY 0 +#endif +#ifndef ICMP_DEST_UNREACH #define ICMP_DEST_UNREACH 3 +#endif +#ifndef ICMP_ECHO #define ICMP_ECHO 8 +#endif +#ifndef ICMP_TIME_EXCEEDED #define ICMP_TIME_EXCEEDED 11 +#endif +#ifndef ICMP_TIMESTAMP #define ICMP_TIMESTAMP 13 +#endif +#ifndef ICMP_TIMESTAMPREPLY #define ICMP_TIMESTAMPREPLY 14 +#endif +#ifndef ICMP_ADDRESS #define ICMP_ADDRESS 17 +#endif +#ifndef ICMP_ADDRESSREPLY #define ICMP_ADDRESSREPLY 18 +#endif +#ifndef ICMP_HOST_UNREACH #define ICMP_HOST_UNREACH 1 +#endif +#ifndef ICMP_PROT_UNREACH #define ICMP_PROT_UNREACH 2 +#endif +#ifndef ICMP_PORT_UNREACH #define ICMP_PORT_UNREACH 3 +#endif +#ifndef ICMP_NET_ANO #define ICMP_NET_ANO 9 +#endif +#ifndef ICMP_HOST_ANO #define ICMP_HOST_ANO 10 +#endif +#ifndef ICMP_PKT_FILTERED #define ICMP_PKT_FILTERED 13 #endif
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- [Patch] BSD traceroute fix Eddie Bell (Apr 12)
- Re: [Patch] BSD traceroute fix Kris Katterjohn (Apr 12)
- Re: [Patch] BSD traceroute fix Eddie Bell (Apr 12)
- Re: [Patch] BSD traceroute fix Kris Katterjohn (Apr 12)
- Re: [Patch] BSD traceroute fix Fyodor (Apr 13)
- Re: [Patch] BSD traceroute fix Eddie Bell (Apr 12)
- Re: [Patch] BSD traceroute fix Kris Katterjohn (Apr 12)
