LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-10-2005, 09:41 PM   #1
ariana
LQ Newbie
 
Registered: Feb 2003
Posts: 22

Rep: Reputation: 15
how to find out if the computer is on the network


Hi,
I am developing a program in C/C++. I need to know if the current machine running the program is on the network. How can I use the program to find it out?
I had thought of using "ping certain_ip", but it means that ip must always be available. What is the reliable solution? Thank you for your help.



Ariana
 
Old 08-10-2005, 09:55 PM   #2
ComputerErik
Member
 
Registered: Apr 2005
Location: NYC
Distribution: Debian, RHEL
Posts: 269

Rep: Reputation: 54
ping is a very low level way to test connectivity between two hosts. Unless there is a dial connection somewhere between the two hosts I don't really see any situation where ping wouldn't work between them.

What exactly do you mean by ip must always be available in order for ping to work? In order for the two devices to be networked some type of protocol must be in use for connectivity to exist. Basically as long as the IP address of the device you want to test for connectivity with, and that will remain static (or at least your program will be able to keep up with any changes) ping should work well.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i find out which filesystem a computer uses? kpachopoulos Linux - Newbie 2 11-12-2005 04:40 AM
how to find my computer address? mfrangos79 Linux - Newbie 9 11-09-2005 05:20 PM
One computer on a three computer network having problems knightofdogbert General 2 10-20-2003 12:56 PM
Nobody else can find my computer aaron_mj Linux - Networking 1 10-27-2002 07:14 AM
What's in my computer/Utility to find out geraldgu Linux - Software 2 12-14-2001 12:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration