Overview
Features
Download
Documentation
Community
Add-Ons & Services

NetworkInterface issue

A general discussion forum.

NetworkInterface issue

Postby killerbot » 03 Dec 2009, 13:38

Hi,
I wrote some test code, to enumerate the list of my interfaces of my laptop.
There are 3 (wired : eth0, wireless (wlan0), and the loopback (lo0).

WHen I run the test code, when only the wireless is active (so no wired connection), I get results like this :
Number of network interfaces is : 3
Interface 0
lo : lo
127.0.0.1
255.0.0.0
0.0.0.0

Interface 1
lo : lo
127.0.0.2
255.0.0.0
127.255.255.255

Interface 2
wlan0 : wlan0
192.168.0.103
255.255.255.0
192.168.0.255


Notice how Poco doesn't seem to find 'eth0' as 'eth0'.

Why I plug in the network cable I get :
Number of network interfaces is : 4
Interface 0
lo : lo
127.0.0.1
255.0.0.0
0.0.0.0

Interface 1
lo : lo
127.0.0.2
255.0.0.0
127.255.255.255

Interface 2
wlan0 : wlan0
192.168.0.103
255.255.255.0
192.168.0.255

Interface 3
eth0 : eth0
192.168.0.108
255.255.255.0
192.168.0.255


Is this a bug, or intended behavior. The documentation stipulates for the NetworkInterface::list() method : returns a list with ALL network interfaces on the system.

kind regards
killerbot
 
Posts: 67
Joined: 03 Dec 2009, 12:55

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest