Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 02-26-2005, 02:56 PM   #1
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
Registered: Jan 2005
Distribution: Slackware current (and others)
Posts: 188

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

or simply a execve to /sbin/ifconfig


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 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 > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:21 PM.

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