View Single Post
  #1 (permalink)  
Old 12-Jun-2009, 03:07
tanmaya's Avatar
tanmaya tanmaya is offline
Puzzled Penguin
 
Join Date: Jun 2008
Location: Mumbai,India
Posts: 42
tanmaya hasn't been rated much yet
Send a message via AIM to tanmaya Send a message via MSN to tanmaya Send a message via Yahoo to tanmaya
Default ping a range of ips

well if i need to ping a range of ips I can use a small script like this#!/bin/bash
for i in { 1..50}
doping -c2 192.168.0.$i &> /dev/null
if [ $?=0 ]; then
echo "UP"
else
echo "DOWN"
fi
done

But I need to do this via a C program . How can I achieve the same ?
Reply With Quote