* @brief Retrieves the address of the peer connected to a socket. * * This function obtains the address of the peer (remote end) connected to the socket 's'. * It is typically used on connected sockets (e.g., TCP) to retrieve information about the peer. * * @param s The file descriptor of the connected socket. * @param name A pointer to a 'sockaddr' structure that will be filled w
| 206 | * @see getsockname() Retrieves the local address of a socket. |
| 207 | */ |
| 208 | int getpeername(int s, struct sockaddr *name, socklen_t *namelen) |
| 209 | { |
| 210 | int socket = dfs_net_getsocket(s); |
| 211 | |
| 212 | return sal_getpeername(socket, name, namelen); |
| 213 | } |
| 214 | RTM_EXPORT(getpeername); |
| 215 | |
| 216 | /** |
no test coverage detected