If you store them as strings, not bit patterns:
IPv4 addresses consist of four three-digit decimal characters with three separators . , therefore only 15 characters, such as 255.255.255.255 .
IPv6 addresses are eight 4-digit hexadecimal characters with seven delimiters : so it accepts 39 characters, such as 0123:4567:89ab:cdef:0123:4567:89ab:cdef .
paxdiablo Aug 11 '10 at 4:42
source share