detecting adminstratively unreachable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I couldn't find an answer to this question in the archives, but I may 
be looking for the wrong keywords. If so, I apologize in advance and 
could someone please point me in the right direction?

For an application I'm writing, it would be very useful to be able to 
distinguish between ICMP network unreachable (a temporary condition) 
and ICMP network administratively unreachable (effectively permanent). 
Similarly for host and port unreachable.

Unfortunately, from /usr/src/linux-2.2.18/net/ipv4/icmp.c, it looks 
like the 2.2 kernel series seems to map both network unreachable and 
network adminstratively unreachable to ENETUNREACH.

Is there any way from application space, when using a TCP session, to 
either get at the actual type and code fields from the ICMP 
unreachable packet or to find out if the trigger for an ENETUNREACH 
had the "fatal" flag set in  the icmp_err_convert[] map? I'd like to 
avoid having to use something like a packet capture library, since 
that seems like overkill in this case. I thought SO_DEBUG might help, 
but I can't seem to find much info on whether it grabs ICMP errors and 
how to get at the data. Are there other options I'm missing here?

thanks very much,
Jeff Cours

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux