[openbeosnetteam] Re: Next milestones?

  • From: "Marcus Overhagen" <ml@xxxxxxxxxxxx>
  • To: openbeosnetteam@xxxxxxxxxxxxx
  • Date: Wed, 30 Oct 2002 22:42:04 GMT

> Here some milestones I think we should aim now.

> D) Code cleanup

Issues that *need* to be solved:

1) Shared variables:

Some header files had been used to define variables. I think I removed
most of this. But two problems remained. Two variables had been used
in different modules. It appeared as if they were shared, but in fact, every
module had it's own copy. It may be needed to share them by providing a 
access function in the core module. Variables that need to be taken care of:

struct ipstat ipstat
uint32 sb_max
struct in_ifaddr *in_ifaddr; (partitially soved by using core->get_primary_addr)

2) in_ifaddr
The usage and init of ifaddr appears to be broken/unclear.

3) socket_accept()
Looks broken, at least I don't understand what is going on here.

4) wait/signal functions broken
void wakeup(sem_id chan) is definitly broken, the way it is implemented
as a result,
int nsleep(sem_id chan, char *msg, int timeo) might not work as expected.
void sowakeup(struct socket *so, struct sockbuf *sb)
and perhaps other related functions may not work as expected.

5) ugly
ugly macros in socketvar.h should be removed/changed

6 ) Locking:
There is nearly no locking! This can lead to all kinds of various errors.
I noticed that especially the socket and mbuf code have no locks
at all, but many other places might need locking, too.

7) Global variables
There are many global variables. Accessing them must be serialized using
proper locking.

8) Comments 
There are hardly any comments in the code. For example, I have no idea what
the radix.c file is supposed to do at all.

9) thats it.

I'm going back to do some media kit work. Have fun. Perhaps rewriting the
network stack (using C++) is an option, unless somebody understands what
is going on/wrong.


Other related posts: