Qt-interest Archive, April 2007
QNetworkInterface how to get interfaces name list?
Message 1 in thread
I want to get list of network interfaces installed on my PC and I use
QNetworkInterface::name(). But name() returns
something like that: {0DC1B270-AF9A-4651-93E0-DB0C8AF3DAD1}. How I can
to get description of interface like
"Realtek RTL8168/8111 PCI-E Gigabit Ethernet NIC" or "Local Area
Connection 2"?
By the way, are there any methods to set network interface to get ip
address dynamically (from DHCP server)?
Qt 4.2.3 Windows XP Home Edition.
Thanks in advance.
Anton I Alferov.
--
[ signature omitted ]
Message 2 in thread
On Friday 27 April 2007 23:26:46 Anton I Alferov wrote:
> I want to get list of network interfaces installed on my PC and I use
> QNetworkInterface::name(). But name() returns
> something like that: {0DC1B270-AF9A-4651-93E0-DB0C8AF3DAD1}. How I can
> to get description of interface like
> "Realtek RTL8168/8111 PCI-E Gigabit Ethernet NIC" or "Local Area
> Connection 2"?
Well, I bet you have to look in the registry (probably subtree HARDWARE) for
that key, and there will be a definition of the values like "name of the
card"...
> By the way, are there any methods to set network interface to get ip
> address dynamically (from DHCP server)?
This is windows related network configuration stuff (?) I don't know the DHCP
protocoll, but I assume it takes the first server it finds and takes its
adress. So there can't be a method to be called at this place (IMHO)
--
[ signature omitted ]
Message 3 in thread
On 27.04.07 23:47:47, J. Preiss wrote:
> On Friday 27 April 2007 23:26:46 Anton I Alferov wrote:
> > By the way, are there any methods to set network interface to get ip
> > address dynamically (from DHCP server)?
>
> This is windows related network configuration stuff (?) I don't know the DHCP
> protocoll, but I assume it takes the first server it finds and takes its
> adress. So there can't be a method to be called at this place (IMHO)
No, DHCP is widely used for assigning an IP address to a client from a
DHCP Server using a specified range of IP adresses. The configuration of
a network interface to activate this is of course platform specific and
I don't think Qt provides such facilities. So one would have to do that
manually, by using the platform specific ways of configuring the
interface.
Andreas
--
[ signature omitted ]