]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man3/gethostbyname.3
fanotify_init.2, fanotify.7: Document FAN_REPORT_TID
[thirdparty/man-pages.git] / man3 / gethostbyname.3
index c8c6499762604a037f8496b06353451d40e3add9..5b680e521f0c09f3a9982f98be53e794df3a6ec8 100644 (file)
@@ -35,7 +35,7 @@
 .\" Modified 2002-08-05, Michael Kerrisk
 .\" Modified 2004-10-31, Andries Brouwer
 .\"
-.TH GETHOSTBYNAME 3 2016-03-15 "" "Linux Programmer's Manual"
+.TH GETHOSTBYNAME 3 2017-09-15 "" "Linux Programmer's Manual"
 .SH NAME
 gethostbyname, gethostbyaddr, sethostent, gethostent, endhostent,
 h_errno,
@@ -49,7 +49,7 @@ gethostent_r \- get network host entry
 .B extern int h_errno;
 .PP
 .BI "struct hostent *gethostbyname(const char *" name );
-.PP
+
 .BR "#include <sys/socket.h>" "       /* for AF_INET */"
 .BI "struct hostent *gethostbyaddr(const void *" addr ,
 .BI "                              socklen_t " len ", int " type );
@@ -63,11 +63,9 @@ gethostent_r \- get network host entry
 .BI "const char *hstrerror(int " err );
 .PP
 /* System V/POSIX extension */
-.br
 .B struct hostent *gethostent(void);
 .PP
 /* GNU extensions */
-.br
 .BI "struct hostent *gethostbyname2(const char *" name ", int " af );
 .PP
 .B "int gethostent_r("
@@ -107,7 +105,9 @@ _DEFAULT_SOURCE
 Glibc versions up to and including 2.19:
 _BSD_SOURCE || _SVID_SOURCE
 .RE
-
+.PD
+.PP
+.PD 0
 .BR herror (),
 .BR hstrerror ():
 .RS 4
@@ -121,7 +121,9 @@ _BSD_SOURCE || _SVID_SOURCE
 Before glibc 2.8:
 none
 .RE
-
+.PD
+.PP
+.PD 0
 .BR h_errno :
 .RS 4
 .TP 4
@@ -150,7 +152,7 @@ Applications should use
 and
 .BR gai_strerror (3)
 instead.
-
+.PP
 The
 .BR gethostbyname ()
 function returns a structure of type
@@ -251,13 +253,12 @@ In glibc 2.4 and earlier, the
 keyword was used to control the order of host lookups as defined in
 .IR /etc/host.conf
 .RB ( host.conf (5)).
-
+.PP
 .PP
 The \fIhostent\fP structure is defined in \fI<netdb.h>\fP as follows:
-.sp
+.PP
 .in +4n
-.nf
-.ne 7
+.EX
 struct hostent {
     char  *h_name;            /* official name of host */
     char **h_aliases;         /* alias list */
@@ -266,7 +267,7 @@ struct hostent {
     char **h_addr_list;       /* list of addresses */
 }
 #define h_addr h_addr_list[0] /* for backward compatibility */
-.fi
+.EE
 .in
 .PP
 The members of the \fIhostent\fP structure are:
@@ -394,7 +395,7 @@ T{
 .BR gethostbyname2_r ()
 T}     Thread safety   MT-Safe env locale
 .TE
-
+.sp 1
 In the above table,
 .I hostent
 in
@@ -441,7 +442,7 @@ later calls.
 Copying the
 .I struct hostent
 does not suffice, since it contains pointers; a deep copy is required.
-.LP
+.PP
 In the original BSD implementation the
 .I len
 argument
@@ -465,7 +466,7 @@ POSIX.1-2001 makes it
 which is OK.)
 See also
 .BR accept (2).
-.LP
+.PP
 The BSD prototype for
 .BR gethostbyaddr ()
 uses
@@ -494,7 +495,7 @@ Glibc2 also has a
 that works like
 .BR gethostbyname (),
 but permits to specify the address family to which the address must belong.
-.LP
+.PP
 Glibc2 also has reentrant versions
 .BR gethostent_r (),
 .BR gethostbyaddr_r (),