Hey all,

I'd like to use the IP address of a MHD connection in my log file.

I've figured out how to get the IP address by passing a callback function as 
the 3rd argument to MHD_start_daemon and using inet_ntop on the various 
elements of the sockaddr that is passed as the second argument of the callback 
function.

However, I have not figured out a way to get the IP address from the 
MHD_Connection struct used with the other callback functions passed to 
MHD_start_daemon (for example, to the 5th argument (usually named 
answer_to_connection) or to the 8th argument (usually named 
request_completed)).  Is there a way to get the IP from the MHD_Connection?  I 
see that MHD_Connection has an addr field, but I am not sure how to get at this 
as it doesn't seem part of the public API.

Cheers,
MS

Reply via email to