in reply to Quickly determine which IP range an IP belongs to.
If you have lots of ranges, you could group them by mask.
$user_lookup{inet_aton($mask)}{inet_aton($start_addr)} = $user_num; [download]