bool CLASS::configureInterface( IONetworkInterface * netif ) { IONetworkData * data; if (super::configureInterface(netif) == false) return false; // Get the generic network statistics structure data = netif->getParameter(kIONetworkStatsKey); if (!data || !(fNetStats = (IONetworkStats *) data->getBuffer())) { ERROR_LOG("%s: no network statistics\n", getName()); return false; } bzero(fNetStats, sizeof(*fNetStats)); // Get the Ethernet statistics structure data = netif->getParameter(kIOEthernetStatsKey); if (!data || !(fEtherStats = (IOEthernetStats *) data->getBuffer())) { ERROR_LOG("%s: no Ethernet statistics\n", getName()); return false; } return true; }
bool RTL8139::configureInterface( IONetworkInterface *netif ) { IONetworkData *data; ELG( this, netif, 'cfgI', "RTL8139::configureInterface " ); DEBUG_LOG( "configureInterface() ===>\n" ); if ( false == super::configureInterface( netif ) ) return false; // Get the generic network statistics structure: data = netif->getParameter( kIONetworkStatsKey ); if ( !data || !(netStats = (IONetworkStats*)data->getBuffer()) ) return false; // Get the Ethernet statistics structure: data = netif->getParameter( kIOEthernetStatsKey ); if ( !data || !(etherStats = (IOEthernetStats*)data->getBuffer()) ) return false; DEBUG_LOG( "configureInterface() <===\n" ); return true; }/* end configureInterface */
bool darwin_iwi3945::configureInterface(IONetworkInterface * netif) { IONetworkData * data; IWI_DEBUG("configureInterface\n"); if (super::configureInterface(netif) == false) return false; // Get the generic network statistics structure. data = netif->getParameter(kIONetworkStatsKey); if (!data || !(netStats = (IONetworkStats *)data->getBuffer())) { return false; } // Get the Ethernet statistics structure. data = netif->getParameter(kIOEthernetStatsKey); if (!data || !(etherStats = (IOEthernetStats *)data->getBuffer())) { return false; } return true; }
bool AgereET131x::configureInterface(IONetworkInterface * interface) { IONetworkData * data = NULL; if (super::configureInterface(interface) == false) { return false; } // Get the generic network statistics structure. data = interface->getParameter(kIONetworkStatsKey); if (!data || !(netStats = (IONetworkStats *) data->getBuffer())) { return false; } // Get the Ethernet statistics structure. data = interface->getParameter(kIOEthernetStatsKey); if (!data || !(etherStats = (IOEthernetStats *) data->getBuffer())) { return false; } return true; }
bool AttansicL2Ethernet::configureInterface(IONetworkInterface *netif) { DbgPrint("configureInterface()\n"); IONetworkData *data; if (!BASE::configureInterface(netif)) return false; //Get the generic network statistics structure. data = netif->getParameter(kIONetworkStatsKey); if (!data || !(netStats_ = (IONetworkStats *)data->getBuffer())) { return false; } //Get the Ethernet statistics structure. data = netif->getParameter(kIOEthernetStatsKey); if (!data || !(etherStats_ = (IOEthernetStats *)data->getBuffer())) { return false; } return true; }
bool HoRNDIS::configureInterface(IONetworkInterface *netif) { IONetworkData *nd; if (super::configureInterface(netif) == false) { LOG(V_ERROR, "super failed"); return false; } nd = netif->getNetworkData(kIONetworkStatsKey); if (!nd || !(fpNetStats = (IONetworkStats *)nd->getBuffer())) { LOG(V_ERROR, "network statistics buffer unavailable?"); return false; } return true; }