PDA

View Full Version : traceroute on IPv6


webmastermattd
05-03-2003, 12:21 PM
Have made an implementation of traceroute for IPv4, though am having trouble changing it to IPv6 compatible.

The major problem that I am having is that when I recieve a message using IPv6 and raw sockets, the IPv6 header is not included. I have checked around and this apears to be standard?? Any ideas as to why this is?

Anyway, onto my question. What would be the best way of combating this 'feature' so that I can determine what IPv6 address is sending the icmp6 time exceeded message?

One way I have thought of is to listen for the replies that come in and work out the address from that. Is that the only way that it can be done?

Thanks in advance.

Later,

RobSeace
05-03-2003, 08:18 PM
Well, you'd know the address that sent the reply, because
recvfrom() would fill that in for you, into the passed "from"
address arg...

You can take a look at some of the implementations of
"traceroute6" which already exist out there, too... Eg: get
the source for the Linux "iputils" package...

webmastermattd
05-04-2003, 01:06 AM
I took a look at traceroute6 in the iputils package and that used the technique of listening for connections ( or something like that ).

Anyway, I did not know that recvfrom would fill in the values if you passed it a blank struct.
That is always something handy to know.

Later,