[torquedev] keeping struct tree

Matti Bickel cat5 at minet.uni-jena.de
Wed May 7 15:35:01 MDT 2008


Hi folks,

one thing that i'm working on currently is the port of the server
portion of torque. The code makes use of a tree structure and associated
functions - which take a u_long parameter which in turn is basically a
ip adress. So now with 128 bit ipv6 adresses, this just doesn't work
anymore. It is simply impossible to compare two struct sockaddr_storage
(which is what i switched to) the way you can compare two u_long, b/c
there's only equality, there's no order defined on structures.

Given the keys that i now work with, i switched the basic structure
around to use struct sockaddr_storage sometime ago. The functions are
very simple and use the compare_ip function, that i wrote for Libnet.

My question now is: should we keep the tree structure around at all?
Yes, it does manage the streams structure, which doesn't rely on ip
adresses as keys. And for that, the current code keeps all the cruft
around. But in the interest of clarity and MUCH less defines and
worries, i'd like to convert this over to use a linear linked list.
Is there any foreseeable compatibility or performance problem with this?

I'd value your input on this,
-- 
Regards, Matti Bickel
Signed/Encrypted email preferred (key 4849EC6C)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torquedev/attachments/20080507/705b60f5/attachment.bin


More information about the torquedev mailing list