Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 10-10-2011, 03:09 PM   #1
LQ Newbie
Registered: Oct 2010
Posts: 5

Rep: Reputation: 0
Finding active computer in local network.

Hi guys!
How can I find out what computers in my local network? I need to implement something similar to this:
nmap -sP
But need to implement it using pure C code without calling system().

nmap works pretty fast it doesn't look like it uses usual ping.

Old 10-10-2011, 05:09 PM   #2
Registered: Jul 2009
Location: Kiev,Ukraine
Distribution: Ubuntu,Slax,RedHat
Posts: 289
Blog Entries: 1

Rep: Reputation: 41
grab source code of nmap and dig..
probably multicast ICMP packet or just inject bunch of ARP 223 12.449143 Casa_01:a9:4f Broadcast ARP Who has Tell
grab wireshark and look
Old 10-10-2011, 05:12 PM   #3
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
You can just read /proc/net/arp and ignore entries with 00:00:00:00:00:00.


local, network, nmap

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
finding mac address of a machine on local network aliabbass Linux - Networking 5 12-21-2010 04:33 PM
How do addresses get associated with computer names on a local network? SwissHeritage Slackware 5 03-27-2009 08:02 PM
Finding a computer in a Windows network. Hekdiesel Linux - Newbie 2 09-23-2005 09:59 AM
finding local fily system on a network sadiboyz Linux - Software 1 08-10-2003 10:14 PM
Finding Local network IP address. zaphanol Linux - Networking 9 07-25-2003 11:41 AM

All times are GMT -5. The time now is 07:32 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration