summaryrefslogtreecommitdiff
path: root/examples/opienet
Side-by-side diff
Diffstat (limited to 'examples/opienet') (more/less context) (ignore whitespace changes)
-rw-r--r--examples/opienet/miniwellenreiter/miniwellenreiter.cpp2
-rw-r--r--examples/opienet/onetworkdemo/onetworkdemo.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/opienet/miniwellenreiter/miniwellenreiter.cpp b/examples/opienet/miniwellenreiter/miniwellenreiter.cpp
index ebd3b5f..ba9d2ca 100644
--- a/examples/opienet/miniwellenreiter/miniwellenreiter.cpp
+++ b/examples/opienet/miniwellenreiter/miniwellenreiter.cpp
@@ -30,49 +30,49 @@ QDict<Station> stations;
//======================== Application class ===============================
class Wellenreiter : public QApplication
{
Q_OBJECT
public:
Wellenreiter( int argc, char** argv ) : QApplication( argc, argv ), channel( 1 )
{
ONetwork* net = ONetwork::instance();
if ( argc < 3 )
{
printf( "Usage: ./%s <interface> <driver> <interval>\n", argv[0] );
printf( "\n" );
printf( "Valid wireless interfaces (detected) are:\n" );
ONetwork::InterfaceIterator it = net->iterator();
while ( it.current() )
{
if ( it.current()->isWireless() )
{
printf( " - '%s' (MAC=%s) (IPv4=%s)\n", (const char*) it.current()->name(),
(const char*) it.current()->macAddress().toString(),
- (const char*) it.current()->ipV4Address() );
+ (const char*) it.current()->ipV4Address().toString() );
}
++it;
}
exit( -1 );
}
printf( "*******************************************************************\n" );
printf( "* Wellenreiter mini edition 1.0.0 (C) 2003 Michael 'Mickey' Lauer *\n" );
printf( "*******************************************************************\n" );
printf( "\n\n" );
QString interface( argv[1] );
QString driver( argv[2] );
printf( "Trying to use '%s' as %s-controlled device...\n", (const char*) interface, (const char*) driver );
// sanity checks before downcasting
ONetworkInterface* iface = net->interface( interface );
if ( !iface )
{
printf( "Interface '%s' doesn't exist. Exiting.\n", (const char*) interface );
exit( -1 );
}
if ( !iface->isWireless() )
diff --git a/examples/opienet/onetworkdemo/onetworkdemo.cpp b/examples/opienet/onetworkdemo/onetworkdemo.cpp
index b3a1115..e8958dc 100644
--- a/examples/opienet/onetworkdemo/onetworkdemo.cpp
+++ b/examples/opienet/onetworkdemo/onetworkdemo.cpp
@@ -38,49 +38,49 @@
using namespace Opie::Net;
int main( int argc, char** argv )
{
odebug << "OPIE Network Demo" << oendl;
ONetwork* net = ONetwork::instance();
ONetwork::InterfaceIterator it = net->iterator();
while ( it.current() )
{
odebug << "DEMO: ONetwork contains Interface '" << it.current()->name() << "'" << oendl;
ONetworkInterfaceDriverInfo info = it.current()->driverInfo();
odebug << "DEMO: DriverName reported as '" << info.name() << "'" << oendl;
odebug << "DEMO: DriverVersion reported as '" << info.version() << "'" << oendl;
odebug << "DEMO: DriverFirmware reported as '" << info.firmware() << "'" << oendl;
odebug << "DEMO: DriverBus reported as '" << info.bus() << "'" << oendl;
odebug << "DEMO: Datalink code is '" << it.current()->dataLinkType() << "'" << oendl;
odebug << "DEMO: MAC Address is '" << it.current()->macAddress().toString() << "'" << oendl;
odebug << "DEMO: MAC Address is '" << it.current()->macAddress().toString(true) << "'" << oendl;
odebug << "DEMO: MAC Manufacturer seems to be '" << it.current()->macAddress().manufacturer() << "'" << oendl;
odebug << "DEMO: Manufacturertest1 = '" << OManufacturerDB::instance()->lookupExt( "08:00:87" ) << "'" << oendl;
odebug << "DEMO: Manufacturertest2 = '" << OManufacturerDB::instance()->lookupExt( "E2:0C:0F" ) << "'" << oendl;
- odebug << "Demo: IPv4 Address is '" << it.current()->ipV4Address() << "'" << oendl;
+ odebug << "Demo: IPv4 Address is '" << it.current()->ipV4Address().toString() << "'" << oendl;
if ( it.current()->isWireless() )
{
OWirelessNetworkInterface* iface = static_cast<OWirelessNetworkInterface*>( it.current() );
odebug << "DEMO: '" << iface->name() << "' seems to feature the wireless extensions." << oendl;
odebug << "DEMO: Current SSID is '" << iface->SSID() << "'" << oendl;
odebug << "DEMO: Antenna is tuned to '" << iface->frequency() << "', that is channel " << iface->channel() << "" << oendl;
//if ( iface->mode() == OWirelessNetworkInterface::adhoc )
//{
//odebug << "DEMO: Associated AP has MAC Address '" << iface->associatedAP().toString() << "'" << oendl;
//}
/*
// nickname
odebug << "DEMO: Current NickName is '" << iface->nickName() << "'" << oendl;
iface->setNickName( "MyNickName" );
if ( iface->nickName() != "MyNickName" )
odebug << "DEMO: Warning! Can't change nickname" << oendl;
else
odebug << "DEMO: Nickname change successful." << oendl;
/*