Karthik Meyyappan

Greenhorn
+ Follow
since Apr 13, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Karthik Meyyappan

There is a dirty way for this problem in my mind. Every time you execute a "ping <ipaddress>" command, the mac address of the remote host will be cached locally. When you execute "arp -a", you get a list of IPs and their corresponding MAC addresses from the local ARP cache. This table can be parsed get the MAC address.
Let's wait to hear from others too. There must be a "solution"!
In the read method's while, you can just change the order in which the characters are checked for. i.e., -1 before #.