Re: SimplePing TTL
Re: SimplePing TTL
- Subject: Re: SimplePing TTL
- From: Quinn <email@hidden>
- Date: Thu, 22 Jul 2004 17:49:10 +0100
At 17:34 +0100 22/7/04, Charlie Boisseau wrote:
I am attempting to re-work the SimplePing example code into a
traceroute implementation, however one vital part which I can't seem
to find is the TTL field. How do I set the TTL for an outgoing ICMP
packet?
Hmmm, traceroute usually uses an ongoing UDP packet, in which case
you set the TTL using the IP_TTL socket option. Don't know whether
that works for ICMP as well. If not, you can just set IP_HDRINCL and
force the TTL in the header.
"UNIX Network Programming" by Stevens has an examlpe sockets-based
traceroute program. See Section 25.6 (at least in my 2nd ed).
S+E
--
Quinn "The Eskimo!" <
http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.