s A socket descriptor created with the socket() function and bound to the socket name with the bind() function. name A pointer to the buffer in which getsockname() should return the socket name. namelen A pointer to an integer containing the size of the buffer pointed to by name. On return, the integer indicates the actual size, in bytes, of the name returned.