From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a79652a22930869 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-16 12:57:10 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Ada program needs to ping another machine. Date: 16 Jan 2002 15:55:56 -0500 Organization: NASA Goddard Space Flight Center Message-ID: References: NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1011214805 24751 128.183.220.71 (16 Jan 2002 21:00:05 GMT) X-Complaints-To: dscoggin@cne-odin.gsfc.nasa.gov NNTP-Posting-Date: 16 Jan 2002 21:00:05 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Xref: archiver1.google.com comp.lang.ada:18981 Date: 2002-01-16T21:00:05+00:00 List-Id: Preben Randhol writes: > I'm making a small Ada program (on my spare time) that I want to be able > to run from both Linux and Windows. The problem is it need to check if > another machine is on or off and display this in a small GUI interface. > I can do this by using the ping command on Linux, but I would rather > learn how to do this from Ada. I'm not asking for a solution (of course > if somebody has something they want to share it would be nice), but some > hints on what I should read up on to find out how to do this. Can I use > sockets for instance? I'm developing on Linux and I don't have much clue > about Windows programming so I would like to make this as portable as > possible (that is, just recompiling in windows would be nice). Get the C source for ping from the Linux distribution, and either pragma Import some of it, or translate it all to Ada. > Eventually it would be nice to evolve the program into a talk > program (a program where one write simultaneously on a split screen) > as the wintalk program is rather unstable and I would hope Ada could > increase security. There are other talk programs out there; I doubt an Ada one would add much. It would, of course, be fun to do :). -- -- Stephe