Host Name May Map to Multiple IP AddressesLast reviewed: November 2, 1995Article ID: Q110703 |
The information in this article applies to:
The sockets function gethostname() returns a string that identifies the name of the local host. Each host has only one "official" name, regardless of how many IP addresses it has, but there may be several "aliases" for the host. In TCP/IP, there is not a one-to-one mapping between host name and IP address. The mapping is one-to-many: one host name can have multiple IP addresses. The sockets function getsockname() returns the sockaddr that the socket is bound to.
|
Additional reference words: 3.10 3.50 4.00 95
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |