AVLDupTree is a set of C subroutines (not C++, so you can use it in drivers) that is useful for indexing a set of key/value pairs, using the key to find a matching value.