Re: ARP clinet look program
- From: Rohan Dhond <rohan.dhond@xxxxxxxxx>
- Date: Wed, 11 Mar 2009 10:49:47 -0700 (PDT)
thnaks,,
now i need help to write program for simple route command
On Mar 5, 9:51 am, Lew Pitcher <lpitc...@xxxxxxxxxxxx> wrote:
On March 4, 2009 23:33, in comp.unix.programmer, Rohan Dhond
(rohan.dh...@xxxxxxxxx) wrote:
Hi all,
I am looking for guidance to write a program that will give me the mac
address of machines connected to my router.
./hw4i1a some_hostname
Host 138.28.58.3 has Ethernet Address aa:bb:cc:dd:ee:ff
ISTM that your requirement breaks down into a program of 4 parts:
1) parse commandline to retrieve hostname
2) perform DNSlookupon hostname to obtain IP address
3) performARP"WHO HAS" to obtain MAC Address
4) report results
Note that you cannot obtain the MAC address for IP addresses outside of your
subnet with this method. To do that, you will need aclient/server
approach, with a server on each system that you wish to query (routers do
not pass along MAC addresses, and some intervening networks may not even
support such a concept).
Now, all you have to do is determine the proper logic to implement each of
those steps.
HTH
--
Lew Pitcher
Master Codewright & JOAT-in-training | Registered Linux User #112576http://pitcher.digitalfreehold.ca/ ; | GPG public key available by request
---------- Slackware - Because I know what I'm doing. ------
.
- References:
- ARP clinet look program
- From: Rohan Dhond
- Re: ARP clinet look program
- From: Lew Pitcher
- ARP clinet look program
- Prev by Date: Re: bind address already in use over multiple ports
- Next by Date: implement route command
- Previous by thread: Re: ARP clinet look program
- Next by thread: Re: ARP clinet look program
- Index(es):
Relevant Pages
|