This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ping on cygwin?


Tino Lange <tino.lange@isg.de>  wrote in <3E22F92D.3040908@isg.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]