473,785 Members | 2,841 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application to check the Internet status??


I tried checking internet status of my system by issuing ping to some
well known server like google.com. But, the problem is that ping is
not working if target address is not within the same network. I
actually started writing small application, which can tell the
internet status of the given system by using some standard network
Apis. It would be great if some one suggest me how to proceed for
this.

Thanx in advance,
Ravindra. Bhadramraju
Aug 5 '08 #1
5 2457
Ravindra.B wrote:
I tried checking internet status of my system by issuing ping to some
well known server like google.com. But, the problem is that ping is
not working if target address is not within the same network. I
actually started writing small application, which can tell the
internet status of the given system by using some standard network
Apis. It would be great if some one suggest me how to proceed for
this.
Try on a group for your system since any methods to do this will be
specific for your implementation and/or system. For ideas under Unix
type systems see comp.unix.progr ammer and see
comp.os.ms-windows.program mer.win32 for Windows machines. There is no
generic way to do this, nor in purely Standard C.

Aug 5 '08 #2
"Ravindra.B " <ra************ ******@gmail.co mwrote:
I tried checking internet status of my system by issuing ping to some
well known server like google.com. But, the problem is that ping is
not working if target address is not within the same network.
No, the problem is that there is no reliable way to do what you want.
And no, I don't mean "no way using ISO C only"; I mean no reliable way
at all. For example, have you thought about what you'd do if your
firewall let you connect to most sites, but (for some, possibly
temporary reason) not to the one you intend to abuse for this purpose?

Richard
Aug 5 '08 #3
On 5 Aug 2008 at 12:46, Ravindra.B wrote:
I tried checking internet status of my system by issuing ping to some
well known server like google.com. But, the problem is that ping is
not working if target address is not within the same network. I
actually started writing small application, which can tell the
internet status of the given system by using some standard network
Apis. It would be great if some one suggest me how to proceed for
this.
I'm not completely sure what it is you want to do. It may just be a DNS
problem - otherwise you could try a traceroute and see how far your
packet gets before being dropped.

As for doing this in C, I can't think of a standard ping library - you
could download a ping program from the web and include the code in your
program, or just write it yourself using basic networking: you need to
send an ICMP echo request packet, and then receive (hopefully...) the
echo back.

If you need more information, describe the problem clearly!

Aug 5 '08 #4
On Aug 6, 3:10*am, Antoninus Twink <nos...@nospam. invalidwrote:
On *5 Aug 2008 at 12:46, Ravindra.B wrote:
I tried checking internet status of my system by issuing ping to some
well known server like google.com. But, the problem is that ping is
not working if target address is not within the same network. I
actually started writing small application, which can tell the
internet status of the given system by using some standard network
Apis. It would be great if some one suggest me how to proceed for
this.

I'm not completely sure what it is you want to do. It may just be a DNS
problem - otherwise you could try a traceroute and see how far your
packet gets before being dropped.

As for doing this in C, I can't think of a standard ping library - you
could download a ping program from the web and include the code in your
program, or just write it yourself using basic networking: you need to
send an ICMP echo request packet, and then receive (hopefully...) the
echo back.

If you need more information, describe the problem clearly!
Well, the requirement is something like this...a small api/function
which could tell if the internet connection is available or not and in
either case it should send a userfriendly message to the application.
To put it in a simple way, if the client application wants to check
every time the internet status of a given system before connecting to
the remote server how can it be achived by using standard Unix-network
Apis
Aug 6 '08 #5
Ravindra.B wrote:
On Aug 6, 3:10*am, Antoninus Twink <nos...@nospam. invalidwrote:
>On *5 Aug 2008 at 12:46, Ravindra.B wrote:
I tried checking internet status of my system by issuing ping to
some well known server like google.com. But, the problem is that
ping is not working if target address is not within the same
network. I actually started writing small application, which can
tell the internet status of the given system by using some standard
network Apis. It would be great if some one suggest me how to
proceed for this.

I'm not completely sure what it is you want to do. It may just be a
DNS problem - otherwise you could try a traceroute and see how far
your packet gets before being dropped.

As for doing this in C, I can't think of a standard ping library -
you could download a ping program from the web and include the code
in your program, or just write it yourself using basic networking:
you need to send an ICMP echo request packet, and then receive
(hopefully.. .) the echo back.

