Pike v8.0 release 1738

Method NetUtils.string_to_ip()


Method string_to_ip

int string_to_ip(string ips)

Description

Converts a string representation of an IPv4 address into the binary representation.

Parameter ips

The string representation of the address. For convenience this function accepts the notation returned from fd->query_adddress() ("ip port")

Returns

The binary representation of the address, or -1 if the string could not be parsed.