+def findMyIPAddr(addrs, intended_port, local_ok = False):
+ """Find the best IP address to use from a list of possibilities.
+
+ @param addrs: the list of possible IP addresses
+ @param intended_port: the port that was supposed to be used
+ @param local_ok: whether known local/private IP ranges are allowed
+ (defaults to False)
+ @return: the preferred IP address, or None if one couldn't be found
+ """