Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #10582

Re: Ping from JAVA to IP Address

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail
From glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups comp.lang.java.programmer
Subject Re: Ping from JAVA to IP Address
Date Wed, 7 Dec 2011 08:59:26 +0000 (UTC)
Organization Aioe.org NNTP Server
Lines 23
Message-ID <jbn9te$dab$2@speranza.aioe.org> (permalink)
References <670cd44b-d05f-4300-9c59-b26f28e17323@j36g2000prh.googlegroups.com> <9gloupFf3oU1@mid.individual.net> <j84mmv$6b7$1@dont-email.me> <0aec9e49-b7d2-4afd-9f8f-07a2d07392ca@k13g2000prg.googlegroups.com> <26b57282-aa91-4116-884c-92af6ae1f911@k38g2000pro.googlegroups.com> <j86jl3$tvd$1@dont-email.me> <wlhabwd73x60$.1qs46lbqszfoq.dlg@40tude.net> <4eb6ee10$0$290$14726298@news.sunsite.dk>
NNTP-Posting-Host H0vc4U5LIRkRHNPyGCs2dA.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 8bit
X-Complaints-To abuse@aioe.org
User-Agent tin/1.9.6-20100522 ("Lochruan") (UNIX) (Linux/2.6.32-5-amd64 (x86_64))
X-Notice Filtered by postfilter v. 0.8.2
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:10582

Show key headers only | View raw


Arne Vajhøj <arne@vajhoej.dk> wrote:

(snip)
> Well - your post was far from complete.

> Raw sockets and ICMP are not exposed to the programmer in Java.

> But that does not prevent something inside Java to use ICMP.

As far as I know, at least for unix-like system, you need to
be setuid root to do raw sockets or ICMP.  Running java as
setuid root doesn't sound great for security.

I would think that it could do something like system("ping") 
to run the ping program (which is setuid root).

> The isReachable method will in fact attempt a ping on *nix.

> On Windows it uses the echo service.

> (it will also fallback to echo on *nix if no privilege to call ping)

-- glen

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Ping from JAVA to IP Address sahm <sahm007@gmail.com> - 2011-10-24 11:01 -0700
  Re: Ping from JAVA to IP Address Robert Klemme <shortcutter@googlemail.com> - 2011-10-24 20:26 +0200
    Re: Ping from JAVA to IP Address markspace <-@.> - 2011-10-24 14:52 -0700
      Re: Ping from JAVA to IP Address sahm <sahm007@gmail.com> - 2011-10-24 22:31 -0700
        Re: Ping from JAVA to IP Address sahm <sahm007@gmail.com> - 2011-10-25 01:56 -0700
          Re: Ping from JAVA to IP Address Screamin Lord Byron <scre@min.dot> - 2011-10-25 11:57 +0200
          Re: Ping from JAVA to IP Address markspace <-@.> - 2011-10-25 08:12 -0700
            Re: Ping from JAVA to IP Address Screamin Lord Byron <scre@min.dot> - 2011-10-25 22:13 +0200
              Re: Ping from JAVA to IP Address markspace <-@.> - 2011-10-25 16:02 -0700
                Re: Ping from JAVA to IP Address Screamin Lord Byron <scre@min.dot> - 2011-10-26 13:16 +0200
              Re: Ping from JAVA to IP Address Arne Vajhøj <arne@vajhoej.dk> - 2011-11-06 15:29 -0500
                Re: Ping from JAVA to IP Address glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-12-07 08:59 +0000
  Re: Ping from JAVA to IP Address Roedy Green <see_website@mindprod.com.invalid> - 2011-10-25 21:28 -0700
  Re: Ping from JAVA to IP Address Arne Vajhøj <arne@vajhoej.dk> - 2011-11-06 15:36 -0500

csiph-web