LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 02: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, 12: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



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

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

All times are GMT -5. The time now is 02:41 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