LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-26-2005, 03:56 PM   #1
tbruer1138
LQ Newbie
 
Registered: Feb 2005
Posts: 5

Rep: Reputation: 0
Network status from within C/C++


What networking/system calls can be used to determine if the machine my software is running on is connected to the network? We are using sockets to do HTTP comms but have discovered no way to get the network status, for instance, when someone disconnects the network cable or the network goes down. Any suggestions/ideas/recommendations?
 
Old 02-27-2005, 01:11 AM   #2
xowl
Member
 
Registered: Jan 2005
Distribution: Slackware current (and others)
Posts: 188

Rep: Reputation: 30
You can try
man gethostbyname
with www.google.com (or something like that)

or simply a execve to /sbin/ifconfig
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Network Interface Status ejtbrown Programming 5 08-04-2006 02:12 AM
Network status from C/C++ program tbruer1138 Programming 1 02-26-2005 06:00 PM
network connection status ................ dileepkk Linux - Networking 1 07-09-2004 01:38 PM
Cannot get network card status up Synth3tic Linux - Newbie 14 05-22-2003 11:13 PM
Cannot Get network card status up Synth3tic Linux - Networking 3 05-21-2003 12:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:55 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration