Try this.
The fifth parameter is the sockaddr.
I'm trying to port an application to IPv6. What is the IPv6 'sendto' function? I'm especially stuck with the 5th parameter of the sendto() function - *to :
int sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen);
Could it be sendmsg() ? I was hoping for sendto6() or something ;-)