Name

ap_ get_virthost_addr — convert a hostname or port to an address

Synopsis

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.

Get Apache: The Definitive Guide, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.