Yes, it's possible to determine the IP address it came from. The IP address is stored in a sockaddr_in struct type whose address you have supplied to recvfrom as a pointer. The IP is in its sin_addr field.
The following code will print the foreign IP address:
printf("%s", inet_ntoa(client.sin_addr)); /* which client is your sockaddr_in struct */
I hope it helps