VirtualBox

Ignore:
Timestamp:
Jul 18, 2017 2:15:32 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
117046
Message:

Main/NetIf (bugref:8915) Moved wireless detection from ConsoleImpl2.cpp to NetIf and exposed wireless flag via IHostNetworkInterface.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/linux/NetIf-linux.cpp

    r67432 r68026  
    2626#include <list>
    2727#include <sys/ioctl.h>
    28 #include <net/if.h>
     28#include <sys/socket.h>
     29#include <linux/wireless.h>
    2930#include <net/if_arp.h>
    3031#include <net/route.h>
     
    164165        if (ioctl(iSocket, SIOCGIFFLAGS, &Req) >= 0)
    165166            pInfo->enmStatus = Req.ifr_flags & IFF_UP ? NETIF_S_UP : NETIF_S_DOWN;
     167
     168        struct iwreq WRq;
     169        RT_ZERO(WRq);
     170        RTStrCopy(WRq.ifr_name, sizeof(WRq.ifr_name), pszName);
     171        pInfo->fWireless = ioctl(iSocket, SIOCGIWNAME, &WRq) >= 0;
    166172
    167173        FILE *fp = fopen("/proc/net/if_inet6", "r");
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette