Hi, I have a lot of student that does not use correctly getsockname in case of dual stack. May be this kind of discussion should be factorized in sockaddr_storage (the historical note particularly). i suppose the same should be done for getpeername I think a safe programming example may be given that accept a socket as stdin and print information on it. Using socat it could be simple to test. maybe forcing ENOTSUPP if *addr > sizeof(sockadd_storage) Regards Bastien