Hi there,
I am working on a network application using ICMP packets over a raw AF_INET socket and was wondering if anyone knows how to set the TTL for the transmission?
It looks like in C++ and other languages you can but can't find any way of setting it in PHP.
What I need to do is set a socket option for the IP protocol (getprotobyname("ip")) for the option IP_TTL but IP_TTL isn't defined anywhere. It looks like being 4 on most UNIX systems but if I try this manually (not a good idea anyway) no joy.
I'm creating the socket as: $socket=socket_create(AF_INET,SOCK_RAW,1);
When I get a reply including the IP header the TTL is contained but I can find no options to read/write this value.
I hope I have been clear - any help is much appreciated.
Regards,
Dave.