Here is the workaround how to get source ip. (It is adopted part from iputils)



int probe_fd = socket(AF_INET,SOCK_DGRAM,0);
struct sockaddr_in dst;
dst.sin_family = AF_INET;...