Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: Sam Edge To: cygwin AT cygwin DOT com Subject: Re: ping on cygwin? Date: Tue, 14 Jan 2003 07:30:28 +0000 Organization: . Reply-To: cygwin AT cygwin DOT com Message-ID: References: <217260-220031113163432974 AT M2W060 DOT mail2web DOT com> <3E22F92D DOT 3040908 AT isg DOT de> In-Reply-To: <3E22F92D.3040908@isg.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Posting-Agent: Hamster/2.0.0.0 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id h0E7VjI18533 Tino Lange wrote in <3E22F92D DOT 3040908 AT isg DOT de> in gmane.os.cygwin on Mon, 13 Jan 2003 18:36:45 +0100: > Thanks! I read it once again and hence I like to (try to) contribute - > see below. > > I learned a lot about raw icmp sockets and why only root is allowed to > open them - making ping a setuid program. If you do write a better ping for Windows - whether native or Cygwin - you can use raw sockets and construct your own ICMP datagrams but on NT/2k/XP-Pro this will only run if you have elevated privileges, just as on UNIX-like systems. Because there's no SUID feature available in Windows or in Cygwin (yet!) this is something of a problem. In case you're not aware, the Microsoft ping.exe and tracert.exe programs use a system library called icmp.dll which provides system calls that will send and receive ICMP Echo datagrams without needing extra privileges. This might be useful for your version. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcecomm/htm/_wcesdk_internet_control_message_protocol__icmp_.asp (Don't worry that this is under the Windows CE section, by the way. It applies to NT/2k/XP too.) -- Sam Edge -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/