0

I need to get info (mainly link speed (gigabit vs. 10/100)) of the network interface used to exchange UDP packets with a device. I'm using Qt in Windows.

I can get this info using GetAdaptersAddresses; I can check the desired interface given its name or its IP address. But, I first need to know the address used when sending/receiving UDP messages.

I found some hints about how to get this info using "low level" socket functions (example). Is there a way to get this info using QUDPSocket? Do I need to access the low level socket?

il_mix
  • 553
  • 8
  • 20
  • Are you talking about the host address? https://doc.qt.io/qt-6/qabstractsocket.html#localAddress – mzimmers Jul 04 '23 at 20:45
  • Looks like it. Easier that I thought... Question: I suppose I need to check localAddress AFTER sending the message, since the OS will decide which interface to use on the go, right? In the same way, if I check the peerAddress after receive, I get the sender address, right? This can be useful when receiving a boardcast message. (I don't have the setup to test these things at the moment) – il_mix Jul 05 '23 at 08:48

0 Answers0