Results 1 to 2 of 2

Thread: How to discriminate if a MAC Address belongs to RJ45 Network Card or Wi-Fi...

  1. #1
    Join Date
    Jun 2008
    Location
    Rome, Italy
    Posts
    95
    Thanks
    19
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default How to discriminate if a MAC Address belongs to RJ45 Network Card or Wi-Fi...

    Hi to all,
    I'm parsing all the network interfaces using the following example code:

    Qt Code:
    1. foreach (const QNetworkInterface &ni, QNetworkInterface::allInterfaces()) {
    2. qDebug() << ni.hardwareAddress();
    3. qDebug() << ni.name();
    4. qDebug() << ni.index();
    5. }
    To copy to clipboard, switch view to plain text mode 

    but It seems impossible to get know what is the interface.
    Need help!!!
    Thanks

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to discriminate if a MAC Address belongs to RJ45 Network Card or Wi-Fi...

    Have you tried looking at the name() of the interfaces to see if there is a useful clue? I don't think anything relying on this alone would be robust and portable but I don't know your application requirements and environment.

Similar Threads

  1. Replies: 0
    Last Post: 26th February 2010, 19:01
  2. How can I discriminate different Windows OSs?
    By cydside in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2010, 10:09
  3. how to read pc's network IP address
    By wei243 in forum Qt Programming
    Replies: 12
    Last Post: 8th January 2010, 16:59
  4. Obtaining MAC address from a network workstation
    By GuS in forum Qt Programming
    Replies: 0
    Last Post: 15th December 2008, 12:46
  5. Replies: 1
    Last Post: 7th February 2008, 10:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.