title: Good hash function for ip addresses and remote ports
body: <p>I'm writing a peer to peer application and I need a hash function for storing IP/port pairs in a java hashset.  Rather than re-invent the wheel I wondered if there are already solutions out there but google has not yielded much.</p>
  
  <p>Can anyone recommend a hash function for IPv4 (bonus if it works for IPv6 as well!) and a remote port number?</p>
  
  <p>The port number is likely to be the same unless the client is on the same host in which case it will be sequential.</p>