Function nrfxlib_sys::nrf_getaddrinfo[][src]

pub unsafe extern "C" fn nrf_getaddrinfo(
    p_node: *const c_char,
    p_service: *const c_char,
    p_hints: *const nrf_addrinfo,
    pp_res: *mut *mut nrf_addrinfo
) -> c_int

Function to resolve the host name into IPv4 and/or IPv6 addresses.

@note The memory pointed to by * pp_res - must be freed using nrf_freeaddrinfo when the address is no longer needed or before calling nrf_getaddrinfo again.

  • p_node - Host name to resolve.
  • p_service - Service to resolve.
  • p_hints - Any hints to be used for the resolution.
  • pp_res - Pointer to the linked list of resolved addresses if the procedure was successful.

Returns 0 if the procedure succeeds, else, an errno indicating the reason for failure.