[haiku-development] Re: BNetworkInterface questions

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 09 Feb 2011 19:41:16 +0100

Alexander von Gluck <kallisti5@xxxxxxxxxxx> wrote:
> On Wed, 2011-02-09 at 14:56 +0100, Axel Dörfler wrote:
> > Alexander von Gluck<kallisti5@xxxxxxxxxxx> wrote:
> > > 1) You can't seem to bring up virtual network cards:
> > > /Data/haiku/headers> ifconfig /dev/net/broadcom570x/0:0 up
> > > ifconfig: Setting flags failed: No such file or directory
> > Sure, there is no support for virtual network cards whatsoever.
> > This has nothing
> > to do with BNetworkInterface itself, though, this is what the
> > network stack is
> > doing.
> Wierd.. Haiku lets you create one that works...
> http://pastebin.com/escXeQ8m

Note the missing "up" in the flags. Since there is no device backing up
the interface, you cannot up it, as that is something the device
handles.

You probably can still create those interfaces, as that was once the
basis for the broken alias mechanism. Since this is completely
pointless, I think we should just remove that leftover, and make
creating such an interface fail.

> Lol, just checking if it was a known issue.  I'll look within the
> BNetworkAddress sources to see if I can find the source of the
> problem.

The only known issues in the code of the BNetwork* classes already have
a TODO in the code :-)

> Also, I noticed that the Broadcast address is being calculated
> incorrectly by ifconfig...
>
> /dev/net/broadcom570x/0
>   Hardware type: Ethernet, Address: 00:15:60:c0:17:a5
>   Media type: 100 MBit, 100BASE-TX
>   inet addr: 10.21.16.87, Bcast: 10.255.255.255, Mask: 255.255.254.0

Since 10.* is a class A network, that looks correct to me.

Bye,
   Axel.


Other related posts: