Hi Thomas, INET6_ADDRSTRLEN is defined by the underlying OS as 46 bytes (to include trailing '/0' char) - you should be able to verify this by doing a bit of grepping in "/usr/include". Hence the definition of the field as 45 chars in the DB schema.
Cheers, Paolo On Mon, Jun 11, 2012 at 01:45:26PM -0200, Thomas M Steenholdt wrote: > Hello there, > > I'm about to extend the schema on my large sfacct mysql table, to > support IPv6 addresses, but there is a thing that seems strange to me. > > In the README.IPv6 document, it's suggested that for IPv6 support, the > columns keeping IP addresses should be char(45). > > Looking at the default size for IPv4 addresses, it seems like there's no > "overhead" calculated into the size of column, so why is char(45) > suggested instead of char(39) for IPv6 fields? 39 chars should be able > to hold an entire, non-shortened IPv6 address. > > Hope to have some light shed on this - I'm probably just missing > something ;-) > > Thanks in advance. > > /Thomas > > > > _______________________________________________ > pmacct-discussion mailing list > http://www.pmacct.net/#mailinglists _______________________________________________ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
