Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!ginosko!aplcen!haven!decuac!shlump.nac.dec.com!michaud From: michaud@devax.dec.com (Jeff Michaud) Newsgroups: comp.protocols.tcp-ip Subject: Re: Counting Internet Hosts (and Users) Message-ID: <5346@shlump.nac.dec.com> Date: 12 Oct 89 01:50:38 GMT References: <20444@usc.edu> <8910101451.AA01170@interlan.interlan.com> Sender: news@shlump.nac.dec.com Organization: DEC Lines: 21 > In article <8910101451.AA01170@interlan.interlan.com> > Seems like there is a simpler way to do it...... > > for (i=0; i<0xffffffff; i++) > foo = ping(i) > if (foo == answered) > number_of_hosts++; > Yes, but it probably takes about 136 YEARS to run (assuming that pings > take about 1 second to either respond or time out). Thats only if you were to actually wait for for a response/timeout. If you just continuously sent one right after the other without waiting for the response (but sending just slow enough as to not create a traffic jam) and simply count the number of responses. I wonder how long that would take? /--------------------------------------------------------------\ |Jeff Michaud michaud@decwrl.dec.com michaud@decvax.dec.com| |DECnet-ULTRIX #include | \--------------------------------------------------------------/