Hey all,
I'm writting my first C program (Apart from the little ones I did to learn the program).
What I want for this program to do is ping a range of IP's and then place the reply if alive into a file the compare all in that file to the /etc/hosts file to find the host name.
I know I could do it all ina script BUT I want to learn C and do it in that.
The reason I want it to do this is so I can check the main computers on the network can see all the other computers and also to check up if anyone has added any computers onto the network.
I'm pretty sure I can do most of this programming. But how do I call apon a external command? Like I'll need to use 'ping' and compare or something the same.
Also another quickie.
Once I have found the IP 64.1.128.15 (example only) in the 'etc/hosts' file how can I take the WHOLE line and place that into the last file for viewing all this data.
Thanks in advanced for the help.