473,788 Members | 2,759 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

project doubts please !

project doubt
1) ping all defined machines in the network from time to time, and
alert (by an indicator on a web page or screen) when some machine is
down
(2) periodically check HTTP and FTP ports of important machines (like
your intranet server) to verify that services are running and
responding properly
(3) can check if there is any networking problem like ping delay or
HTTP server responding slow
(4) sysadmins can add custom service ports (other than HTTP/FTP) to
their checklist
(5) your application will then check if those ports are open from time
to time
(6) sysadmins can also define ports which SHOULD NOT be open on any
machine, for example, IRC 666

This is what i am trying to code in C , can someone show me the way
how to start coding and proceed so that i can learn . I have coded
some sockets . yet am facing probs in coding this project ... details
on how to report error when a node in network timesout is highly
appreciated.

TIA

~bharat
Nov 14 '05 #1
5 1573
"Bharat Shetty" <bh***********@ gmail.com> wrote in message
news:12******** *************** ***@posting.goo gle.com...
project doubt
1) ping all defined machines in the network from time to time, and
alert (by an indicator on a web page or screen) when some machine is
down
(2) periodically check HTTP and FTP ports of important machines (like
your intranet server) to verify that services are running and
responding properly
(3) can check if there is any networking problem like ping delay or
HTTP server responding slow
(4) sysadmins can add custom service ports (other than HTTP/FTP) to
their checklist
(5) your application will then check if those ports are open from time
to time
(6) sysadmins can also define ports which SHOULD NOT be open on any
machine, for example, IRC 666

This is what i am trying to code in C , can someone show me the way
how to start coding and proceed so that i can learn . I have coded
some sockets . yet am facing probs in coding this project ... details
on how to report error when a node in network timesout is highly
appreciated.


Why do this in C ?
a shell script, or possibly some python or perl would be much easier for such a
task.
much simpler to maintain, configure and extend.
Furthermore, I'd be very surprised if packages for this purpose are not already
developped !

Chqrlie.

Don't use a surgeon's scalpel set to mow your lawn.
Nov 14 '05 #2

"Bharat Shetty" <bh***********@ gmail.com> wrote
project doubt
1) ping all defined machines in the network from time to time, and
alert (by an indicator on a web page or screen) when some machine is
down
This is what i am trying to code in C , can someone show me the way
how to start coding and proceed so that i can learn .

It is not really a C language problem, and the standard library provides no
support for networking. However many third party libraries are available.

The heart of the program would seem to be some technique for enumerating
machines on the network. How you would do this I have no idea, since I don't
do that sort of programming. Once you've got your list you can ping them
periodically. You can alert simply by writing to an HTML file. Similalry it
shouldn't be too much of a problem for an admistrator to save a list of
"important" machines to a data file somewhere, which your program
periodically reads.
Nov 14 '05 #3
"Charlie Gordon" <ne**@chqrlie.o rg> wrote in message news:<cn******* ***@reader1.ima ginet.fr>...
"Bharat Shetty" <bh***********@ gmail.com> wrote in message
news:12******** *************** ***@posting.goo gle.com...
project doubt
1) ping all defined machines in the network from time to time, and
alert (by an indicator on a web page or screen) when some machine is
down
(2) periodically check HTTP and FTP ports of important machines (like
your intranet server) to verify that services are running and
responding properly
(3) can check if there is any networking problem like ping delay or
HTTP server responding slow
(4) sysadmins can add custom service ports (other than HTTP/FTP) to
their checklist
(5) your application will then check if those ports are open from time
to time
(6) sysadmins can also define ports which SHOULD NOT be open on any
machine, for example, IRC 666

This is what i am trying to code in C , can someone show me the way
how to start coding and proceed so that i can learn . I have coded
some sockets . yet am facing probs in coding this project ... details
on how to report error when a node in network timesout is highly
appreciated.


Why do this in C ?
a shell script, or possibly some python or perl would be much easier for such a
task.
much simpler to maintain, configure and extend.
Furthermore, I'd be very surprised if packages for this purpose are not already
developped !

Chqrlie.

Don't use a surgeon's scalpel set to mow your lawn.


I want to do it in C , as per university norms. Could somebody tell me
how to start coding , reading for this project.
Nov 14 '05 #4

"Bharat Shetty" <bh***********@ gmail.com> wrote in message
news:12******** *************** ***@posting.goo gle.com...
"Charlie Gordon" <ne**@chqrlie.o rg> wrote in message

news:<cn******* ***@reader1.ima ginet.fr>...
"Bharat Shetty" <bh***********@ gmail.com> wrote in message
news:12******** *************** ***@posting.goo gle.com...
project doubt
1) ping all defined machines in the network from time to time, and
alert (by an indicator on a web page or screen) when some machine is
down
(2) periodically check HTTP and FTP ports of important machines (like
your intranet server) to verify that services are running and
responding properly
(3) can check if there is any networking problem like ping delay or
HTTP server responding slow
(4) sysadmins can add custom service ports (other than HTTP/FTP) to
their checklist
(5) your application will then check if those ports are open from time
to time
(6) sysadmins can also define ports which SHOULD NOT be open on any
machine, for example, IRC 666

This is what i am trying to code in C , can someone show me the way
how to start coding and proceed so that i can learn . I have coded
some sockets . yet am facing probs in coding this project ... details
on how to report error when a node in network timesout is highly
appreciated.


Why do this in C ?
a shell script, or possibly some python or perl would be much easier for such a task.
much simpler to maintain, configure and extend.
Furthermore, I'd be very surprised if packages for this purpose are not already developped !

Chqrlie.

Don't use a surgeon's scalpel set to mow your lawn.


