author | mickeyl <mickeyl> | 2005-05-16 17:48:03 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-05-16 17:48:03 (UTC) |
commit | d2426de3452342ab4af8e95214b9ff408f30744e (patch) (unidiff) | |
tree | 41eb23ab226a83778112aaf6d14ab3e8fc5dc896 /examples | |
parent | a0276f0957bd503491e8d435b7ad1a6479ce24eb (diff) | |
download | opie-d2426de3452342ab4af8e95214b9ff408f30744e.zip opie-d2426de3452342ab4af8e95214b9ff408f30744e.tar.gz opie-d2426de3452342ab4af8e95214b9ff408f30744e.tar.bz2 |
- add ONetworkInterfaceDriverInfo block extracting info using ethtool ioctls
- adjust example
-rw-r--r-- | examples/opienet/onetworkdemo/onetworkdemo.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/opienet/onetworkdemo/onetworkdemo.cpp b/examples/opienet/onetworkdemo/onetworkdemo.cpp index e0c93a2..b3a1115 100644 --- a/examples/opienet/onetworkdemo/onetworkdemo.cpp +++ b/examples/opienet/onetworkdemo/onetworkdemo.cpp | |||
@@ -39,24 +39,29 @@ using namespace Opie::Net; | |||
39 | 39 | ||
40 | int main( int argc, char** argv ) | 40 | int main( int argc, char** argv ) |
41 | { | 41 | { |
42 | odebug << "OPIE Network Demo" << oendl; | 42 | odebug << "OPIE Network Demo" << oendl; |
43 | 43 | ||
44 | ONetwork* net = ONetwork::instance(); | 44 | ONetwork* net = ONetwork::instance(); |
45 | 45 | ||
46 | ONetwork::InterfaceIterator it = net->iterator(); | 46 | ONetwork::InterfaceIterator it = net->iterator(); |
47 | 47 | ||
48 | while ( it.current() ) | 48 | while ( it.current() ) |
49 | { | 49 | { |
50 | odebug << "DEMO: ONetwork contains Interface '" << it.current()->name() << "'" << oendl; | 50 | odebug << "DEMO: ONetwork contains Interface '" << it.current()->name() << "'" << oendl; |
51 | ONetworkInterfaceDriverInfo info = it.current()->driverInfo(); | ||
52 | odebug << "DEMO: DriverName reported as '" << info.name() << "'" << oendl; | ||
53 | odebug << "DEMO: DriverVersion reported as '" << info.version() << "'" << oendl; | ||
54 | odebug << "DEMO: DriverFirmware reported as '" << info.firmware() << "'" << oendl; | ||
55 | odebug << "DEMO: DriverBus reported as '" << info.bus() << "'" << oendl; | ||
51 | odebug << "DEMO: Datalink code is '" << it.current()->dataLinkType() << "'" << oendl; | 56 | odebug << "DEMO: Datalink code is '" << it.current()->dataLinkType() << "'" << oendl; |
52 | odebug << "DEMO: MAC Address is '" << it.current()->macAddress().toString() << "'" << oendl; | 57 | odebug << "DEMO: MAC Address is '" << it.current()->macAddress().toString() << "'" << oendl; |
53 | odebug << "DEMO: MAC Address is '" << it.current()->macAddress().toString(true) << "'" << oendl; | 58 | odebug << "DEMO: MAC Address is '" << it.current()->macAddress().toString(true) << "'" << oendl; |
54 | odebug << "DEMO: MAC Manufacturer seems to be '" << it.current()->macAddress().manufacturer() << "'" << oendl; | 59 | odebug << "DEMO: MAC Manufacturer seems to be '" << it.current()->macAddress().manufacturer() << "'" << oendl; |
55 | odebug << "DEMO: Manufacturertest1 = '" << OManufacturerDB::instance()->lookupExt( "08:00:87" ) << "'" << oendl; | 60 | odebug << "DEMO: Manufacturertest1 = '" << OManufacturerDB::instance()->lookupExt( "08:00:87" ) << "'" << oendl; |
56 | odebug << "DEMO: Manufacturertest2 = '" << OManufacturerDB::instance()->lookupExt( "E2:0C:0F" ) << "'" << oendl; | 61 | odebug << "DEMO: Manufacturertest2 = '" << OManufacturerDB::instance()->lookupExt( "E2:0C:0F" ) << "'" << oendl; |
57 | odebug << "Demo: IPv4 Address is '" << it.current()->ipV4Address() << "'" << oendl; | 62 | odebug << "Demo: IPv4 Address is '" << it.current()->ipV4Address() << "'" << oendl; |
58 | if ( it.current()->isWireless() ) | 63 | if ( it.current()->isWireless() ) |
59 | { | 64 | { |
60 | OWirelessNetworkInterface* iface = static_cast<OWirelessNetworkInterface*>( it.current() ); | 65 | OWirelessNetworkInterface* iface = static_cast<OWirelessNetworkInterface*>( it.current() ); |
61 | odebug << "DEMO: '" << iface->name() << "' seems to feature the wireless extensions." << oendl; | 66 | odebug << "DEMO: '" << iface->name() << "' seems to feature the wireless extensions." << oendl; |
62 | odebug << "DEMO: Current SSID is '" << iface->SSID() << "'" << oendl; | 67 | odebug << "DEMO: Current SSID is '" << iface->SSID() << "'" << oendl; |