summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/getprotoent.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/net/getprotoent.3')
-rw-r--r--src/lib/libc/net/getprotoent.328
1 files changed, 21 insertions, 7 deletions
diff --git a/src/lib/libc/net/getprotoent.3 b/src/lib/libc/net/getprotoent.3
index 2497f9f7ca..5ebd03cc45 100644
--- a/src/lib/libc/net/getprotoent.3
+++ b/src/lib/libc/net/getprotoent.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: getprotoent.3,v 1.11 2004/10/17 20:24:23 millert Exp $ 1.\" $OpenBSD: getprotoent.3,v 1.12 2004/10/25 03:09:01 millert Exp $
2.\" 2.\"
3.\" Copyright (c) 1983, 1991, 1993 3.\" Copyright (c) 1983, 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
@@ -46,15 +46,15 @@
46.Fd #include <netdb.h> 46.Fd #include <netdb.h>
47.Ft struct protoent * 47.Ft struct protoent *
48.Fn getprotoent "void" 48.Fn getprotoent "void"
49.Ft struct protoent * 49.Ft int
50.Fn getprotoent_r "struct protoent *protoent" "struct protoent_data *protoent_data" 50.Fn getprotoent_r "struct protoent *protoent" "struct protoent_data *protoent_data"
51.Ft struct protoent * 51.Ft struct protoent *
52.Fn getprotobyname "const char *name" 52.Fn getprotobyname "const char *name"
53.Ft struct protoent * 53.Ft int
54.Fn getprotobyname_r "const char *name" "struct protoent *protoent" "struct protoent_data *protoent_data" 54.Fn getprotobyname_r "const char *name" "struct protoent *protoent" "struct protoent_data *protoent_data"
55.Ft struct protoent * 55.Ft struct protoent *
56.Fn getprotobynumber "int proto" 56.Fn getprotobynumber "int proto"
57.Ft struct protoent * 57.Ft int
58.Fn getprotobynumber_r "int proto" "struct protoent *protoent" "struct protoent_data *protoent_data" 58.Fn getprotobynumber_r "int proto" "struct protoent *protoent" "struct protoent_data *protoent_data"
59.Ft void 59.Ft void
60.Fn setprotoent "int stayopen" 60.Fn setprotoent "int stayopen"
@@ -144,9 +144,23 @@ also take a pointer to a
144.Fa protoent 144.Fa protoent
145structure which is used to store the results of the database lookup. 145structure which is used to store the results of the database lookup.
146.Sh RETURN VALUES 146.Sh RETURN VALUES
147Null pointer (0) returned on 147The
148.Dv EOF 148.Fn getprotoent ,
149or error. 149.Fn getprotobyport ,
150and
151.Fn getprotobyname
152functions return a pointer to a
153.Fa servent
154structure on success or a null pointer if end-of-file
155is reached or an error occurs.
156.Pp
157The
158.Fn getprotoent_r ,
159.Fn getprotobyport_r ,
160and
161.Fn getprotobyname_r
162functions return 0 on success or \-1 if end-of-file
163is reached or an error occurs.
150.Sh FILES 164.Sh FILES
151.Bl -tag -width /etc/protocols -compact 165.Bl -tag -width /etc/protocols -compact
152.It Pa /etc/protocols 166.It Pa /etc/protocols