GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
resolve_hostname(3) FreeBSD Library Functions Manual resolve_hostname(3)

#include <xtend/string.h>
-lxtend

int     resolve_hostname(const char *hostname, char *ip, size_t ip_buff_len)

hostname    Name of the host to be resolved
ip          Character array to receive IP address
ip_buff_len Size of ip array including null byte

Resolve a host name to an IP address.

XT_OK on success, XT_FAIL otherwise

#define IP_MAX_CHARS    64
char    *hostname = "my.site.edu",
        ip[IP_MAX_CHARS + 1];
if ( resolve_hostname(hostname, ip, IP_MAX_CHARS + 1) == XT_OK )
{
}

gethostbyname(3), getaddrinfo(3)


Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.