SunQuest
           C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old October 31st, 2002, 08:52 AM
moonnightingale moonnightingale is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Posts: 1 moonnightingale User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question how to use Dos commands in Borlad C

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.

Reply With Quote
  #2  
Old October 31st, 2002, 09:02 AM
Oraly Oraly is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Location: Stavanger
Posts: 83 Oraly User rank is Lance Corporal (50 - 100 Reputation Level)Oraly User rank is Lance Corporal (50 - 100 Reputation Level)Oraly User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 20 h 13 m 24 sec
Reputation Power: 8
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!

Reply With Quote
  #3  
Old October 31st, 2002, 10:44 AM
ClayDowling ClayDowling is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Flint, MI
Posts: 328 ClayDowling User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 19 m 25 sec
Reputation Power: 6
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/

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > how to use Dos commands in Borlad C


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway