If this could be a hashtable lookup rather than a looping construct that would be ideal..though I recognize the reasoning behind this approach, given that incoming addr may not be 1:1 with the key.  Ideal data structure for this use case would be a 'range' tree or something (though its use & associated heft would run against the overall simplicity of LibVMI).