BSDs provide an implementation of RB trees you could look at it ([/usr/src]/sys/sys/tree.h). BTW I copied it for AFTR (RB tree is the best know ordered balanced tree algo for the AFTR kind of use). Regards Francis Dupont <fdupont at isc.org>