If you need more information, describe the problem clearly!

Well, the requirement is something like this...a small api/function
which could tell if the internet connection is available or not and in
either case it should send a userfriendly message to the application.
To put it in a simple way, if the client application wants to check
every time the internet status of a given system before connecting to
the remote server how can it be achived by using standard Unix-network
Apis
Please note that networking is not defined in any manner by the C
Standard and you will need to use system specific extensions to attempt
what you want. For that a group dealing with your system is a much
better place than here. If you program uses the POSIX APIs ask in
comp.unix.progr ammer, if it uses the Windows API ask in
comp.os.ms-windows.program mer.win32 or another suitable group.

<OT>
The usual method is try to connect and handle failure. This is a bit
like trying to read a byte and getting end-of-file or error in C.
</OT>

Aug 6 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1399
by: Graeme Coutts | last post by:
Developed a web application which adopts a custom security model which displays a login page and requests a username/password combination. The username works in a mixed-mode of usernames matched with the windows login name and some extra accounts (similar to SQL mixed-mode security). Web application is executed both in the corporate intranet and externally on the web. Getting user complaints about having to login to the web application when...
6
2374
by: @win | last post by:
Hello, I'm creating a windows service with VB.net. (vs 2003) I want this service to connect (or check the status of the connection) to the internet via a ISDN modem connection (standard dailup) without a logged in user. The service is running on a windows XP embedded OS. Can anyone point me in the right direction with this, I have no idea where to start on this on
23
4269
by: Gustaf | last post by:
I just read this article from today: http://webstandards.org/buzz/archive/2005_09.html I need some help understanding this sentense: The W3C recommends XHTML 1.1 should be served with the application/xhtml+xml MIME type, something that Internet Explorer does not currently support.
2
1408
by: JoeBlack | last post by:
Hi all, I am new to web development and have been asked if the following is possible, I was hoping some people with more experience than me could confirm if this is possible and what technologies would be required to realise it, so that I can then investigate how to do it. I have a "black box" of electronics with an ADSL connection, the "black box" has 4 buttons and 4 lights on it.
3
3173
by: Daniel Liberman | last post by:
Hi, everyone. That's my environment: - I have a pocket pc (iPAQ h4350) application developed with VSNET2003/C# that has a SQL Server CE Database, running. That's working fine. Obs: the pocket is NOT supposed to have a wireless conection available. - I have an access database on a standalone desktop running Windows XP, i.e., there is NO guaranteed network connection available. - I've developed a webservice with VSNET2003/C# too to do...
1
1977
by: toori | last post by:
i am new to the JAVA...Any one help to make codes for this server client application program "Design and implement a server application which acts as an Internet bank, i.e. keeps track of bank accounts and allows clients to connect over the Internet and make deposits and withdrawals from any of the bank accounts. Also implement the client application. Use any port number available for general use, i.e. in the range 50000 through 65535"...
1
2935
by: CodeSeeker | last post by:
I have an application, which uses pop3 to read the messages from the mailbox, and it has been working fine for so many year. We recently have started changing this application to use java mail IMAP 4 instead of Pop3. Primary reason for that :- Is we want to better meet out SLA, so we have decided to go with the 2 instances of this application, and hence decided to use IMAP4 to concurrently accessing the mailboxes via IMAP4. My issues:- Now...
3
7057
by: Sylvie | last post by:
My Windows Application has two forms, one form contains a grid (lets say Stock Listing), and the other is a form of one stock, contains some edit boxes for one stock's fields.. Is it possible to run application remotely and retrieve grid and form data in some way without accessing directly to database server? Web Services is being used for this purpose I think, Which methods must be used for this ?
2
3155
by: swethak | last post by:
Hi, I am getting the problem the problem with google map in Internet Explorer. This map worked fine in mozilla . When i opened the same map in Internet Explorer i am getting the error message as in alert box as " Internet Explorer cannot open the Internet site http://google.citycarrentals.com.au/viewalllocations.php . Operation aborted". It is working in Mozilla . Here i mentioned my code . I am facing this problem several...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10153
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10093
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9952
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8976
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3654
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.