summaryrefslogtreecommitdiffstats
path: root/man3/getprotoent_r.3
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--man3/getprotoent_r.319
1 files changed, 9 insertions, 10 deletions
diff --git a/man3/getprotoent_r.3 b/man3/getprotoent_r.3
index 5028e4f..d802b4c 100644
--- a/man3/getprotoent_r.3
+++ b/man3/getprotoent_r.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH getprotoent_r 3 2023-07-20 "Linux man-pages 6.05.01"
+.TH getprotoent_r 3 2023-10-31 "Linux man-pages 6.7"
.SH NAME
getprotoent_r, getprotobyname_r, getprotobynumber_r \- get
protocol entry (reentrant)
@@ -14,7 +14,7 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <netdb.h>
-.PP
+.P
.BI "int getprotoent_r(struct protoent *restrict " result_buf ,
.BI " char " buf "[restrict ." buflen "], size_t " buflen ,
.BI " struct protoent **restrict " result );
@@ -26,13 +26,13 @@ Standard C library
.BI " struct protoent *restrict " result_buf ,
.BI " char " buf "[restrict ." buflen "], size_t " buflen ,
.BI " struct protoent **restrict " result );
-.PP
+.P
.fi
.RS -4
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.RE
-.PP
+.P
.BR getprotoent_r (),
.BR getprotobyname_r (),
.BR getprotobynumber_r ():
@@ -59,13 +59,13 @@ structure is returned,
and in the function calling signature and return value.
This manual page describes just the differences from
the nonreentrant functions.
-.PP
+.P
Instead of returning a pointer to a statically allocated
.I protoent
structure as the function result,
these functions copy the structure into the location pointed to by
.IR result_buf .
-.PP
+.P
The
.I buf
array is used to store the string fields pointed to by the returned
@@ -83,7 +83,7 @@ and the caller must try again with a larger buffer.
.\" I can find no information on the required/recommended buffer size;
.\" the nonreentrant functions use a 1024 byte buffer.
.\" The 1024 byte value is also what the Solaris man page suggests. -- mtk
-.PP
+.P
If the function call successfully obtains a protocol record, then
.I *result
is set pointing to
@@ -94,7 +94,7 @@ is set to NULL.
.SH RETURN VALUE
On success, these functions return 0.
On error, they return one of the positive error numbers listed in ERRORS.
-.PP
+.P
On error, record not found
.RB ( getprotobyname_r (),
.BR getprotobynumber_r ()),
@@ -130,7 +130,6 @@ T{
.BR getprotobynumber_r ()
T} Thread safety MT-Safe locale
.TE
-.sp 1
.SH VERSIONS
Functions with similar names exist on some other systems,
though typically with different calling signatures.
@@ -150,7 +149,7 @@ fails with the error
.BR ERANGE ,
the program retries with larger buffer sizes.
The following shell session shows a couple of sample runs:
-.PP
+.P
.in +4n
.EX
.RB "$" " ./a.out tcp 1"