Preliminary IPv6 support.

Very little difference between the two. Had to modify more lines for the
test than I had to to implement the function.

TODO - Add more testing for IPv6.
Merge pull request #1 from RyPeck/feature/IPv6

Preliminary IPv6 support.