Re: ARP clinet look program



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.          ------

.



Relevant Pages

  • Re: ARP clinet look program
    ... I am looking for guidance to write a program that will give me the mac ... address of machines connected to my router. ... ISTM that your requirement breaks down into a program of 4 parts: ... parse commandline to retrieve hostname ...
    (comp.unix.programmer)
  • Re: Sending big files to a friend.
    ... which makes sense in terms of the controls that my router supplies. ... connect to my Mac in that fashion from the Internet via my ADSL ... A game or application is made up of one or more TCP/UDP port ranges. ... Because the internet IP that your prvider assigns to you is dynamic. ...
    (uk.comp.sys.mac)
  • Re: WatchGuard FireBox III?
    ... >> clone the original computer's NIC MAC that was provisioned with the ... >> ISP into the router. ... an OUI (Organizationally Unique ... Identifier) which indicates the manufacturer of the network adapter, ...
    (comp.security.firewalls)
  • Re: If you were stuck on a desert island and had only ten fonts...
    ... Dad's Mac can't get on the net. ... It's not their BB connection as Mums ... Rebooting the router often worked. ... Dad's iMac uses one of those Belkin ...
    (uk.comp.sys.mac)
  • Re: Sending big files to a friend.
    ... which makes sense in terms of the controls that my router supplies. ... Port Forwarding here, as well as `Always use this IP address'. ... Given that the router identifies devices by MAC and seems to do port ...
    (uk.comp.sys.mac)