1@node getpeername
2@section @code{getpeername}
3@findex getpeername
4
5POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9699919799/functions/getpeername.html}
6
7Gnulib module: getpeername
8
9Portability problems fixed by Gnulib:
10@itemize
11@item
12On Windows platforms (excluding Cygwin), error codes from this function
13are not placed in @code{errno}, and @code{WSAGetLastError} must be used
14instead.
15@item
16On HP-UX 11, in 64-bit mode, when the macro @code{_HPUX_ALT_XOPEN_SOCKET_API}
17is not defined, this function behaves incorrectly because it is declared
18to take a pointer to a 64-bit wide @code{socklen_t} entity but in fact
19considers it as a pointer to a 32-bit wide @code{unsigned int} entity.
20@end itemize
21
22Portability problems not fixed by Gnulib:
23@itemize
24@item
25Some platforms don't have a @code{socklen_t} type; in this case this function's
26third argument type is @samp{int *}.
27@end itemize
28