docs and tests for IPv4 address generation