|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
I want to make a small program in C language to whom when i run should Ping specific range of IP addresses on my LAN system.For example my range is from 192.168.0.41 to 192.168.0.59 so every time if i want to check the number of users online i need to pickup and dial at lab or secondly if phone is busy i use to Ping each IP address and it is very hectic.So i want to make a program to whom when i run should ping whole series of 18 IP and it will tell that number of users alive and dead.Secondly it will be more better if it also give me alive IP addresses.So please help me.Donot tell me to use IP Scanner i know many of them but i want to design my own small and simple.i donot need fency software i just need information about users. Please tell me how we can use Dos commands of Ping ,netstat,ipconfig in Borland C.
![]() |
|
#2
|
|||
|
|||
|
I'm not 100% sure this works with Borland C, but it works fine if you run it on a linux/unix system.
The way I figure it you're in the need of calling some system calls to "shell" commands. Then you just run the function system(<commandname>); and the program will execute that command. Can't remember which library you need to include, but its one of the standard ones. Good luck! |
|
#3
|
|||
|
|||
|
If you're using C++ Builder (based on the Borland compiler), there is a convenient ICMP component included in the Professional version (possibly also in Basic). This will be better than shelling to a DOS command, because you'll have better access to the actual ping data.
__________________
Clay Dowling Lazarus Notes Articles and commentary on web development http://www.lazarusid.com/notes/ |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > how to use Dos commands in Borlad C |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|