* @brief Receives data from a specific address using an unconnected socket. * * This function reads data from a socket and stores it in the specified buffer. It is commonly used * with connectionless protocols (e.g., UDP) to receive data from a specific source address. * * @param s The file descriptor of the socket to receive data from. * @param mem A pointer to the buffer where
| 517 | * @see recv() Receives data on a connected socket. |
| 518 | */ |
| 519 | int recvfrom(int s, void *mem, size_t len, int flags, |
| 520 | struct sockaddr *from, socklen_t *fromlen) |
| 521 | { |
| 522 | int socket = dfs_net_getsocket(s); |
| 523 | |
| 524 | return sal_recvfrom(socket, mem, len, flags, from, fromlen); |
| 525 | } |
| 526 | RTM_EXPORT(recvfrom); |
| 527 | |
| 528 | /** |