Networking: arp-request in Unix
-
wrote on 28 Aug 2020, 16:03 last edited by
Hi!
Is there a qt api for arp-requesting?
I need to find out the MAC address by IP.
Thank you. -
Hi,
AFAIK, no, that is outside of Qt's scope.
-
Hi
What is the use case ?
I needed it on a "controlled" pc so i just run arp command with QProcess and read the output.
But that might not be an option in all cases. -
Hi
What is the use case ?
I needed it on a "controlled" pc so i just run arp command with QProcess and read the output.
But that might not be an option in all cases.wrote on 31 Aug 2020, 13:05 last edited by@mrjj said in Networking: arp-request in Unix:
Hi
What is the use case ?
I needed it on a "controlled" pc so i just run arp command with QProcess and read the output.
But that might not be an option in all cases.Hi!
This is needs for the simple hardware configuration of the device. On Windows-host pc I use SendArp... But, as I see, there is no alternative API for Linux. -
@mrjj said in Networking: arp-request in Unix:
Hi
What is the use case ?
I needed it on a "controlled" pc so i just run arp command with QProcess and read the output.
But that might not be an option in all cases.Hi!
This is needs for the simple hardware configuration of the device. On Windows-host pc I use SendArp... But, as I see, there is no alternative API for Linux.wrote on 31 Aug 2020, 13:45 last edited by@sitesv said in Networking: arp-request in Unix:
there is no alternative API for Linux.
maybe the arping command is of some help?
-
@mrjj said in Networking: arp-request in Unix:
Hi
What is the use case ?
I needed it on a "controlled" pc so i just run arp command with QProcess and read the output.
But that might not be an option in all cases.Hi!
This is needs for the simple hardware configuration of the device. On Windows-host pc I use SendArp... But, as I see, there is no alternative API for Linux. -
wrote on 31 Aug 2020, 19:41 last edited by Kent-Dorfman
There are many ways to do what you seek in linux, just none are Qt specific. It's a Linux systems programming exercise, not Qt. Firstly, you're not going to get a real MAC address for any IP that isn't directly connected. You may get the MAC of the router gateway though. I'd just send a dgram to the destination IP, then read /proc/net/arp to see if an entry was added.
1/7