ap_ get_virthost_addr — convert a hostname or port to an address
unsigned long ap_ get_virthost_addr(const char *hostname, short *ports)
Converts a hostname
of the form
name
[:
port
]
to an IP address in network order, which it returns.
*ports
is filled in with the port number if it is
not NULL
. If name
is
missing or “*”,
INADDR_ANY
is returned. If
port
is missing or
“*”, *ports
is
set to 0
.
If the host has multiple IP addresses, an error message is printed,
and exit()
is called.