From owner-freebsd-questions Thu Sep 4 21:22:51 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id VAA15000 for questions-outgoing; Thu, 4 Sep 1997 21:22:51 -0700 (PDT) Received: from super-g.inch.com (super-g.com [207.240.140.161]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id VAA14995 for ; Thu, 4 Sep 1997 21:22:47 -0700 (PDT) Received: from localhost (spork@localhost) by super-g.inch.com (8.8.7/8.8.5) with SMTP id AAA01689; Fri, 5 Sep 1997 00:28:29 -0400 (EDT) Date: Fri, 5 Sep 1997 00:28:28 -0400 (EDT) From: spork X-Sender: spork@super-g.inch.com To: Michael Richards <026809r@dragon.acadiau.ca> cc: freebsd-questions@FreeBSD.ORG Subject: Re: Ping bug? In-Reply-To: <199709050210.XAA19228@dragon.acadiau.ca> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk In looking at the latest issue of Phrack (#51), I found a very nice port scanner that is smart enough to ping hosts before it scans them. It's a very slick tool, but to make a long story short, I was looking at stealing the ping they wrote that incorporates a very short ping time. Perfect for checking local hosts or sweeping through a range of IPs to see who's up without that annoying timeout. If you'rehandy with C, I recommend looking at the source, it seems like it could be easily lifted out of the package.... Charles On Thu, 4 Sep 1997, Michael Richards wrote: > Hi. > > I have an interesting problem with ping. I don't know if it is a bug or > not. > > The man page says that the -Q switch will shut it up when it comes to error > messages. > > I am writing a package to tell me if the host is up or down. > the script calls: > ping -c1 -Q lib226-1.acadiau.ca > at this time it is dead. so it tries: > ping -c10 -Q lib226-1.acadiau.ca > if nothing comes back, we assume lib226-1 is dead.. right? > > Here's what I keep getting back. > > ping: sendto: Host is down > ping: wrote lib226-1.acadiau.ca 64 chars, ret=-1 > > According to the man page, it shouldn't give me any errors. Even funnier, it > seems to behave correctly if I just start off pinging it once. As soon as I > try pinging a second time in a row, it spits out these error messages... > > Any ideas? > > -Mike >