src/adapters/net_iw.cpp
/**
   * Query the wireless device for information
   * about the current connection
   */
Query the wireless device for information
about the current connection
Query the wireless device for information about the current connection
bool wireless_network::query(bool accumulate) {
    if (!network::query(accumulate)) {
      return false;
    }
    auto socket_fd = file_util::make_file_descriptor(iw_sockets_open());
    if (!*socket_fd) {
      return false;
    }
    struct iwreq req {};
    if (iw_get_ext(*socket_fd, m_interface.c_str(), SIOCGIWMODE, &req) == -1) {
      return false;
    }
    if (req.u.mode == IW_MODE_ADHOC) {
      return false;
    }
    query_essid(*socket_fd);
    query_quality(*socket_fd);
    return true;
  }
bool wireless_network :: query ( bool accumulate ) { if ( ! network :: query ( accumulate ) ) { return false ; } auto socket_fd = file_util :: make_file_descriptor ( iw_sockets_open ( ) ) ; if ( ! * socket_fd ) { return false ; } struct iwreq req { } ; if ( iw_get_ext ( * socket_fd , m_interface . c_str ( ) , SIOCGIWMODE , & req ) == -1 ) { return false ; } if ( req . u . mode == IW_MODE_ADHOC ) { return false ; } query_essid ( * socket_fd ) ; query_quality ( * socket_fd ) ; return true ; }
Query the wireless device for information
 about the current connection
Query the wireless device for information about the current connection
// Ignore interfaces in ad-hoc mode