[ds6] Info on address notation

Stefano Guandalini guandalf at ferrara.linux.it
Sun Jul 13 01:17:20 CEST 2003


Sorry if my question is very simple but I am a newby.

I'm taking a look to linux include files to start developing an app that 
supports ipv6. It's a daemon that have to talk to some terminals that check 
entrance in buildings.

I have some doubts with the string notation of addresses; counting the maximum 
lenght that an ipv6 address can be, I think I need a 39 characters string but 
in /usr/include/netinet/in.h I see:

#define INET_ADDRSTRLEN 16
#define INET6_ADDRSTRLEN 46

I suppose that the second value is to declare a char[].

Am I right?
Why 46 chars?

Thank you.

-- 
Stefano Guandalini
the mobile guandalf
GPG fingerprint = C091 CA6C 5D03 9A38 39EE  D17C DF85 0FC7 C3D6 18F5



More information about the ds6 mailing list