I want to do it in C , as per university norms. Could somebody tell me
how to start coding , reading for this project.


First of all, you'll need a function that

1 Opens a TCP connection and returns an error code when this does not
succeed. Assuming you
have a POSIX socket lib, checkout socket(), bind(), connect()

2 Sends a request using the expected protocol on that port (HTTP, just ask
for a short page, FTP
send a 'ls'.

3 Pass the response to a protocol handler (not a complete one, but still) to
check wether the
response is a valid one. In this case, an appropriate error message (404,
for instance) would also
constitute a valid response. Return an error if the response wasn't valid.

4 Closes the TCP connection again.
So for each call to that function, you'd need

1. The TCP/IP address/port
2. An appropriate request
3. A (short) function to determine wether or not that response is valid for
the service expected

The latter (3) would be supplied in the form of a pointer-to-function. If
the demand is only to see wether or not a port is open, simply omit 2 and 3
and check the result status of connect(). If you can connect to an
address/port, then A) the server is up and running and B) the port specified
is "open".

This will give yo the main functionality. Now it should not be that hard to
poll servers and check the results.
Nov 14 '05 #5
On 15 Nov 2004 20:07:30 -0800
bh***********@g mail.com (Bharat Shetty) wrote:
"Charlie Gordon" <ne**@chqrlie.o rg> wrote in message
news:<cn******* ***@reader1.ima ginet.fr>...
"Bharat Shetty" <bh***********@ gmail.com> wrote in message
news:12******** *************** ***@posting.goo gle.com...
project doubt
1) ping all defined machines in the network from time to time, and
alert (by an indicator on a web page or screen) when some machine
is down
Networking is not defined by the C standard ans is highly OS specific.
Ask on a group dedicated to your system.

<snip>
This is what i am trying to code in C , can someone show me the
way how to start coding and proceed so that i can learn . I have
coded some sockets . yet am facing probs in coding this project
... details on how to report error when a node in network timesout
is highly appreciated.

Not on this group. We only deal with the C language, not OS specific
extensions.
Why do this in C ?
a shell script, or possibly some python or perl would be much easier
for such a task.
much simpler to maintain, configure and extend.
Furthermore, I'd be very surprised if packages for this purpose are
not already developped !

Chqrlie.

Don't use a surgeon's scalpel set to mow your lawn.


I want to do it in C , as per university norms. Could somebody tell me
how to start coding , reading for this project.


int main(void)
{
return 0;
}

We don't (as a rule) do coding for people even when it is possible in
standard C, we help when people have specific problems.

Write the code to read a configuration file detailing IP addresses and
we can help you with specific problems. For your networking problems you
will need to ask on a group dedicated to your system.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
Nov 14 '05 #6

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

Similar topics

0
1519
by: abbas reji | last post by:
--0-599929911-1059996886=:4358 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Content-Id: Content-Disposition: inline ________________________________________________________________________
6
1582
by: ritesh | last post by:
Hi, I have been reading some text on C and C++ (i.e advanced books). One of the books mentioned that C++ requires a runtime support whereas C does not - what the author was trying to say was that once you compile a C program the executable created is all that is needed whereas if you compile a C++ program the executable created requires a C++ runtime installed on your system to run the program. Can someone please provide more...
17
1631
by: ranjeet.gupta | last post by:
Dear All Below are the few doubts which I got while studying about C 1. Is there any method in C by which we can process the entire string in one unit, 2. Does there exist any way to make the command line arguments available to other functions without passing them as arguments to
13
1934
by: maadhuu | last post by:
hello everybody, i have 2 doubts . 1. is this always defined ?? int i =10; int a = i++ + i++; and also, i tried this in gcc, answer was 20, so what the sequence points for evaluation of something like i++ + i++ ???
1
1391
by: archana | last post by:
Hi all, I want to clear one doubt which i am facing regarding timer. Suppose i have one timer in which i am generating some files. and interval of my timer is say 5 min. Say suppose at then my files are generated at time 12:30 am and then as i set interval to 5 next file should gets generated to 12:35 but what if i change my system time to 12:25 or 12:34.
8
1740
by: Afshar | last post by:
Hi Group, Please help ending my Nightmare! There's a Windows Service written in VC++ and I have an ASP.NET project that uses this sevice as a COM library. It just works fine in VS Internal Web Server and also in my IIS. I can publish it on my computer easily, But CAN'T publish or deploy it on other machines with almost same configuration. The Service in working on all other machines too. I've tried several ways to set all permissions...
4
2207
by: naknak4 | last post by:
Introduction This assignment requires you to develop solutions to the given problem using several different approaches (which actually involves using three different STL containers). You will implement all three techniques as programs. In these programs, as well as solving the problem, you will also measure how long the program takes to run. The programs are worth 80% of the total mark. The final 20% of the marks are awarded for a...
0
984
by: kumar77 | last post by:
I have some doubts in Pro*C: 1)after precompiling a pro*C program how will be the output will be displayed i.e. how the SELECT statements are replaced by C stmts? 2)How to debug the Pro*C program?Which debugger is used? 3)When an error occurs after precompilation of a pro*C program,where to see the logical errors? 4)Is Pro*C a Procedural Programming Language or not?
2
1588
by: NIKHILUNNIKRISHNAN | last post by:
Hi, My name is Nikhil. I am new to programming.I am obfuscating a C# solution using Dotfuscator. The output of the soultion is a UI along with a setup to install the application. The setup is getting the binaries from a path saved in the project setup on VisualStudio 2003. The dotfuscated project is having an another path, the path where dotfuscator is installed. Will I get the proper Setup ? First the C# project is build, on ly then the...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9969
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
8995
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...
1
7519
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
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
5538
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4074
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
3
2897
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.