[liboping] TTL of received packets (was: liboping improvement)
Vladimir V. Melnikov
wlad.w.m at gmail.com
Fri Mar 20 09:08:01 CET 2009
Hello, Florian.
This version can not build on my platform (sun solaris) - I have some old
SunSparc "netra" as "pinger". Solaris uses alternative socket library for
recvmsg with msg_control in msghdr structure - xnet, and I had another
problem on my platform - recvmsg not returned any cmsghdr - this version
trats this situation as timeout, although recvmsg returned payload. That
situation can be fixed by replacement "family = -1" by "family =
ph->addrfamily" in ping_receive_one. Also I've added workaround with empty
msg_control - ttl form ipv4 can still be got from ip_hdr :-).
Patch follow up in the attach.
Best regards,
Vladimir
> -----Original Message-----
> From: Florian Forster [mailto:octo at verplant.org]
> Sent: Sunday, March 15, 2009 1:50 PM
> To: Vladimir V. Melnikov
> Cc: liboping at verplant.org
> Subject: Re: [liboping] TTL of received packets (was:
> liboping improvement)
>
> Hi Vladimir,
>
> On Fri, Mar 13, 2009 at 03:23:37PM +0300, Vladimir V. Melnikov wrote:
> > But I missed one little thing in it - rest of ttl on
> returned packet.
> > I made a little patch for it (see below).
> > Hope you will include this feature in next version.
>
> sounds interesting :)
>
> I'm in the process of implementing this. Reading the TTL from
> the `struct ip' doesn't work for IPv6 unfortunately, because
> RAW sockets don't get the IPv6 header. I've switched to
> `recvmsg' because that can give me the required meta-data for
> both protocols.
>
> I've pushed the changes to the Git repository, I'll upload a
> new tarball alter today.
>
> Regards,
> -octo
> --
> Florian octo Forster
> Hacker in training
> GnuPG: 0x91523C3D
> http://verplant.org/
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: liboping-patch.txt
Url: http://mailman.verplant.org/pipermail/liboping/attachments/20090320/e907829f/attachment.txt
More information about the liboping
mailing list