lwip_gethostbyname_r() function
Thread-safe variant of lwip_gethostbyname: instead of using a static buffer, this function takes buffer and errno pointers as arguments and uses these for the result.
Arguments
name
the hostname to resolve
ret
pre-allocated struct where to store the result
buf
pre-allocated buffer where to store additional data
result
pointer to a hostent pointer that is set to ret on success and set to zero on error
h_errnop
pointer to an int where to store errors (instead of modifying the global h_errno)
Return value
0 on success, non-zero on error, additional error information is stored in *h_errnop instead of h_errno to be thread-safe