Function gnunet_sys::GNUNET_STRINGS_to_address_ip[][src]

pub unsafe extern "C" fn GNUNET_STRINGS_to_address_ip(
    addr: *const c_char,
    addrlen: u16,
    r_buf: *mut sockaddr_storage
) -> c_int

Tries to convert @a addr string to an IP (v4 or v6) address. Will automatically decide whether to treat ‘addr’ as v4 or v6 address.

@param addr a string, may not be 0-terminated. @param addrlen number of bytes in @a addr (if addr is 0-terminated, 0-terminator should not be counted towards addrlen). @param r_buf a buffer to fill. @return #GNUNET_OK if conversion succeeded. #GNUNET_SYSERR otherwise, in which case the contents of r_buf are undefined.