|
|
|
@ -185,7 +185,7 @@ void NetToolsBackend::parseIfconfigOutput()
|
|
|
|
|
TQStringList::Iterator it;
|
|
|
|
|
for ( it = ifList.begin(); it != ifList.end(); ++it )
|
|
|
|
|
{
|
|
|
|
|
int index = ( *it ).tqfind( ' ' );
|
|
|
|
|
int index = ( *it ).find( ' ' );
|
|
|
|
|
if ( index == -1 )
|
|
|
|
|
continue;
|
|
|
|
|
TQString key = ( *it ).left( index );
|
|
|
|
@ -203,7 +203,7 @@ void NetToolsBackend::parseIfconfigOutput()
|
|
|
|
|
TQString key = ifIt.currentKey();
|
|
|
|
|
Interface* interface = ifIt.current();
|
|
|
|
|
|
|
|
|
|
if ( configs.tqfind( key ) == configs.end() )
|
|
|
|
|
if ( configs.find( key ) == configs.end() )
|
|
|
|
|
{
|
|
|
|
|
// The interface does not exist. Meaning the driver
|
|
|
|
|
// isn't loaded and/or the interface has not been created.
|
|
|
|
@ -211,8 +211,8 @@ void NetToolsBackend::parseIfconfigOutput()
|
|
|
|
|
interface->getData().available = false;
|
|
|
|
|
}
|
|
|
|
|
// JJ 2005-07-18: use RUNNING instead of UP to detect whether interface is connected
|
|
|
|
|
else if ( !configs[key].tqcontains( "inet " ) ||
|
|
|
|
|
!configs[key].tqcontains( "RUNNING" ) )
|
|
|
|
|
else if ( !configs[key].contains( "inet " ) ||
|
|
|
|
|
!configs[key].contains( "RUNNING" ) )
|
|
|
|
|
{
|
|
|
|
|
// The interface is up or has an IP assigned but not both
|
|
|
|
|
interface->getData().existing = true;
|
|
|
|
@ -221,7 +221,7 @@ void NetToolsBackend::parseIfconfigOutput()
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// ...determine the type of the interface
|
|
|
|
|
if ( configs[key].tqcontains( "Ethernet" ) )
|
|
|
|
|
if ( configs[key].contains( "Ethernet" ) )
|
|
|
|
|
interface->setType( Interface::ETHERNET );
|
|
|
|
|
else
|
|
|
|
|
interface->setType( Interface::PPP );
|
|
|
|
@ -350,7 +350,7 @@ void NetToolsBackend::parseIwconfigOutput()
|
|
|
|
|
TQStringList::Iterator it;
|
|
|
|
|
for ( it = ifList.begin(); it != ifList.end(); ++it )
|
|
|
|
|
{
|
|
|
|
|
int index = ( *it ).tqfind( ' ' );
|
|
|
|
|
int index = ( *it ).find( ' ' );
|
|
|
|
|
if ( index == -1 )
|
|
|
|
|
continue;
|
|
|
|
|
TQString key = ( *it ).left( index );
|
|
|
|
@ -367,12 +367,12 @@ void NetToolsBackend::parseIwconfigOutput()
|
|
|
|
|
TQString key = ifIt.currentKey();
|
|
|
|
|
Interface* interface = ifIt.current();
|
|
|
|
|
|
|
|
|
|
if ( configs.tqfind( key ) == configs.end() )
|
|
|
|
|
if ( configs.find( key ) == configs.end() )
|
|
|
|
|
{
|
|
|
|
|
// The interface was not found.
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
else if ( configs[key].tqcontains( "no wireless extensions" ) )
|
|
|
|
|
else if ( configs[key].contains( "no wireless extensions" ) )
|
|
|
|
|
{
|
|
|
|
|
// The interface isn't a wireless device.
|
|
|
|
|
interface->getData().wirelessDevice = false;
|
|
|
|
@ -483,7 +483,7 @@ void NetToolsBackend::parseRouteOutput()
|
|
|
|
|
TQString key = ifIt.currentKey();
|
|
|
|
|
Interface* interface = ifIt.current();
|
|
|
|
|
|
|
|
|
|
if ( configs.tqfind( key ) != configs.end() )
|
|
|
|
|
if ( configs.find( key ) != configs.end() )
|
|
|
|
|
{
|
|
|
|
|
// Update the default gateway.
|
|
|
|
|
TQStringList routeParameter = configs[key];
|
|
|
|
|