[openbeosnetteam] Userland update

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: "OpenBeOS Net-Team" <openbeosnetteam@xxxxxxxxxxxxx>
  • Date: Thu, 09 May 2002 03:53:52 CEST (+0200)

I've started to get some commands working, but I ran into some problems 
that I forgot to think about earlier (stupid me):

1) ioctl() doesn't get the size of the data buffer in BeOS - it's 
always zero. Hence, it's needed to already know all the commands and 
their buffer lengths at compile time, which isn't too nice (but hey, 
it's working).
Fortunately, BSD ioctls are computed values and contain the length of 
the buffer

2) pointers in buffers passed to ioctl() - we use them a lot, but also 
the BSD code (notably struct ifconf) uses them, and it's some ugly work 
required to copy those buffers first into the shared region.

Apart from that, I got the stack up and running, and I could also ran 
the start_net.sample script to configure my interfaces - but there 
still may be some unresolved problems.
"ifconfig -a" does work fine, though :)

To build the userland stack:
in the driver's directory:
USERLAND=true make install
in the server's directory:
USERLAND=true make

The rest stays the same as in the kernel.

To sum it up, it's far more work than I initially expected (should have 
done my homeworks first), and it's not that nice either, but for 
developing purposes it's working fine - I wouldn't want anyone to 
really use the userland stack in "real life".

BTW: I've moved the net_stack_driver.h file to the driver/ directory.

Adios...
   Axel.



Other related posts: