I would like to know how to retrieve the IP address in a more sophisticated way. Find the known MAC address and the corresponding IP address from the list.Execute arp -a to print a list of IP and MAC addresses.Execute ping command ping 192.168.0.2 (NOTE: the instrument does not respond to ping).But I need to know the IP address before opening a socket (WinSock on Windows, sys/socket on OS X and Linux).Ĭurrently I use a very dirty way as shown below. I would like to write a C/C++ application which talks with the instrument using a socket connection. I know the MAC address of the instrument, but please assume that its IP address is unknown. The PC and the instrument are directly connected over a UDP socket with a CAT5 cable. In my case, there are only two devices: a very normal PC (192.168.0.1) and a scientific instrument which has an arbitrary IP address (192.168.0.xxx) hard coded in its ROM. I am looking for an easy way to convert a MAC address to the corresponding IP address in a local network.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |