| 796 | } |
| 797 | |
| 798 | int sal_getpeername(int socket, struct sockaddr *name, socklen_t *namelen) |
| 799 | { |
| 800 | struct sal_socket *sock; |
| 801 | struct sal_proto_family *pf; |
| 802 | |
| 803 | /* get the socket object by socket descriptor */ |
| 804 | SAL_SOCKET_OBJ_GET(sock, socket); |
| 805 | |
| 806 | /* check the network interface socket opreation */ |
| 807 | SAL_NETDEV_SOCKETOPS_VALID(sock->netdev, pf, getpeername); |
| 808 | |
| 809 | return pf->skt_ops->getpeername((int)(size_t)sock->user_data, name, namelen); |
| 810 | } |
| 811 | |
| 812 | int sal_getsockname(int socket, struct sockaddr *name, socklen_t *namelen) |
| 813 | { |
no outgoing calls
no test coverage detected