On Wed, 11 Oct 2006 16:47:45 +0000 (UTC), in comp.lang.c ,
ro******@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote:
>In article <11********************@b28g2000cwb.googlegroups.c om>,
santosh <sa*********@gmail.comwrote:
>>Santy wrote:
>>I am making an application in which i need to list all the computers in
my network.
>>Generally, there're
fairly portable POSIX APIs to do this, unless you happen to code for
Billy Gates.
Unfortunately that part is not correct. There are no POSIX APIs
to enumerate all the computers in any network -- not even if one
confines oneself to a particular subnet. No matter what API you
use on computer X, computer Y might be programmed to ignore all
packets from computer X.
The Billy Gates part is also incorrect. Unless you're running an
antique version of Windows from the early nineties (in which case, you
ought to mention Stevie J too) it'll respond to much the same
protocols as any other networked device.
--
Mark McIntyre
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan