Function gnunet_sys::GNUNET_STRINGS_to_address_ipv4[][src]

pub unsafe extern "C" fn GNUNET_STRINGS_to_address_ipv4(
    zt_addr: *const c_char,
    addrlen: u16,
    r_buf: *mut sockaddr_in
) -> c_int

Tries to convert @a zt_addr string to an IPv4 address. The string is expected to have the format “1.2.3.4:80”.

@param zt_addr 0-terminated string. May be mangled by the function. @param addrlen length of zt_addr (not counting 0-terminator). @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.