gethost.man
来自「开放源码实时操作系统源码.」· MAN 代码 · 共 27 行
MAN
27 行
NAME
gethostbyname, gethostbyaddr, herror, hstrerror - get network host entry
SYNOPSIS
#include <network.h>
struct hostent *gethostbyname(const char *name);
struct hostent *gethostbyaddr(const char *addr, int len, int type);
void herror(const char *s);
const char * hstrerror(int err);
DESCRIPTION
The gethostbyname() function returns a structure of type
hostent for the given host name. Here name is either a
host name, or an IPv4 address in standard dot notation, or
an IPv6 address in colon (and possibly dot) notation. (See
RFC 1884 for the description of IPv6 addresses.) If name
is an IPv4 or IPv6 address, no lookup is performed and
gethostbyname() simply copies name into the h_name field
and its struct in_addr equivalent into the h_addr_list[0]
field of the returned hostent structure. If name doesn't
end in a dot and the environment variable HOSTALIASES is
set, the alias file pointed to by HOSTALIASES will first
be searched for name. (See hostname(7) for the file for
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?