Re: IP and ICMP datagrams

From: Date: Sat, 27 Apr 2002 17:12:17 +0000
Subject: Re: IP and ICMP datagrams
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-94917@lists.php.net to get a copy of this message
On Sat, 27 Apr 2002, Ero Stig Karlsen wrote: > I'm trying to write a trace route program in PHP. The algorithm in itself > is not a problem, but i need to know how to set time to live (by number of > hops) in an IP datagram and send it. I also need to be able to listen for > and recieve ICMP messages and to exctract the IP adress of the sending > router from this message. > > I'm rather new to PHP, and I'm suspecting that I will have to use a > language that can manipulate the internet protocol stack at a lower level. > But if it is possible with PHP, nothing would be better. Any suggestions? I don't think this is possible with PHP. Traceroute handcrafts packets with specific TTL values. The PHP socket library doesn't give you this level of control. miguel

« previous php.general (#94917) next »