> I tried harder to change the SLIRP queue stuff to something saner by > hiding the pointer access inside inlined functions. Still when I > changed the 32 bit pointers to native 64 bit (or moved the pointers > outside the packet), qemu crashes. Must be some devilishly hidden > access somewhere. I already fixed one, which involved recycling port > number fields for buffer pointers. IMHO there should be some kind of > corporeal punishments mandated by law for writing this kind of mess. > Maybe it would even be easier to create a new userland IP stack based > on Linux from scratch instead of fixing this. > > I think I'll just commit in the log part, unless there are objections.
IMHO you should add a context in the 'struct socket' structure so that you can avoid adding a context in all the functions manipulating this structure. The same holds for mbuf.
Regards, Fabrice.