LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-10-2011, 03:09 PM   #1
greyblake
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:
Quote:
nmap -sP 192.168.0.0/24
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.

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

Rep: Reputation: 61
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 xxx.xxx.xxx.30? Tell xxx.xxx.xxx.1?
grab wireshark and look
 
Old 10-10-2011, 05:12 PM   #3
macemoneta
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: 344Reputation: 344Reputation: 344Reputation: 344
You can just read /proc/net/arp and ignore entries with 00:00:00:00:00:00.
 
  


Reply

Tags
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:28 PM.

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