Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Can I Ping in REBOL?

From: holger:rebol at: 17-Apr-2001 6:42

On Tue, Apr 17, 2001 at 11:08:05AM +0100, Geraint Jones wrote:
> Hello REBOLers, > > Now to the problem I have: I am a Computer Technician for a college in the UK and the Network Administrator here wants to write a CGI Ping tool. He is > fluent in Perl but there are severe limitations with implementing the tool with this language, i.e. to use TCP/IP Perl requires that the user of the tool be > logged-in as root (an unacceptable security risk). So he asked me to look into it with REBOL, hence the big question: How do I write a Ping type tool with > REBOL, that can use TCP/IP and is autonomous? And it's not possible with REBOL, will another language do it?
Ping always requires root permission, with any language. This is a side effect of the way ICMP works in Unix, not a limitation of any particular language. There are two ways to get root permission. One is to be logged in as root, the other one is to install the program that needs to ping with "setuid root". That's how "/sbin/ping" is typically installed. This limitation of ICMP is exactly the reason why REBOL currently does not provide an ICMP scheme. There are two workarounds though: if you only want to check for connecticity you could use UDP instead of ICMP. That is what traceroute does, for example. The other possibility is to call "/sbin/ping" as an external program from REBOL/Command, REBOL/View/Pro or the upcoming REBOL/Core/Pro. -- Holger Kruse [holger--rebol--com]